All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup
@ 2020-10-10  6:30 Sergey Matyukevich
  2020-10-10  6:30 ` [Buildroot] [PATCH 1/5] configs/mx6sx_udoo_neo: bump kernel and U-Boot versions Sergey Matyukevich
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Sergey Matyukevich @ 2020-10-10  6:30 UTC (permalink / raw)
  To: buildroot

Hi Fabio and all,

Here is a patch series for Udoo boards with BSP updates and several minor
cleanups required to make updated BSP work out of the box.
Major changes include:

- bump Linux kernel to 5.8.13
- bump U-Boot to 2020.10
- udoo/mx6qdl: disable usbh1 in dts rather than in kernel configuration
- use common image generation files for udoo boards

Regards,
Sergey


Sergey Matyukevich (5):
  configs/mx6sx_udoo_neo: bump kernel and U-Boot versions
  configs/mx6udoo: bump bsp versions and modify image
  board/udoo: use common image generation files
  board/udoo/mx6qdl: disable usb device in device tree
  board/udoo: drop custom post-image script

 board/udoo/{neo => common}/boot.scr.txt       |  2 +-
 board/udoo/{neo => common}/genimage.cfg       |  9 -------
 board/udoo/{neo => common}/post-build.sh      |  0
 board/udoo/mx6qdl/linux.fragment              |  1 -
 .../linux/0000-udoo-disable-usbh1.patch       | 26 +++++++++++++++++++
 board/udoo/mx6qdl/readme.txt                  |  2 +-
 board/udoo/neo/post-image.sh                  | 15 -----------
 board/udoo/neo/readme.txt                     |  2 +-
 configs/mx6sx_udoo_neo_defconfig              | 13 +++++-----
 configs/mx6udoo_defconfig                     | 16 +++++++-----
 10 files changed, 46 insertions(+), 40 deletions(-)
 rename board/udoo/{neo => common}/boot.scr.txt (66%)
 rename board/udoo/{neo => common}/genimage.cfg (50%)
 rename board/udoo/{neo => common}/post-build.sh (100%)
 delete mode 100644 board/udoo/mx6qdl/linux.fragment
 create mode 100644 board/udoo/mx6qdl/patches/linux/0000-udoo-disable-usbh1.patch
 delete mode 100755 board/udoo/neo/post-image.sh

-- 
2.28.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 1/5] configs/mx6sx_udoo_neo: bump kernel and U-Boot versions
  2020-10-10  6:30 [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup Sergey Matyukevich
@ 2020-10-10  6:30 ` Sergey Matyukevich
  2020-10-13 16:16   ` Thomas Petazzoni
  2020-10-10  6:30 ` [Buildroot] [PATCH 2/5] configs/mx6udoo: bump bsp versions and modify image Sergey Matyukevich
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Sergey Matyukevich @ 2020-10-10  6:30 UTC (permalink / raw)
  To: buildroot

Bump Linux kernel to 5.8.13 and U-Boot to 2020.10.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
 configs/mx6sx_udoo_neo_defconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/configs/mx6sx_udoo_neo_defconfig b/configs/mx6sx_udoo_neo_defconfig
index e2e36b907b..57b9562c06 100644
--- a/configs/mx6sx_udoo_neo_defconfig
+++ b/configs/mx6sx_udoo_neo_defconfig
@@ -3,8 +3,8 @@ BR2_cortex_a9=y
 BR2_ARM_ENABLE_NEON=y
 BR2_ARM_ENABLE_VFP=y
 BR2_ARM_FPU_VFPV3=y
