From 4623f3f2b204a5946ee26176beaa911b427cc0c2 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 27 Aug 2023 22:09:06 +0100 Subject: Remove superfluous GRUB modules (save CBFS space) With this change, about 54KB of compressed space is saved inside of CBFS, on setups that use the GRUB payload. The uncompressed saving is about 720KB, but payloads are compressed inside each coreboot image, so the compressed saving is much smaller. That 54KB saving means a lot, especially on small (1MB or smaller) flash sizes. The following modules were removed: adler32, afsplitter, aout, archelp, backtrace, blocklist, bswap_test, cat, cmdline_cat_test, cmosdump, cmostest, cmp, cmp_test, cpuid, cs5536, ctz_test, date, datehook, datetime, disk, diskfilter, div, div_test, dm_nv, efiemu, eval, exfctest, extcmd, file, fshelp, functional_test, gdb, gettext, gptsync, hashsum, hdparm, hello, hfspluscomp, http, json, json, ldm, loadenv, macbless, macho, mda_text, morse, mpi, msdospart, mul_test, net, ntfscomp, offsetio, part_acorn, part_amiga, part_apple, part_dvh, part_plan, part_sun, part_sunpc, parttool, pbkdf2, pbkdf2_test, pci, play, priority_queue, probe, progress, random, rdmsr, read, relocator, setjmp, setjmp_test, shift_test, signature_test, sleep, sleep_test, smbios, strtoull_test, terminal, terminfo, test_blockarg, testload, testspeed, tftp, tga, time, tr, trig, usbtest, video_bochs, video_cirrus, videoinfo, videotest, videotest_checksum, wrmsr, xnu_uuid, xnu_uuid_test These were retained, but moved to modules instead of install modules: geli, udf, ufs1, ufs1_be, ufs2 Signed-off-by: Leah Rowe --- resources/grub/modules.list | 109 ++------------------------------------------ script/build/grub/utils | 2 +- 2 files changed, 6 insertions(+), 105 deletions(-) diff --git a/resources/grub/modules.list b/resources/grub/modules.list index d75b65db..ec9172f1 100644 --- a/resources/grub/modules.list +++ b/resources/grub/modules.list @@ -1,82 +1,26 @@ # Install modules (installed, but not automatically loaded) grub_install_modules=" \ -adler32 \ -backtrace \ bfs \ -bswap_test \ -cmdline_cat_test \ -cmp_test \ -cpuid \ -ctz_test \ -div \ -div_test \ -dm_nv \ -exfctest \ -functional_test \ -gdb \ -geli \ -gettext \ -hello \ hexdump \ hfs \ hfsplus \ -hfspluscomp \ -http \ jfs \ -macbless \ -macho \ -mda_text \ minix \ minix2 \ minix2_be \ minix3 \ minix3_be \ minix_be \ -morse \ -mpi \ -mul_test \ -net \ newc \ nilfs2 \ odc \ -offsetio \ -part_acorn \ -part_amiga \ -part_apple \ -part_dvh \ -part_plan \ -part_sun \ -part_sunpc \ -pbkdf2_test \ -rdmsr \ reiserfs \ -setjmp_test \ -shift_test \ -signature_test \ -sleep_test \ -strtoull_test \ -test_blockarg \ -testload \ -testspeed \ -tftp \ -ufs1 \ -ufs1_be \ -ufs2 \ usbserial_common \ usbserial_ftdi \ usbserial_pl2303 \ usbserial_usbdebug \ -usbtest \ -video_bochs \ -video_cirrus \ video_colors \ -videoinfo \ -videotest \ -videotest_checksum \ -wrmsr \ xnu \ -xnu_uuid \ -xnu_uuid_test \ " # Modules (and always loaded) @@ -84,52 +28,33 @@ grub_modules=" \ acpi \ affs \ afs \ -afsplitter \ ahci \ -aout \ at_keyboard \ all_video \ -archelp \ ata \ bitmap \ bitmap_scale \ -blocklist \ boot \ bsd \ btrfs \ -cat \ cbfs \ cbls \ cbmemc \ cbtime \ chain \ -cmosdump \ -cmostest \ -cmp \ configfile \ cpio \ cpio_be \ crc64 \ crypto \ cryptodisk \ -cs5536 \ -date \ -datehook \ -datetime \ -disk \ -diskfilter \ echo \ -efiemu \ ehci \ -eval \ elf \ -extcmd \ exfat \ ext2 \ f2fs \ fat \ -file \ -fshelp \ gcry_arcfour \ gcry_blowfish \ gcry_camellia \ @@ -152,26 +77,20 @@ gcry_sha512 \ gcry_tiger \ gcry_twofish \ gcry_whirlpool \ +geli \ gfxmenu \ gfxterm_background \ gfxterm_menu \ -gptsync \ gzio \ halt \ -hashsum \ -hdparm \ help \ iorw \ iso9660 \ -json \ jpeg \ -json \ keylayouts \ keystatus \ -ldm \ linux \ linux16 \ -loadenv \ loopback \ ls \ lsacpi \ @@ -189,39 +108,27 @@ memdisk \ memrw \ minicmd \ mmap \ -msdospart \ multiboot \ multiboot2 \ nativedisk \ normal \ ntfs \ -ntfscomp \ ohci \ part_bsd \ part_dfly \ part_gpt \ part_msdos \ -parttool \ password \ password_pbkdf2 \ pata \ -pbkdf2 \ -pci \ pcidump \ pgp \ -play \ png \ -priority_queue \ -probe \ procfs \ -progress \ raid5rec \ raid6rec \ -random \ -read \ reboot \ regexp \ -relocator \ romfs \ scsi \ search \ @@ -230,24 +137,18 @@ search_fs_uuid \ search_label \ serial \ syslinuxcfg \ -setjmp \ setpci \ -sleep \ -smbios \ spkmodem \ squash4 \ sfs \ tar \ -terminal \ -terminfo \ test \ -time \ -tga \ true \ -tr \ -trig \ -udf \ uhci \ +udf \ +ufs1 \ +ufs1_be \ +ufs2 \ usb \ usb_keyboard \ usbms \ diff --git a/script/build/grub/utils b/script/build/grub/utils index f0449ed7..3a282f2e 100755 --- a/script/build/grub/utils +++ b/script/build/grub/utils @@ -44,7 +44,7 @@ build_grub() err "build_grub: autogen.sh" ./configure --with-platform=coreboot || \ err "build_grub: autoconf" - make -j$(nproc) || \ + make -j$(nproc) FS_PAYLOAD_MODULES="" || \ err "build_grub: make" ) } -- cgit v1.2.1