User:Fchmmr

From coreboot
Revision as of 22:41, 5 December 2013 by Fchmmr (talk | contribs)
Jump to navigation Jump to search

For X60

thanks go to GNUtoo, PaulePanter, patrickg, phcoder and others, for all your help so far.

Compile GNUtoo's fork of coreboot with:

- GRUB2 payload
- native graphics (replacement for VGA option ROM / Video BIOS / VBIOS)

Note: the upstream coreboot has a Kconfig option for grub2. i didn't use that. here i compiled grub2 payload manually... (upstream coreboot isn't used. we are using gnutoo's fork)

This version also removes the nonfree microcode.

I have tested this on an X60s 170237G.

GNUtoo uses this on an X60.

I hope to test it on more machines also.


git clone git://gitorious.org/gnutoo-for-coreboot/build-makefiles.git

(get the grub config, etc)

that is where i got the grub.cfg from.

rename it to grub.custom.cfg and put it in the root of the grub source code directory

(see below)

note: i'm not using this. i adapted my own.

(at the time of writing, here is my grub.cfg, renamed to grub.custom.cfg: http://paste.debian.net/69573/ )


git clone git://gitorious.org/gnutoo-for-coreboot/coreboot.git

cd coreboot

git checkout 6ec9b1637b4e75de0ae4e2de258f72a7811aafbf

(the checkout gets gnutoo's patches to remove microcode, etc)

the .config (included in this post), put it in the coreboot directory. I got it from here, which GNUtoo uploaded: http://paste.debian.net/68794

Now coreboot is there, with the right config.

Now need to compile grub2


come out of coreboot:

cd ..

do that:

git clone git://git.savannah.gnu.org/grub.git

cd grub

./autogen.sh

./configure --with-platform=coreboot

make


Now we need to create a grub elf file as the payload:

note: in grub source root directory, make a grub.custom.cfg with your grub config text inside


do that command:

./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o grub2-X60.elf --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos xfs ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=grub.custom.cfg


test grub2-X60.elf in a coreboot.rom compiled for qemu first (not covered in this guide).

assuming that it works, continue on...


ok,

just put grub2-X60.elf (it will be in the root of the grub source directory) in coreboot directory.

in make menuconfig, change the path to say grub2-X60.elf

then:

make


and now a coreboot.rom is in ./build/


if you are flashing this for the first time on a machine that has the factory bios, then using the

coreboot.rom just follow the wiki insturctions, especially with regards to the dd commands and the bucts commands


most important:

- cd build
- dd if=coreboot.rom of=top64k.bin bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x10000] count=64k
- dd if=coreboot.rom bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k | hexdump
- dd if=top64k.bin of=coreboot.rom bs=1 seek=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k conv=notrunc


flash the resulting coreboot.rom like you normally would.

(with the dd commands you should also be able to use the flashing procedure from factory BIOS, but I haven't tested that. yet)


see below:


---

.config (put it in root coreboot source directory) is like this: download that text, save it as .config and put it in coreboot source directory (you need it) http://paste.debian.net/68794