diff options
| -rw-r--r-- | Makefile | 16 | ||||
| -rw-r--r-- | init/do_mounts_rd.c | 5 |
2 files changed, 21 insertions, 0 deletions
| @@ -720,6 +720,22 @@ mod_strip_cmd = true | |||
| 720 | endif # INSTALL_MOD_STRIP | 720 | endif # INSTALL_MOD_STRIP |
| 721 | export mod_strip_cmd | 721 | export mod_strip_cmd |
| 722 | 722 | ||
| 723 | # Select initial ramdisk compression format, default is gzip(1). | ||
| 724 | # This shall be used by the dracut(8) tool while creating an initramfs image. | ||
| 725 | # | ||
| 726 | INITRD_COMPRESS=gzip | ||
| 727 | ifeq ($(CONFIG_RD_BZIP2), y) | ||
| 728 | INITRD_COMPRESS=bzip2 | ||
| 729 | else ifeq ($(CONFIG_RD_LZMA), y) | ||
| 730 | INITRD_COMPRESS=lzma | ||
| 731 | else ifeq ($(CONFIG_RD_XZ), y) | ||
| 732 | INITRD_COMPRESS=xz | ||
| 733 | else ifeq ($(CONFIG_RD_LZO), y) | ||
| 734 | INITRD_COMPRESS=lzo | ||
| 735 | else ifeq ($(CONFIG_RD_LZ4), y) | ||
| 736 | INITRD_COMPRESS=lz4 | ||
| 737 | endif | ||
| 738 | export INITRD_COMPRESS | ||
| 723 | 739 | ||
| 724 | ifdef CONFIG_MODULE_SIG_ALL | 740 | ifdef CONFIG_MODULE_SIG_ALL |
| 725 | MODSECKEY = ./signing_key.priv | 741 | MODSECKEY = ./signing_key.priv |
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index 143e98de6f29..7c098ac9068a 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c | |||
| @@ -57,6 +57,11 @@ static int __init crd_load(int in_fd, int out_fd, decompress_fn deco); | |||
| 57 | * cramfs | 57 | * cramfs |
| 58 | * squashfs | 58 | * squashfs |
| 59 | * gzip | 59 | * gzip |
| 60 | * bzip2 | ||
| 61 | * lzma | ||
| 62 | * xz | ||
| 63 | * lzo | ||
| 64 | * lz4 | ||
| 60 | */ | 65 | */ |
| 61 | static int __init | 66 | static int __init |
| 62 | identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor) | 67 | identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor) |
