diff options
author | Leah Woods <info@minifree.org> | 2016-05-21 06:27:11 (EDT) |
---|---|---|
committer | Leah Woods <info@minifree.org> | 2016-05-21 06:27:11 (EDT) |
commit | 2e58042c9cdd9a57603646f02e5694e441310d63 (patch) | |
tree | 7003f9c1916db6ee94b33203e56a8e81aec8ed4c /resources/scripts/helpers | |
parent | 2717e0ce9a34c664a198bb6b64174d13baae0cb6 (diff) | |
download | libreboot-2e58042c9cdd9a57603646f02e5694e441310d63.zip libreboot-2e58042c9cdd9a57603646f02e5694e441310d63.tar.gz libreboot-2e58042c9cdd9a57603646f02e5694e441310d63.tar.bz2 |
Only use SeaGRUB on i945, KCMA-D8 and KGPE-D16
Diffstat (limited to 'resources/scripts/helpers')
-rwxr-xr-x | resources/scripts/helpers/build/roms/withgrub_helper | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/resources/scripts/helpers/build/roms/withgrub_helper b/resources/scripts/helpers/build/roms/withgrub_helper index 1f2d32b..c2cbc73 100755 --- a/resources/scripts/helpers/build/roms/withgrub_helper +++ b/resources/scripts/helpers/build/roms/withgrub_helper @@ -109,6 +109,13 @@ do make clean mv "config_${romtype}" ".config" cp "../../grub_${romtype}.elf" "grub.elf" + if [ "${boardtarget}" = "macbook21" ] || [ "${boardtarget}" = "x60" ] || [ "${boardtarget}" = "t60" ] || [ "${boardtarget}" = "kcma-d8" ] || [ "${boardtarget}" = "kgpe-d16" ]; then + # Use SeaGRUB + cp "../../../seabios/out/bios.bin.elf" "payload.elf" + else + # Use GRUB + cp grub.elf payload.elf + fi cp "../../../seabios/out/bios.bin.elf" "payload.elf" make -j${cores} mv "build/coreboot.rom" "${boardtarget}_${romtype}.rom" @@ -116,23 +123,29 @@ do # We dont need seabios.elf anymore rm -f "payload.elf" - # Add the grub.elf to CBFS - ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add-payload -c lzma -f grub.elf -n img/grub2 - # we dont need that grub.elf now - rm -f "grub.elf" + if [ "${boardtarget}" = "macbook21" ] || [ "${boardtarget}" = "x60" ] || [ "${boardtarget}" = "t60" ] || [ "${boardtarget}" = "kcma-d8" ] || [ "${boardtarget}" = "kgpe-d16" ]; then + # These systems use SeaGRUB, which requires additional files: + + # Add the grub.elf to CBFS + ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add-payload -c lzma -f grub.elf -n img/grub2 + + # Set bootorder so that seabios loads grub by default + printf "/rom@img/grub2\n" > bootorder + ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add -f bootorder -n bootorder -t raw + rm -f bootorder - # Set bootorder so that seabios loads grub by default - printf "/rom@img/grub2\n" > bootorder - ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add -f bootorder -n bootorder -t raw - rm -f bootorder + # Add 0s delay to seabios, so that the user is not burdened by seeing + # that horrible interface that seabios has + ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add-int -i 0 -n etc/show-boot-menu || "already exists" - # Add 0s delay to seabios, so that the user is not burdened by seeing - # that horrible interface that seabios has - ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add-int -i 0 -n etc/show-boot-menu || "already exists" + # keyboard spinup timeout + ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" remove -n etc/ps2-keyboard-spinup || printf "does not exist" + ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add-int -i 3000 -n etc/ps2-keyboard-spinup || printf "already exists" - # keyboard spinup timeout - ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" remove -n etc/ps2-keyboard-spinup || printf "does not exist" - ./util/cbfstool/cbfstool "${boardtarget}_${romtype}.rom" add-int -i 3000 -n etc/ps2-keyboard-spinup || printf "already exists" + fi + + # we dont need that grub.elf now + rm -f "grub.elf" # .config no longer needed rm -f ".config" |