Skip to contentSkip to conversation

configs/imxrt1050-evk: New defconfig

PATCH Superseded Jesse Taube 3 participants 6 messages Jul 30, 2022 – Aug 2, 2022 Arm i.MX and Layerscape

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 configs/imxrt1050-evk: New defconfig

Add defconfig for imxrt1050-evk is a development board from NXP.

The i.MXRTxxxx family spreads from i.MXRT1020 to i.MXRT1170 with the first one supporting 1 USB OTG & 100M ethernet with a cortex-M7@500Mhz up to the latter with i.MXRT1170 with cortex-M7@1Ghz and cortex-M4@400Mhz, 2MB of internal SRAM, 2D GPU, 2x 1Gb and 1x 100Mb ENET. The i.MXRT family is NXP's answer to STM32F7xx, as it uses only simple SDRAM, it gives the chance of a 4 or less layer PCBs. Seeing that these chips are comparable to the STM32F7xxs which have buildroot ported to them it seems reasonable to add support for them.

https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1050-evaluation-kit:MIMXRT1050-EVK

Cc Giulio Benetti <[email protected]>
---
 DEVELOPERS                                  |  6 +++
 board/freescale/imxrt1050evk/genimage.cfg   | 40 +++++++++++++++++++
 board/freescale/imxrt1050evk/post-build.sh  |  6 +++
 board/freescale/imxrt1050evk/readme.txt     | 24 +++++++++++
 board/freescale/imxrt1050evk/uboot.fragment |  2 +
 configs/imxrt1050-evk_defconfig             | 44 +++++++++++++++++++++
 6 files changed, 122 insertions(+)
 create mode 100644 board/freescale/imxrt1050evk/genimage.cfg
 create mode 100755 board/freescale/imxrt1050evk/post-build.sh
 create mode 100644 board/freescale/imxrt1050evk/readme.txt
 create mode 100644 board/freescale/imxrt1050evk/uboot.fragment
 create mode 100644 configs/imxrt1050-evk_defconfig
DEVELOPERS +6 -0
index 0afd697b6c..206bac99e0 100644
@@ -1096,9 +1096,11 @@ F:	package/webp/
 F:	package/xapian/
 
 N:	Giulio Benetti <[email protected]>
