diff options
-rw-r--r-- | meta/recipes-bsp/u-boot/u-boot.inc | 101 |
1 files changed, 43 insertions, 58 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc index 6bdc86ae0c..7053a56786 100644 --- a/meta/recipes-bsp/u-boot/u-boot.inc +++ b/meta/recipes-bsp/u-boot/u-boot.inc | |||
@@ -66,20 +66,17 @@ do_compile () { | |||
66 | if [ "x${UBOOT_CONFIG}" != "x" ] | 66 | if [ "x${UBOOT_CONFIG}" != "x" ] |
67 | then | 67 | then |
68 | for config in ${UBOOT_MACHINE}; do | 68 | for config in ${UBOOT_MACHINE}; do |
69 | for type in in ${UBOOT_CONFIG}; do | 69 | i=`expr $i + 1`; |
70 | if [ "${type}"x = "in"x ] | 70 | for type in ${UBOOT_CONFIG}; do |
71 | j=`expr $j + 1`; | ||
72 | if [ $j -eq $i ] | ||
71 | then | 73 | 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} | 74 | oe_runmake O=${config} ${config} |
79 | oe_runmake O=${config} ${UBOOT_MAKE_TARGET} | 75 | oe_runmake O=${config} ${UBOOT_MAKE_TARGET} |
80 | cp ${S}/${config}/${UBOOT_BINARY} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} | 76 | cp ${S}/${config}/${UBOOT_BINARY} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} |
81 | fi | 77 | fi |
82 | done | 78 | done |
79 | unset j | ||
83 | done | 80 | done |
84 | else | 81 | else |
85 | oe_runmake ${UBOOT_MACHINE} | 82 | oe_runmake ${UBOOT_MACHINE} |
@@ -92,20 +89,17 @@ do_install () { | |||
92 | if [ "x${UBOOT_CONFIG}" != "x" ] | 89 | if [ "x${UBOOT_CONFIG}" != "x" ] |
93 | then | 90 | then |
94 | for config in ${UBOOT_MACHINE}; do | 91 | for config in ${UBOOT_MACHINE}; do |
95 | for type in in ${UBOOT_CONFIG}; do | 92 | i=`expr $i + 1`; |
96 | if [ "${type}"x = "in"x ] | 93 | for type in ${UBOOT_CONFIG}; do |
97 | then | 94 | j=`expr $j + 1`; |
98 | continue | 95 | if [ $j -eq $i ] |
99 | fi | ||
100 | if [ -d "${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}" ] | ||
101 | then | 96 | then |
102 | break | ||
103 | else | ||
104 | install -d ${D}/boot | 97 | install -d ${D}/boot |
105 | install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX} | 98 | install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} |
106 | ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} | 99 | ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} |
107 | fi | 100 | fi |
108 | done | 101 | done |
102 | unset j | ||
109 | done | 103 | done |
110 | else | 104 | else |
111 | install -d ${D}/boot | 105 | install -d ${D}/boot |
@@ -123,20 +117,17 @@ do_install () { | |||
123 | if [ "x${UBOOT_CONFIG}" != "x" ] | 117 | if [ "x${UBOOT_CONFIG}" != "x" ] |
124 | then | 118 | then |
125 | for config in ${UBOOT_MACHINE}; do | 119 | for config in ${UBOOT_MACHINE}; do |
126 | for type in in ${UBOOT_CONFIG}; do | 120 | i=`expr $i + 1`; |
127 | if [ "${type}"x = "in"x ] | 121 | for type in ${UBOOT_CONFIG}; do |
128 | then | 122 | j=`expr $j + 1`; |
129 | continue | 123 | if [ $j -eq $i ] |
130 | fi | 124 | then |
131 | if [ -d "${D}/boot/${SPL_IMAGE}-${type}" ] | 125 | install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR} |
132 | then | 126 | ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}-${type} |
133 | break | 127 | ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY} |
134 | else | 128 | fi |
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 | 129 | done |
130 | unset j | ||
140 | done | 131 | done |
141 | else | 132 | else |
142 | install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} | 133 | install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} |
@@ -157,22 +148,19 @@ do_deploy () { | |||
157 | if [ "x${UBOOT_CONFIG}" != "x" ] | 148 | if [ "x${UBOOT_CONFIG}" != "x" ] |
158 | then | 149 | then |
159 | for config in ${UBOOT_MACHINE}; do | 150 | for config in ${UBOOT_MACHINE}; do |
160 | for type in in ${UBOOT_CONFIG}; do | 151 | i=`expr $i + 1`; |
161 | if [ "${type}"x = "in"x ] | 152 | for type in ${UBOOT_CONFIG}; do |
153 | j=`expr $j + 1`; | ||
154 | if [ $j -eq $i ] | ||
162 | then | 155 | then |
163 | continue | ||
164 | fi | ||
165 | if [ -d "${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}" ] | ||
166 | then | ||
167 | break | ||
168 | else | ||
169 | install -d ${DEPLOYDIR} | 156 | install -d ${DEPLOYDIR} |
170 | install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX} | 157 | install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} |
171 | cd ${DEPLOYDIR} | 158 | cd ${DEPLOYDIR} |
172 | ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} | 159 | ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} |
173 | ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_BINARY} | 160 | ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY} |
174 | fi | 161 | fi |
175 | done | 162 | done |
163 | unset j | ||
176 | done | 164 | done |
177 | else | 165 | else |
178 | install -d ${DEPLOYDIR} | 166 | install -d ${DEPLOYDIR} |
@@ -190,23 +178,20 @@ do_deploy () { | |||
190 | if [ "x${UBOOT_CONFIG}" != "x" ] | 178 | if [ "x${UBOOT_CONFIG}" != "x" ] |
191 | then | 179 | then |
192 | for config in ${UBOOT_MACHINE}; do | 180 | for config in ${UBOOT_MACHINE}; do |
193 | for type in in ${UBOOT_CONFIG}; do | 181 | i=`expr $i + 1`; |
194 | if [ "${type}"x = "in"x ] | 182 | for type in ${UBOOT_CONFIG}; do |
195 | then | 183 | j=`expr $j + 1`; |
196 | continue | 184 | if [ $j -eq $i ] |
197 | fi | 185 | then |
198 | if [ -d "${DEPLOYDIR}/${SPL_IMAGE}-${type}" ] | 186 | install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} |
199 | then | 187 | rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} |
200 | break | 188 | ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}-${type} |
201 | else | 189 | ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY} |
202 | install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type} | 190 | ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} |
203 | rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} | 191 | ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK} |
204 | ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}-${type} | 192 | fi |
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 | 193 | done |
194 | unset j | ||
210 | done | 195 | done |
211 | else | 196 | else |
212 | install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} | 197 | install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} |