Skip to contentSkip to conversation

image_types_fsl.bbclass: make sdcard compatible with fitImage

PATCH In review S. Lockwood-Childs 2 participants 2 messages Oct 27, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 image_types_fsl.bbclass: make sdcard compatible with fitImage

Fixes error along the lines of
ERROR: imx-blah.dtb does not exist.

The sdcard image format was assuming all applicable devicetree files would be available in the deploy area. This is not the case for fitImage kernel format, which packs both the kernel and all enabled devicetree files into a single file.

Treat fitImage as an exception, skipping separate install of dtb files since they get installed as part of the kernel file instead.

---
 classes/image_types_fsl.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/image_types_fsl.bbclass +1 -1
index 4709af9..cde1af7 100644
@@ -97,7 +97,7 @@ _generate_boot_image() {
 	done
 
 	# Copy device tree file
-	if test -n "${KERNEL_DEVICETREE}"; then
+	if [ -n "${KERNEL_DEVICETREE}" -a ${KERNEL_IMAGETYPE} != fitImage ]; then
 		for DTS_FILE in ${KERNEL_DEVICETREE}; do
 			DTS_BASE_NAME=`basename ${DTS_FILE} .dtb`
 			if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
Signature · 1 line
1.9.4
#1 lore raw
Quoted 8 lines · S. Lockwood-Childs

Fixes error along the lines of
ERROR: imx-blah.dtb does not exist.

The sdcard image format was assuming all applicable devicetree files would be available in the deploy area. This is not the case for fitImage kernel format, which packs both the kernel and all enabled devicetree files into a single file.

Quoted 4 lines

Treat fitImage as an exception, skipping separate install of dtb files since they get installed as part of the kernel file instead.

Thanks for sending this; one question though ... did you try to do the same using wic?

We are deprecating the class use for rocko and will soon remove the sdcard generation from it, so it'd be good if you could try the wic ... it is very straightforward and we use it internally with a fitImage :-)

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750