Dear Wen,
welcome to coreboot!
Am Donnerstag, den 22.01.2015, 23:34 -0500 schrieb Wen Wang:
Has anybody tried to launch GRUB2 by SeaBIOS as a payload (not grub2 on MBR)? I am hoping to see grub2 on SeaBIOS boot menu.
Yes, I did. You can press F12 (or the configured key) and select the GRUB 2 payload. Also make sure to enable support for payloads in SeaBIOS Kconfig menu.
I followed the coreboot wiki page to compile grub2: git clone git://git.savannah.gnu.org/grub.git grub cd grub ./autogen.sh ./configure --with-platform=coreboot make
At this point it is not clear to me how to create grub2.elf and what the role of memdisk is. I would appreciate it if somebody could clarify the steps.
You can look at `payloads/external/GRUB2/Makefile.inc` in coreboot’s source to see how it is built when selected as payload in the Kconfig system.
The following additional steps should get you going.
$ make default_payload.elf
Then go to the coreboot directory. Add a symlink to the built GRUB payload file and add it compressed to the file `img/grub.lzma` in the CBFS (coreboot file system) of your coreboot firmware image using `cbfstool`.
$ ln -s path/to/default_payload.elf grub2.elf $ build/cbfstool build/coreboot.rom add-payload -f grub2.elf -n img/grub.lzma -c lzma
Add the GRUB configuration file to `etc/grub.cfg` in the CBFS of your coreboot firmware image.
$ build/cbfstool build/coreboot.rom add -f /boot/grub/grub.cfg -n etc/grub.cfg -t raw
Then write the image to the flash ROM chip.
If it works for you, it’d be great if you added it to the Wiki.
Thanks,
Paul