From e42a2915574e92c1765b84007262e2189916b07f Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Mon, 12 Jan 2015 16:45:04 +0100 Subject: [PATCH] meta-digi: support ccardimx28js SD images based on kernel 2.6.35 Notes: * This version of u-boot does not support comments in scripts * Enabled EXT4 in kernel config (for the SDCARD rootfs) https://jira.digi.com/browse/DEL-197 Signed-off-by: Javier Viguera --- meta-digi-arm/classes/image_types_digi.bbclass | 2 +- meta-digi-arm/conf/machine/include/ccardimx28.inc | 3 ++- .../u-boot/u-boot-dey-2009.08/ccardimx28/boot-sd.txt | 3 +++ meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2009.08.bb | 8 +++++--- .../linux/linux-dey-2.6.35.14/ccardimx28js/defconfig | 8 +++++++- 5 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2009.08/ccardimx28/boot-sd.txt diff --git a/meta-digi-arm/classes/image_types_digi.bbclass b/meta-digi-arm/classes/image_types_digi.bbclass index e7d0aff88..ca20a100f 100644 --- a/meta-digi-arm/classes/image_types_digi.bbclass +++ b/meta-digi-arm/classes/image_types_digi.bbclass @@ -109,7 +109,7 @@ generate_ccardimx28js_sdcard() { echo -n S | dd of=${SDCARD} bs=1 count=1 seek=450 conv=notrunc ${PRINTF} "${BS_HDR}" | dd of=${SDCARD} bs=512 seek=$(expr 1024 \* 2) conv=notrunc,sync - dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} of=${SDCARD} bs=512 seek=$(expr 1024 \* 2 \+ 1) conv=notrunc,sync + dd if=${DEPLOY_DIR_IMAGE}/${UBOOT_SYMLINK} of=${SDCARD} bs=512 seek=$(expr 1024 \* 2 \+ 1) conv=notrunc,sync BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \ | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 1024 }') diff --git a/meta-digi-arm/conf/machine/include/ccardimx28.inc b/meta-digi-arm/conf/machine/include/ccardimx28.inc index 459e8b4b4..58c3bdb26 100644 --- a/meta-digi-arm/conf/machine/include/ccardimx28.inc +++ b/meta-digi-arm/conf/machine/include/ccardimx28.inc @@ -7,7 +7,8 @@ include conf/machine/include/mxs-digi-base.inc DIGI_FAMILY = "ccardimx28" SOC_FAMILY = "mxs:mx28:${DIGI_FAMILY}" -# Platform u-boot settings +# Platform u-boot settings (IS_KERNEL_2X implies also u-boot v2009.08) +UBOOT_BSTR = "${@base_conditional('IS_KERNEL_2X', '1' , '-ivt', '', d)}" UBOOT_ENTRYPOINT = "0x40008000" UBOOT_SUFFIX = "sb" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2009.08/ccardimx28/boot-sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2009.08/ccardimx28/boot-sd.txt new file mode 100644 index 000000000..f70a512a3 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2009.08/ccardimx28/boot-sd.txt @@ -0,0 +1,3 @@ +setenv kimg uimage +setenv mmc_rpart /dev/mmcblk0p3 +dboot linux mmc 0:2 fat diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2009.08.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2009.08.bb index dad1e4890..ef84b8c95 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2009.08.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2009.08.bb @@ -9,16 +9,18 @@ PROVIDES += "u-boot" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=4c6cde5df68eff615d36789dc18edd3b" -PR = "r0" +SRC_URI_append_mxs = " file://boot-sd.txt" S = "${WORKDIR}/git" -UBOOT_BSTR_mxs = "-ivt" - DEPENDS_mxs += "elftosb-native imx-bootlets-dey" EXTRA_OEMAKE += 'HOSTSTRIP=true' EXTRA_OEMAKE_append_mxs = ' BOOTLETS_DIR=${STAGING_DIR_TARGET}/boot' +do_deploy_append() { + mkimage -T script -n bootscript -C none -d ${WORKDIR}/boot-sd.txt ${DEPLOYDIR}/boot-sd.scr +} + PACKAGE_ARCH = "${MACHINE_ARCH}" COMPATIBLE_MACHINE = "(mxs|mx5)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey-2.6.35.14/ccardimx28js/defconfig b/meta-digi-arm/recipes-kernel/linux/linux-dey-2.6.35.14/ccardimx28js/defconfig index ca4dd431a..00eb6f2be 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey-2.6.35.14/ccardimx28js/defconfig +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey-2.6.35.14/ccardimx28js/defconfig @@ -1406,8 +1406,14 @@ CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set # CONFIG_EXT3_FS_XATTR is not set -# CONFIG_EXT4_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_XATTR=y +# CONFIG_EXT4_FS_POSIX_ACL is not set +# CONFIG_EXT4_FS_SECURITY is not set +# CONFIG_EXT4_DEBUG is not set CONFIG_JBD=y +CONFIG_JBD2=y +CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set # CONFIG_FS_POSIX_ACL is not set