[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Makefile: Allow to set file systems modules for default_payload.
From: |
Paul Menzel |
Subject: |
[PATCH] Makefile: Allow to set file systems modules for default_payload.elf |
Date: |
Wed, 6 Mar 2019 16:14:49 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Date: Wed, 6 Mar 2019 13:46:05 +0100
By default all file system modules are added to the GRUB coreboot
payload `default_payload.elf`. This makes the image quite big,
especially as often not all modules are needed.
Introduce the variable `FS_PAYLOAD_MODULES`, which can be used to
explicitly set file systems modules to be added.
$ make default_payload.elf
test -f default_payload.elf && rm default_payload.elf || true
pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O
i386-coreboot -o default_payload.elf --modules='ahci pata ehci uhci ohci
usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug
cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw
iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi
chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu affs
afs bfs btrfs cbfs cpio cpio_be exfat ext2 f2fs fat hfs hfsplus iso9660 jfs
minix minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc procfs
reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs password_pbkdf2 '
--fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=./coreboot.cfg
$ ls -l default_payload.elf
-rw-rw---- 1 joey joey 1199568 Mar 6 13:58 default_payload.elf
$ make default_payload.elf FS_PAYLOAD_MODULES=ext2
test -f default_payload.elf && rm default_payload.elf || true
pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O
i386-coreboot -o default_payload.elf --modules='ahci pata ehci uhci ohci
usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug
cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw
iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi
chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu ext2
password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/
/boot/grub/grub.cfg=./coreboot.cfg
$ ls -l default_payload.elf
-rw-rw---- 1 joey joey 843728 Mar 6 15:20 default_payload.elf
So, the resulting payload size is around 360 kB smaller. (Adding it to
the CBFS, it will be compressed, so the effective size difference will
be smaller.)
Signed-off-by: Paul Menzel <address@hidden>
---
Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 94296a37e..1f4bb9b8c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -422,9 +422,10 @@ BOOTCHECK_TIMEOUT=180
bootcheck: $(BOOTCHECKS)
if COND_i386_coreboot
+FS_PAYLOAD_MODULES ?= $(shell cat grub-core/fs.lst)
default_payload.elf: grub-mkstandalone grub-mkimage FORCE
test -f $@ && rm $@ || true
- pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O
i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms
part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs'
--install-modules='ls linux search configfile normal cbtime cbls memrw iorw
minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain
test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu $(shell cat
grub-core/fs.lst) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes=
--locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
+ pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O
i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms
part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs'
--install-modules='ls linux search configfile normal cbtime cbls memrw iorw
minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain
test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu
$(FS_PAYLOAD_MODULES) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts=
--themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
endif
endif
--
2.21.0
smime.p7s
Description: S/MIME Cryptographic Signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Makefile: Allow to set file systems modules for default_payload.elf,
Paul Menzel <=