diff options
Diffstat (limited to 'recipes-kernel/linux/linux-qoriq_3.12.bbappend')
-rw-r--r-- | recipes-kernel/linux/linux-qoriq_3.12.bbappend | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-qoriq_3.12.bbappend b/recipes-kernel/linux/linux-qoriq_3.12.bbappend new file mode 100644 index 0000000..b972e24 --- /dev/null +++ b/recipes-kernel/linux/linux-qoriq_3.12.bbappend @@ -0,0 +1,46 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI = "\ + git://git.scalys.com/linux-fsl-qoriq;branch=scalys \ + file://fit_image_template.its \ +" +SRCREV = "0247864d78189c1ca73dfba348eeddcfeb618a35" + +python __anonymous () { + d.appendVar("PACKAGES", " kernel-fitimage") +} + +FILES_kernel-fitimage = "/boot/" + +do_kernel_fitimage() { + cd ${B} + for i in ${KERNEL_FIT_IMAGES}; do + cp ${WORKDIR}/fit_image_template.its ${i}.its + sed -i "s/DTB_PLACEHOLDER/${i}/g" ${i}.its + uboot-mkimage -f ${i}.its ${B}/arch/${ARCH}/boot/${i}.itb + + # Assemble the name for the fitImage + ITB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${i}/g" | sed "s/uImage-/fitImage/g"` + ITB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${i}/g"` + + install -d ${DEPLOYDIR} + install -m 0644 ${B}/arch/${ARCH}/boot/${i}.itb ${DEPLOYDIR}/${ITB_NAME}.itb + + # create a symlink for the last generated fit image + cd ${DEPLOYDIR} + ln -sf ${ITB_NAME}.itb fitImage.itb + cd - + + # Make the FIT image available on the target RFS + install -d ${D}/boot + install -m 0644 ${B}/arch/${ARCH}/boot/${i}.itb ${D}/boot/${ITB_NAME}.itb + + # create a symlink for the last generated fit image + cd ${D}/boot/ + ln -sf ${ITB_NAME}.itb fitImage.itb + cd - + done +} + +# The install stage generates the DTB needed for the FIT image (linux-dtb.inc) +addtask do_kernel_fitimage after do_install before do_deploy
\ No newline at end of file |