diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2022-04-29 21:22:24 -0400 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2022-04-29 21:22:24 -0400 |
commit | e5a5b64c61de0b687b465fb19d8f0208df7cc14e (patch) | |
tree | 00d8967a3cf7506e37d969e484a200b68c63b2c8 /linux/patches/initramfs.c.patch | |
parent | 700a1b10b3a9d021b6a02d0f837ddfde52578634 (diff) |
add complete build system
Diffstat (limited to 'linux/patches/initramfs.c.patch')
-rw-r--r-- | linux/patches/initramfs.c.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/linux/patches/initramfs.c.patch b/linux/patches/initramfs.c.patch new file mode 100644 index 0000000..dc8a304 --- /dev/null +++ b/linux/patches/initramfs.c.patch @@ -0,0 +1,45 @@ +--- init/initramfs.c.new 2022-04-21 10:43:58.644900319 -0400 ++++ init/initramfs.c 2022-04-21 10:46:57.309758246 -0400 +@@ -461,7 +461,7 @@ + + #include <linux/decompress/generic.h> + +-static char * __init unpack_to_rootfs(char *buf, unsigned long len) ++static char * __init do_unpack_to_rootfs(char *buf, unsigned long len, char *output) + { + long written; + decompress_fn decompress; +@@ -497,7 +497,7 @@ + decompress = decompress_method(buf, len, &compress_name); + pr_debug("Detected %s compressed data\n", compress_name); + if (decompress) { +- int res = decompress(buf, len, NULL, flush_buffer, NULL, ++ int res = decompress(buf, len, NULL, flush_buffer, output, + &my_inptr, error); + if (res) + error("decompressor failed"); +@@ -523,6 +523,11 @@ + return message; + } + ++static char * __init unpack_to_rootfs(char *buf, unsigned long len) ++{ ++ return do_unpack_to_rootfs(buf, len, NULL); ++} ++ + static int __initdata do_retain_initrd; + + static int __init retain_initrd_param(char *str) +@@ -683,7 +688,11 @@ + else + printk(KERN_INFO "Unpacking initramfs...\n"); + +- err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start); ++ //err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start); ++ void *output = vmalloc(0x80000); ++ err = do_unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start, output); ++ vfree(output); ++ + if (err) { + #ifdef CONFIG_BLK_DEV_RAM + populate_initrd_image(err); |