MA-10340 Don't pass dm-verity commandline to kernel
authorji.luo <ji.luo@nxp.com>
Mon, 25 Sep 2017 12:44:54 +0000 (20:44 +0800)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:37:21 +0000 (02:37 +0800)
The dm-verity commandline has conflicts with system bootargs and we can't
determine whether dm-verity is opened by the commandline for now.

Change-Id: I043e82b6bc2ee67f476e8a90dcb8404b6dd7a0bf
Signed-off-by: ji.luo <ji.luo@nxp.com>
drivers/usb/gadget/f_fastboot.c

index 5e3c8fd..7d5920e 100644 (file)
@@ -2148,9 +2148,16 @@ int do_boota(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {
                        goto fail;
                }
                printf(" verify OK, boot '%s%s'\n", avb_loadpart->partition_name, avb_out_data->ab_suffix);
+               /* The dm-verity commandline has conflicts with system bootargs and we can't
+                * determine whether dm-verity is opened by the commandline for now. */
+               char bootargs_sec[ANDR_BOOT_ARGS_SIZE];
+               sprintf(bootargs_sec, "androidboot.slot_suffix=%s", avb_out_data->ab_suffix);
+               setenv("bootargs_sec", bootargs_sec);
+               /*
                char bootargs_sec[2048];
                sprintf(bootargs_sec, "androidboot.slot_suffix=%s %s", avb_out_data->ab_suffix, avb_out_data->cmdline);
                setenv("bootargs_sec", bootargs_sec);
+               */
 #ifdef CONFIG_SYSTEM_RAMDISK_SUPPORT
                if(!is_recovery_mode)
                        fastboot_setup_system_boot_args(avb_out_data->ab_suffix);