-# Linux headers same as kernel, a 4.13 series
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+# Linux headers same as kernel, a 5.8 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/udoo/neo/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/udoo/neo/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
@@ -12,13 +12,13 @@ BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="udoo_neo"
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="SPL"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.3"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13"
 BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sx-udoo-neo-basic imx6sx-udoo-neo-full imx6sx-udoo-neo-extended"
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/5] configs/mx6udoo: bump bsp versions and modify image
  2020-10-10  6:30 [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup Sergey Matyukevich
  2020-10-10  6:30 ` [Buildroot] [PATCH 1/5] configs/mx6sx_udoo_neo: bump kernel and U-Boot versions Sergey Matyukevich
@ 2020-10-10  6:30 ` Sergey Matyukevich
  2020-10-13 16:22   ` Thomas Petazzoni
  2020-10-10  6:30 ` [Buildroot] [PATCH 3/5] board/udoo: use common image generation files Sergey Matyukevich
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Sergey Matyukevich @ 2020-10-10  6:30 UTC (permalink / raw)
  To: buildroot

Bump U-Boot to 2020.10 and kernel to 5.8.13 version. Updated U-Boot no
longer provides specific boot command in default environment for this
board. So boot script needs to be added to the image. For this purpose
switch from Freescale common scripts to custom image generation similar
to what Udoo Neo board does. Create a single rootfs partition with all
the required boot files including boot.scr, kernel, and dtb.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
 board/udoo/mx6qdl/boot.scr.txt  |  7 +++++++
 board/udoo/mx6qdl/genimage.cfg  | 32 ++++++++++++++++++++++++++++++++
 board/udoo/mx6qdl/post-build.sh |  7 +++++++
 board/udoo/mx6qdl/post-image.sh | 15 +++++++++++++++
 configs/mx6udoo_defconfig       | 13 ++++++++-----
 5 files changed, 69 insertions(+), 5 deletions(-)
 create mode 100644 board/udoo/mx6qdl/boot.scr.txt
 create mode 100644 board/udoo/mx6qdl/genimage.cfg
 create mode 100755 board/udoo/mx6qdl/post-build.sh
 create mode 100755 board/udoo/mx6qdl/post-image.sh

diff --git a/board/udoo/mx6qdl/boot.scr.txt b/board/udoo/mx6qdl/boot.scr.txt
new file mode 100644
index 0000000000..7acceed0fb
--- /dev/null
+++ b/board/udoo/mx6qdl/boot.scr.txt
@@ -0,0 +1,7 @@
+setenv finduuid "part uuid mmc 0:1 uuid"
+run finduuid
+run findfdt
+setenv bootargs "console=${console} root=PARTUUID=${uuid} rootwait rootfstype=ext4"
+load mmc 0:1 ${fdt_addr} boot/${fdtfile}
+load mmc 0:1 ${loadaddr} boot/zImage
+bootz ${loadaddr} - ${fdt_addr}
diff --git a/board/udoo/mx6qdl/genimage.cfg b/board/udoo/mx6qdl/genimage.cfg
new file mode 100644
index 0000000000..46209120f0
--- /dev/null
+++ b/board/udoo/mx6qdl/genimage.cfg
@@ -0,0 +1,32 @@
+# Minimal SD card image for the MX6SX Udoo Neo board
+#
+# The SD card must have at least 1 MB free at the beginning.
+# U-Boot and its environment are dumped as is.
+# A single root filesystem partition is required (Ext4 in this case).
+#
+# For details about the layout, see:
+# http://wiki.wandboard.org/index.php/Boot-process
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition spl {
+    in-partition-table = "no"
+    image = "SPL"
+    offset = 1K
+  }
+
+  partition u-boot {
+    in-partition-table = "no"
+    image = "u-boot.img"
+    offset = 69K
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext4"
+    offset = 1M
+    size = 512M
+  }
+}
diff --git a/board/udoo/mx6qdl/post-build.sh b/board/udoo/mx6qdl/post-build.sh
new file mode 100755
index 0000000000..6ccd87fafd
--- /dev/null
+++ b/board/udoo/mx6qdl/post-build.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+
+install -d -m 755 $TARGET_DIR/boot
+$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none  \
+	-n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr
diff --git a/board/udoo/mx6qdl/post-image.sh b/board/udoo/mx6qdl/post-image.sh
new file mode 100755
index 0000000000..18e76aa40d
--- /dev/null
+++ b/board/udoo/mx6qdl/post-image.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+  --rootpath "${TARGET_DIR}" \
+  --tmppath "${GENIMAGE_TMP}" \
+  --inputpath "${BINARIES_DIR}" \
+  --outputpath "${BINARIES_DIR}" \
+  --config "${GENIMAGE_CFG}"
+
diff --git a/configs/mx6udoo_defconfig b/configs/mx6udoo_defconfig
index 86ad13bbf3..2cf13ae559 100644
--- a/configs/mx6udoo_defconfig
+++ b/configs/mx6udoo_defconfig
@@ -3,27 +3,30 @@ BR2_cortex_a9=y
 BR2_ARM_ENABLE_NEON=y
 BR2_ARM_ENABLE_VFP=y
 BR2_ARM_FPU_VFPV3=y
