diff --git a/config/grub/bootorder b/config/grub/bootorder new file mode 100644 index 0000000..b33e129 --- /dev/null +++ b/config/grub/bootorder @@ -0,0 +1 @@ +/rom@img/grub2 diff --git a/script/build/roms b/script/build/roms index 6558422..7098a9d 100755 --- a/script/build/roms +++ b/script/build/roms @@ -399,8 +399,12 @@ build_grub_roms() newrom="${newrom}${initmode}_${keymap}.rom" x_ moverom "${tmpgrubrom}" "${newrom}" if [ "${payload_seabios_grubonly}" = "y" ]; then - mkSeagrubRom "${tmpgrubrom}" "${newrom}" - mkSeabiosGrubonlyRom "${tmpgrubrom}" "${newrom}" + x_ "$cbfstool" "$tmpgrubrom" add \ + -f "config/grub/bootorder" -n bootorder -t raw + x_ moverom "$tmpgrubrom" "${newrom%.rom}_grubfirst.rom" + x_ "$cbfstool" "$tmpgrubrom" add-int -i 0 \ + -n etc/show-boot-menu + x_ moverom "$tmpgrubrom" "${newrom%.rom}_grubonly.rom" fi x_ rm -f "${tmpgrubrom}" done @@ -429,34 +433,6 @@ mkSeabiosRom() { printf "%s\n" "${tmprom}" } -# SeaGRUB configuration -mkSeagrubRom() -{ - _grubrom="${1}" - _newrom="${2}" - - tmpbootorder=$(mktemp -t coreboot_rom.XXXXXXXXXX) - - # only load grub, by inserting a custom bootorder file - printf "/rom@img/grub2\n" > "$tmpbootorder" || $err "printf bootorder" - x_ "${cbfstool}" "${_grubrom}" \ - add -f "${tmpbootorder}" -n bootorder -t raw - x_ rm -f "${tmpbootorder}" - - x_ moverom "${_grubrom}" "${_newrom%.rom}_grubfirst.rom" -} - -# SeaGRUB, and disable the SeaBIOS menu (grub only) -mkSeabiosGrubonlyRom() -{ - _grubrom="${1}" - _newrom="${2}" - - x_ "${cbfstool}" "${_grubrom}" add-int -i 0 -n etc/show-boot-menu - - x_ moverom "${_grubrom}" "${_newrom%.rom}_grubonly.rom" -} - build_uboot_roms() { tmprom=$(mkUbootRom "${cbrom}" "fallback/payload") || \