[coreboot] patch: dbe62 boots to FILO!
mart.raudsepp at artecdesign.ee
Fri Apr 4 19:35:39 CEST 2008
Ühel kenal päeval, K, 2008-04-02 kell 23:04, kirjutas ron minnich:
> now how do we get a disk to boot? All we have is USB :-)
Actually we have 3.75MB of space to use for kernel and initramfs on the
boot: mem at 0xffc00000,0x140000 initrd=mem at 0xffd40000,0x140000 console=tty0 console=ttyS0,115200 ro
Found Linux version 184.108.40.206 (leio at martr-gentoo) #1 PREEMPT Thu Apr 3 17:41:23 EEST 2008 bzImage.
BusyBox v1.9.1 (2008-04-03 17:34:30 EEST) built-in shell (ash)
In other words, I get a busybox shell from the SVN HEAD code of
coreboot-v3 on DBE62 now! Nice work Ron and co
To get that I had to enable 4MB mode on the dongle with a
in some init code. Picked randomly northbridge/amd/geodelx/geodelxinit.c
northbridge_init_early() as a hack
Then I had to manually add the VSA, as its requirement seems hardcoded
and its addition isn't part of the build in a manner payload.elf is.
And then I merged together a 4MB image from a kernel image, initramfs
image and the firmware, like so:
cp vmlinuz "dongle_image"
dd if=initrd.gz of="dongle_image" bs=4096 seek=320
dd if=firmware.rom of="dongle_image" bs=4096 seek=960 # assumes 256KB firmware image
and wrote that to the dongle.
My payload.elf was a FILO that has
AUTOBOOT_FILE = "mem at 0xffc00000,0x140000 initrd=mem at 0xffd40000,0x140000 console=tty0 console=ttyS0,115200 ro"
This then allows for a 1.25MB kernel and 1.25MB zero padded initramfs
from inside the dongle, adjust numbers as necessary. In particular the
size of initrd could be 0x280000 or offsets shuffled around for a bigger
kernel - I just used those numbers as everything fits nicely that I need
and I don't need to write in too much zeroes for replacing just the
initramfs (kernel chokes if the given size is larger than the actual
initramfs, but is fine if the remaining space is zero padded). The
offsets are chosen from the starting points of the 32 erase blocks
(equally divided amongst the 4MB) so that when overwriting one part, it
doesn't erase the end of the previous content.
The initrd.gz was created from a rootfs directory with
cd "rootfs" && find . | cpio --quiet -o -H newc | gzip -9 >"../initrd.gz"
NAND and network doesn't seem to work at first glance, but nice progress!
CS553x NAND controller: Flash I/O not enabled in MSR_DIVIL_BALL_OPTS.
Artec Design LLC
More information about the coreboot