mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
bzip2/lzma: make internal initramfs compression configurable
Impact: Avoids silent environment dependency Make builtin initramfs compression an explicit configurable. The previous version would pick a compression based on the binaries which were installed on the system, which could lead to unexpected results. It is now explicitly configured, and not having the appropriate binaries installed on the build host is simply an error. Signed-off-by: Alain Knaff <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
This commit is contained in:
parent
ab59d3b70f
commit
ab76f3d771
2 changed files with 68 additions and 12 deletions
18
usr/Makefile
18
usr/Makefile
|
|
@ -5,24 +5,18 @@
|
|||
klibcdirs:;
|
||||
PHONY += klibcdirs
|
||||
|
||||
# Find out "preferred" ramdisk compressor. Order of preference is
|
||||
# 1. bzip2 efficient, and likely to be present
|
||||
# 2. gzip former default
|
||||
# 3. lzma
|
||||
# 4. none
|
||||
|
||||
# None of the above
|
||||
suffix_y =
|
||||
|
||||
# Lzma, but no gzip nor bzip2
|
||||
suffix_$(CONFIG_RD_LZMA) = .lzma
|
||||
# No compression
|
||||
suffix_$(CONFIG_INITRAMFS_COMPRESSION_NONE) =
|
||||
|
||||
# Gzip, but no bzip2
|
||||
suffix_$(CONFIG_RD_GZIP) = .gz
|
||||
suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP) = .gz
|
||||
|
||||
# Bzip2
|
||||
suffix_$(CONFIG_RD_BZIP2) = .bz2
|
||||
suffix_$(CONFIG_INITRAMFS_COMPRESSION_BZIP2) = .bz2
|
||||
|
||||
# Lzma
|
||||
suffix_$(CONFIG_INITRAMFS_COMPRESSION_LZMA) = .lzma
|
||||
|
||||
# Generate builtin.o based on initramfs_data.o
|
||||
obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data$(suffix_y).o
|
||||
|
|
|
|||
Loading…
Reference in a new issue