summaryrefslogtreecommitdiffstats
path: root/buildrom-withgrub
diff options
context:
space:
mode:
Diffstat (limited to 'buildrom-withgrub')
-rwxr-xr-xbuildrom-withgrub18
1 files changed, 10 insertions, 8 deletions
diff --git a/buildrom-withgrub b/buildrom-withgrub
index b86bbe9..c5d12d0 100755
--- a/buildrom-withgrub
+++ b/buildrom-withgrub
@@ -38,14 +38,6 @@ cd coreboot
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
rm -rf .config
make clean
@@ -61,12 +53,22 @@ do
# .config no longer needed
rm -rf .config
+ # Build the correct GRUB payload for this type of ROM image
# Generate each type of GRUB configuration for this type of ROM image
for keymap in $(ls ../resources/utilities/grub-assemble/keymap/original)
do
# copy the images based on the keymap
cp "$1"_"$romtype".rom "$1"_"$keymap"_"$romtype".rom
+ # Build the GRUB payload (ELF executable) and add it to the ROM
+ # Has to be done here to get the right keymap for this image.
+ cd ../resources/utilities/grub-assemble
+ ./gen."$romtype".sh $keymap
+ rm -rf ../../../coreboot/grub_"$romtype".elf
+ mv grub_"$romtype".elf ../../../coreboot/
+ cd ../../../coreboot
+ ./util/cbfstool/cbfstool "$1"_"$keymap"_"$romtype".rom add-payload -f grub_"$romtype".elf -n fallback/payload -c lzma
+
# generate the correct grub config
touch grub_"$keymap"_"$romtype".cfg
# generate contents: