build/roms: simplified seagrub handling
Signed-off-by: Leah Rowe <leah@libreboot.org>audit2-merge1
parent
cbf673fc46
commit
96eb7913a5
|
@ -0,0 +1 @@
|
||||||
|
/rom@img/grub2
|
|
@ -399,8 +399,12 @@ build_grub_roms()
|
||||||
newrom="${newrom}${initmode}_${keymap}.rom"
|
newrom="${newrom}${initmode}_${keymap}.rom"
|
||||||
x_ moverom "${tmpgrubrom}" "${newrom}"
|
x_ moverom "${tmpgrubrom}" "${newrom}"
|
||||||
if [ "${payload_seabios_grubonly}" = "y" ]; then
|
if [ "${payload_seabios_grubonly}" = "y" ]; then
|
||||||
mkSeagrubRom "${tmpgrubrom}" "${newrom}"
|
x_ "$cbfstool" "$tmpgrubrom" add \
|
||||||
mkSeabiosGrubonlyRom "${tmpgrubrom}" "${newrom}"
|
-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
|
fi
|
||||||
x_ rm -f "${tmpgrubrom}"
|
x_ rm -f "${tmpgrubrom}"
|
||||||
done
|
done
|
||||||
|
@ -429,34 +433,6 @@ mkSeabiosRom() {
|
||||||
printf "%s\n" "${tmprom}"
|
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()
|
build_uboot_roms()
|
||||||
{
|
{
|
||||||
tmprom=$(mkUbootRom "${cbrom}" "fallback/payload") || \
|
tmprom=$(mkUbootRom "${cbrom}" "fallback/payload") || \
|
||||||
|
|
Loading…
Reference in New Issue