summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/u-boot
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2017-02-02 04:04:06 +0000
committerDenys Dmytriyenko <denys@ti.com>2017-02-02 18:34:37 -0500
commit5021fec8b9799a805c9c3bdad30d34f99c97aeb8 (patch)
treef27349f44fce307c14cb69c19191af58c6033fd5 /recipes-bsp/u-boot
parent06b068fb14d7d24dca57a58cbe6b8dfde7bd59c8 (diff)
downloadmeta-ti-5021fec8b9799a805c9c3bdad30d34f99c97aeb8.tar.gz
u-boot: move common settings and code to u-boot-ti.inc
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-bsp/u-boot')
-rw-r--r--recipes-bsp/u-boot/u-boot-ti-staging_2016.05.bb108
-rw-r--r--recipes-bsp/u-boot/u-boot-ti.inc126
2 files changed, 113 insertions, 121 deletions
diff --git a/recipes-bsp/u-boot/u-boot-ti-staging_2016.05.bb b/recipes-bsp/u-boot/u-boot-ti-staging_2016.05.bb
index 4998d685..fa15569f 100644
--- a/recipes-bsp/u-boot/u-boot-ti-staging_2016.05.bb
+++ b/recipes-bsp/u-boot/u-boot-ti-staging_2016.05.bb
@@ -1,113 +1,7 @@
1require u-boot-ti.inc 1require u-boot-ti.inc
2 2
3# u-boot needs devtree compiler to parse dts files
4DEPENDS += "dtc-native"
5
6DESCRIPTION = "u-boot bootloader for TI devices"
7
8LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
9
10PR = "r30" 3PR = "r30"
11PV_append = "+git${SRCPV}"
12 4
13SRC_URI = "git://git.ti.com/ti-u-boot/ti-u-boot.git;protocol=git;branch=${BRANCH}" 5BRANCH = "ti-u-boot-2016.05"
14
15BRANCH ?= "ti-u-boot-2016.05"
16 6
17SRCREV = "4db46a6bbde46e4587b77e14763787f66c292701" 7SRCREV = "4db46a6bbde46e4587b77e14763787f66c292701"
18
19# Support for secure devices - detailed info is in doc/README.ti-secure
20TI_SECURE_DEV_PKG ?= ""
21export TI_SECURE_DEV_PKG
22
23SPL_BINARY = "MLO"
24SPL_BINARY_k2e-hs-evm = ""
25SPL_UART_BINARY = "u-boot-spl.bin"
26
27# Keystone specifics
28UBOOT_SUFFIX_keystone = "bin"
29SPL_UART_BINARY_keystone = ""
30
31# SPI NOR Flash binaries
32UBOOT_SPI_SPL_BINARY = "u-boot-spl.bin"
33UBOOT_SPI_BINARY = "u-boot.img"
34UBOOT_SPI_GPH_BINARY = "u-boot-spi.gph"
35
36# SPI NOR Flash deployed images
37UBOOT_SPI_SPL_IMAGE = "u-boot-spl-${MACHINE}-${PV}-${PR}.bin"
38UBOOT_SPI_SPL_SYMLINK = "u-boot-spl-${MACHINE}.bin"
39UBOOT_SPI_IMAGE = "u-boot-${MACHINE}-${PV}-${PR}.img"
40UBOOT_SPI_SYMLINK = "u-boot-${MACHINE}.img"
41UBOOT_SPI_GPH_IMAGE = "u-boot-spi-${MACHINE}-${PV}-${PR}.gph"
42UBOOT_SPI_GPH_SYMLINK = "u-boot-spi-${MACHINE}.gph"
43
44# HS XLD
45UBOOT_HS_XLD_BINARY = "u-boot-spl_HS_X-LOADER"
46UBOOT_HS_XLD_IMAGE = "u-boot-spl_HS_X-LOADER-${MACHINE}-${PV}-${PR}"
47UBOOT_HS_XLD_SYMLINK = "u-boot-spl_HS_X-LOADER-${MACHINE}"
48
49# HS MLO
50UBOOT_HS_MLO_BINARY = "u-boot_HS_MLO"
51UBOOT_HS_MLO_IMAGE = "u-boot_HS_MLO-${MACHINE}-${PV}-${PR}"
52UBOOT_HS_MLO_SYMLINK = "u-boot_HS_MLO-${MACHINE}"
53
54do_compile_append_am437x-hs-evm () {
55 if [ -f ${B}/u-boot-spl_HS_ISSW ]; then
56 rm -rf ${B}/MLO
57 cp ${B}/u-boot-spl_HS_ISSW ${B}/MLO
58 fi
59}
60
61do_install_append () {
62 if [ -f ${B}/${UBOOT_HS_XLD_BINARY} ]; then
63 install ${B}/${UBOOT_HS_XLD_BINARY} ${D}/boot/${UBOOT_HS_XLD_IMAGE}
64 ln -sf ${UBOOT_HS_XLD_IMAGE} ${D}/boot/${UBOOT_HS_XLD_BINARY}
65 fi
66 if [ -f ${B}/${UBOOT_HS_MLO_BINARY} ]; then
67 install ${B}/${UBOOT_HS_MLO_BINARY} ${D}/boot/${UBOOT_HS_MLO_IMAGE}
68 ln -sf ${UBOOT_HS_MLO_IMAGE} ${D}/boot/${UBOOT_HS_MLO_BINARY}
69 fi
70}
71
72do_deploy_append () {
73 if [ -f ${B}/${UBOOT_HS_XLD_BINARY} ]; then
74 install ${B}/${UBOOT_HS_XLD_BINARY} ${DEPLOYDIR}/${UBOOT_HS_XLD_IMAGE}
75 rm -f ${UBOOT_HS_XLD_BINARY} ${UBOOT_HS_XLD_SYMLINK}
76 ln -sf ${UBOOT_HS_XLD_IMAGE} ${UBOOT_HS_XLD_SYMLINK}
77 ln -sf ${UBOOT_HS_XLD_IMAGE} ${UBOOT_HS_XLD_BINARY}
78 fi
79 if [ -f ${B}/${UBOOT_HS_MLO_BINARY} ]; then
80 install ${B}/${UBOOT_HS_MLO_BINARY} ${DEPLOYDIR}/${UBOOT_HS_MLO_IMAGE}
81 rm -f ${UBOOT_HS_MLO_BINARY} ${UBOOT_HS_MLO_SYMLINK}
82 ln -sf ${UBOOT_HS_MLO_IMAGE} ${UBOOT_HS_MLO_SYMLINK}
83 ln -sf ${UBOOT_HS_MLO_IMAGE} ${UBOOT_HS_MLO_BINARY}
84 fi
85}
86
87do_install_append_keystone () {
88 install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${D}/boot/${UBOOT_SPI_SPL_IMAGE}
89 ln -sf ${UBOOT_SPI_SPL_IMAGE} ${D}/boot/${UBOOT_SPI_SPL_BINARY}
90
91 install ${B}/${UBOOT_SPI_BINARY} ${D}/boot/${UBOOT_SPI_IMAGE}
92 ln -sf ${UBOOT_SPI_IMAGE} ${D}/boot/${UBOOT_SPI_BINARY}
93
94 install ${B}/${UBOOT_SPI_GPH_BINARY} ${D}/boot/${UBOOT_SPI_GPH_IMAGE}
95 ln -sf ${UBOOT_SPI_GPH_IMAGE} ${D}/boot/${UBOOT_SPI_GPH_BINARY}
96}
97
98do_deploy_append_keystone () {
99 install ${B}/spl/${UBOOT_SPI_SPL_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_SPL_IMAGE}
100 rm -f ${UBOOT_SPI_SPL_BINARY} ${UBOOT_SPI_SPL_SYMLINK}
101 ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_SYMLINK}
102 ln -sf ${UBOOT_SPI_SPL_IMAGE} ${UBOOT_SPI_SPL_BINARY}
103
104 install ${B}/${UBOOT_SPI_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_IMAGE}
105 rm -f ${UBOOT_SPI_BINARY} ${UBOOT_SPI_SYMLINK}
106 ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_SYMLINK}
107 ln -sf ${UBOOT_SPI_IMAGE} ${UBOOT_SPI_BINARY}
108
109 install ${B}/${UBOOT_SPI_GPH_BINARY} ${DEPLOYDIR}/${UBOOT_SPI_GPH_IMAGE}
110 rm -f ${UBOOT_SPI_GPH_BINARY} ${UBOOT_SPI_GPH_SYMLINK}
111 ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_SYMLINK}
112 ln -sf ${UBOOT_SPI_GPH_IMAGE} ${UBOOT_SPI_GPH_BINARY}
113}
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
17FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:" 17FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:"
18 18
19SUMMARY = "u-boot bootloader for TI devices"
20
19LICENSE = "GPLv2+" 21LICENSE = "GPLv2+"
20LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" 22LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
23
24BRANCH ?= "master"
25SRC_URI = "git://git.ti.com/ti-u-boot/ti-u-boot.git;protocol=git;branch=${BRANCH}"
26
27PV_append = "+git${SRCPV}"
28
29# u-boot needs devtree compiler to parse dts files
30DEPENDS += "dtc-native"
21 31
22PACKAGE_ARCH = "${MACHINE_ARCH}" 32PACKAGE_ARCH = "${MACHINE_ARCH}"
23 33
@@ -28,26 +38,114 @@ PKG_${PN}-dbg = "u-boot-dbg"
28 38
29S = "${WORKDIR}/git" 39S = "${WORKDIR}/git"
30 40
41# Support for secure devices - detailed info is in doc/README.ti-secure
42TI_SECURE_DEV_PKG ?= ""
43export 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
32SPL_UART_BINARY ?= "" 46SPL_UART_BINARY ?= ""
33SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" 47SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"
34SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}" 48SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}"
35 49
50SPL_BINARY = "MLO"
51SPL_BINARY_k2e-hs-evm = ""
52SPL_UART_BINARY = "u-boot-spl.bin"
53
54# Keystone specifics
55UBOOT_SUFFIX_keystone = "bin"
56SPL_UART_BINARY_keystone = ""
57
58# SPI NOR Flash binaries
59UBOOT_SPI_SPL_BINARY = "u-boot-spl.bin"
60UBOOT_SPI_BINARY = "u-boot.img"
61UBOOT_SPI_GPH_BINARY = "u-boot-spi.gph"
62
63# SPI NOR Flash deployed images
64UBOOT_SPI_SPL_IMAGE = "u-boot-spl-${MACHINE}-${PV}-${PR}.bin"
65UBOOT_SPI_SPL_SYMLINK = "u-boot-spl-${MACHINE}.bin"
66UBOOT_SPI_IMAGE = "u-boot-${MACHINE}-${PV}-${PR}.img"
67UBOOT_SPI_SYMLINK = "u-boot-${MACHINE}.img"
68UBOOT_SPI_GPH_IMAGE = "u-boot-spi-${MACHINE}-${PV}-${PR}.gph"
69UBOOT_SPI_GPH_SYMLINK = "u-boot-spi-${MACHINE}.gph"
70
71# HS XLD
72UBOOT_HS_XLD_BINARY = "u-boot-spl_HS_X-LOADER"
73UBOOT_HS_XLD_IMAGE = "u-boot-spl_HS_X-LOADER-${MACHINE}-${PV}-${PR}"
74UBOOT_HS_XLD_SYMLINK = "u-boot-spl_HS_X-LOADER-${MACHINE}"
75
76# HS MLO
77UBOOT_HS_MLO_BINARY = "u-boot_HS_MLO"
78UBOOT_HS_MLO_IMAGE = "u-boot_HS_MLO-${MACHINE}-${PV}-${PR}"
79UBOOT_HS_MLO_SYMLINK = "u-boot_HS_MLO-${MACHINE}"
80
81do_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
36do_install_append () { 88do_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
44do_deploy_append () { 103do_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
125do_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
136do_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}