aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-imx6/patches
diff options
context:
space:
mode:
Diffstat (limited to 'package/boot/uboot-imx6/patches')
-rw-r--r--package/boot/uboot-imx6/patches/0001-apalis_imx6_defconfig-enable-some-useful-commands.patch39
-rw-r--r--package/boot/uboot-imx6/patches/0001-imx6-apalis-Make-the-boot-process-more-generic.patch123
-rw-r--r--package/boot/uboot-imx6/patches/100-wandboard-enable-fit.patch17
-rw-r--r--package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch13
-rw-r--r--package/boot/uboot-imx6/patches/111-mx6cuboxi_defconfig-force-mmc-boot.patch23
5 files changed, 63 insertions, 152 deletions
diff --git a/package/boot/uboot-imx6/patches/0001-apalis_imx6_defconfig-enable-some-useful-commands.patch b/package/boot/uboot-imx6/patches/0001-apalis_imx6_defconfig-enable-some-useful-commands.patch
new file mode 100644
index 0000000000..18ad2d66d3
--- /dev/null
+++ b/package/boot/uboot-imx6/patches/0001-apalis_imx6_defconfig-enable-some-useful-commands.patch
@@ -0,0 +1,39 @@
+From 630b39c46b29de1874149c6b2c18c64966a0fabf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
+Date: Sun, 1 Mar 2020 22:47:31 +0100
+Subject: [PATCH] apalis_imx6_defconfig: enable some useful commands
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+partition table info, EXT4 write support, support for FAT and generic FS
+commands like load/ls that work for multiple FS types.
+
+Signed-off-by: Petr Štetiar <ynezz@true.cz>
+---
+ configs/apalis_imx6_defconfig | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
+index 0d11ab53d663..bbb3ec1aa554 100644
+--- a/configs/apalis_imx6_defconfig
++++ b/configs/apalis_imx6_defconfig
+@@ -43,6 +43,7 @@ CONFIG_CMD_GPIO=y
+ CONFIG_CMD_GPT=y
+ CONFIG_CMD_I2C=y
+ CONFIG_CMD_MMC=y
++CONFIG_CMD_PART=y
+ CONFIG_CMD_USB=y
+ CONFIG_CMD_USB_SDP=y
+ CONFIG_CMD_USB_MASS_STORAGE=y
+@@ -52,6 +53,10 @@ CONFIG_CMD_PMIC=y
+ CONFIG_CMD_REGULATOR=y
+ CONFIG_OF_CONTROL=y
+ CONFIG_DEFAULT_DEVICE_TREE="imx6-apalis"
++CONFIG_CMD_EXT4=y
++CONFIG_CMD_EXT4_WRITE=y
++CONFIG_CMD_FAT=y
++CONFIG_CMD_FS_GENERIC=y
+ CONFIG_ENV_IS_IN_MMC=y
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/package/boot/uboot-imx6/patches/0001-imx6-apalis-Make-the-boot-process-more-generic.patch b/package/boot/uboot-imx6/patches/0001-imx6-apalis-Make-the-boot-process-more-generic.patch
deleted file mode 100644
index 4de8ede39f..0000000000
--- a/package/boot/uboot-imx6/patches/0001-imx6-apalis-Make-the-boot-process-more-generic.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 42cc2cffb6d550fbb21dad033d2564d4da571015 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
-Date: Sat, 1 Dec 2018 12:46:37 +0100
-Subject: [PATCH] imx6: apalis: Make the boot process more generic
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-I'm preparing support for Apalis imx6 boards in OpenWrt and I've ended
-up with quite huge patchset against upstream U-Boot 2018.03, so I'm
-trying to propose more generic way of boot process handling.
-
-In OpenWrt we usually have kernel, dtbs and U-Boot boot script in boot
-partition with ext4fs, so for some use cases it would be handy to be
-able to replace some of the files in the boot partion, that's why I've
-added write support to the ext4.
-
-I've added `set_blkcnt` environment variable which is needed for every
-`mmc write` command as we need to always specify size in block count.
-This is copy&pasted from official Toradex's flashing scripts, so all the
-credits for this work belongs to them.
-
-Currently the rootfs location is passed via mmcblk number and the
-problem with this approach is that the mmcblk number for the boot device
-changes depending on the kernel version and imx6 SoC type. In order to
-avoid such issues, use the UUID method to specify the rootfs location.
-
-I've added new boot sequence, where we first try to load and run boot
-script defined in the new `script` variable, so the boot process could
-be more generic and overridden by the distro. When the boot script isn't
-loaded, it will use the previous boot sequence so it should be backward
-compatible.
-
-For the recovery purposes and better end user experience I've added boot
-from SDP as the last boot command if every other boot option fails. I
-plan to use SDP as official flashing/recovery procedure in OpenWrt for
-Apalis imx6 boards.
-
-I've copy&pasted almost everything from the `f086812a mx6sxsabresd: Use
-PARTUUID to specify the rootfs location` commit, so credits for the rest
-of this patch belongs to Fabio.
-
-Cc: Stefan Agner <stefan.agner@toradex.com>
-Cc: Max Krummenacher <max.krummenacher@toradex.com>
-Signed-off-by: Petr Štetiar <ynezz@true.cz>
----
- configs/apalis_imx6_defconfig | 2 ++
- include/configs/apalis_imx6.h | 26 +++++++++++++++++++++-----
- 2 files changed, 23 insertions(+), 5 deletions(-)
-
---- a/configs/apalis_imx6_defconfig
-+++ b/configs/apalis_imx6_defconfig
-@@ -40,6 +40,7 @@ CONFIG_CMD_DFU=y
- CONFIG_CMD_GPIO=y
- CONFIG_CMD_I2C=y
- CONFIG_CMD_MMC=y
-+CONFIG_CMD_PART=y
- CONFIG_CMD_USB=y
- CONFIG_CMD_USB_SDP=y
- CONFIG_CMD_USB_MASS_STORAGE=y
-@@ -49,6 +50,7 @@ CONFIG_CMD_PING=y
- CONFIG_CMD_BMP=y
- CONFIG_CMD_CACHE=y
- CONFIG_CMD_EXT4=y
-+CONFIG_CMD_EXT4_WRITE=y
- CONFIG_CMD_FAT=y
- CONFIG_CMD_FS_GENERIC=y
- CONFIG_ENV_IS_IN_MMC=y
---- a/include/configs/apalis_imx6.h
-+++ b/include/configs/apalis_imx6.h
-@@ -138,9 +138,9 @@
- "imx6q-colibri-cam-eval-v3.dtb fat 0 1"
-
- #define EMMC_BOOTCMD \
-- "emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext3 " \
-+ "emmcargs=ip=off root=PARTUUID=${uuid} rw,noatime rootfstype=ext3 " \
- "rootwait\0" \
-- "emmcboot=run setup; " \
-+ "emmcboot=run setup; run finduuid;" \
- "setenv bootargs ${defargs} ${emmcargs} ${setupargs} " \
- "${vidargs}; echo Booting from internal eMMC chip...; " \
- "run emmcdtbload; load mmc 0:1 ${kernel_addr_r} " \
-@@ -197,10 +197,17 @@
- #define FDT_FILE "imx6q-apalis_v1_0-eval.dtb"
- #endif
- #define CONFIG_EXTRA_ENV_SETTINGS \
-- "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \
-+ "script=boot.scr\0" \
-+ "finduuid=part uuid mmc 0:2 uuid\0" \
-+ "loadbootscript=" \
-+ "load mmc 0:1 ${loadaddr} ${script};\0" \
-+ "bootscript=echo Running bootscript from mmc ...; " \
-+ "source\0" \
-+ "bootcmd_default=run emmcboot ; echo ; echo emmcboot failed ; " \
- "run nfsboot ; echo ; echo nfsboot failed ; " \
- "usb start ;" \
-- "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \
-+ "setenv stdout serial,vga ; setenv stdin serial,usbkbd;" \
-+ "sdp 0\0" \
- "boot_file=uImage\0" \
- "console=ttymxc0\0" \
- "defargs=enable_wait_mode=off vmalloc=400M\0" \
-@@ -228,7 +235,16 @@
- "vidargs=mxc_hdmi.only_cea=1 " \
- "video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 " \
- "video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off " \
-- "fbmem=32M\0 "
-+ "fbmem=32M\0 " \
-+ "set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200\0"
-+
-+#define CONFIG_BOOTCOMMAND \
-+ "mmc dev 0;" \
-+ "if run loadbootscript; then " \
-+ "run bootscript; " \
-+ "else " \
-+ "run bootcmd_default; " \
-+ "fi; "
-
- /* Miscellaneous configurable options */
- #undef CONFIG_SYS_CBSIZE
---
-1.9.1
-
diff --git a/package/boot/uboot-imx6/patches/100-wandboard-enable-fit.patch b/package/boot/uboot-imx6/patches/100-wandboard-enable-fit.patch
deleted file mode 100644
index 2fd207e11c..0000000000
--- a/package/boot/uboot-imx6/patches/100-wandboard-enable-fit.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/configs/wandboard_defconfig
-+++ b/configs/wandboard_defconfig
-@@ -30,7 +30,7 @@ CONFIG_CMD_I2C=y
- CONFIG_CMD_MMC=y
- CONFIG_CMD_SATA=y
- CONFIG_CMD_USB=y
--CONFIG_CMD_CACHE=y
-+# CONFIG_CMD_CACHE is not set
- CONFIG_CMD_EXT4_WRITE=y
- CONFIG_ENV_IS_IN_MMC=y
- CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
-@@ -44,3 +44,5 @@ CONFIG_USB=y
- CONFIG_VIDEO=y
- # CONFIG_VIDEO_SW_CURSOR is not set
- CONFIG_OF_LIBFDT=y
-+CONFIG_FIT=y
-+CONFIG_FIT_VERBOSE=y
diff --git a/package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch b/package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch
index 2b2fde5ec9..111e1b9809 100644
--- a/package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch
+++ b/package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch
@@ -1,6 +1,6 @@
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
-@@ -290,6 +290,12 @@ static void setup_iomux_enet(void)
+@@ -292,6 +292,12 @@ static void setup_iomux_enet(void)
udelay(100);
}
@@ -13,14 +13,3 @@
int board_phy_config(struct phy_device *phydev)
{
if (phydev->drv->config)
---- a/arch/arm/mach-imx/spl.c
-+++ b/arch/arm/mach-imx/spl.c
-@@ -176,7 +176,7 @@ int g_dnl_bind_fixup(struct usb_device_d
- /* called from spl_mmc to see type of boot mode for storage (RAW or FAT) */
- u32 spl_boot_mode(const u32 boot_device)
- {
-- switch (spl_boot_device()) {
-+ switch (boot_device) {
- /* for MMC return either RAW or FAT mode */
- case BOOT_DEVICE_MMC1:
- case BOOT_DEVICE_MMC2:
diff --git a/package/boot/uboot-imx6/patches/111-mx6cuboxi_defconfig-force-mmc-boot.patch b/package/boot/uboot-imx6/patches/111-mx6cuboxi_defconfig-force-mmc-boot.patch
new file mode 100644
index 0000000000..19b73e3c9f
--- /dev/null
+++ b/package/boot/uboot-imx6/patches/111-mx6cuboxi_defconfig-force-mmc-boot.patch
@@ -0,0 +1,23 @@
+From 00ad8b42dfe801107db25ead8249cb10afcd0f94 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
+Date: Sun, 1 Mar 2020 22:10:23 +0100
+Subject: [PATCH] mx6cuboxi_defconfig: force mmc boot
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Petr Štetiar <ynezz@true.cz>
+---
+ configs/mx6cuboxi_defconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/configs/mx6cuboxi_defconfig
++++ b/configs/mx6cuboxi_defconfig
+@@ -6,6 +6,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
+ CONFIG_SPL_LIBGENERIC_SUPPORT=y
+ CONFIG_TARGET_MX6CUBOXI=y
+ CONFIG_SPL_MMC_SUPPORT=y
++CONFIG_SPL_FORCE_MMC_BOOT=y
+ CONFIG_SPL_SERIAL_SUPPORT=y
+ CONFIG_ENV_SIZE=0x2000
+ CONFIG_ENV_OFFSET=0xFE000