Set different bootargs for imx8m_phanbell based on ram capacity
for 1GB ram: cma=296M galcore.contiguousSize=8388608 for 3GB ram: cma=384M Test: Boot successfully on AIY-1G & AIY-3G Change-Id: If082d5b751b5a5e06efe301c0b8e49ec4ac3dfb7 Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> Reviewed-on: http://androidsource.ap.freescale.net/project/5262 Reviewed-by: Wang Haoran <elven.wang@nxp.com> Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
This commit is contained in:
parent
8be00c435e
commit
434e104b7d
|
|
@ -356,6 +356,16 @@ int board_late_init(void)
|
||||||
#ifdef CONFIG_ENV_IS_IN_MMC
|
#ifdef CONFIG_ENV_IS_IN_MMC
|
||||||
board_late_mmc_env_init();
|
board_late_mmc_env_init();
|
||||||
#endif
|
#endif
|
||||||
|
int baseboard_id;
|
||||||
|
baseboard_id = get_imx8m_baseboard_id();
|
||||||
|
if ((baseboard_id == ENTERPRISE_MICRON_1G) ||
|
||||||
|
(baseboard_id == ENTERPRISE_HYNIX_1G)) {
|
||||||
|
/* 1G DDR size */
|
||||||
|
env_set("bootargs_ram_capacity", "cma=296M galcore.contiguousSize=8388608");
|
||||||
|
} else {
|
||||||
|
/* 3G DDR size */
|
||||||
|
env_set("bootargs_ram_capacity", "cma=384M");
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,14 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Add 'bootargs_ram_capacity' to hold the parameters based on different ram capacity */
|
||||||
|
char *bootargs_ram_capacity = env_get("bootargs_ram_capacity");
|
||||||
|
if (bootargs_ram_capacity) {
|
||||||
|
strncat(commandline, " ", sizeof(commandline) - strlen(commandline));
|
||||||
|
strncat(commandline, bootargs_ram_capacity,
|
||||||
|
sizeof(commandline) - strlen(commandline));
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_TAG
|
#ifdef CONFIG_SERIAL_TAG
|
||||||
struct tag_serialnr serialnr;
|
struct tag_serialnr serialnr;
|
||||||
get_board_serial(&serialnr);
|
get_board_serial(&serialnr);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue