diff options
Diffstat (limited to 'meta/classes/kernel-fitimage.bbclass')
-rw-r--r-- | meta/classes/kernel-fitimage.bbclass | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass index f3c2ff0a30..f84be44bb9 100644 --- a/meta/classes/kernel-fitimage.bbclass +++ b/meta/classes/kernel-fitimage.bbclass | |||
@@ -258,25 +258,34 @@ fitimage_emit_section_config() { | |||
258 | fi | 258 | fi |
259 | 259 | ||
260 | # Test if we have any DTBs at all | 260 | # Test if we have any DTBs at all |
261 | conf_desc="Linux kernel" | 261 | sep="" |
262 | kernel_line="kernel = \"kernel@${2}\";" | 262 | conf_desc="" |
263 | kernel_line="" | ||
263 | fdt_line="" | 264 | fdt_line="" |
264 | ramdisk_line="" | 265 | ramdisk_line="" |
265 | setup_line="" | 266 | setup_line="" |
266 | default_line="" | 267 | default_line="" |
267 | 268 | ||
269 | if [ -n "${2}" ]; then | ||
270 | conf_desc="Linux kernel" | ||
271 | sep=", " | ||
272 | kernel_line="kernel = \"kernel@${2}\";" | ||
273 | fi | ||
274 | |||
268 | if [ -n "${3}" ]; then | 275 | if [ -n "${3}" ]; then |
269 | conf_desc="${conf_desc}, FDT blob" | 276 | conf_desc="${conf_desc}${sep}FDT blob" |
277 | sep=", " | ||
270 | fdt_line="fdt = \"fdt@${3}\";" | 278 | fdt_line="fdt = \"fdt@${3}\";" |
271 | fi | 279 | fi |
272 | 280 | ||
273 | if [ -n "${4}" ]; then | 281 | if [ -n "${4}" ]; then |
274 | conf_desc="${conf_desc}, ramdisk" | 282 | conf_desc="${conf_desc}${sep}ramdisk" |
283 | sep=", " | ||
275 | ramdisk_line="ramdisk = \"ramdisk@${4}\";" | 284 | ramdisk_line="ramdisk = \"ramdisk@${4}\";" |
276 | fi | 285 | fi |
277 | 286 | ||
278 | if [ -n "${5}" ]; then | 287 | if [ -n "${5}" ]; then |
279 | conf_desc="${conf_desc}, setup" | 288 | conf_desc="${conf_desc}${sep}setup" |
280 | setup_line="setup = \"setup@${5}\";" | 289 | setup_line="setup = \"setup@${5}\";" |
281 | fi | 290 | fi |
282 | 291 | ||
@@ -299,18 +308,26 @@ EOF | |||
299 | 308 | ||
300 | if [ ! -z "${conf_sign_keyname}" ] ; then | 309 | if [ ! -z "${conf_sign_keyname}" ] ; then |
301 | 310 | ||
302 | sign_line="sign-images = \"kernel\"" | 311 | sign_line="sign-images = " |
312 | sep="" | ||
313 | |||
314 | if [ -n "${2}" ]; then | ||
315 | sign_line="${sign_line}${sep}\"kernel\"" | ||
316 | sep=", " | ||
317 | fi | ||
303 | 318 | ||
304 | if [ -n "${3}" ]; then | 319 | if [ -n "${3}" ]; then |
305 | sign_line="${sign_line}, \"fdt\"" | 320 | sign_line="${sign_line}${sep}\"fdt\"" |
321 | sep=", " | ||
306 | fi | 322 | fi |
307 | 323 | ||
308 | if [ -n "${4}" ]; then | 324 | if [ -n "${4}" ]; then |
309 | sign_line="${sign_line}, \"ramdisk\"" | 325 | sign_line="${sign_line}${sep}\"ramdisk\"" |
326 | sep=", " | ||
310 | fi | 327 | fi |
311 | 328 | ||
312 | if [ -n "${5}" ]; then | 329 | if [ -n "${5}" ]; then |
313 | sign_line="${sign_line}, \"setup\"" | 330 | sign_line="${sign_line}${sep}\"setup\"" |
314 | fi | 331 | fi |
315 | 332 | ||
316 | sign_line="${sign_line};" | 333 | sign_line="${sign_line};" |
@@ -413,7 +430,12 @@ fitimage_assemble() { | |||
413 | if [ -n "${DTBS}" ]; then | 430 | if [ -n "${DTBS}" ]; then |
414 | i=1 | 431 | i=1 |
415 | for DTB in ${DTBS}; do | 432 | for DTB in ${DTBS}; do |
416 | fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}`" | 433 | dtb_ext=${DTB##*.} |
434 | if [ "${dtb_ext}" = "dtbo" ]; then | ||
435 | fitimage_emit_section_config ${1} "" "${DTB}" "" "" "`expr ${i} = ${dtbcount}`" | ||
436 | else | ||
437 | fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}`" | ||
438 | fi | ||
417 | i=`expr ${i} + 1` | 439 | i=`expr ${i} + 1` |
418 | done | 440 | done |
419 | fi | 441 | fi |