-# Linux headers same as kernel, a 4.14 series
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y
+# Linux headers same as kernel, a 5.8 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/udoo/mx6qdl/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/udoo/mx6qdl/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="udoo"
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.01"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="SPL"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14.13"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13"
 BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
 BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/udoo/mx6qdl/linux.fragment"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-udoo imx6dl-udoo"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
 # required tools to create the SD card image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 3/5] board/udoo: use common image generation files
  2020-10-10  6:30 [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup Sergey Matyukevich
  2020-10-10  6:30 ` [Buildroot] [PATCH 1/5] configs/mx6sx_udoo_neo: bump kernel and U-Boot versions Sergey Matyukevich
  2020-10-10  6:30 ` [Buildroot] [PATCH 2/5] configs/mx6udoo: bump bsp versions and modify image Sergey Matyukevich
@ 2020-10-10  6:30 ` Sergey Matyukevich
  2020-10-10  6:30 ` [Buildroot] [PATCH 4/5] board/udoo/mx6qdl: disable usb device in device tree Sergey Matyukevich
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Sergey Matyukevich @ 2020-10-10  6:30 UTC (permalink / raw)
  To: buildroot

Both Udoo boards use the same set of boot scripts and image generation
scripts. Move all such scripts and files to common directory in order
to avoid duplication.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
 board/udoo/{mx6qdl => common}/boot.scr.txt  |  0
 board/udoo/{neo => common}/genimage.cfg     |  9 ------
 board/udoo/{mx6qdl => common}/post-build.sh |  0
 board/udoo/{mx6qdl => common}/post-image.sh |  0
 board/udoo/mx6qdl/genimage.cfg              | 32 ---------------------
 board/udoo/mx6qdl/readme.txt                |  2 +-
 board/udoo/neo/boot.scr.txt                 |  7 -----
 board/udoo/neo/post-build.sh                |  7 -----
 board/udoo/neo/post-image.sh                | 15 ----------
 board/udoo/neo/readme.txt                   |  2 +-
 configs/mx6sx_udoo_neo_defconfig            |  4 +--
 configs/mx6udoo_defconfig                   |  4 +--
 12 files changed, 6 insertions(+), 76 deletions(-)
 rename board/udoo/{mx6qdl => common}/boot.scr.txt (100%)
 rename board/udoo/{neo => common}/genimage.cfg (50%)
 rename board/udoo/{mx6qdl => common}/post-build.sh (100%)
 rename board/udoo/{mx6qdl => common}/post-image.sh (100%)
 delete mode 100644 board/udoo/mx6qdl/genimage.cfg
 delete mode 100644 board/udoo/neo/boot.scr.txt
 delete mode 100755 board/udoo/neo/post-build.sh
 delete mode 100755 board/udoo/neo/post-image.sh

diff --git a/board/udoo/mx6qdl/boot.scr.txt b/board/udoo/common/boot.scr.txt
similarity index 100%
rename from board/udoo/mx6qdl/boot.scr.txt
rename to board/udoo/common/boot.scr.txt
diff --git a/board/udoo/neo/genimage.cfg b/board/udoo/common/genimage.cfg
similarity index 50%
rename from board/udoo/neo/genimage.cfg
rename to board/udoo/common/genimage.cfg
index 46209120f0..79d3ba6fee 100644
--- a/board/udoo/neo/genimage.cfg
+++ b/board/udoo/common/genimage.cfg
@@ -1,12 +1,3 @@
-# Minimal SD card image for the MX6SX Udoo Neo board
-#
-# The SD card must have at least 1 MB free at the beginning.
-# U-Boot and its environment are dumped as is.
-# A single root filesystem partition is required (Ext4 in this case).
-#
-# For details about the layout, see:
-# http://wiki.wandboard.org/index.php/Boot-process
-
 image sdcard.img {
   hdimage {
   }
diff --git a/board/udoo/mx6qdl/post-build.sh b/board/udoo/common/post-build.sh
similarity index 100%
rename from board/udoo/mx6qdl/post-build.sh
rename to board/udoo/common/post-build.sh
diff --git a/board/udoo/mx6qdl/post-image.sh b/board/udoo/common/post-image.sh
similarity index 100%
rename from board/udoo/mx6qdl/post-image.sh
rename to board/udoo/common/post-image.sh
diff --git a/board/udoo/mx6qdl/genimage.cfg b/board/udoo/mx6qdl/genimage.cfg
deleted file mode 100644
index 46209120f0..0000000000
--- a/board/udoo/mx6qdl/genimage.cfg
+++ /dev/null
@@ -1,32 +0,0 @@
-# Minimal SD card image for the MX6SX Udoo Neo board
-#
-# The SD card must have at least 1 MB free at the beginning.
-# U-Boot and its environment are dumped as is.
-# A single root filesystem partition is required (Ext4 in this case).
-#
-# For details about the layout, see:
-# http://wiki.wandboard.org/index.php/Boot-process
-
-image sdcard.img {
-  hdimage {
-  }
-
-  partition spl {
-    in-partition-table = "no"
-    image = "SPL"
-    offset = 1K
-  }
-
-  partition u-boot {
-    in-partition-table = "no"
-    image = "u-boot.img"
-    offset = 69K
-  }
-
-  partition rootfs {
-    partition-type = 0x83
-    image = "rootfs.ext4"
-    offset = 1M
-    size = 512M
-  }
-}
diff --git a/board/udoo/mx6qdl/readme.txt b/board/udoo/mx6qdl/readme.txt
index cf1a610421..2e439ffa4c 100644
--- a/board/udoo/mx6qdl/readme.txt
+++ b/board/udoo/mx6qdl/readme.txt
@@ -14,4 +14,4 @@ directory, ready to be dumped on a micro SD card:
 dd if=output/images/sdcard.img of=/dev/<your-microsd-device>
 
 For details about the medium image layout, see the definition in
-board/udoo/mx6qdl/genimage.cfg.
+board/udoo/common/genimage.cfg.
diff --git a/board/udoo/neo/boot.scr.txt b/board/udoo/neo/boot.scr.txt
deleted file mode 100644
index 7a8aa4bd54..0000000000
--- a/board/udoo/neo/boot.scr.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-setenv finduuid "part uuid mmc 0:1 uuid"
-run finduuid
-run findfdt
-setenv bootargs "console=ttymxc0,115200 root=PARTUUID=${uuid} rootwait rootfstype=ext4"
-load mmc 0:1 ${fdt_addr} boot/${fdtfile}
-load mmc 0:1 ${loadaddr} boot/zImage
-bootz ${loadaddr} - ${fdt_addr}
diff --git a/board/udoo/neo/post-build.sh b/board/udoo/neo/post-build.sh
deleted file mode 100755
index 6ccd87fafd..0000000000
--- a/board/udoo/neo/post-build.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-BOARD_DIR="$(dirname $0)"
-
-install -d -m 755 $TARGET_DIR/boot
-$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none  \
-	-n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr
diff --git a/board/udoo/neo/post-image.sh b/board/udoo/neo/post-image.sh
deleted file mode 100755
index 18e76aa40d..0000000000
--- a/board/udoo/neo/post-image.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-
-BOARD_DIR="$(dirname $0)"
-GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage \
-  --rootpath "${TARGET_DIR}" \
-  --tmppath "${GENIMAGE_TMP}" \
-  --inputpath "${BINARIES_DIR}" \
-  --outputpath "${BINARIES_DIR}" \
-  --config "${GENIMAGE_CFG}"
-
diff --git a/board/udoo/neo/readme.txt b/board/udoo/neo/readme.txt
index f037ad484a..4d9659e02f 100644
--- a/board/udoo/neo/readme.txt
+++ b/board/udoo/neo/readme.txt
@@ -13,4 +13,4 @@ directory, ready to be dumped on an SD card:
 dd if=output/images/sdcard.img of=/dev/<your-microsd-device>
 
 For details about the medium image layout, see the definition in
-board/udoo/neo/genimage.cfg.
+board/udoo/common/genimage.cfg.
diff --git a/configs/mx6sx_udoo_neo_defconfig b/configs/mx6sx_udoo_neo_defconfig
index 57b9562c06..bec87561bb 100644
--- a/configs/mx6sx_udoo_neo_defconfig
+++ b/configs/mx6sx_udoo_neo_defconfig
@@ -5,8 +5,8 @@ BR2_ARM_ENABLE_VFP=y
 BR2_ARM_FPU_VFPV3=y
 # Linux headers same as kernel, a 5.8 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
-BR2_ROOTFS_POST_BUILD_SCRIPT="board/udoo/neo/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/udoo/neo/post-image.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/udoo/common/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/udoo/common/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_UBOOT=y
diff --git a/configs/mx6udoo_defconfig b/configs/mx6udoo_defconfig
index 2cf13ae559..bd0583b955 100644
--- a/configs/mx6udoo_defconfig
+++ b/configs/mx6udoo_defconfig
@@ -6,8 +6,8 @@ BR2_ARM_FPU_VFPV3=y
 # Linux headers same as kernel, a 5.8 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
-BR2_ROOTFS_POST_BUILD_SCRIPT="board/udoo/mx6qdl/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/udoo/mx6qdl/post-image.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/udoo/common/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/udoo/common/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_UBOOT=y
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 4/5] board/udoo/mx6qdl: disable usb device in device tree
  2020-10-10  6:30 [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup Sergey Matyukevich
                   ` (2 preceding siblings ...)
  2020-10-10  6:30 ` [Buildroot] [PATCH 3/5] board/udoo: use common image generation files Sergey Matyukevich
@ 2020-10-10  6:30 ` Sergey Matyukevich
  2020-10-10  6:30 ` [Buildroot] [PATCH 5/5] board/udoo: drop custom post-image script Sergey Matyukevich
  2020-10-13 13:28 ` [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup Fabio Estevam
  5 siblings, 0 replies; 10+ messages in thread
From: Sergey Matyukevich @ 2020-10-10  6:30 UTC (permalink / raw)
  To: buildroot

After BSP update Udoo Quad/Dual board once again hangs on boot. On a
new kernel disabling CONFIG_USB option is not enough to work around
the troublesome usb host on Udoo Quad/Dual board. So it makes sense
to disable usbh1 block in device tree rather than fine-tune kernel
configuration. Replace Linux configuration fragment by dts patch.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
 board/udoo/mx6qdl/linux.fragment              |  1 -
 .../linux/0000-udoo-disable-usbh1.patch       | 26 +++++++++++++++++++
 configs/mx6udoo_defconfig                     |  2 +-
 3 files changed, 27 insertions(+), 2 deletions(-)
 delete mode 100644 board/udoo/mx6qdl/linux.fragment
 create mode 100644 board/udoo/mx6qdl/patches/linux/0000-udoo-disable-usbh1.patch

diff --git a/board/udoo/mx6qdl/linux.fragment b/board/udoo/mx6qdl/linux.fragment
deleted file mode 100644
index 1d2509982b..0000000000
--- a/board/udoo/mx6qdl/linux.fragment
+++ /dev/null
@@ -1 +0,0 @@
-# CONFIG_USB is not set
diff --git a/board/udoo/mx6qdl/patches/linux/0000-udoo-disable-usbh1.patch b/board/udoo/mx6qdl/patches/linux/0000-udoo-disable-usbh1.patch
new file mode 100644
index 0000000000..d151a40d6e
--- /dev/null
+++ b/board/udoo/mx6qdl/patches/linux/0000-udoo-disable-usbh1.patch
@@ -0,0 +1,26 @@
+[PATCH] ARM: dts: imx6qdl-udoo: Disable usbh1 to avoid kernel hang
+
+Currently the kernel hangs when USB Host1 is enabled due to the lack of
+support for controlling the USB hub clock and GPIO reset line.
+
+Peter Chen has made several attempts to fix this problem, but his series
+has not been applied yet, so better disable USB host1 for now to avoid
+the kernel hang.
+
+Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
+---
+
+diff --git a/arch/arm/boot/dts/imx6qdl-udoo.dtsi b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
+index 828dd20cd27d..c9e122865312 100644
+--- a/arch/arm/boot/dts/imx6qdl-udoo.dtsi
++++ b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
+@@ -292,7 +292,8 @@ &usbh1 {
+ 	pinctrl-0 = <&pinctrl_usbh>;
+ 	vbus-supply = <&reg_usb_h1_vbus>;
+ 	clocks = <&clks IMX6QDL_CLK_CKO>;
+-	status = "okay";
++	/* currently USB support causes a kernel hang. Disable it for now */
++	status = "disabled";
+ };
+ 
+ &usbotg {
diff --git a/configs/mx6udoo_defconfig b/configs/mx6udoo_defconfig
index bd0583b955..5be82e5e39 100644
--- a/configs/mx6udoo_defconfig
+++ b/configs/mx6udoo_defconfig
@@ -3,6 +3,7 @@ BR2_cortex_a9=y
 BR2_ARM_ENABLE_NEON=y
 BR2_ARM_ENABLE_VFP=y
 BR2_ARM_FPU_VFPV3=y
+BR2_GLOBAL_PATCH_DIR="board/udoo/mx6qdl/patches"
 # Linux headers same as kernel, a 5.8 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
@@ -21,7 +22,6 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13"
 BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/udoo/mx6qdl/linux.fragment"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-udoo imx6dl-udoo"
 BR2_LINUX_KERNEL_INSTALL_TARGET=y
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 5/5] board/udoo: drop custom post-image script
  2020-10-10  6:30 [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup Sergey Matyukevich
                   ` (3 preceding siblings ...)
  2020-10-10  6:30 ` [Buildroot] [PATCH 4/5] board/udoo/mx6qdl: disable usb device in device tree Sergey Matyukevich
@ 2020-10-10  6:30 ` Sergey Matyukevich
  2020-10-13 13:28 ` [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup Fabio Estevam
  5 siblings, 0 replies; 10+ messages in thread
From: Sergey Matyukevich @ 2020-10-10  6:30 UTC (permalink / raw)
  To: buildroot

Use generic genimage.sh script instead.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
 board/udoo/common/post-image.sh  | 15 ---------------
 configs/mx6sx_udoo_neo_defconfig |  3 ++-
 configs/mx6udoo_defconfig        |  3 ++-
 3 files changed, 4 insertions(+), 17 deletions(-)
 delete mode 100755 board/udoo/common/post-image.sh

diff --git a/board/udoo/common/post-image.sh b/board/udoo/common/post-image.sh
deleted file mode 100755
index 18e76aa40d..0000000000
--- a/board/udoo/common/post-image.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-
-BOARD_DIR="$(dirname $0)"
-GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage \
-  --rootpath "${TARGET_DIR}" \
-  --tmppath "${GENIMAGE_TMP}" \
-  --inputpath "${BINARIES_DIR}" \
-  --outputpath "${BINARIES_DIR}" \
-  --config "${GENIMAGE_CFG}"
-
diff --git a/configs/mx6sx_udoo_neo_defconfig b/configs/mx6sx_udoo_neo_defconfig
index bec87561bb..e22f6a35af 100644
--- a/configs/mx6sx_udoo_neo_defconfig
+++ b/configs/mx6sx_udoo_neo_defconfig
@@ -6,7 +6,8 @@ BR2_ARM_FPU_VFPV3=y
 # Linux headers same as kernel, a 5.8 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/udoo/common/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/udoo/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/udoo/common/genimage.cfg"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_UBOOT=y
diff --git a/configs/mx6udoo_defconfig b/configs/mx6udoo_defconfig
index 5be82e5e39..388c9c7b64 100644
--- a/configs/mx6udoo_defconfig
+++ b/configs/mx6udoo_defconfig
@@ -8,7 +8,8 @@ BR2_GLOBAL_PATCH_DIR="board/udoo/mx6qdl/patches"
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/udoo/common/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/udoo/common/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/udoo/common/genimage.cfg"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_UBOOT=y
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup
  2020-10-10  6:30 [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup Sergey Matyukevich
                   ` (4 preceding siblings ...)
  2020-10-10  6:30 ` [Buildroot] [PATCH 5/5] board/udoo: drop custom post-image script Sergey Matyukevich
@ 2020-10-13 13:28 ` Fabio Estevam
  5 siblings, 0 replies; 10+ messages in thread
From: Fabio Estevam @ 2020-10-13 13:28 UTC (permalink / raw)
  To: buildroot

Hi Sergey,

On Sat, Oct 10, 2020 at 3:24 AM Sergey Matyukevich <geomatsi@gmail.com> wrote:
>
> Hi Fabio and all,
>
> Here is a patch series for Udoo boards with BSP updates and several minor
> cleanups required to make updated BSP work out of the box.
> Major changes include:
>
> - bump Linux kernel to 5.8.13
> - bump U-Boot to 2020.10
> - udoo/mx6qdl: disable usbh1 in dts rather than in kernel configuration
> - use common image generation files for udoo boards

Thanks for the series:

Reviewed-by: Fabio Estevam <festevam@gmail.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 1/5] configs/mx6sx_udoo_neo: bump kernel and U-Boot versions
  2020-10-10  6:30 ` [Buildroot] [PATCH 1/5] configs/mx6sx_udoo_neo: bump kernel and U-Boot versions Sergey Matyukevich
@ 2020-10-13 16:16   ` Thomas Petazzoni
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2020-10-13 16:16 UTC (permalink / raw)
  To: buildroot

On Sat, 10 Oct 2020 09:30:18 +0300
Sergey Matyukevich <geomatsi@gmail.com> wrote:

> Bump Linux kernel to 5.8.13 and U-Boot to 2020.10.
> 
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
> ---
>  configs/mx6sx_udoo_neo_defconfig | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/5] configs/mx6udoo: bump bsp versions and modify image
  2020-10-10  6:30 ` [Buildroot] [PATCH 2/5] configs/mx6udoo: bump bsp versions and modify image Sergey Matyukevich
@ 2020-10-13 16:22   ` Thomas Petazzoni
  2020-10-13 19:39     ` Sergey Matyukevich
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2020-10-13 16:22 UTC (permalink / raw)
  To: buildroot

Hello Sergey,

Thanks for this patch. A few questions below.

On Sat, 10 Oct 2020 09:30:19 +0300
Sergey Matyukevich <geomatsi@gmail.com> wrote:

> diff --git a/board/udoo/mx6qdl/genimage.cfg b/board/udoo/mx6qdl/genimage.cfg
> new file mode 100644
> index 0000000000..46209120f0
> --- /dev/null
> +++ b/board/udoo/mx6qdl/genimage.cfg

Why do you introduce a genimage.cfg file? It is identical to the one in
board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl,
which I believe is already being used in the current defconfig.

> diff --git a/board/udoo/mx6qdl/post-build.sh b/board/udoo/mx6qdl/post-build.sh
> new file mode 100755
> index 0000000000..6ccd87fafd
> --- /dev/null
> +++ b/board/udoo/mx6qdl/post-build.sh
> @@ -0,0 +1,7 @@
> +#!/bin/sh
> +
> +BOARD_DIR="$(dirname $0)"
> +
> +install -d -m 755 $TARGET_DIR/boot
> +$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none  \
> +	-n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr

Could you use:

BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/udoo/mx6qdl/boot.scr.txt"

You will still need a post-build.sh script to copy from BINARIES_DIR to
TARGET_DIR/boot, though.

> diff --git a/board/udoo/mx6qdl/post-image.sh b/board/udoo/mx6qdl/post-image.sh
> new file mode 100755
> index 0000000000..18e76aa40d
> --- /dev/null
> +++ b/board/udoo/mx6qdl/post-image.sh

Even if you cannot use for some reason the common post-image script
from board/freescale/common/imx/, you could still use the generic
support/scripts/genimage.sh... which you're anyway doing in a later
commit.

> diff --git a/configs/mx6udoo_defconfig b/configs/mx6udoo_defconfig
> index 86ad13bbf3..2cf13ae559 100644
> --- a/configs/mx6udoo_defconfig
> +++ b/configs/mx6udoo_defconfig
> @@ -3,27 +3,30 @@ BR2_cortex_a9=y
>  BR2_ARM_ENABLE_NEON=y
>  BR2_ARM_ENABLE_VFP=y
>  BR2_ARM_FPU_VFPV3=y
> -# Linux headers same as kernel, a 4.14 series
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y
> +# Linux headers same as kernel, a 5.8 series
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
>  BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
> -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"

As asked above, any reason to no longer use this post-image script ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/5] configs/mx6udoo: bump bsp versions and modify image
  2020-10-13 16:22   ` Thomas Petazzoni
