From cb1818f7b6fc6a48768936d39ba689b8a28855cb Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 26 Mar 2014 19:53:08 +0100 Subject: [PATCH] meta-digi-arm: add u-boot script to boot from SD card https://jira.digi.com/browse/DEL-980 Signed-off-by: Javier Viguera --- meta-digi-arm/conf/machine/ccimx6adpt.conf | 3 +++ .../u-boot/u-boot-dey-2013.04/boot-sd.txt | 15 +++++++++++++++ .../recipes-bsp/u-boot/u-boot-dey_2013.04.bb | 6 ++++++ 3 files changed, 24 insertions(+) create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2013.04/boot-sd.txt diff --git a/meta-digi-arm/conf/machine/ccimx6adpt.conf b/meta-digi-arm/conf/machine/ccimx6adpt.conf index 9fcc88707..5a2abae53 100644 --- a/meta-digi-arm/conf/machine/ccimx6adpt.conf +++ b/meta-digi-arm/conf/machine/ccimx6adpt.conf @@ -9,6 +9,9 @@ KERNEL_DEVICETREE = "imx6-${MACHINE}.dtb imx6-${MACHINE}-ldo.dtb imx6-${MACHINE} SERIAL_CONSOLES = "115200;ttymxc0" +# U-Boot script to be copied to the SD image +BOOT_SCRIPTS = "boot-sd.scr:boot.scr" + # # Partition sizes # --------------- diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2013.04/boot-sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2013.04/boot-sd.txt new file mode 100644 index 000000000..86df1d4fc --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2013.04/boot-sd.txt @@ -0,0 +1,15 @@ +# +# U-Boot bootscript for SD images created by Yocto. +# +# Layout: +# * U-Boot (raw copied) +# * Boot partion (FAT) with kernel images and DTB +# * Rootfs partion (EXT4) +# +# +--------------+----------------------+-------------------------+ +# | U-BOOT (RAW) | BOOT_PARTITION (FAT) | ROOTFS_PARTITION (EXT4) | +# +--------------+----------------------+-------------------------+ +# +setenv mmcroot /dev/mmcblk${mmcdev}p2 +setenv uimage uImage +dboot linux mmc ${mmcdev}:${mmcpart} diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2013.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2013.04.bb index e0e595545..8776f95c9 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2013.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2013.04.bb @@ -9,11 +9,17 @@ PROVIDES += "u-boot" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" +SRC_URI += "file://boot-sd.txt" + S = "${WORKDIR}/git" do_compile_prepend() { ${S}/tools/setlocalversion --save-scmversion ${S} } +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 = "(mx6)"