Skip to content

Commit 0489120

Browse files
committed
add option to forcedisable skip_initramfs
* used by TWRP as a commandline argument to boot TWRP with "fastboot boot <twrp image>" * doesnt prevent normal boot of any ROM Signed-off-by: SGCMarkus <markusornik@gmail.com>
1 parent c9083b5 commit 0489120

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

init/initramfs.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,17 @@ static void __init clean_rootfs(void)
608608
}
609609
#endif
610610

611+
static int __initdata disable_skip_initramfs;
612+
613+
static int __init disable_skip_initramfs_param(char *str)
614+
{
615+
if (*str)
616+
return 0;
617+
disable_skip_initramfs = 1;
618+
return 1;
619+
}
620+
__setup("disable_skip_initramfs", disable_skip_initramfs_param);
621+
611622
static int __initdata do_skip_initramfs;
612623

613624
static int __init skip_initramfs_param(char *str)
@@ -623,7 +634,7 @@ static int __init populate_rootfs(void)
623634
{
624635
char *err;
625636

626-
if (do_skip_initramfs) {
637+
if (!disable_skip_initramfs && do_skip_initramfs) {
627638
if (initrd_start)
628639
free_initrd();
629640
return default_rootfs();

0 commit comments

Comments
 (0)