diff options
author | Francis Rowe <info@gluglug.org.uk> | 2014-11-21 04:40:35 (EST) |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2014-11-21 04:40:35 (EST) |
commit | 3e1712768172e53ed02da96e1bb392edaa219de7 (patch) | |
tree | dbfc2ec9b37b430aaa232fa1e4453d75e0b3a111 /buildrom-withgrub | |
parent | 862987344403417057deb453dd73887799cb0fcb (diff) | |
download | libreboot-3e1712768172e53ed02da96e1bb392edaa219de7.zip libreboot-3e1712768172e53ed02da96e1bb392edaa219de7.tar.gz libreboot-3e1712768172e53ed02da96e1bb392edaa219de7.tar.bz2 |
buildrom-withgrub: Only include 1 keymap file in GRUB memdisk.
This is to reduce the size of the image. To accomplish this,
the payload in each coreboot configuration was set to 'None',
after which the buildrom-withgrub script was modified to
build a new grub.elf for each image. This is fast, since
building the grub.elf only takes less than a second. The
alternative was to build a new coreboot ROM per keymap,
which would have been slow.
Other files were also modified along with this, check
the diff to see everything.
Diffstat (limited to 'buildrom-withgrub')
-rwxr-xr-x | buildrom-withgrub | 18 |
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: |