From c44194873aab639424a812b62b69c7325fec9aec Mon Sep 17 00:00:00 2001 From: Chris Zhong Date: Tue, 31 Oct 2017 17:07:04 +0800 Subject: [PATCH] HACK: get ramdisk correct size with rk bootloader RK bootloader does not put a correct size to cmdline, hack the initramfs, directly return when we get a good initrd. Change-Id: Ia1199a1c47f1c0789268971c9f2c9b55bf81ca05 Signed-off-by: Chris Zhong --- init/initramfs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init/initramfs.c b/init/initramfs.c index b2cb82ba54c5..3cccb9d51196 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -491,6 +491,11 @@ static char * __init unpack_to_rootfs(char *buf, unsigned long len) error("junk in compressed archive"); if (state != Reset) error("junk in compressed archive"); + #ifdef CONFIG_ARCH_ROCKCHIP + else + break; + #endif + this_header = saved_offset + my_inptr; buf += my_inptr; len -= my_inptr;