+F:	board/freescale/imxrt1050evk/*
 F:	board/olimex/a*
 F:	configs/amarula_vyasa_rk3288_defconfig
 F:	configs/asus_tinker_rk3288_defconfig
+F:	configs/imxrt1050-evk_defconfig
 F:	configs/olimex_a*
 F:	package/at/
 F:	package/binutils/
@@ -1421,6 +1423,10 @@ F:	package/wmctrl/
 F:	package/x11r7/xdriver_xf86-video-imx/
 F:	package/x11r7/xdriver_xf86-video-imx-viv/
 
+N:	Jesse Taube <[email protected]>
+F:	board/freescale/imxrt1050evk/*
+F:	configs/imxrt1050-evk_defconfig
+
 N:	Jianhui Zhao <[email protected]>
 F:	package/libuhttpd/
 F:	package/libuwsc/
board/freescale/imxrt1050evk/genimage.cfg new file +40 -0
new file mode 100644
index 0000000000..7e1e932d37
@@ -0,0 +1,40 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"uImage",
+			"imxrt1050-evk.dtb",
+		}
+	}
+
+	size = 6M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition SPL {
+		in-partition-table = "no"
+		image = "SPL"
+		offset = 1K
+		size = 127K
+	}
+
+	partition u-boot {
+		in-partition-table = "no"
+		image = "u-boot.img"
+		offset = 128K
+		size = 512K
+	}
+
+	partition boot {
+		partition-type = 0xc
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
board/freescale/imxrt1050evk/post-build.sh new file +6 -0
new file mode 100755
index 0000000000..476958a691
@@ -0,0 +1,6 @@
+#!/bin/sh
+MKIMAGE=$HOST_DIR/bin/mkimage
+
+if [ -e $BINARIES_DIR/Image ]; then
+	$MKIMAGE -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux kernel" -d $BINARIES_DIR/Image $BINARIES_DIR/uImage
+fi
board/freescale/imxrt1050evk/readme.txt new file +24 -0
new file mode 100644
index 0000000000..bbbcd5307f
@@ -0,0 +1,24 @@
+NXP i.MXRT1050 EVK board
+---------------------
+
+To build a minimal support for this board:
+
+$ make imxrt1050-evk_defconfig
+$ make
+
+Buildroot prepares a bootable "sdcard.img" image in the output/images/
+directory, ready to be flashed into the SD card:
+
+$ dd if=output/images/sdcard.img of=/dev/sdX
+Where 'sdX' is the device node of the uSD.
+
+Jumper settings:
+
+   SW7: 1 0 1 0
+
+Where 0 means bottom position and 1 means top position (from the
+switch label numbers reference).
+
+Connect the USB cable between the EVK and the PC for the console.
+
+Insert the micro SD card in the board, power it up and U-Boot messages should come up.
board/freescale/imxrt1050evk/uboot.fragment new file +2 -0
new file mode 100644
index 0000000000..1c5bb6af35
@@ -0,0 +1,2 @@
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="setenv bootargs console=ttyLP0 root=/dev/mmcblk0p2 rw earlycon rootwait;load mmc 0:1 0x80800000 imxrt1050-evk.dtb;load mmc 0:1 0x80000000 uImage;bootm 0x80000000 - 0x80800000"
configs/imxrt1050-evk_defconfig new file +44 -0

44 lines not on this page · raw message

Signature · 6 lines
2.36.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Jesse,

Thanks for your contribution!

Quoted 11 lines · On Sat, 30 Jul 2022 02:12:19 -0400 Jesse Taube <[email protected]> wrote:

Add defconfig for imxrt1050-evk is a development board from NXP.

The i.MXRTxxxx family spreads from i.MXRT1020 to i.MXRT1170 with the first one supporting 1 USB OTG & 100M ethernet with a cortex-M7@500Mhz up to the latter with i.MXRT1170 with cortex-M7@1Ghz and cortex-M4@400Mhz, 2MB of internal SRAM, 2D GPU, 2x 1Gb and 1x 100Mb ENET. The i.MXRT family is NXP's answer to STM32F7xx, as it uses only simple SDRAM, it gives the chance of a 4 or less layer PCBs. Seeing that these chips are comparable to the STM32F7xxs which have buildroot ported to them it seems reasonable to add support for them.

Quoted 4 lines

https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1050-evaluation-kit:MIMXRT1050-EVK

Cc Giulio Benetti <[email protected]>

Thanks a lot, it looks mostly good, but I have a few comments/questions.

DEVELOPERS F: package/webp/ · line 1106

Quoted 9 lines

N: Giulio Benetti <[email protected]>

DEVELOPERS +2 -0
+F:	board/freescale/imxrt1050evk/*
 F:	board/olimex/a*
 F:	configs/amarula_vyasa_rk3288_defconfig
 F:	configs/asus_tinker_rk3288_defconfig
+F:	configs/imxrt1050-evk_defconfig
 F:	configs/olimex_a*
 F:	package/at/
 F:	package/binutils/

Any reason to add Giulio here?

board/freescale/imxrt1050evk/post-build.sh line 4

Quoted 10 lines
board/freescale/imxrt1050evk/post-build.sh new file +4 -0
new file mode 100755
index 0000000000..476958a691
@@ -0,0 +1,6 @@
+#!/bin/sh
+MKIMAGE=$HOST_DIR/bin/mkimage
+
+if [ -e $BINARIES_DIR/Image ]; then

Why is this test needed? The Image file will be produced by the kernel build, so it should be there. If it's not, we should really error out hard. So I think doing without the test is better.

board/freescale/imxrt1050evk/readme.txt line 2

Quoted 10 lines
board/freescale/imxrt1050evk/post-build.sh new file +2 -0
+	$MKIMAGE -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux kernel" -d $BINARIES_DIR/Image $BINARIES_DIR/uImage
+fi
board/freescale/imxrt1050evk/readme.txt new file +2 -0
new file mode 100644
index 0000000000..bbbcd5307f
@@ -0,0 +1,24 @@
+NXP i.MXRT1050 EVK board
+---------------------

Add the few missing '-'

Also, as requested by Giulio, a short intro about the board + a link would be useful here.

board/freescale/imxrt1050evk/readme.txt line 6

Quoted 4 lines
board/freescale/imxrt1050evk/readme.txt new file +4 -0
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.19-rc5"

5.19 is out now, so you can use a non-rc version :)

board/freescale/imxrt1050evk/readme.txt line 18

Quoted 12 lines
board/freescale/imxrt1050evk/readme.txt new file +12 -0
+BR2_LINUX_KERNEL_DEFCONFIG="imxrt"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
+BR2_LINUX_KERNEL_IMAGE_NAME="Image"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imxrt1050-evk"
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_LABEL="root"
+BR2_TARGET_ROOTFS_EXT2_SIZE="3M"

Why limit to 3 MB ? Is there a strong reason? Also, leave the label undefined.

board/freescale/imxrt1050evk/readme.txt line 20

Quoted 2 lines
board/freescale/imxrt1050evk/readme.txt new file +2 -0
+# Bootloader
+BR2_TARGET_UBOOT=y

Please used a version of U-Boot explicitly defined in the defconfig.

Quoted 5 lines
board/freescale/imxrt1050evk/readme.txt new file +5 -0
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imxrt1050-evk"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/freescale/imxrt1050evk/uboot.fragment"
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="SPL"

board/freescale/imxrt1050evk/readme.txt

Quoted 10 lines
board/freescale/imxrt1050evk/readme.txt new file +10 -0
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+
+# Required tools to create the SD card image
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MKPASSWD=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+
+# Misc
+BR2_BINUTILS_VERSION_2_36_X=y
+# thumb2 ADR bug introduced in 2.37 fix is not yet in u-boot

Do you have some detail on this bug? Like a link to the bug report, or something like this? Note that binutils 2.39 is soon going to arrive, so we will get rid of binutils 2.36... which means we will very soon have a problem with this defconfig.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author
#2 lore raw
Quoted 26 lines · Thomas Petazzoni

Hello Jesse,

Thanks for your contribution!

Quoted 11 lines · On Sat, 30 Jul 2022 02:12:19 -0400 Jesse Taube <[email protected]> wrote:

Add defconfig for imxrt1050-evk is a development board from NXP.

The i.MXRTxxxx family spreads from i.MXRT1020 to i.MXRT1170 with the first one supporting 1 USB OTG & 100M ethernet with a cortex-M7@500Mhz up to the latter with i.MXRT1170 with cortex-M7@1Ghz and cortex-M4@400Mhz, 2MB of internal SRAM, 2D GPU, 2x 1Gb and 1x 100Mb ENET. The i.MXRT family is NXP's answer to STM32F7xx, as it uses only simple SDRAM, it gives the chance of a 4 or less layer PCBs. Seeing that these chips are comparable to the STM32F7xxs which have buildroot ported to them it seems reasonable to add support for them.

Quoted 4 lines

https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1050-evaluation-kit:MIMXRT1050-EVK

Cc Giulio Benetti <[email protected]>

Thanks a lot, it looks mostly good, but I have a few comments/questions.

Quoted 11 lines

DEVELOPERS F: package/webp/ · line 1106

Quoted 9 lines

N: Giulio Benetti <[email protected]>

DEVELOPERS +2 -0
+F:   board/freescale/imxrt1050evk/*
 F:   board/olimex/a*
 F:   configs/amarula_vyasa_rk3288_defconfig
 F:   configs/asus_tinker_rk3288_defconfig
+F:   configs/imxrt1050-evk_defconfig
 F:   configs/olimex_a*
 F:   package/at/
 F:   package/binutils/

Any reason to add Giulio here?

We worked on Linux and U-Boot together.

Quoted 15 lines

board/freescale/imxrt1050evk/post-build.sh line 4

Quoted 11 lines
board/freescale/imxrt1050evk/post-build.sh new file +4 -0
new file mode 100755
index 0000000000..476958a691
@@ -0,0 +1,6 @@
+#!/bin/sh
+MKIMAGE=$HOST_DIR/bin/mkimage
+
+if [ -e $BINARIES_DIR/Image ]; then

Why is this test needed? The Image file will be produced by the kernel build, so it should be there. If it's not, we should really error out hard. So I think doing without the test is better.

I was using board/nexbox/a95x/post-build.sh as a base, I can drop it.

Quoted 17 lines

board/freescale/imxrt1050evk/readme.txt line 2

Quoted 10 lines
board/freescale/imxrt1050evk/post-build.sh new file +2 -0
+     $MKIMAGE -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux kernel" -d $BINARIES_DIR/Image $BINARIES_DIR/uImage
+fi
board/freescale/imxrt1050evk/readme.txt new file +2 -0
new file mode 100644
index 0000000000..bbbcd5307f
@@ -0,0 +1,24 @@
+NXP i.MXRT1050 EVK board
+---------------------

Add the few missing '-'

Also, as requested by Giulio, a short intro about the board + a link would be useful here.

Quoted 6 lines

board/freescale/imxrt1050evk/readme.txt line 6

Quoted 4 lines
board/freescale/imxrt1050evk/readme.txt new file +4 -0
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.19-rc5"

5.19 is out now, so you can use a non-rc version :)

Sorry I forgot to change when submitting...

Quoted 6 lines
Quoted 6 lines
board/freescale/imxrt1050evk/readme.txt new file +6 -0
+BR2_LINUX_KERNEL_DEFCONFIG="imxrt"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
+BR2_LINUX_KERNEL_IMAGE_NAME="Image"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imxrt1050-evk"
Quoted 8 lines

board/freescale/imxrt1050evk/readme.txt line 18

Quoted 6 lines
board/freescale/imxrt1050evk/readme.txt new file +6 -0
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_LABEL="root"
+BR2_TARGET_ROOTFS_EXT2_SIZE="3M"

Why limit to 3 MB ? Is there a strong reason?

Because that's the nearest ceil(MB) size of the ext4 filesystem. I like dd-ing the images fast.

Also, leave the label

Quoted 6 lines

undefined.

board/freescale/imxrt1050evk/readme.txt line 20

Quoted 2 lines
board/freescale/imxrt1050evk/readme.txt new file +2 -0
+# Bootloader
+BR2_TARGET_UBOOT=y

Please used a version of U-Boot explicitly defined in the defconfig.

Read below.

Quoted 13 lines
Quoted 13 lines
board/freescale/imxrt1050evk/readme.txt new file +12 -0
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imxrt1050-evk"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/freescale/imxrt1050evk/uboot.fragment"
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="SPL"
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+
+# Required tools to create the SD card image
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MKPASSWD=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+
Quoted 9 lines

board/freescale/imxrt1050evk/readme.txt

Quoted 3 lines
board/freescale/imxrt1050evk/readme.txt new file +3 -0
+# Misc
+BR2_BINUTILS_VERSION_2_36_X=y
+# thumb2 ADR bug introduced in 2.37 fix is not yet in u-boot

Do you have some detail on this bug? Like a link to the bug report, or something like this? Note that binutils 2.39 is soon going to arrive, so we will get rid of binutils 2.36... which means we will very soon have a problem with this defconfig.

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

The patch above removes the need for binutils 2.36 and a U-Boot version hasn't been released with that commit yet. This is the reason for no U-Boot version.

Thanks,
Jesse T

Quoted 7 lines

Best regards,

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Hi Jesse,

Quoted 137 lines · Jesse T
Quoted 26 lines · Thomas Petazzoni

Hello Jesse,

Thanks for your contribution!

Quoted 11 lines · On Sat, 30 Jul 2022 02:12:19 -0400 Jesse Taube <[email protected]> wrote:

Add defconfig for imxrt1050-evk is a development board from NXP.

The i.MXRTxxxx family spreads from i.MXRT1020 to i.MXRT1170 with the first one supporting 1 USB OTG & 100M ethernet with a cortex-M7@500Mhz up to the latter with i.MXRT1170 with cortex-M7@1Ghz and cortex-M4@400Mhz, 2MB of internal SRAM, 2D GPU, 2x 1Gb and 1x 100Mb ENET. The i.MXRT family is NXP's answer to STM32F7xx, as it uses only simple SDRAM, it gives the chance of a 4 or less layer PCBs. Seeing that these chips are comparable to the STM32F7xxs which have buildroot ported to them it seems reasonable to add support for them.

Quoted 4 lines

https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1050-evaluation-kit:MIMXRT1050-EVK

Cc Giulio Benetti <[email protected]>

Thanks a lot, it looks mostly good, but I have a few comments/questions.

Quoted 11 lines

DEVELOPERS F: package/webp/ · line 1106

Quoted 9 lines

N: Giulio Benetti <[email protected]>

DEVELOPERS +2 -0
+F:   board/freescale/imxrt1050evk/*
  F:   board/olimex/a*
  F:   configs/amarula_vyasa_rk3288_defconfig
  F:   configs/asus_tinker_rk3288_defconfig
+F:   configs/imxrt1050-evk_defconfig
  F:   configs/olimex_a*
  F:   package/at/
  F:   package/binutils/

Any reason to add Giulio here?

We worked on Linux and U-Boot together.

Quoted 15 lines

board/freescale/imxrt1050evk/post-build.sh line 4

Quoted 11 lines
board/freescale/imxrt1050evk/post-build.sh new file +4 -0
new file mode 100755
index 0000000000..476958a691
@@ -0,0 +1,6 @@
+#!/bin/sh
+MKIMAGE=$HOST_DIR/bin/mkimage
+
+if [ -e $BINARIES_DIR/Image ]; then

Why is this test needed? The Image file will be produced by the kernel build, so it should be there. If it's not, we should really error out hard. So I think doing without the test is better.

I was using board/nexbox/a95x/post-build.sh as a base, I can drop it.

Quoted 17 lines

board/freescale/imxrt1050evk/readme.txt line 2

Quoted 10 lines
board/freescale/imxrt1050evk/post-build.sh new file +2 -0
+     $MKIMAGE -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux kernel" -d $BINARIES_DIR/Image $BINARIES_DIR/uImage
+fi
board/freescale/imxrt1050evk/readme.txt new file +2 -0
new file mode 100644
index 0000000000..bbbcd5307f
@@ -0,0 +1,24 @@
+NXP i.MXRT1050 EVK board
+---------------------

Add the few missing '-'

Also, as requested by Giulio, a short intro about the board + a link would be useful here.

Quoted 6 lines

board/freescale/imxrt1050evk/readme.txt line 6

Quoted 4 lines
board/freescale/imxrt1050evk/readme.txt new file +4 -0
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.19-rc5"

5.19 is out now, so you can use a non-rc version :)

Sorry I forgot to change when submitting...

Quoted 6 lines
Quoted 6 lines
board/freescale/imxrt1050evk/readme.txt new file +6 -0
+BR2_LINUX_KERNEL_DEFCONFIG="imxrt"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
+BR2_LINUX_KERNEL_IMAGE_NAME="Image"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imxrt1050-evk"
Quoted 8 lines

board/freescale/imxrt1050evk/readme.txt line 18

Quoted 6 lines
board/freescale/imxrt1050evk/readme.txt new file +6 -0
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_LABEL="root"
+BR2_TARGET_ROOTFS_EXT2_SIZE="3M"

Why limit to 3 MB ? Is there a strong reason?

Because that's the nearest ceil(MB) size of the ext4 filesystem. I like dd-ing the images fast.

Also, leave the label

Quoted 6 lines

undefined.

board/freescale/imxrt1050evk/readme.txt line 20

Quoted 2 lines
board/freescale/imxrt1050evk/readme.txt new file +2 -0
+# Bootloader
+BR2_TARGET_UBOOT=y

Please used a version of U-Boot explicitly defined in the defconfig.

Read below.

Quoted 13 lines
Quoted 13 lines
board/freescale/imxrt1050evk/readme.txt new file +12 -0
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imxrt1050-evk"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/freescale/imxrt1050evk/uboot.fragment"
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="SPL"
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+
+# Required tools to create the SD card image
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MKPASSWD=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+
Quoted 9 lines

board/freescale/imxrt1050evk/readme.txt

Quoted 3 lines
board/freescale/imxrt1050evk/readme.txt new file +3 -0
+# Misc
+BR2_BINUTILS_VERSION_2_36_X=y
+# thumb2 ADR bug introduced in 2.37 fix is not yet in u-boot

Do you have some detail on this bug? Like a link to the bug report, or something like this? Note that binutils 2.39 is soon going to arrive, so we will get rid of binutils 2.36... which means we will very soon have a problem with this defconfig.

Quoted 4 lines

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

The patch above removes the need for binutils 2.36 and a U-Boot version hasn't been released with that commit yet.

Then the best practice is to backport the patch above locally to binutils package for every version. But when trying to compile using an external toolchain(not generated by Buildroot like official ARM toolchain) then it will fail to boot.

As Thomas mentioned binutils 2.36.1 will be removed soon in favor of 2.39 that will contain that patch, but 2.37 and 2.38 will create problems, as well as all the external ones.

Do you think there is a possible work-around for u-boot to avoid the binutils bug? If yes one possibility is to add a local patch for u-boot for this defconfig only with the work-around. This will make the board to work everytime. It's a patch that doesn't have to be upstreamed but only a local work-around.

What about that Thomas?

Best regards

Signature · 2 lines
Giulio Benetti
CEO/CTO@Benetti Engineering sas
Quoted 12 lines

This is the reason for no U-Boot version.

Thanks,
Jesse T

Quoted 7 lines

Best regards,

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com

Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw

Hi Jesse, Thomas,

Quoted 155 lines · Giulio Benetti

Hi Jesse,

Quoted 138 lines · Jesse T
Quoted 26 lines · Thomas Petazzoni

Hello Jesse,

Thanks for your contribution!

Quoted 11 lines · On Sat, 30 Jul 2022 02:12:19 -0400 Jesse Taube <[email protected]> wrote:

Add defconfig for imxrt1050-evk is a development board from NXP.

The i.MXRTxxxx family spreads from i.MXRT1020 to i.MXRT1170 with the first one supporting 1 USB OTG & 100M ethernet with a cortex-M7@500Mhz up to the latter with i.MXRT1170 with cortex-M7@1Ghz and cortex-M4@400Mhz, 2MB of internal SRAM, 2D GPU, 2x 1Gb and 1x 100Mb ENET. The i.MXRT family is NXP's answer to STM32F7xx, as it uses only simple SDRAM, it gives the chance of a 4 or less layer PCBs. Seeing that these chips are comparable to the STM32F7xxs which have buildroot ported to them it seems reasonable to add support for them.

Quoted 4 lines

https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1050-evaluation-kit:MIMXRT1050-EVK

Cc Giulio Benetti <[email protected]>

Thanks a lot, it looks mostly good, but I have a few comments/questions.

Quoted 11 lines
Quoted 9 lines

  N:   Giulio Benetti <[email protected]> +F:   board/freescale/imxrt1050evk/*
  F:   board/olimex/a*
  F:   configs/amarula_vyasa_rk3288_defconfig
  F:   configs/asus_tinker_rk3288_defconfig
+F:   configs/imxrt1050-evk_defconfig
  F:   configs/olimex_a*
  F:   package/at/
  F:   package/binutils/

Any reason to add Giulio here?

We worked on Linux and U-Boot together.

Quoted 15 lines

board/freescale/imxrt1050evk/post-build.sh line 4

Quoted 11 lines
board/freescale/imxrt1050evk/post-build.sh new file +4 -0
new file mode 100755
index 0000000000..476958a691
@@ -0,0 +1,6 @@
+#!/bin/sh
+MKIMAGE=$HOST_DIR/bin/mkimage
+
+if [ -e $BINARIES_DIR/Image ]; then

Why is this test needed? The Image file will be produced by the kernel build, so it should be there. If it's not, we should really error out hard. So I think doing without the test is better.

I was using board/nexbox/a95x/post-build.sh as a base, I can drop it.

Quoted 18 lines

board/freescale/imxrt1050evk/readme.txt line 2

Quoted 11 lines
board/freescale/imxrt1050evk/post-build.sh new file +1 -0
+     $MKIMAGE -A arm -O linux -T kernel -C none -a 0x80008000 -e 

0x80008000 -n "Linux kernel" -d $BINARIES_DIR/Image $BINARIES_DIR/uImage

board/freescale/imxrt1050evk/post-build.sh new file +1 -0
+fi
board/freescale/imxrt1050evk/readme.txt new file +2 -0
new file mode 100644
index 0000000000..bbbcd5307f
@@ -0,0 +1,24 @@
+NXP i.MXRT1050 EVK board
+---------------------

Add the few missing '-'

Also, as requested by Giulio, a short intro about the board + a link would be useful here.

Quoted 6 lines

board/freescale/imxrt1050evk/readme.txt line 6

Quoted 4 lines
board/freescale/imxrt1050evk/readme.txt new file +4 -0
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.19-rc5"

5.19 is out now, so you can use a non-rc version :)

Sorry I forgot to change when submitting...

Quoted 6 lines
Quoted 6 lines
board/freescale/imxrt1050evk/readme.txt new file +6 -0
+BR2_LINUX_KERNEL_DEFCONFIG="imxrt"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
+BR2_LINUX_KERNEL_IMAGE_NAME="Image"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imxrt1050-evk"
Quoted 8 lines

board/freescale/imxrt1050evk/readme.txt line 18

Quoted 6 lines
board/freescale/imxrt1050evk/readme.txt new file +6 -0
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_LABEL="root"
+BR2_TARGET_ROOTFS_EXT2_SIZE="3M"

Why limit to 3 MB ? Is there a strong reason?

Because that's the nearest ceil(MB) size of the ext4 filesystem. I like dd-ing the images fast.

Also, leave the label

Quoted 6 lines

undefined.

board/freescale/imxrt1050evk/readme.txt line 20

Quoted 2 lines
board/freescale/imxrt1050evk/readme.txt new file +2 -0
+# Bootloader
+BR2_TARGET_UBOOT=y

Please used a version of U-Boot explicitly defined in the defconfig.

Read below.

Quoted 13 lines
Quoted 13 lines
board/freescale/imxrt1050evk/readme.txt new file +12 -0
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imxrt1050-evk"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/freescale/imxrt1050evk/uboot.fragment"
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="SPL"
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+
+# Required tools to create the SD card image
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MKPASSWD=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+
Quoted 9 lines

board/freescale/imxrt1050evk/readme.txt

Quoted 3 lines
board/freescale/imxrt1050evk/readme.txt new file +3 -0
+# Misc
+BR2_BINUTILS_VERSION_2_36_X=y
+# thumb2 ADR bug introduced in 2.37 fix is not yet in u-boot

Do you have some detail on this bug? Like a link to the bug report, or something like this? Note that binutils 2.39 is soon going to arrive, so we will get rid of binutils 2.36... which means we will very soon have a problem with this defconfig.

Quoted 4 lines

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

The patch above removes the need for binutils 2.36 and a U-Boot version hasn't been released with that commit yet.

Then the best practice is to backport the patch above locally to binutils package for every version. But when trying to compile using an external toolchain(not generated by Buildroot like official ARM toolchain) then it will fail to boot.

As Thomas mentioned binutils 2.36.1 will be removed soon in favor of 2.39 that will contain that patch, but 2.37 and 2.38 will create problems, as well as all the external ones.

Quoted 5 lines

Do you think there is a possible work-around for u-boot to avoid the binutils bug? If yes one possibility is to add a local patch for u-boot for this defconfig only with the work-around. This will make the board to work everytime. It's a patch that doesn't have to be upstreamed but only a local work-around.

Jesse privately pointed me that the patch is exactly the u-boot patch
we need here. So Jesse, please add it under board/frescale/imxrt1050evk/patches/uboot and point to that folder(without /uboot) like this in defconfig:
BR2_GLOBAL_PATCH_DIR=board/frescale/imxrt1050evk/patches

This way when uboot is built the patch is applied to it. And of course this is valid once you define a specific custom version for u-boot as Thomas pointed you before.

Best regards

Signature · 6 lines
Giulio Benetti
CEO/CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw
In reply to Jesse T

Hello Jesse,

Quoted 3 lines · On Mon, 1 Aug 2022 17:46:48 -0400 Jesse T <[email protected]> wrote:
Quoted 1 line

Any reason to add Giulio here?

We worked on Linux and U-Boot together.

Then I think it is worth mentioning in the commit log, as it is surprising to see two people added in the DEVELOPERS file, without any explanation.

Quoted 5 lines
Quoted 3 lines

Why is this test needed? The Image file will be produced by the kernel build, so it should be there. If it's not, we should really error out hard. So I think doing without the test is better.

I was using board/nexbox/a95x/post-build.sh as a base, I can drop it.

Yes, I think this test doesn't make sense, so you can drop it.

Quoted 10 lines
Quoted 7 lines

configs/imxrt1050-evk_defconfig line 25

Quoted 5 lines
configs/imxrt1050-evk_defconfig new file +5 -0
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_LABEL="root"
+BR2_TARGET_ROOTFS_EXT2_SIZE="3M"  

Why limit to 3 MB ? Is there a strong reason?

Because that's the nearest ceil(MB) size of the ext4 filesystem. I like dd-ing the images fast.

You can use bmap-tools to speed up writing a SD card image that is large but mostly empty.

Quoted 5 lines

https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

The patch above removes the need for binutils 2.36 and a U-Boot version hasn't been released with that commit yet. This is the reason for no U-Boot version.

As explained by Giulio, you should use a well-defined version of U-Boot, and backport the U-Boot patch.

Thanks a lot!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot