diff options
Diffstat (limited to 'meta-toradex-extras/recipes/u-boot')
8 files changed, 78 insertions, 7 deletions
diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex.bb b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex.bb index b83e6a03..92ea3bd7 100644 --- a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex.bb +++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex.bb @@ -25,16 +25,21 @@ DEPENDS = "u-boot-mkimage-native" PV = "v2.3" -SRC_URI = "file://flash_mmc.scr" +SRC_URI = " \ + file://flash_mmc.scr \ + file://flash_blk.scr \ + " inherit deploy -UPDATESCRIPT = "${WORKDIR}/flash_mmc.scr" - do_mkimage () { uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ - -n "update script" -d ${UPDATESCRIPT} \ + -n "update script" -d ${WORKDIR}/flash_mmc.scr \ flash_mmc.img + + uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n "update script" -d ${WORKDIR}/flash_blk.scr \ + flash_blk.img } addtask mkimage after do_compile before do_install @@ -42,10 +47,13 @@ addtask mkimage after do_compile before do_install do_deploy () { install -d ${DEPLOYDIR} install ${S}/flash_mmc.img ${DEPLOYDIR}/flash_mmc-${MACHINE}-${PV}-${PR}.img + install ${S}/flash_blk.img ${DEPLOYDIR}/flash_blk-${MACHINE}-${PV}-${PR}.img cd ${DEPLOYDIR} rm -f flash_mmc-${MACHINE}.img ln -sf flash_mmc-${MACHINE}-${PV}-${PR}.img flash_mmc-${MACHINE}.img + rm -f flash_blk-${MACHINE}.img + ln -sf flash_blk-${MACHINE}-${PV}-${PR}.img flash_blk-${MACHINE}.img } addtask deploy after do_install before do_build @@ -55,4 +63,4 @@ do_install[noexec] = "1" do_populate_sysroot[noexec] = "1" PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(apalis-imx6)" +COMPATIBLE_MACHINE = "(apalis-imx6|colibri-vf)" diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/flash_mmc.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/flash_mmc.scr deleted file mode 100644 index 5b7dc803..00000000 --- a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/flash_mmc.scr +++ /dev/null @@ -1,2 +0,0 @@ -setenv update_uboot 'fatload mmc ${drive}:1 ${loadaddr} u-boot.imx && setexpr blkcnt $filesize + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 && mmc dev 0 && mmc write ${loadaddr} 2 ${blkcnt}' -echo 'enter "run update_uboot" to update the uboot' diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr new file mode 100644 index 00000000..ee87e854 --- /dev/null +++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr @@ -0,0 +1,6 @@ +test -n ${interface} || setenv interface mmc +test -n ${drive} || setenv drive 1 + +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +setenv update_uboot 'fatload ${interface} ${drive}:1 ${loadaddr} u-boot.imx && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 2 ${blkcnt}' +echo 'enter "run update_uboot" to update the uboot' diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr new file mode 100644 index 00000000..207c7db4 --- /dev/null +++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr @@ -0,0 +1,6 @@ +#flash_mmc has been renamed to flash_blk, ensure compatibilty when updating from older versions +test -n ${interface} || setenv interface mmc +test -n ${drive} || setenv drive 1 + +fatload ${interface} ${drive}:1 ${loadaddr} flash_blk.img +source ${loadaddr} diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr new file mode 100644 index 00000000..5e313804 --- /dev/null +++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr @@ -0,0 +1,2 @@ +setenv update_uboot 'fatload ${interface} 0:1 ${loadaddr} u-boot-nand.imx && nand erase.part u-boot && nand erase.part u-boot-env && nand write ${loadaddr} u-boot' +echo 'enter "run update_uboot" to update the uboot' diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr new file mode 100644 index 00000000..e0770a02 --- /dev/null +++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr @@ -0,0 +1,3 @@ +setenv interface mmc +fatload ${interface} 0:1 ${loadaddr} flash_blk.img +source ${loadaddr} diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl/0001-colibri-vf-enable-sdboot-by-default.patch b/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl/0001-colibri-vf-enable-sdboot-by-default.patch new file mode 100644 index 00000000..2e72ff60 --- /dev/null +++ b/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl/0001-colibri-vf-enable-sdboot-by-default.patch @@ -0,0 +1,45 @@ +From a388755704c3f8c4336939f3c868942d68b1e256 Mon Sep 17 00:00:00 2001 +From: Samuli Piippo <samuli.piippo@theqtcompany.com> +Date: Thu, 28 May 2015 09:06:54 +0300 +Subject: [PATCH] colibri vf: enable sdboot by default + +Run sdboot first, update dtb file location to /boot/ and +remove console message from tty1 +--- + include/configs/colibri_vf.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h +index feea159..b080510 100644 +--- a/include/configs/colibri_vf.h ++++ b/include/configs/colibri_vf.h +@@ -135,7 +135,7 @@ + "load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \ + "run sddtbload; bootz ${kernel_addr_r} - ${dtbparam}\0" \ + "sddtbload=setenv dtbparam; load mmc 0:2 ${fdt_addr_r} " \ +- "${soc}-colibri-${fdt_board}.dtb && " \ ++ "/boot/${soc}-colibri-${fdt_board}.dtb && " \ + "setenv dtbparam ${fdt_addr_r}\0" + + #define NFS_BOOTCMD \ +@@ -160,7 +160,7 @@ + "/boot/${soc}-colibri-${fdt_board}.dtb && " \ + "setenv dtbparam ${fdt_addr_r}\0" + +-#define CONFIG_BOOTCOMMAND "run ubiboot; run sdboot; run nfsboot" ++#define CONFIG_BOOTCOMMAND "run sdboot; run ubiboot; run nfsboot" + + #define DFU_ALT_NAND_INFO "vf-bcb part 0,1;u-boot part 0,2;ubi part 0,4" + +@@ -173,7 +173,7 @@ + "defargs=\0" \ + "console=ttyLP0\0" \ + "setup=setenv setupargs fec_mac=${ethaddr} consoleblank=0 " \ +- "console=tty1 console=${console},${baudrate}n8 ${memargs}\0" \ ++ "console=${console},${baudrate}n8 ${memargs}\0" \ + "setsdupdate=mmc rescan && set interface mmc && " \ + "fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ + "source ${loadaddr}\0" \ +-- +1.9.1 + diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl_git.bbappend b/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl_git.bbappend index d1675deb..1c2e5617 100644 --- a/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl_git.bbappend +++ b/meta-toradex-extras/recipes/u-boot/u-boot-toradex-fsl_git.bbappend @@ -24,3 +24,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI_append_apalis-imx6 = " \ file://0001-Update-default-args-for-apalis-imx6.patch \ " +SRC_URI_append_colibri-vf = " \ + file://0001-colibri-vf-enable-sdboot-by-default.patch \ + " |