summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke go <sangch.go@gmail.com>2020-11-26 11:30:54 +0300
committerLuke go <sangch.go@gmail.com>2020-11-26 11:30:54 +0300
commit0b3595e1fbd67c6b5e7e25d111132bf0c070d35d (patch)
treeb472feaa8b4b7e56618feefbcec0c5cf99a55bc4
parentef1ac9a102adc8838c3e8ff5ec5adc12929763a7 (diff)
downloadu-boot-0b3595e1fbd67c6b5e7e25d111132bf0c070d35d.tar.xz
ODROID-COMMON: android: Changed recovery process.
- In android reboot sequence, devtype and devnum are needed. so except fastboot sequence, other boot sequences are moved to script in boot.ini. Change-Id: I6f0bdf960bdf37041e15b3cec06ded913213f559
-rw-r--r--common/bootm.c31
-rw-r--r--include/configs/odroid-g12-common.h5
2 files changed, 3 insertions, 33 deletions
diff --git a/common/bootm.c b/common/bootm.c
index ccdcbad072..49f101c3e1 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -344,33 +344,6 @@ static int get_fdto_totalsize(u32 *tz)
}
#endif
-#if defined(CONFIG_ODROID_COMMON)
-extern int get_boot_device(void);
-static int bootm_add_ignore_mpt_to_fdt(void *fdth)
-{
- bool is_emmc_boot = false;
- const char * mmc_dev = getenv("mmc_dev");
- const char * dev_type = getenv("devtype");
- char boot_device[7];
-
- if (mmc_dev == NULL)
- is_emmc_boot = get_boot_device() == 1;
- else
- is_emmc_boot = simple_strtol(mmc_dev, NULL, 10) == 0;
-
- memset(boot_device, 0x00, sizeof(boot_device));
- if (!strncmp(dev_type, "mmc", sizeof("mmc"))) {
- sprintf(boot_device, "%s%c", "mmcblk", is_emmc_boot? '0':'1');
- } else {
- sprintf(boot_device, "%s%c", "sd", is_emmc_boot ? 'a': 'b');
- }
-
- setenv("boot_device", boot_device);
-
- return 0;
-}
-#endif
-
#ifdef CONFIG_OF_LIBFDT_OVERLAY
static int do_fdt_overlay(void)
{
@@ -494,10 +467,6 @@ static int bootm_find_fdt(int flag, int argc, char * const argv[])
set_working_fdt_addr(images.ft_addr);
-#if defined(CONFIG_ODROID_COMMON)
- bootm_add_ignore_mpt_to_fdt(images.ft_addr);
-#endif
-
#ifdef CONFIG_OF_LIBFDT_OVERLAY
do_fdt_overlay();
#endif
diff --git a/include/configs/odroid-g12-common.h b/include/configs/odroid-g12-common.h
index 640943505f..fe3688eca1 100644
--- a/include/configs/odroid-g12-common.h
+++ b/include/configs/odroid-g12-common.h
@@ -177,7 +177,7 @@
"switch_bootmode=" \
"get_rebootmode;" \
"if test ${reboot_mode} = factory_reset; then " \
- "run boot_recovery;" \
+ "run boot_default;" \
"else if test ${reboot_mode} = selfinstall; then " \
"run boot_default;" \
"else if test ${reboot_mode} = cold_boot; then " \
@@ -195,7 +195,8 @@
"cvbsmode=${cvbsmode} osd_reverse=${osd_reverse} video_reverse=${video_reverse} "\
"androidboot.selinux=permissive jtag=disable "\
"androidboot.hardware=" CONFIG_DEVICE_PRODUCT " "\
- "recovery_part=recovery recovery_offset=0; "\
+ "recovery_part=recovery recovery_offset=0 " \
+ "boot_device=${boot_device};" \
"movi read dtbs 0 ${cramfsaddr}; " \
"if test " CONFIG_DEVICE_PRODUCT " = odroidn2; then " \
"cramfsload ${dtb_mem_addr} meson64_" CONFIG_DEVICE_PRODUCT "_android.dtb;" \