From 3cd55b34ff554d7b4496535e46acf1126dc8d399 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 20 Oct 2014 15:00:00 +0200 Subject: colibri-vf: switch to zImage inside root fs Due to U-Boot udpate we need to create one big UBI volume. Since attaching the UBI volume is the expensive operation (compared to mount the UBIFS inside that volume), it is relatively cheep to load the kernel directly from the root filesystems /boot directory instead of creating a own volume for the kernel. This also makes it simpler to load a mainline kernel (along with the required dtb file). However, we loose the integrity check of the uImage. But since there were no measures in place to handle a invalid image, we do not loose functionality here. In case we need integrity check, we should consider switching to the new FIT image format... --- recipes/images/trdx-image-fstype.inc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'recipes') diff --git a/recipes/images/trdx-image-fstype.inc b/recipes/images/trdx-image-fstype.inc index ad5e435..dbafc48 100644 --- a/recipes/images/trdx-image-fstype.inc +++ b/recipes/images/trdx-image-fstype.inc @@ -42,16 +42,25 @@ imagedeploytools_append_mx6() { cp ${STAGING_ETCDIR_NATIVE}/imx-loader.d/mx6_usb_work.conf ${IMAGE_ROOT}/ } +imagedeploy_kernel() { + # put u-boot, kernel into the bin directories, remove the kernel/dtb from the rootfs/boot + # rm -f ${IMAGE_ROOTFS}/boot/uImage* ${IMAGE_ROOTFS}/boot/*.dtb + cp -pP ${DEPLOY_DIR_IMAGE}/uImage* ${IMAGE_ROOTFS}/../${MACHINE}_bin/ + ls ${DEPLOY_DIR_IMAGE}/*.dtb 2> /dev/null && cp -pP ${DEPLOY_DIR_IMAGE}/*.dtb ${IMAGE_ROOTFS}/../${MACHINE}_bin/ + mv ${IMAGE_ROOTFS}/../${MACHINE}_bin/uImage-${MACHINE}.bin ${IMAGE_ROOTFS}/../${MACHINE}_bin/uImage +} + +imagedeploy_kernel_colibri-vf() { + # Do nothing, we use the kernel from /boot inside root fs + : +} + fakeroot do_imagedeploy() { cd ${WORKDIR} tar -xf ${BURNFLASH} cp -pPr burnflash/* ${IMAGE_NAME}${PV}/ - # put u-boot, kernel into the bin directories, remove the kernel/dtb from the rootfs/boot - rm -f ${IMAGE_ROOTFS}/boot/uImage* ${IMAGE_ROOTFS}/boot/*.dtb - cp -pP ${DEPLOY_DIR_IMAGE}/uImage* ${IMAGE_ROOTFS}/../${MACHINE}_bin/ - ls ${DEPLOY_DIR_IMAGE}/*.dtb 2> /dev/null && cp -pP ${DEPLOY_DIR_IMAGE}/*.dtb ${IMAGE_ROOTFS}/../${MACHINE}_bin/ - mv ${IMAGE_ROOTFS}/../${MACHINE}_bin/uImage-${MACHINE}.bin ${IMAGE_ROOTFS}/../${MACHINE}_bin/uImage + imagedeploy_kernel cp -pP ${DEPLOY_DIR_IMAGE}/u-boot* ${IMAGE_ROOTFS}/../${MACHINE}_bin/ rm -f ${IMAGE_ROOTFS}/../${MACHINE}_bin/u-boot-hsmmc-${MACHINE}.${U_BOOT_EXT} -- cgit v1.2.3