You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.4 KiB
Diff
46 lines
1.4 KiB
Diff
--- 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);
|