meta-digi-arm: add u-boot script to boot from SD card

https://jira.digi.com/browse/DEL-980

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2014-03-26 19:53:08 +01:00
parent 3f17dd091e
commit cb1818f7b6
3 changed files with 24 additions and 0 deletions

View File

@ -9,6 +9,9 @@ KERNEL_DEVICETREE = "imx6-${MACHINE}.dtb imx6-${MACHINE}-ldo.dtb imx6-${MACHINE}
SERIAL_CONSOLES = "115200;ttymxc0" SERIAL_CONSOLES = "115200;ttymxc0"
# U-Boot script to be copied to the SD image
BOOT_SCRIPTS = "boot-sd.scr:boot.scr"
# #
# Partition sizes # Partition sizes
# --------------- # ---------------

View File

@ -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}

View File

@ -9,11 +9,17 @@ PROVIDES += "u-boot"
LICENSE = "GPLv2+" LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
SRC_URI += "file://boot-sd.txt"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
do_compile_prepend() { do_compile_prepend() {
${S}/tools/setlocalversion --save-scmversion ${S} ${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}" PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(mx6)" COMPATIBLE_MACHINE = "(mx6)"