Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic, RPi, Allwinner: disable initramfs compression, use lz4 for Allwinner #3485

Merged
merged 6 commits into from
May 3, 2019

Conversation

kszaq
Copy link
Contributor

@kszaq kszaq commented May 2, 2019

Quoting kernel config (https://github.com/torvalds/linux/blob/v5.0/usr/Kconfig#L137-L143):

  Do not compress the built-in initramfs at all. This may sound wasteful
  in space, but, you should be aware that the built-in initramfs will be
  compressed at a later stage anyways along with the rest of the kernel,
  on those architectures that support this. However, not compressing the
  initramfs may lead to slightly higher memory consumption during a
  short time at boot, while both the cpio image and the unpacked
  filesystem image will be present in memory simultaneously

We are using bzip2 for Generic and gzip for RPi kernel compression, there is no point to additionally enable initramfs compression.

kszaq added 2 commits May 2, 2019 21:18
Kernel image is already compressed with bzip2,
there is no point in having compressed initramfs
inside a compressed image.

Initramfs compression is discouraged:
https://github.com/torvalds/linux/blob/v5.0/usr/Kconfig#L137-L143
Kernel image is already compressed with gzip,
there is no point in having compressed initramfs
inside a compressed image.

Initramfs compression is discouraged:
https://github.com/torvalds/linux/blob/v5.0/usr/Kconfig#L137-L143
kszaq added 3 commits May 3, 2019 00:17
Kernel image is already compressed with bzip2,
there is no point in having compressed initramfs
inside a compressed image.

Initramfs compression is discouraged:
https://github.com/torvalds/linux/blob/v5.0/usr/Kconfig#L137-L143
@kszaq kszaq changed the title Generic, RPi: disable initrmafs compression Generic, RPi, Allwinner: disable initrmafs compression May 2, 2019
@kszaq
Copy link
Contributor Author

kszaq commented May 2, 2019

Thanks to @jernejsk added:

  • Allwinner/aarch64: compress initramfs with lz4
  • Allwinner/arm: use uncompressed initramfs, compress kernel image with lz4

@kszaq kszaq changed the title Generic, RPi, Allwinner: disable initrmafs compression Generic, RPi, Allwinner: disable initramfs compression May 2, 2019
@kszaq kszaq requested review from MilhouseVH and jernejsk May 3, 2019 11:27
@jernejsk
Copy link
Member

jernejsk commented May 3, 2019

Can you please add lz4:host dependency to kernel package?

It is required to compress kernel image and initramfs.
@kszaq kszaq changed the title Generic, RPi, Allwinner: disable initramfs compression Generic, RPi, Allwinner: disable initramfs compression, use lz4 for Allwinner May 3, 2019
@jernejsk jernejsk merged commit d4325cc into LibreELEC:master May 3, 2019
@kszaq kszaq deleted the initramfs_compression branch May 3, 2019 13:11
@MilhouseVH
Copy link
Contributor

RPi/RPi2/Generic all now drop CONFIG_DECOMPRESS_GZIP=y after this PR - not sure how we missed that! Will update the confs in #3434

DECOMPRESS_GZIP is being selected by:

config RD_GZIP
        bool "Support initial ramdisk/ramfs compressed using gzip"
        depends on BLK_DEV_INITRD
        default y
        select DECOMPRESS_GZIP
        help
          Support loading of a gzip encoded initial ramdisk or cpio buffer.
          If unsure, say Y.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants