summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-11-22 01:02:41 (EST)
committer Francis Rowe <info@gluglug.org.uk>2014-11-22 01:02:41 (EST)
commit0036d6e15f9f8935507c0c30391254b4a46d35b6 (patch)
tree7eecdaf00e47054a68feb976ea2904c4450d691b /build
parent0155d52d7b926faea9412a8f75ae7063d7865a42 (diff)
downloadlibreboot-0036d6e15f9f8935507c0c30391254b4a46d35b6.zip
libreboot-0036d6e15f9f8935507c0c30391254b4a46d35b6.tar.gz
libreboot-0036d6e15f9f8935507c0c30391254b4a46d35b6.tar.bz2
build: Only generate the GRUB configurations once
Should speed up the build process a little bit.
Diffstat (limited to 'build')
-rwxr-xr-xbuild20
1 files changed, 17 insertions, 3 deletions
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 <info@gluglug.org.uk>
#
@@ -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 ----------------------