diff options
author | Aaron Ball <nullspoon@oper.io> | 2023-03-05 11:07:22 -0700 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2023-03-05 11:07:22 -0700 |
commit | 3c4a728f6d23bce2b2f7a523b01c6b88f3ced2f9 (patch) | |
tree | b50c165bd0ca5ed537fae3020d97090da7747027 | |
parent | 6139e69fcf7160fee2baa9493e452842121c6350 (diff) | |
download | mkinitramfs-3c4a728f6d23bce2b2f7a523b01c6b88f3ced2f9.tar.gz mkinitramfs-3c4a728f6d23bce2b2f7a523b01c6b88f3ced2f9.tar.xz |
mkinitramfs:Reduce terminfo and kernel modules
This reduces the terminfo directory, which is currently over 40 MB
uncompressed, to just copy in the `l` directory, as the bootup tty is a
`linux` terminal, so we only need terminfo for that.
This also adds additional removals from the kernel device drivers
directory for modules that are not required during the boot process.
-rwxr-xr-x | mkinitramfs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mkinitramfs b/mkinitramfs index 70802a2..d38111d 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -131,9 +131,9 @@ function cache_dir_setup { mkdir -p ${cache}/${i} done - # Copy in terminals database - mkdir -p "${cache}/usr/share" - cp -r /usr/share/terminfo "${cache}/usr/share/terminfo" + # Copy in terminals database for `l` (linux - stock tty) + mkdir -p "${cache}/usr/share/terminfo" + cp -r /usr/share/terminfo/l "${cache}/usr/share/terminfo/l" } @@ -154,7 +154,7 @@ function check_crypto_support { cp -vr "/lib/modules/${version}/" "${cache}/lib/modules/${version}" # Strip out kernel modules not required for bootstrapping - for i in virt net sound drivers/gpu drivers/bluetooth drivers/video; do + for i in virt sound drivers/{bluetooth,gpu,hid,media,mmc,net,video,virtio}; do buf="${cache}/lib/modules/${version}/kernel/${i}" if [ -d "${buf}" ]; then printf 'Stripping %s from initramfs\n' "${buf}" |