summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoran Wang <elven.wang@nxp.com>2017-02-10 16:11:02 +0800
committerHaoran Wang <elven.wang@nxp.com>2017-02-10 16:12:04 +0800
commit3a6eed16607fd2edc909e8db09f076521e5ed629 (patch)
treee8fbfb9965dc3518605540d3c861d118ba901748
parent678c1cf7991d79d7cf5f27d79de3849c72776baa (diff)
downloadu-boot-imx-3a6eed16607fd2edc909e8db09f076521e5ed629.zip
u-boot-imx-3a6eed16607fd2edc909e8db09f076521e5ed629.tar.gz
u-boot-imx-3a6eed16607fd2edc909e8db09f076521e5ed629.tar.bz2
Support system_ramdisk in bootctl
Add SYSTEM_RAMDISK support in BOOTCTL enabled situation. Change-Id: I7198b4d29605acbdca96bc102f2b4ae0801583fc Signed-off-by: Haoran Wang <elven.wang@nxp.com>
-rwxr-xr-xdrivers/usb/gadget/f_fastboot.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 339887a..a593d88 100755
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -1887,10 +1887,10 @@ static void fastboot_setup_system_boot_args(const char *slot)
const char *system_part_name = NULL;
if(slot == NULL)
return;
- if(!strncmp(slot, "_a", strlen("_a"))) {
+ if(!strncmp(slot, "_a", strlen("_a")) || !strncmp(slot, "boot_a", strlen("boot_a"))) {
system_part_name = FASTBOOT_PARTITION_SYSTEM_A;
}
- else if(!strncmp(slot, "_b", strlen("_b"))) {
+ else if(!strncmp(slot, "_b", strlen("_b")) || !strncmp(slot, "boot_b", strlen("boot_b"))) {
system_part_name = FASTBOOT_PARTITION_SYSTEM_B;
}
struct fastboot_ptentry *ptentry = fastboot_flash_find_ptn(system_part_name);
@@ -2036,7 +2036,7 @@ int do_boota(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {
setenv("bootargs_sec", avb_out_data->cmdline);
#ifdef CONFIG_SYSTEM_RAMDISK_SUPPORT
if(!is_recovery_mode)
- fastboot_setup_system_boot_args(avb_out_data->ab_suffix);
+ f,astboot_setup_system_boot_args(avb_out_data->ab_suffix);
#endif
image_size = avb_loadpart->data_size;
memcpy((void *)load_addr, (void *)hdr, image_size);
@@ -2199,6 +2199,11 @@ slot_select:
printf("no valid slot found, enter to recovery\n");
ptn = "recovery";
}
+#ifdef CONFIG_SYSTEM_RAMDISK_SUPPORT
+ else {
+ fastboot_setup_system_boot_args(ptn);
+ }
+#endif
use_given_ptn:
printf("use slot %s\n", ptn);
}