From 10c9d074e0b3a00ef45d0764c7283fe2cdade101 Mon Sep 17 00:00:00 2001 From: Risto Avila Date: Fri, 15 Jul 2016 12:36:45 +0300 Subject: Fix colibri- vf & imx7 partitions Change-Id: Ib7544e8c85e29f19e3a979217834f486e9e5f0fd Reviewed-by: Kalle Viironen --- .../recipes/u-boot/u-boot-script-toradex/mx7/flash_blk.scr | 2 +- .../recipes/u-boot/u-boot-script-toradex/mx7/flash_mmc.scr | 2 +- .../0001-colibri-imx7-fix-update-u-boot.patch | 12 ++++++++++++ .../u-boot-toradex/0002-colibri-vf-fix-mmc-boot.patch | 14 ++++++++++++++ .../recipes/u-boot/u-boot-toradex_2015.04.bbappend | 2 ++ 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 meta-toradex-extras/recipes/u-boot/u-boot-toradex/0001-colibri-imx7-fix-update-u-boot.patch create mode 100644 meta-toradex-extras/recipes/u-boot/u-boot-toradex/0002-colibri-vf-fix-mmc-boot.patch (limited to 'meta-toradex-extras') diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_blk.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_blk.scr index ee87e85..3e05a85 100644 --- a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_blk.scr +++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_blk.scr @@ -1,5 +1,5 @@ test -n ${interface} || setenv interface mmc -test -n ${drive} || setenv drive 1 +test -n ${drive} || setenv drive 0 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}' diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_mmc.scr b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_mmc.scr index 152982c..0c16652 100644 --- a/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_mmc.scr +++ b/meta-toradex-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_mmc.scr @@ -1,6 +1,6 @@ #flash_mmc has been renamed to flash_blk, ensure compatibility when updating from older versions test -n ${interface} || setenv interface mmc -test -n ${drive} || setenv drive 1 +test -n ${drive} || setenv drive 0 fatload ${interface} ${drive}:1 ${loadaddr} flash_blk.img source ${loadaddr} diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-toradex/0001-colibri-imx7-fix-update-u-boot.patch b/meta-toradex-extras/recipes/u-boot/u-boot-toradex/0001-colibri-imx7-fix-update-u-boot.patch new file mode 100644 index 0000000..501ad33 --- /dev/null +++ b/meta-toradex-extras/recipes/u-boot/u-boot-toradex/0001-colibri-imx7-fix-update-u-boot.patch @@ -0,0 +1,12 @@ +diff -Naur git.orig/include/configs/colibri_imx7.h git/include/configs/colibri_imx7.h +--- git.orig/include/configs/colibri_imx7.h 2016-07-15 12:31:35.915934824 +0300 ++++ git/include/configs/colibri_imx7.h 2016-07-15 12:32:40.867937388 +0300 +@@ -248,7 +248,7 @@ + "${board}/flash_eth.img && source ${loadaddr}\0" \ + "setsdupdate=mmc rescan && setenv interface mmc && " \ + "fatload ${interface} 0:1 ${loadaddr} " \ +- "${board}/flash_blk.img && source ${loadaddr}\0" \ ++ "/flash_blk.img && source ${loadaddr}\0" \ + "setup=setenv setupargs " \ + "console=tty1 console=${console}" \ + ",${baudrate}n8 ${memargs} consoleblank=0 ${mtdparts}\0" \ diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-toradex/0002-colibri-vf-fix-mmc-boot.patch b/meta-toradex-extras/recipes/u-boot/u-boot-toradex/0002-colibri-vf-fix-mmc-boot.patch new file mode 100644 index 0000000..25476dd --- /dev/null +++ b/meta-toradex-extras/recipes/u-boot/u-boot-toradex/0002-colibri-vf-fix-mmc-boot.patch @@ -0,0 +1,14 @@ +diff -Naur git.orig/include/configs/colibri_vf.h git/include/configs/colibri_vf.h +--- git.orig/include/configs/colibri_vf.h 2016-07-15 12:05:41.263873456 +0300 ++++ git/include/configs/colibri_vf.h 2016-07-15 12:06:19.759874976 +0300 +@@ -161,8 +161,8 @@ + "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \ + "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} " \ + "${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \ +- "load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \ +- "load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri-${fdt_board}.dtb && " \ ++ "load mmc 0:1 ${kernel_addr_r} /${kernel_file} && " \ ++ "load mmc 0:1 ${fdt_addr_r} /${soc}-colibri-${fdt_board}.dtb && " \ + "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ + + #define NFS_BOOTCMD \ diff --git a/meta-toradex-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend b/meta-toradex-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend index 29070c5..bdae0b8 100644 --- a/meta-toradex-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend +++ b/meta-toradex-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend @@ -30,6 +30,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += " \ file://0001-colibri-vf-remove-console-from-tty1.patch \ + file://0002-colibri-vf-fix-mmc-boot.patch \ + file://0001-colibri-imx7-fix-update-u-boot.patch \ " do_compile_append () { -- cgit v1.2.3-54-g00ecf