Commit 0bc300ff authored by faqiang.zhu's avatar faqiang.zhu
Browse files

MA-18392-2 pass imx8 soc revision info to kernel



pass imx8 soc revision info to kernel so it can be used to judge
bootloader0 partition offset in postinstall command and update
the partition.

Change-Id: Ifc4d3d2abe8a694d7ec6f368c3e56f3d175982e5
Signed-off-by: default avatarfaqiang.zhu <faqiang.zhu@nxp.com>
parent 5d845664
......@@ -97,6 +97,14 @@ static void append_kernel_cmdline(char *commandline)
soc_type);
strncat(commandline, newbootargs, COMMANDLINE_LENGTH - strlen(commandline));
}
/* append soc rev into bootargs */
char *soc_rev = env_get("soc_rev");
if (soc_rev) {
sprintf(newbootargs,
" androidboot.soc_rev=%s",
soc_rev);
strncat(commandline, newbootargs, COMMANDLINE_LENGTH - strlen(commandline));
}
sprintf(newbootargs,
" androidboot.boot_device_root=mmcblk%d", mmc_map_to_kernel_blk(mmc_get_env_dev()));
......
......@@ -182,9 +182,19 @@ void board_fastboot_setup(void)
} else if (is_imx8qm()) {
if (!env_get("soc_type"))
env_set("soc_type", "imx8qm");
if (is_soc_rev(CHIP_REV_A))
env_set("soc_rev", "reva");
else if (is_soc_rev(CHIP_REV_B))
env_set("soc_rev", "revb");
} else if (is_imx8qxp()) {
if (!env_get("soc_type"))
env_set("soc_type", "imx8qxp");
if (is_soc_rev(CHIP_REV_A))
env_set("soc_rev", "reva");
else if (is_soc_rev(CHIP_REV_B))
env_set("soc_rev", "revb");
else if (is_soc_rev(CHIP_REV_C))
env_set("soc_rev", "revc");
} else if (is_imx8mq()) {
if (!env_get("soc_type"))
env_set("soc_type", "imx8mq");
......
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