aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-11-22 05:25:32 +0000
committerFrancis Rowe <info@gluglug.org.uk>2014-11-22 05:25:32 +0000
commit662c5841bd88979bf772be0c76d3163a5d21b69d (patch)
tree5e68f0aeb2c57a5f3007d5f65f5bb7fc993e599b
parentb8a8ee8b1b99e3c3c36261a548e509a1e3fa58bf (diff)
downloadlibrebootfr-662c5841bd88979bf772be0c76d3163a5d21b69d.tar.gz
librebootfr-662c5841bd88979bf772be0c76d3163a5d21b69d.zip
Only build 2 GRUB payload executables, re-use on all boards.
This should speed up the build process a bit.
-rwxr-xr-xbuild17
-rwxr-xr-xbuildrom-withgrub10
-rwxr-xr-xresources/utilities/grub-assemble/gen.txtmode.sh2
-rwxr-xr-xresources/utilities/grub-assemble/gen.vesafb.sh2
4 files changed, 21 insertions, 10 deletions
diff --git a/build b/build
index 2844ef5c..3866d757 100755
--- a/build
+++ b/build
@@ -26,11 +26,28 @@ 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:
+cd coreboot/
+for romtype in txtmode vesafb
+do
+ cd ../resources/utilities/grub-assemble
+ ./gen."$romtype".sh
+ rm -rf ../../../coreboot/grub_"$romtype".elf
+ mv grub_"$romtype".elf ../../../coreboot/
+ cd ../../../coreboot
+done
+cd ../
+
# Build ROM images for supported boards
for board in x60 t60 x60t macbook21
do
./buildrom-withgrub $board
done
+# The GRUB payloads are no longer needed
+rm -rf coreboot/grub_vesafb.rom
+rm -rf coreboot/grub_txtmode.rom
+
# ------------------- DONE ----------------------
diff --git a/buildrom-withgrub b/buildrom-withgrub
index ac1888f8..99af39f9 100755
--- a/buildrom-withgrub
+++ b/buildrom-withgrub
@@ -41,18 +41,12 @@ sed 's/# CONFIG_FRAMEBUFFER_KEEP_VESA_MODE is not set/CONFIG_FRAMEBUFFER_KEEP_VE
for romtype in txtmode vesafb
do
- # Build the GRUB payload (ELF executable)
- # and add it to coreboot directory:
- cd ../resources/utilities/grub-assemble
- ./gen."$romtype".sh
- rm -rf ../../../coreboot/grub.elf
- mv grub.elf ../../../coreboot/
- cd ../../../coreboot
-
# Build coreboot ROM image
make clean
mv config_"$romtype" .config
+ mv grub_"$romtype".elf grub.elf
make
+ mv grub.elf grub_"$romtype".elf
mv build/coreboot.rom "$1"_"$romtype".rom
# .config no longer needed
rm -rf .config
diff --git a/resources/utilities/grub-assemble/gen.txtmode.sh b/resources/utilities/grub-assemble/gen.txtmode.sh
index 72746389..d9e69f8e 100755
--- a/resources/utilities/grub-assemble/gen.txtmode.sh
+++ b/resources/utilities/grub-assemble/gen.txtmode.sh
@@ -21,7 +21,7 @@ grub_modules="acpi ahci at_keyboard boot cat cbfs cbls cbtime chain cmosdump cmo
$grubdir/grub-mkstandalone \
--grub-mkimage=$grubdir/grub-mkimage \
-O i386-coreboot \
- -o grub.elf \
+ -o grub_txtmode.elf \
-d $grubdir/grub-core/ \
--fonts= --themes= --locales= \
--modules="$grub_modules" \
diff --git a/resources/utilities/grub-assemble/gen.vesafb.sh b/resources/utilities/grub-assemble/gen.vesafb.sh
index 9d2935e8..97de823e 100755
--- a/resources/utilities/grub-assemble/gen.vesafb.sh
+++ b/resources/utilities/grub-assemble/gen.vesafb.sh
@@ -21,7 +21,7 @@ grub_modules="acpi ahci at_keyboard boot cat cbfs cbls cbtime chain cmosdump cmo
$grubdir/grub-mkstandalone \
--grub-mkimage=$grubdir/grub-mkimage \
-O i386-coreboot \
- -o grub.elf \
+ -o grub_vesafb.elf \
-d $grubdir/grub-core/ \
--fonts= --themes= --locales= \
--modules="$grub_modules" \