diff options
author | Tom Rini <trini@konsulko.com> | 2017-12-13 18:18:29 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-12-19 17:32:57 -0500 |
commit | 8e1e3e7be522095086e80bd4e1640ca3bb28a3c4 (patch) | |
tree | 4aaa724f933d73f9833892ca7d10b2ad6a265580 /meta-agl-bsp/meta-rcar-gen3/recipes-bsp | |
parent | 6d60fccd6fa657660d78bfae5c3cf84dedcaced4 (diff) |
meta-agl-bsp/meta-rcar-gen3: Add u-boot-script-rcar-gen3 to ease boot
Introduce a boot.scr script to handle loading the kernel and device
tree, along with setting up the bootargs.
Change-Id: I6716197bc68c37e72d6203113f055fbc0d84ee37
Bug-AGL: SPEC-1175
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'meta-agl-bsp/meta-rcar-gen3/recipes-bsp')
-rw-r--r-- | meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-script-rcar-gen3.bb | 35 | ||||
-rw-r--r-- | meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-script-rcar-gen3/boot.cmd | 4 |
2 files changed, 39 insertions, 0 deletions
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-script-rcar-gen3.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-script-rcar-gen3.bb new file mode 100644 index 000000000..42a05ec26 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-script-rcar-gen3.bb @@ -0,0 +1,35 @@ +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" +DEPENDS = "u-boot-mkimage-native" + +SRC_URI = "file://boot.cmd" + +inherit deploy + +do_mkimage () { + uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n "boot script" -d ${WORKDIR}/boot.cmd ${WORKDIR}/boot.scr +} + +addtask mkimage after do_compile before do_install + +do_compile[noexec] = "1" + +do_install () { + install -D -m 644 ${WORKDIR}/boot.scr ${D}/boot/boot.scr +} + +do_deploy () { + install -D -m 644 ${WORKDIR}/boot.scr \ + ${DEPLOYDIR}/boot.scr-${MACHINE}-${PV}-${PR} + + cd ${DEPLOYDIR} + rm -f boot.scr-${MACHINE} + ln -sf boot.scr-${MACHINE}-${PV}-${PR} 6x_bootscript-${MACHINE} +} + +addtask deploy after do_install before do_build + +FILES_${PN} += "/" + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-script-rcar-gen3/boot.cmd b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-script-rcar-gen3/boot.cmd new file mode 100644 index 000000000..61a7a925e --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-script-rcar-gen3/boot.cmd @@ -0,0 +1,4 @@ +setenv bootargs console=ttySC0,115200 root=/dev/mmcblk0p1 rootwait ro rootfstype=ext4 +ext4load mmc 0:1 0x48000000 /boot/${fdtfile} +ext4load mmc 0:1 0x48080000 /boot/Image +booti 0x48080000 - 0x48000000 |