summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorChunrong Guo <B40290@freescale.com>2015-01-22 14:27:50 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-08 08:00:24 +0000
commiteca277b0af9e0e29022f81f54c17bf24aec02232 (patch)
tree0711552f91dab77634ce0d720d40b1193d6c5663 /meta/recipes-bsp
parent1e4ee4bc22467bc4dfc52ec610c067bb6c337cd3 (diff)
downloadpoky-eca277b0af9e0e29022f81f54c17bf24aec02232.tar.gz
u-boot.inc : add compile multiple u-boot feature
(From OE-Core rev: ab126dcca85d6a335212b07a1ca37d5e045a59cf) Signed-off-by: Chunrong Guo <B40290@freescale.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc150
1 files changed, 129 insertions, 21 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index c695b73b48..58725fa7aa 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -62,15 +62,56 @@ do_compile () {
62 echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion 62 echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
63 echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion 63 echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
64 fi 64 fi
65
66 if [ "x${UBOOT_CONFIG}" != "x" ]
67 then
68 for config in ${UBOOT_MACHINE}; do
69 for type in in ${UBOOT_CONFIG}; do
70 if [ "${type}"x = "in"x ]
71 then
72 continue
73 fi
74 if [ -d "${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}"]
75 then
76 break
77 else
78 oe_runmake O=${config} ${config}
79 oe_runmake O=${config} ${UBOOT_MAKE_TARGET}
80 cp ${S}/${config}/${UBOOT_BINARY} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
81 fi
82 done
83 done
84 else
85 oe_runmake ${UBOOT_MACHINE}
86 oe_runmake ${UBOOT_MAKE_TARGET}
87 fi
65 88
66 oe_runmake ${UBOOT_MACHINE}
67 oe_runmake ${UBOOT_MAKE_TARGET}
68} 89}
69 90
70do_install () { 91do_install () {
71 install -d ${D}/boot 92 if [ "x${UBOOT_CONFIG}" != "x" ]
72 install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} 93 then
73 ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} 94 for config in ${UBOOT_MACHINE}; do
95 for type in in ${UBOOT_CONFIG}; do
96 if [ "${type}"x = "in"x ]
97 then
98 continue
99 fi
100 if [ -d "${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}"]
101 then
102 break
103 else
104 install -d ${D}/boot
105 install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}
106 ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
107 fi
108 done
109 done
110 else
111 install -d ${D}/boot
112 install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
113 ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
114 fi
74 115
75 if [ -e ${WORKDIR}/fw_env.config ] ; then 116 if [ -e ${WORKDIR}/fw_env.config ] ; then
76 install -d ${D}${sysconfdir} 117 install -d ${D}${sysconfdir}
@@ -79,8 +120,28 @@ do_install () {
79 120
80 if [ "x${SPL_BINARY}" != "x" ] 121 if [ "x${SPL_BINARY}" != "x" ]
81 then 122 then
82 install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} 123 if [ "x${UBOOT_CONFIG}" != "x" ]
83 ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY} 124 then
125 for config in ${UBOOT_MACHINE}; do
126 for type in in ${UBOOT_CONFIG}; do
127 if [ "${type}"x = "in"x ]
128 then
129 continue
130 fi
131 if [ -d "${D}/boot/${SPL_IMAGE}-${type}"]
132 then
133 break
134 else
135 install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}
136 ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}-${type}
137 ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}
138 fi
139 done
140 done
141 else
142 install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
143 ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
144 fi
84 fi 145 fi
85 146
86 if [ "x${UBOOT_ENV}" != "x" ] 147 if [ "x${UBOOT_ENV}" != "x" ]
@@ -93,21 +154,68 @@ do_install () {
93FILES_${PN} = "/boot ${sysconfdir}" 154FILES_${PN} = "/boot ${sysconfdir}"
94 155
95do_deploy () { 156do_deploy () {
96 install -d ${DEPLOYDIR} 157 if [ "x${UBOOT_CONFIG}" != "x" ]
97 install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
98
99 cd ${DEPLOYDIR}
100 rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
101 ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
102 ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
103
104 if [ "x${SPL_BINARY}" != "x" ]
105 then 158 then
106 install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} 159 for config in ${UBOOT_MACHINE}; do
107 rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK} 160 for type in in ${UBOOT_CONFIG}; do
108 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY} 161 if [ "${type}"x = "in"x ]
109 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} 162 then
110 fi 163 continue
164 fi
165 if [ -d "${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}"]
166 then
167 break
168 else
169 install -d ${DEPLOYDIR}
170 install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}
171 cd ${DEPLOYDIR}
172 ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
173 ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
174 fi
175 done
176 done
177 else
178 install -d ${DEPLOYDIR}
179 install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
180 cd ${DEPLOYDIR}
181 rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
182 ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
183 ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
184 fi
185
186
187
188 if [ "x${SPL_BINARY}" != "x" ]
189 then
190 if [ "x${UBOOT_CONFIG}" != "x" ]
191 then
192 for config in ${UBOOT_MACHINE}; do
193 for type in in ${UBOOT_CONFIG}; do
194 if [ "${type}"x = "in"x ]
195 then
196 continue
197 fi
198 if [ -d "${DEPLOYDIR}/${SPL_IMAGE}-${type}"]
199 then
200 break
201 else
202 install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}
203 rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
204 ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}-${type}
205 ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}
206 ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
207 ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}
208 fi
209 done
210 done
211 else
212 install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
213 rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}
214 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY}
215 ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
216 fi
217 fi
218
111 219
112 if [ "x${UBOOT_ENV}" != "x" ] 220 if [ "x${UBOOT_ENV}" != "x" ]
113 then 221 then