diff options
author | Leah Rowe <leah@libreboot.org> | 2024-01-01 17:47:43 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-01-01 17:47:43 +0000 |
commit | fcf2b2bb05a5ea232d9a835b92c808de4d21c108 (patch) | |
tree | ec2599ccac5ec1981eebd84039188d2b48441b05 /script/build/roms | |
parent | 535c9007fdc3b81fc045fa194e68030ebe86a58e (diff) |
build/roms: simplify grub dependency check
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/build/roms')
-rwxr-xr-x | script/build/roms | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/script/build/roms b/script/build/roms index 35373594..3f90d33b 100755 --- a/script/build/roms +++ b/script/build/roms @@ -132,7 +132,7 @@ configure_dependencies() [ "${payload_memtest}" != "y" ] || [ -f "src/${memtest_bin}" ] || \ x_ ./update trees -b memtest86plus - for bt in dependency_seabios dependency_grub dependency_uboot target; do + for bt in dependency_seabios grub_payload dependency_uboot target; do eval "build_${bt}" done } @@ -148,43 +148,23 @@ build_dependency_seabios() x_ ./update trees -b seabios } -build_dependency_grub() +build_grub_payload() { [ "$payload_grub" != "y" ] && [ "$payload_seabios_withgrub" != "y" ] \ && [ "${payload_seabios_grubonly}" != "y" ] && return 0 - rebuild_grub="n" - [ -f "${grubelf}" ] || rebuild_grub="y" for keymapfile in "${kmapdir}"/*.gkb; do [ -f "${keymapfile}" ] || continue keymaps="${keymaps} ${keymapfile}" keymap="${keymapfile##*/}" keymap="${keymap%.gkb}" - [ ! -f "elf/grub/keymap_${keymap}.cfg" ] && \ - rebuild_grub="y" + [ -f "elf/grub/keymap_$keymap.cfg" ] || printf "keymap %s\n" \ + "$keymap" > "elf/grub/keymap_$keymap.cfg" || err "!key"; : done [ -n "${_keyboard}" ] && keymaps="${kmapdir}/${_keyboard}.gkb" - [ "$rebuild_grub" = "y" ] || return 0 - x_ ./update trees -b grub - remkdir elf/grub - build_keymap_configs - build_grub_payload -} + [ -f "src/grub/grub-mkstandalone" ] || x_ ./update trees -b grub -build_keymap_configs() -{ - for keylayoutfile in "${grubcfgsdir}/keymap/"*.gkb; do - [ -f "${keylayoutfile}" ] || continue - keymap="${keylayoutfile##"${grubcfgsdir}/keymap/"}" - keymap="${keymap%.gkb}" - printf "keymap %s\n" "${keymap}" > \ - "elf/grub/keymap_${keymap}.cfg" || err "!insert keymap" - done -} - -build_grub_payload() -{ ./src/grub/grub-mkstandalone \ --grub-mkimage="src/grub/grub-mkimage" \ -O i386-coreboot \ |