init: Introduce config ROCKCHIP_ONE_INITRD

This feature is conflict with Android 11 which has the generic ramdisk
and the vendor ramdisk.

Fixes: c44194873a ("HACK: get ramdisk correct size with rk bootloader")
Change-Id: I4d158862398973f3ca205fbbbaa48022c2903936
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
Tao Huang 2020-09-27 11:17:09 +08:00
parent acf4d3c4f9
commit 78c27ecb0c
2 changed files with 9 additions and 1 deletions

View File

@ -1231,6 +1231,14 @@ config INITRD_ASYNC
help
Init ramdisk async, can reduce kernel init time.
config ROCKCHIP_ONE_INITRD
bool "Detect only one initrd"
depends on ARCH_ROCKCHIP
default ARCH_ROCKCHIP
help
RK bootloader does not put a correct size to cmdline.
Directly return when we get a good initrd.
endif
config INITCALL_ASYNC

View File

@ -495,7 +495,7 @@ 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
#ifdef CONFIG_ROCKCHIP_ONE_INITRD
else
break;
#endif