Commit ff92794f by zhang sanshan Committed by Chen Guoyin

MA-9409-2 fix some issue for android and android things

* Add CONFIG_SYSTEM_RAMDISK_SUPPORT to support system's ramdisk * Normal boot: cmdline to bypass ramdisk in boot.img, but use Recovery boot: Use the ramdisk in boot.img * commandline is larger than 512, system can't bootup sometime for commandline issue. * support fastboot getvar. * Support "fastboot erase" command for emmc device. TODO: uboot community have api to operate flash, we can unify this part * support "fastboot flash" even on damaged gpt Change-Id: I080c25d6569d6cab56ff025601cd3b8df21cf3dd
parent 1c79796a
......@@ -190,6 +190,16 @@ static struct fsl_esdhc_cfg usdhc_cfg[1] = {
{USDHC1_BASE_ADDR},
};
int board_mmc_get_env_dev(int devno)
{
return devno;
}
int mmc_map_to_kernel_blk(int dev_no)
{
return dev_no;
}
int board_mmc_getcd(struct mmc *mmc)
{
return 1;
......
......@@ -126,6 +126,19 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify,
strcat(commandline, bootargs_sec);
}
#endif
#ifdef CONFIG_SYSTEM_RAMDISK_SUPPORT
/* Normal boot:
* cmdline to bypass ramdisk in boot.img, but use the system.img
* Recovery boot:
* Use the ramdisk in boot.img
*/
char *bootargs_3rd = getenv("bootargs_3rd");
if (bootargs_3rd) {
strcat(commandline, " ");
strcat(commandline, bootargs_3rd);
}
#endif
printf("Kernel command line: %s\n", commandline);
setenv("bootargs", commandline);
if (os_data) {
......
......@@ -285,7 +285,6 @@ int get_slotvar(char *cmd, char *response, size_t chars_left)
struct boot_ctl t_bootctl;
memset(&t_bootctl, 0, sizeof(t_bootctl));
/* these two var no need to read_bootctl */
if (!strcmp_l1("has-slot:", cmd)) {
char *ptnname = NULL;
ptnname = strchr(cmd, ':') + 1;
......
......@@ -584,6 +584,7 @@ int board_mmc_init(bd_t *bis);
int cpu_mmc_init(bd_t *bis);
int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr);
int mmc_get_env_dev(void);
int mmc_map_to_kernel_blk(int dev_no);
struct pci_device_id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment