From 3e1712768172e53ed02da96e1bb392edaa219de7 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Fri, 21 Nov 2014 04:40:35 -0500 Subject: 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. --- (limited to 'buildrom-withgrub') 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: -- cgit v0.9.1