From 0036d6e15f9f8935507c0c30391254b4a46d35b6 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Sat, 22 Nov 2014 01:02:41 -0500 Subject: build: Only generate the GRUB configurations once Should speed up the build process a little bit. --- (limited to 'build') diff --git a/build b/build index 3bd92d9..00e6c37 100755 --- a/build +++ b/build @@ -1,7 +1,7 @@ #!/bin/bash # -# build script: builds the ROM images and puts them in ./bin/ +# build script: builds the ROM images with GRUB payloads and puts them in ./bin/ # # Copyright (C) 2014 Francis Rowe # @@ -26,8 +26,8 @@ set -u -e -v # MAKE SURE THAT YOU RAN "buildall" OR "builddeps" *AT LEAST ONCE* # BEFORE RUNNING THIS! -# Build the GRUB payloads (ELF executable) -# and add them to the coreboot directory: +# Put GRUB payloads and config files +# in the coreboot directory, ready for next step cd coreboot/ for romtype in txtmode vesafb do @@ -36,6 +36,18 @@ do rm -rf ../../../coreboot/grub_"$romtype".elf mv grub_"$romtype".elf ../../../coreboot/ cd ../../../coreboot + + # GRUB configuration files + for keymap in $(ls ../resources/utilities/grub-assemble/keymap/original) + do + cat ../resources/grub/config/extra/common.cfg > grub_"$keymap"_"$romtype".cfg + cat ../resources/grub/config/extra/"$romtype".cfg >> grub_"$keymap"_"$romtype".cfg + echo "keymap $keymap" >> grub_"$keymap"_"$romtype".cfg + cat ../resources/grub/config/menuentries/common.cfg >> grub_"$keymap"_"$romtype".cfg + cat ../resources/grub/config/menuentries/"$romtype".cfg >> grub_"$keymap"_"$romtype".cfg + # grubtest.cfg should be able to switch back to grub.cfg + sed 's/grubtest.cfg/grub.cfg/' < grub_"$keymap"_"$romtype".cfg > grub_"$keymap"_"$romtype"_test.cfg + done done cd ../ @@ -48,6 +60,8 @@ done # The GRUB payloads are no longer needed rm -rf coreboot/grub_vesafb.elf rm -rf coreboot/grub_txtmode.elf +# The GRUB configs are no longer needed +rm -rf coreboot/grub*cfg # ------------------- DONE ---------------------- -- cgit v0.9.1