Skip to content

Commit 0b3595e

Browse files
committed
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
1 parent ef1ac9a commit 0b3595e

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed

common/bootm.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -344,33 +344,6 @@ static int get_fdto_totalsize(u32 *tz)
344344
}
345345
#endif
346346

347-
#if defined(CONFIG_ODROID_COMMON)
348-
extern int get_boot_device(void);
349-
static int bootm_add_ignore_mpt_to_fdt(void *fdth)
350-
{
351-
bool is_emmc_boot = false;
352-
const char * mmc_dev = getenv("mmc_dev");
353-
const char * dev_type = getenv("devtype");
354-
char boot_device[7];
355-
356-
if (mmc_dev == NULL)
357-
is_emmc_boot = get_boot_device() == 1;
358-
else
359-
is_emmc_boot = simple_strtol(mmc_dev, NULL, 10) == 0;
360-
361-
memset(boot_device, 0x00, sizeof(boot_device));
362-
if (!strncmp(dev_type, "mmc", sizeof("mmc"))) {
363-
sprintf(boot_device, "%s%c", "mmcblk", is_emmc_boot? '0':'1');
364-
} else {
365-
sprintf(boot_device, "%s%c", "sd", is_emmc_boot ? 'a': 'b');
366-
}
367-
368-
setenv("boot_device", boot_device);
369-
370-
return 0;
371-
}
372-
#endif
373-
374347
#ifdef CONFIG_OF_LIBFDT_OVERLAY
375348
static int do_fdt_overlay(void)
376349
{
@@ -494,10 +467,6 @@ static int bootm_find_fdt(int flag, int argc, char * const argv[])
494467

495468
set_working_fdt_addr(images.ft_addr);
496469

497-
#if defined(CONFIG_ODROID_COMMON)
498-
bootm_add_ignore_mpt_to_fdt(images.ft_addr);
499-
#endif
500-
501470
#ifdef CONFIG_OF_LIBFDT_OVERLAY
502471
do_fdt_overlay();
503472
#endif

include/configs/odroid-g12-common.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
"switch_bootmode=" \
178178
"get_rebootmode;" \
179179
"if test ${reboot_mode} = factory_reset; then " \
180-
"run boot_recovery;" \
180+
"run boot_default;" \
181181
"else if test ${reboot_mode} = selfinstall; then " \
182182
"run boot_default;" \
183183
"else if test ${reboot_mode} = cold_boot; then " \
@@ -195,7 +195,8 @@
195195
"cvbsmode=${cvbsmode} osd_reverse=${osd_reverse} video_reverse=${video_reverse} "\
196196
"androidboot.selinux=permissive jtag=disable "\
197197
"androidboot.hardware=" CONFIG_DEVICE_PRODUCT " "\
198-
"recovery_part=recovery recovery_offset=0; "\
198+
"recovery_part=recovery recovery_offset=0 " \
199+
"boot_device=${boot_device};" \
199200
"movi read dtbs 0 ${cramfsaddr}; " \
200201
"if test " CONFIG_DEVICE_PRODUCT " = odroidn2; then " \
201202
"cramfsload ${dtb_mem_addr} meson64_" CONFIG_DEVICE_PRODUCT "_android.dtb;" \

0 commit comments

Comments
 (0)