diff options
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-ti.inc')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-ti.inc | 126 |
1 files changed, 112 insertions, 14 deletions
diff --git a/recipes-bsp/u-boot/u-boot-ti.inc b/recipes-bsp/u-boot/u-boot-ti.inc index 661f9318..c53689ee 100644 --- a/recipes-bsp/u-boot/u-boot-ti.inc +++ b/recipes-bsp/u-boot/u-boot-ti.inc | |||
@@ -16,8 +16,18 @@ require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc | |||
16 | 16 | ||
17 | FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:" | 17 | FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:" |
18 | 18 | ||
19 | SUMMARY = "u-boot bootloader for TI devices" | ||
20 | |||
19 | LICENSE = "GPLv2+" | 21 | LICENSE = "GPLv2+" |
20 | LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" | 22 | LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" |
23 | |||
24 | BRANCH ?= "master" | ||
25 | SRC_URI = "git://git.ti.com/ti-u-boot/ti-u-boot.git;protocol=git;branch=${BRANCH}" | ||
26 | |||
27 | PV_append = "+git${SRCPV}" | ||
28 | |||
29 | # u-boot needs devtree compiler to parse dts files | ||
30 | DEPENDS += "dtc-native" | ||
21 | 31 | ||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 32 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
23 | 33 | ||
@@ -28,26 +38,114 @@ PKG_${PN}-dbg = "u-boot-dbg" | |||
28 | 38 | ||
29 | S = "${WORKDIR}/git" | 39 | S = "${WORKDIR}/git" |
30 | 40 | ||
41 | # Support for secure devices - detailed info is in doc/README.ti-secure | ||
42 | TI_SECURE_DEV_PKG ?= "" | ||
43 | export TI_SECURE_DEV_PKG | ||
44 | |||
31 | # SPL (Second Program Loader) to be loaded over UART | 45 | # SPL (Second Program Loader) to be loaded over UART |
32 | SPL_UART_BINARY ?= "" | 46 | SPL_UART_BINARY ?= "" |
33 | SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" | 47 | SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" |
34 | SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}" | 48 | SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}" |
35 | 49 | ||
50 | SPL_BINARY = "MLO" | ||
51 | SPL_BINARY_k2e-hs-evm = "" | ||
52 | SPL_UART_BINARY = "u-boot-spl.bin" | ||
53 | |||
54 | # Keystone specifics | ||
55 | UBOOT_SUFFIX_keystone = "bin" | ||
56 | SPL_UART_BINARY_keystone = "" | ||
57 | |||
58 | # SPI NOR Flash binaries | ||
59 | UBOOT_SPI_SPL_BINARY = "u-boot-spl.bin" | ||
60 | UBOOT_SPI_BINARY = "u-boot.img" | ||
61 | UBOOT_SPI_GPH_BINARY = "u-boot-spi.gph" | ||
62 | |||
63 | # SPI NOR Flash deployed images | ||
64 | UBOOT_SPI_SPL_IMAGE = "u-boot-spl-${MACHINE}-${PV}-${PR}.bin" | ||
65 | UBOOT_SPI_SPL_SYMLINK = "u-boot-spl-${MACHINE}.bin" | ||
66 | UBOOT_SPI_IMAGE = "u-boot-${MACHINE}-${PV}-${PR}.img" | ||
67 | UBOOT_SPI_SYMLINK = "u-boot-${MACHINE}.img" | ||
68 | UBOOT_SPI_GPH_IMAGE = "u-boot-spi-${MACHINE}-${PV}-${PR}.gph" | ||
69 | UBOOT_SPI_GPH_SYMLINK = "u-boot-spi-${MACHINE}.gph" | ||
70 | |||
71 | # HS XLD | ||
72 | UBOOT_HS_XLD_BINARY = "u-boot-spl_HS_X-LOADER" | ||
73 | UBOOT_HS_XLD_IMAGE = "u-boot-spl_HS_X-LOADER-${MACHINE}-${PV}-${PR}" | ||
74 | UBOOT_HS_XLD_SYMLINK = "u-boot-spl_HS_X-LOADER-${MACHINE}" | ||
75 | |||
76 | # HS MLO | ||
77 | UBOOT_HS_MLO_BINARY = "u-boot_HS_MLO" | ||
78 | UBOOT_HS_MLO_IMAGE = "u-boot_HS_MLO-${MACHINE}-${PV}-${PR}" | ||
79 | UBOOT_HS_MLO_SYMLINK = "u-boot_HS_MLO-${MACHINE}" | ||
80 | |||
81 | do_compile_append_am437x-hs-evm () { | ||
82 | if [ -f ${B}/u-boot-spl_HS_ISSW ]; then | ||
83 | rm -rf ${B}/MLO | ||
84 | cp ${B}/u-boot-spl_HS_ISSW ${B}/MLO | ||
85 | fi | ||
86 | } | ||
87 | |||
36 | do_install_append () { | 88 | do_install_append () { |
37 | if [ "x${SPL_UART_BINARY}" != "x" ] | 89 | if [ "x${SPL_UART_BINARY}" != "x" ]; then |
38 | then | 90 | install ${B}/spl/${SPL_UART_BINARY} ${D}/boot/${SPL_UART_IMAGE} |
39 | install ${B}/spl/${SPL_UART_BINARY} ${D}/boot/${SPL_UART_IMAGE} | 91 | ln -sf ${SPL_UART_IMAGE} ${D}/boot/${SPL_UART_BINARY} |
40 | ln -sf ${SPL_UART_IMAGE} ${D}/boot/${SPL_UART_BINARY} | 92 | fi |
41 | fi | 93 | if [ -f ${B}/${UBOOT_HS_XLD_BINARY} ]; then |
94 | install ${B}/${UBOOT_HS_XLD_BINARY} ${D}/boot/${UBOOT_HS_XLD_IMAGE} | ||
95 | ln -sf ${UBOOT_HS_XLD_IMAGE} ${D}/boot/${UBOOT_HS_XLD_BINARY} | ||
96 | fi | ||
97 | if [ -f ${B}/${UBOOT_HS_MLO_BINARY} ]; then | ||
98 | install ${B}/${UBOOT_HS_MLO_BINARY} ${D}/boot/${UBOOT_HS_MLO_IMAGE} | ||
99 | ln -sf ${UBOOT_HS_MLO_IMAGE} ${D}/boot/${UBOOT_HS_MLO_BINARY} | ||
100 | fi | ||
42 | } | 101 | } |
43 | 102 | ||
44 | do_deploy_append () { | 103 | do_deploy_append () { |
45 | cd ${DEPLOYDIR} | 104 | cd ${DEPLOYDIR} |
46 | if [ "x${SPL_UART_BINARY}" != "x" ] | 105 | if [ "x${SPL_UART_BINARY}" != "x" ]; then |
47 | then | 106 | install ${B}/spl/${SPL_UART_BINARY} ${DEPLOYDIR}/${SPL_UART_IMAGE} |
48 | install ${B}/spl/${SPL_UART_BINARY} ${DEPLOYDIR}/${SPL_UART_IMAGE} | 107 | rm -f ${DEPLOYDIR}/${SPL_UART_BINARY} ${DEPLOYDIR}/${SPL_UART_SYMLINK} |
49 | rm -f ${DEPLOYDIR}/${SPL_UART_BINARY} ${DEPLOYDIR}/${SPL_UART_SYMLINK} | 108 | ln -sf ${SPL_UART_IMAGE} ${DEPLOYDIR}/${SPL_UART_BINARY} |
50 | ln -sf ${SPL_UART_IMAGE} ${DEPLOYDIR}/${SPL_UART_BINARY} | 109 | ln -sf ${SPL_UART_IMAGE} ${DEPLOYDIR}/${SPL_UART_SYMLINK} |
51 | ln -sf ${SPL_UART_IMAGE} ${DEPLOYDIR}/${SPL_UART_SYMLINK} | 110 | fi |
52 | fi | 111 | if [ -f ${B}/${UBOOT_HS_XLD_BINARY} ]; then |
112 | install ${B}/${UBOOT_HS_XLD_BINARY} ${DEPLOYDIR}/${UBOOT_HS_XLD_IMAGE} | ||
113 | rm -f ${UBOOT_HS_XLD_BINARY} ${UBOOT_HS_XLD_SYMLINK} | ||
114 | ln -sf ${UBOOT_HS_XLD_IMAGE} ${UBOOT_HS_XLD_SYMLINK} | ||
115 | ln -sf ${UBOOT_HS_XLD_IMAGE} ${UBOOT_HS_XLD_BINARY} | ||
116 | fi | ||
117 | if [ -f ${B}/${UBOOT_HS_MLO_BINARY} ]; then | ||
118 | install ${B}/${UBOOT_HS_MLO_BINARY} ${DEPLOYDIR}/${UBOOT_HS_MLO_IMAGE} | ||
119 | rm -f ${UBOOT_HS_MLO_BINARY} ${UBOOT_HS_MLO_SYMLINK} | ||
120 | ln -sf ${UBOOT_HS_MLO_IMAGE} ${UBOOT_HS_MLO_SYMLINK} | ||
121 | ln -sf ${UBOOT_HS_MLO_IMAGE} ${UBOOT_HS_MLO_BINARY} | ||
122 | fi | ||
123 | } | ||
124 | |||
125 | do_install_append_keystone () { | ||
126 | install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE} | ||
127 | ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY} | ||
128 | |||
129 | install ${B}/${UBOOT_SPI_BINARY} ${D}/boot/${UBOOT_SPI_IMAGE} | ||
130 | ln -sf ${UBOOT_SPI_IMAGE} ${D}/boot/${UBOOT_SPI_BINARY} | ||
131 | |||
132 | install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE} | ||
133 | ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY} | ||
134 | } | ||
135 | |||
136 | do_deploy_append_keystone () { | ||
137 | install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE} | ||
138 | rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK} | ||
139 | ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK} | ||
140 | ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY} | ||
141 | |||
142 | install ${B}/${UBOOT_SPI_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_IMAGE} | ||
143 | rm -f ${UBOOT_SPI_BINARY} ${UBOOT_SPI_SYMLINK} | ||
144 | ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_SYMLINK} | ||
145 | ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_BINARY} | ||
146 | |||
147 | install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE} | ||
148 | rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK} | ||
149 | ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK} | ||
150 | ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY} | ||
53 | } | 151 | } |