From 1a4829c92dde3bde267530fdb28ce5265355568b Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Fri, 21 Nov 2014 14:57:46 -0500 Subject: Revert "buildrom-withgrub: Only include 1 keymap file in GRUB memdisk." This reverts commit 3e1712768172e53ed02da96e1bb392edaa219de7. --- diff --git a/buildrom-withgrub b/buildrom-withgrub index c5d12d0..b86bbe9 100755 --- a/buildrom-withgrub +++ b/buildrom-withgrub @@ -38,6 +38,14 @@ 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 @@ -53,22 +61,12 @@ 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: diff --git a/docs/git/index.html b/docs/git/index.html index dc3d64c..a2596c3 100644 --- a/docs/git/index.html +++ b/docs/git/index.html @@ -258,7 +258,7 @@
  • Generic Drivers / Digitizer = Autodetect
  • Console / Send console output to a CBMEM buffer = enable
  • -
  • Payload / Add a payload = None (You must add the payload manually. Libreboot's build script 'buildrom-withgrub' does this)
  • +
  • Payload / Add a payload = An ELF executable payload
  • Payload / Payload path and filename = grub.elf
  • @@ -304,7 +304,7 @@

  • Generic Drivers / Digitizer = Present
  • Console / Send console output to a CBMEM buffer = enable
  • -
  • Payload / Add a payload = None (You must add the payload manually. Libreboot's build script 'buildrom-withgrub' does this)
  • +
  • Payload / Add a payload = An ELF executable payload
  • Payload / Payload path and filename = grub.elf
  • @@ -345,7 +345,7 @@

  • Console / Send console output to a CBMEM buffer = enable
  • -
  • Payload / Add a payload = None (You must add the payload manually. Libreboot's build script 'buildrom-withgrub' does this)
  • +
  • Payload / Add a payload = An ELF executable payload
  • Payload / Payload path and filename = grub.elf
  • @@ -387,7 +387,7 @@

  • Console / Send console output to a CBMEM buffer = enable
  • -
  • Payload / Add a payload = None (You must add the payload manually. Libreboot's build script 'buildrom-withgrub' does this)
  • +
  • Payload / Add a payload = An ELF executable payload
  • Payload / Payload path and filename = grub.elf
  • diff --git a/resources/libreboot/config/macbook21/config b/resources/libreboot/config/macbook21/config index 65a947c..f443f49 100644 --- a/resources/libreboot/config/macbook21/config +++ b/resources/libreboot/config/macbook21/config @@ -417,8 +417,8 @@ CONFIG_GENERATE_SMBIOS_TABLES=y # # Payload # -CONFIG_PAYLOAD_NONE=y -# CONFIG_PAYLOAD_ELF is not set +# CONFIG_PAYLOAD_NONE is not set +CONFIG_PAYLOAD_ELF=y # CONFIG_PAYLOAD_LINUX is not set # CONFIG_PAYLOAD_SEABIOS is not set # CONFIG_PAYLOAD_FILO is not set @@ -426,6 +426,8 @@ CONFIG_PAYLOAD_NONE=y # CONFIG_PAYLOAD_TIANOCORE is not set # CONFIG_SEABIOS_THREAD_OPTIONROMS is not set # CONFIG_SEABIOS_VGA_COREBOOT is not set +CONFIG_PAYLOAD_FILE="grub.elf" +CONFIG_COMPRESSED_PAYLOAD_LZMA=y # # Debugging diff --git a/resources/libreboot/config/t60/config b/resources/libreboot/config/t60/config index 967e912..d2c1c68 100644 --- a/resources/libreboot/config/t60/config +++ b/resources/libreboot/config/t60/config @@ -431,8 +431,8 @@ CONFIG_GENERATE_SMBIOS_TABLES=y # # Payload # -CONFIG_PAYLOAD_NONE=y -# CONFIG_PAYLOAD_ELF is not set +# CONFIG_PAYLOAD_NONE is not set +CONFIG_PAYLOAD_ELF=y # CONFIG_PAYLOAD_LINUX is not set # CONFIG_PAYLOAD_SEABIOS is not set # CONFIG_PAYLOAD_FILO is not set @@ -440,6 +440,8 @@ CONFIG_PAYLOAD_NONE=y # CONFIG_PAYLOAD_TIANOCORE is not set # CONFIG_SEABIOS_THREAD_OPTIONROMS is not set # CONFIG_SEABIOS_VGA_COREBOOT is not set +CONFIG_PAYLOAD_FILE="grub.elf" +CONFIG_COMPRESSED_PAYLOAD_LZMA=y # # Debugging diff --git a/resources/libreboot/config/x60/config b/resources/libreboot/config/x60/config index 5646622..1757aeb 100644 --- a/resources/libreboot/config/x60/config +++ b/resources/libreboot/config/x60/config @@ -434,8 +434,8 @@ CONFIG_GENERATE_SMBIOS_TABLES=y # # Payload # -CONFIG_PAYLOAD_NONE=y -# CONFIG_PAYLOAD_ELF is not set +# CONFIG_PAYLOAD_NONE is not set +CONFIG_PAYLOAD_ELF=y # CONFIG_PAYLOAD_LINUX is not set # CONFIG_PAYLOAD_SEABIOS is not set # CONFIG_PAYLOAD_FILO is not set @@ -443,6 +443,8 @@ CONFIG_PAYLOAD_NONE=y # CONFIG_PAYLOAD_TIANOCORE is not set # CONFIG_SEABIOS_THREAD_OPTIONROMS is not set # CONFIG_SEABIOS_VGA_COREBOOT is not set +CONFIG_PAYLOAD_FILE="grub.elf" +CONFIG_COMPRESSED_PAYLOAD_LZMA=y # # Debugging diff --git a/resources/libreboot/config/x60t/config b/resources/libreboot/config/x60t/config index 0fe2b17..e5b6f19 100644 --- a/resources/libreboot/config/x60t/config +++ b/resources/libreboot/config/x60t/config @@ -434,8 +434,8 @@ CONFIG_GENERATE_SMBIOS_TABLES=y # # Payload # -CONFIG_PAYLOAD_NONE=y -# CONFIG_PAYLOAD_ELF is not set +# CONFIG_PAYLOAD_NONE is not set +CONFIG_PAYLOAD_ELF=y # CONFIG_PAYLOAD_LINUX is not set # CONFIG_PAYLOAD_SEABIOS is not set # CONFIG_PAYLOAD_FILO is not set @@ -443,6 +443,8 @@ CONFIG_PAYLOAD_NONE=y # CONFIG_PAYLOAD_TIANOCORE is not set # CONFIG_SEABIOS_THREAD_OPTIONROMS is not set # CONFIG_SEABIOS_VGA_COREBOOT is not set +CONFIG_PAYLOAD_FILE="grub.elf" +CONFIG_COMPRESSED_PAYLOAD_LZMA=y # # Debugging diff --git a/resources/utilities/grub-assemble/gen.txtmode.sh b/resources/utilities/grub-assemble/gen.txtmode.sh index b6eba6b..cfe7482 100755 --- a/resources/utilities/grub-assemble/gen.txtmode.sh +++ b/resources/utilities/grub-assemble/gen.txtmode.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, @@ -6,29 +6,24 @@ set -u -e -v -if (( $# != 1 )); then - echo "Usage: ./gen.txtmode.sh nameofkeymap" - exit 1 -fi -if [ ! -f ./keymap/"$1".gkb ]; then - echo "resources/utilities/grub-assemble/keymap/$1.gkb not found" - exit 1 -fi -if [ ! -f ./keymap/original/"$1" ]; then - echo "resources/utilities/grub-assemble/keymap/original/$1 not found" - exit 1 -fi +# TODO: Fail (and clean up) if GRUB isn't actually built. Error checking. # This is where GRUB is expected to be (outside of the grub-assemble, instead in main checkout) grubdir="../../../grub" -source ./modules.conf +# Install modules (installed, but not automatically loaded) +grub_install_modules="adler32 all_video archelp ata backtrace bitmap bitmap_scale cmp cpio_be cpio cpuid crc64 cs5536 div_test efiemu elf eval exfat extcmd file fshelp gettext gfxmenu gptsync gzio hashsum hexdump http linux16 loadenv lzopio mda_text mmap mpi msdospart multiboot2 multiboot nativedisk net newc ntfscomp ntfs odc offsetio parttool priority_queue procfs progress read relocator scsi search_fs_file search_fs_uuid search_label search setjmp setpci sleep squash4 tar terminfo testload testspeed tftp time trig tr true udf ufs1_be ufs1 ufs2 usbserial_common usbserial_ftdi usbserial_pl2303 usbserial_usbdebug usbtest video_colors videotest_checksum xzio" + +# Modules (and always loaded) +grub_modules="acpi ahci at_keyboard boot cat cbfs cbls cbtime chain cmosdump cmostest cbmemc crypto cryptodisk configfile datehook date datetime diskfilter disk echo ext2 ehci fat halt help iorw iso9660 keystatus linux loopback ls lsacpi lsmmap lspci luks lvm memdisk minicmd memrw morse normal ohci part_gpt part_msdos password password_pbkdf2 pbkdf2 pcidump pci play probe reboot serial terminal test usb_keyboard usbms uhci gcry_arcfour gcry_blowfish gcry_camellia gcry_cast5 gcry_crc gcry_des gcry_dsa gcry_idea gcry_md4 gcry_md5 gcry_rfc2268 gcry_rijndael gcry_rmd160 gcry_rsa gcry_seed gcry_serpent gcry_sha1 gcry_sha256 gcry_sha512 gcry_tiger gcry_twofish gcry_whirlpool hdparm regexp spkmodem syslinuxcfg usb verify videoinfo videotest xfs btrfs zfs sfs romfs reiserfs nilfs2 minix_be minix3_be minix3 minix2_be minix2 minix jfs hfsplus hfs bfs afs affs gfxmenu gfxterm_background gfxterm_menu jpeg png tga pata" + +pwd # Generate the grub.elf $grubdir/grub-mkstandalone \ --grub-mkimage=$grubdir/grub-mkimage \ -O i386-coreboot \ - -o grub_txtmode.elf \ + -o grub.elf \ -d $grubdir/grub-core/ \ --fonts= --themes= --locales= \ --modules="$grub_modules" \ @@ -36,5 +31,5 @@ $grubdir/grub-mkstandalone \ /boot/grub/grub.cfg="../../../resources/grub/config/grub_memdisk.cfg" \ /memtest="../../../memtest86+-5.01/memtest" \ /invaders.exec="../../../grubinvaders/invaders.exec" \ - /boot/grub/layouts/"$1".gkb=keymap/"$1".gkb \ + $(./grub_memdisk_keymap) \ diff --git a/resources/utilities/grub-assemble/gen.vesafb.sh b/resources/utilities/grub-assemble/gen.vesafb.sh index d38d5d3..1c0b593 100755 --- a/resources/utilities/grub-assemble/gen.vesafb.sh +++ b/resources/utilities/grub-assemble/gen.vesafb.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, @@ -6,29 +6,22 @@ set -u -e -v -if (( $# != 1 )); then - echo "Usage: ./gen.vesafb.sh nameofkeymap" - exit 1 -fi -if [ ! -f ./keymap/"$1".gkb ]; then - echo "resources/utilities/grub-assemble/keymap/$1.gkb not found" - exit 1 -fi -if [ ! -f ./keymap/original/"$1" ]; then - echo "resources/utilities/grub-assemble/keymap/original/$1 not found" - exit 1 -fi +# TODO: Fail (and clean up) if GRUB isn't actually built. Error checking. # This is where GRUB is expected to be (outside of the grub-assemble, instead in main checkout) grubdir="../../../grub" -source ./modules.conf +# Install modules (installed, but not automatically loaded) +grub_install_modules="adler32 all_video archelp ata backtrace bitmap bitmap_scale cmp cpio_be cpio cpuid crc64 cs5536 div_test efiemu elf eval exfat extcmd file fshelp gettext gfxmenu gptsync gzio hashsum hexdump http linux16 loadenv lzopio mda_text mmap mpi msdospart multiboot2 multiboot nativedisk net newc ntfscomp ntfs odc offsetio parttool priority_queue procfs progress read relocator scsi search_fs_file search_fs_uuid search_label search setjmp setpci sleep squash4 tar terminfo testload testspeed tftp time trig tr true udf ufs1_be ufs1 ufs2 usbserial_common usbserial_ftdi usbserial_pl2303 usbserial_usbdebug usbtest video_colors videotest_checksum xzio" + +# Modules (and always loaded) +grub_modules="acpi ahci at_keyboard boot cat cbfs cbls cbtime chain cmosdump cmostest cbmemc crypto cryptodisk configfile datehook date datetime diskfilter disk echo ext2 ehci fat halt help iorw iso9660 keystatus linux loopback ls lsacpi lsmmap lspci luks lvm memdisk minicmd memrw morse normal ohci part_gpt part_msdos password password_pbkdf2 pbkdf2 pcidump pci play probe reboot serial terminal test usb_keyboard usbms uhci gcry_arcfour gcry_blowfish gcry_camellia gcry_cast5 gcry_crc gcry_des gcry_dsa gcry_idea gcry_md4 gcry_md5 gcry_rfc2268 gcry_rijndael gcry_rmd160 gcry_rsa gcry_seed gcry_serpent gcry_sha1 gcry_sha256 gcry_sha512 gcry_tiger gcry_twofish gcry_whirlpool hdparm regexp spkmodem syslinuxcfg usb verify videoinfo videotest xfs btrfs zfs sfs romfs reiserfs nilfs2 minix_be minix3_be minix3 minix2_be minix2 minix jfs hfsplus hfs bfs afs affs gfxmenu gfxterm_background gfxterm_menu jpeg png tga pata" # Generate the grub.elf $grubdir/grub-mkstandalone \ --grub-mkimage=$grubdir/grub-mkimage \ -O i386-coreboot \ - -o grub_vesafb.elf \ + -o grub.elf \ -d $grubdir/grub-core/ \ --fonts= --themes= --locales= \ --modules="$grub_modules" \ @@ -36,5 +29,4 @@ $grubdir/grub-mkstandalone \ /boot/grub/grub.cfg="../../../resources/grub/config/grub_memdisk.cfg" \ /background.jpg="../../../resources/grub/background/background.jpg" \ /dejavusansmono.pf2="../../../resources/grub/font/dejavusansmono.pf2" \ - /boot/grub/layouts/"$1".gkb=keymap/"$1".gkb \ - + $(./grub_memdisk_keymap) \ diff --git a/resources/utilities/grub-assemble/grub_memdisk_keymap b/resources/utilities/grub-assemble/grub_memdisk_keymap new file mode 100755 index 0000000..2ef0113 --- /dev/null +++ b/resources/utilities/grub-assemble/grub_memdisk_keymap @@ -0,0 +1,27 @@ +#!/bin/bash + +# +# lists keymaps +# +# Copyright (C) 2014 Francis Rowe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +set -u -e -v + +for keymap in $(ls keymap/original) +do + printf "/boot/grub/layouts/$keymap.gkb=keymap/$keymap.gkb " +done diff --git a/resources/utilities/grub-assemble/modules.conf b/resources/utilities/grub-assemble/modules.conf deleted file mode 100644 index 718d4c4..0000000 --- a/resources/utilities/grub-assemble/modules.conf +++ /dev/null @@ -1,200 +0,0 @@ -grub_install_modules=" \ -adler32 \ -all_video \ -archelp \ -ata \ -backtrace \ -bitmap \ -bitmap_scale \ -cmp \ -cpio_be \ -cpio \ -cpuid \ -crc64 \ -cs5536 \ -div_test \ -efiemu \ -elf \ -eval \ -exfat \ -extcmd \ -file \ -fshelp \ -gettext \ -gfxmenu \ -gptsync \ -gzio \ -hashsum \ -hexdump \ -http \ -linux16 \ -loadenv \ -lzopio \ -mda_text \ -mmap \ -mpi \ -msdospart \ -multiboot2 \ -multiboot \ -nativedisk \ -net \ -newc \ -ntfscomp \ -ntfs \ -odc \ -offsetio \ -parttool \ -priority_queue \ -procfs \ -progress \ -read \ -relocator \ -scsi \ -search_fs_file \ -search_fs_uuid \ -search_label \ -search \ -setjmp \ -setpci \ -sleep \ -squash4 \ -tar \ -terminfo \ -testload \ -testspeed \ -tftp \ -time \ -trig \ -tr \ -true \ -udf \ -ufs1_be \ -ufs1 \ -ufs2 \ -usbserial_common \ -usbserial_ftdi \ -usbserial_pl2303 \ -usbserial_usbdebug \ -usbtest \ -video_colors \ -videotest_checksum \ -xzio \ -" - -grub_modules=" \ -acpi \ -ahci \ -at_keyboard \ -boot \ -cat \ -cbfs \ -cbls \ -cbtime \ -chain \ -cmosdump \ -cmostest \ -cbmemc \ -crypto \ -cryptodisk \ -configfile \ -datehook \ -date \ -datetime \ -diskfilter \ -disk \ -echo \ -ext2 \ -ehci \ -fat \ -halt \ -help \ -iorw \ -iso9660 \ -keystatus \ -linux \ -loopback \ -ls \ -lsacpi \ -lsmmap \ -lspci \ -luks \ -lvm \ -memdisk \ -minicmd \ -memrw \ -morse \ -normal \ -ohci \ -part_gpt \ -part_msdos \ -password \ -password_pbkdf2 \ -pbkdf2 \ -pcidump \ -pci \ -play \ -probe \ -reboot \ -serial \ -terminal \ -test \ -usb_keyboard \ -usbms \ -uhci \ -gcry_arcfour \ -gcry_blowfish \ -gcry_camellia \ -gcry_cast5 \ -gcry_crc \ -gcry_des \ -gcry_dsa \ -gcry_idea \ -gcry_md4 \ -gcry_md5 \ -gcry_rfc2268 \ -gcry_rijndael \ -gcry_rmd160 \ -gcry_rsa \ -gcry_seed \ -gcry_serpent \ -gcry_sha1 \ -gcry_sha256 \ -gcry_sha512 \ -gcry_tiger \ -gcry_twofish \ -gcry_whirlpool \ -hdparm \ -regexp \ -spkmodem \ -syslinuxcfg \ -usb \ -verify \ -videoinfo \ -videotest \ -xfs \ -btrfs \ -zfs \ -sfs \ -romfs \ -reiserfs \ -nilfs2 \ -minix_be \ -minix3_be \ -minix3 \ -minix2_be \ -minix2 \ -minix \ -jfs \ -hfsplus \ -hfs \ -bfs \ -afs \ -affs \ -gfxmenu \ -gfxterm_background \ -gfxterm_menu \ -jpeg \ -png \ -tga \ -pata \ -" -- cgit v0.9.1