Commit a2fea67d3eb3092f19f250d53a4a27fa1a0c815f
Committed by
Richard Liu
1 parent
c250b072a6
Exists in
smarc-imx_v2017.03_4.9.11_1.0.0_ga
and in
1 other branch
MA-9763 Include init.${ro.hardware}.${ro.boot.soc_type}.rc based uboot's soc_type
Append androidboot.soc_type based on the imx soc type, only add imx6/7 support. Change-Id: I3ae18bff42b434eb77728a7db70dd3baf6d7e0a6 Signed-off-by: guoyin.chen <guoyin.chen@nxp.com> Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
Showing 2 changed files with 38 additions and 0 deletions Side-by-side Diff
common/image-android.c
... | ... | @@ -97,6 +97,16 @@ |
97 | 97 | serialnr.low); |
98 | 98 | strcat(commandline, newbootargs); |
99 | 99 | #endif |
100 | + | |
101 | + /* append soc type into bootargs */ | |
102 | + char *soc_type = getenv("soc_type"); | |
103 | + if (soc_type) { | |
104 | + sprintf(newbootargs, | |
105 | + " androidboot.soc_type=%s", | |
106 | + soc_type); | |
107 | + strcat(commandline, newbootargs); | |
108 | + } | |
109 | + | |
100 | 110 | int bootdev = get_boot_device(); |
101 | 111 | if (bootdev == SD1_BOOT || bootdev == SD2_BOOT || |
102 | 112 | bootdev == SD3_BOOT || bootdev == SD4_BOOT) { |
drivers/usb/gadget/f_fastboot.c
... | ... | @@ -33,6 +33,7 @@ |
33 | 33 | #endif |
34 | 34 | |
35 | 35 | #ifdef CONFIG_FSL_FASTBOOT |
36 | +#include <asm/imx-common/sys_proto.h> | |
36 | 37 | #include <fsl_fastboot.h> |
37 | 38 | #include <mmc.h> |
38 | 39 | #include <android_image.h> |
... | ... | @@ -1753,6 +1754,33 @@ |
1753 | 1754 | default: |
1754 | 1755 | printf("unsupported boot devices\n"); |
1755 | 1756 | break; |
1757 | + } | |
1758 | + | |
1759 | + /* add soc type into bootargs */ | |
1760 | + if (is_mx6dqp()) { | |
1761 | + if (!getenv("soc_type")) | |
1762 | + setenv("soc_type", "imx6qp"); | |
1763 | + } else if (is_mx6dq()) { | |
1764 | + if (!getenv("soc_type")) | |
1765 | + setenv("soc_type", "imx6q"); | |
1766 | + } else if (is_mx6sdl()) { | |
1767 | + if (!getenv("soc_type")) | |
1768 | + setenv("soc_type", "imx6dl"); | |
1769 | + } else if (is_mx6sx()) { | |
1770 | + if (!getenv("soc_type")) | |
1771 | + setenv("soc_type", "imx6sx"); | |
1772 | + } else if (is_mx6sl()) { | |
1773 | + if (!getenv("soc_type")) | |
1774 | + setenv("soc_type", "imx6sl"); | |
1775 | + } else if (is_mx6ul()) { | |
1776 | + if (!getenv("soc_type")) | |
1777 | + setenv("soc_type", "imx6ul"); | |
1778 | + } else if (is_mx7()) { | |
1779 | + if (!getenv("soc_type")) | |
1780 | + setenv("soc_type", "imx7d"); | |
1781 | + } else if (is_mx7ulp()) { | |
1782 | + if (!getenv("soc_type")) | |
1783 | + setenv("soc_type", "imx7ulp"); | |
1756 | 1784 | } |
1757 | 1785 | } |
1758 | 1786 |