@ 2020-10-13 19:39     ` Sergey Matyukevich
  0 siblings, 0 replies; 10+ messages in thread
From: Sergey Matyukevich @ 2020-10-13 19:39 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

> > diff --git a/board/udoo/mx6qdl/genimage.cfg b/board/udoo/mx6qdl/genimage.cfg
> > new file mode 100644
> > index 0000000000..46209120f0
> > --- /dev/null
> > +++ b/board/udoo/mx6qdl/genimage.cfg
> 
> Why do you introduce a genimage.cfg file? It is identical to the one in
> board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl,
> which I believe is already being used in the current defconfig.
> 
> > diff --git a/board/udoo/mx6qdl/post-build.sh b/board/udoo/mx6qdl/post-build.sh
> > new file mode 100755
> > index 0000000000..6ccd87fafd
> > --- /dev/null
> > +++ b/board/udoo/mx6qdl/post-build.sh
> > @@ -0,0 +1,7 @@
> > +#!/bin/sh
> > +
> > +BOARD_DIR="$(dirname $0)"
> > +
> > +install -d -m 755 $TARGET_DIR/boot
> > +$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none  \
> > +	-n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr
> 
> Could you use:
> 
> BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
> BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/udoo/mx6qdl/boot.scr.txt"
> 
> You will still need a post-build.sh script to copy from BINARIES_DIR to
> TARGET_DIR/boot, though.
> 
> > diff --git a/board/udoo/mx6qdl/post-image.sh b/board/udoo/mx6qdl/post-image.sh
> > new file mode 100755
> > index 0000000000..18e76aa40d
> > --- /dev/null
> > +++ b/board/udoo/mx6qdl/post-image.sh
> 
> Even if you cannot use for some reason the common post-image script
> from board/freescale/common/imx/, you could still use the generic
> support/scripts/genimage.sh... which you're anyway doing in a later
> commit.
> 
> > diff --git a/configs/mx6udoo_defconfig b/configs/mx6udoo_defconfig
> > index 86ad13bbf3..2cf13ae559 100644
> > --- a/configs/mx6udoo_defconfig
> > +++ b/configs/mx6udoo_defconfig
> > @@ -3,27 +3,30 @@ BR2_cortex_a9=y
> >  BR2_ARM_ENABLE_NEON=y
> >  BR2_ARM_ENABLE_VFP=y
> >  BR2_ARM_FPU_VFPV3=y
> > -# Linux headers same as kernel, a 4.14 series
> > -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y
> > +# Linux headers same as kernel, a 5.8 series
> > +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
> >  BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
> > -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
> 
> As asked above, any reason to no longer use this post-image script ?

All suggestions look reasonable. In fact, it looks like I have chosen the
wrong direction. For some reason I decided to switch both Udoo boards
from the common freescale infra to a custom one. However the opposite
needs to be done: both boards should use freescale common infra in order
to simplify maintenance. I will address review comments and submit v2.

Regards,
Sergey

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-13 19:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-10  6:30 [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup Sergey Matyukevich
2020-10-10  6:30 ` [Buildroot] [PATCH 1/5] configs/mx6sx_udoo_neo: bump kernel and U-Boot versions Sergey Matyukevich
2020-10-13 16:16   ` Thomas Petazzoni
2020-10-10  6:30 ` [Buildroot] [PATCH 2/5] configs/mx6udoo: bump bsp versions and modify image Sergey Matyukevich
2020-10-13 16:22   ` Thomas Petazzoni
2020-10-13 19:39     ` Sergey Matyukevich
2020-10-10  6:30 ` [Buildroot] [PATCH 3/5] board/udoo: use common image generation files Sergey Matyukevich
2020-10-10  6:30 ` [Buildroot] [PATCH 4/5] board/udoo/mx6qdl: disable usb device in device tree Sergey Matyukevich
2020-10-10  6:30 ` [Buildroot] [PATCH 5/5] board/udoo: drop custom post-image script Sergey Matyukevich
2020-10-13 13:28 ` [Buildroot] [PATCH 0/5] board/udoo: bsp updates and cleanup Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.