Skip to contentSkip to conversation

Add Boundary Devices Nitrogen8M support

PATCH Superseded Gary Bisson 3 participants 20 messages Jul 19, 2018 – Jul 26, 2018 Arm i.MX and Layerscape

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add Boundary Devices Nitrogen8M support

Hi all,

This series adds support for our i.MX8MQ based Nitrogen8M platform.

Since this is our first ARM64 design, our boot scripts and post-build script needed to be updated. Doing so, it became clear that it was time to remove obsolete boot scripts so it is part of the series as well.

Also, the freescale imx8-bootloader-prepare script hardcoded the evk device tree which means it could only be used for 1 board. Therefore it was also modified to accept any device tree as a script argument (using BR2_ROOTFS_POST_SCRIPT_ARGS), let me know if you are ok with this approach.

Regards,
Gary

Gary Bisson (5):
board/freescale/common/imx: make imx8-bootloader-prepare more generic board/boundarydevices: update post-build.sh for i.MX8MQ platforms board/boundarydevices: remove obsolete u-boot scripts board/boundarydevices: add i.MX8MQ support to u-boot scripts configs/nitrogen8m: Add new defconfig

 .../boundarydevices/common/6x_bootscript.txt  | 131 ------------------
 board/boundarydevices/common/6x_upgrade.txt   |  69 ---------
 board/boundarydevices/common/boot.cmd         |  40 +++---
 board/boundarydevices/common/post-build.sh    |  28 ++--
 board/boundarydevices/common/upgrade.cmd      |  69 ++++++++-
 .../common/imx/imx8-bootloader-prepare.sh     |  12 +-
 configs/nitrogen8m_defconfig                  |  54 ++++++++
 7 files changed, 161 insertions(+), 242 deletions(-)
 delete mode 100644 board/boundarydevices/common/6x_bootscript.txt
 delete mode 100644 board/boundarydevices/common/6x_upgrade.txt
 create mode 100644 configs/nitrogen8m_defconfig
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/5 board/freescale/common/imx: make imx8-bootloader-prepare more generic

Allow user to override the hardcoded dtb name by using BR2_ROOTFS_POST_SCRIPT_ARGS.

---
 .../freescale/common/imx/imx8-bootloader-prepare.sh  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
board/freescale/common/imx/imx8-bootloader-prepare.sh +10 -2
index 2648147ab0..ce2c3405a0 100755
@@ -2,9 +2,17 @@
 
 main ()
 {
-	# Currently we support imx8mqevk.
+	if [ $# -le 1 ]; then
+		UBOOT_DTB=${BINARIES_DIR}/fsl-imx8mq-evk.dtb
+	else
+		UBOOT_DTB=$2
+	fi
+	if [ ! -e $UBOOT_DTB ]; then
+		echo "ERROR: couldn't find $UBOOT_DTB"
+		exit 1
+	fi
 	cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/lpddr4_pmu_train_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin
-	BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ${HOST_DIR}/bin/mkimage_fit_atf.sh ${BINARIES_DIR}/fsl-imx8mq-evk.dtb > ${BINARIES_DIR}/u-boot.its
+	BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its
 	${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb
 	rm -f ${BINARIES_DIR}/u-boot.its
 
Signature · 1 line
2.18.0
#2 lore raw

PATCH 1/5 board/freescale/common/imx: make imx8-bootloader-prepare more generic

Hello,

Quoted 13 lines · Gary Bisson

Allow user to override the hardcoded dtb name by using BR2_ROOTFS_POST_SCRIPT_ARGS.

---
 .../freescale/common/imx/imx8-bootloader-prepare.sh  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
board/freescale/common/imx/imx8-bootloader-prepare.sh +0 -0
index 2648147ab0..ce2c3405a0 100755

board/freescale/common/imx/imx8-bootloader-prepare.sh line 6

Quoted 6 lines
board/freescale/common/imx/imx8-bootloader-prepare.sh +2 -1
@@ -2,9 +2,17 @@
 
 main ()
 {
-	# Currently we support imx8mqevk.
+	if [ $# -le 1 ]; then
+		UBOOT_DTB=${BINARIES_DIR}/fsl-imx8mq-evk.dtb

I don't think it's worth keeping some kind of "backward compatibility" here. Just change configs/freescale_imx8mqevk_defconfig to pass the DTB name as argument.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/5 board/freescale/common/imx: make imx8-bootloader-prepare more generic

Hi Thomas,

Quoted 17 lines · Thomas Petazzoni

Hello,

Quoted 14 lines · Gary Bisson

Allow user to override the hardcoded dtb name by using BR2_ROOTFS_POST_SCRIPT_ARGS.

---
 .../freescale/common/imx/imx8-bootloader-prepare.sh  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
board/freescale/common/imx/imx8-bootloader-prepare.sh +0 -0
index 2648147ab0..ce2c3405a0 100755
@@ -2,9 +2,17 @@
 
Quoted 9 lines

board/freescale/common/imx/imx8-bootloader-prepare.sh line 6

Quoted 5 lines
board/freescale/common/imx/imx8-bootloader-prepare.sh +2 -1
 main ()
 {
-	# Currently we support imx8mqevk.
+	if [ $# -le 1 ]; then
+		UBOOT_DTB=${BINARIES_DIR}/fsl-imx8mq-evk.dtb

I don't think it's worth keeping some kind of "backward compatibility" here. Just change configs/freescale_imx8mqevk_defconfig to pass the DTB name as argument.

Fair enough, I'm fine with that. However, should I keep the check on the arguments number to throw an error if no argument is provided?

Or is the check on UBOOT_DTB existence sufficient?

I'll wait for a day before respinning the series to see if there are other comments.

Also, not related to the patch, the series doesn't appear "properly" in the mailing list archive, patches aren't answers to the cover letter. Other strange thing in Patchwork, patch 4/5 is part of "Untitled series #56383" instead of the real series, is it normal?
I just want to make sure I'm not missing some settings in my git-send-email config although it just seems that the server received/treated the emails in the wrong order.

Regards,
Gary

#4 lore raw

PATCH 1/5 board/freescale/common/imx: make imx8-bootloader-prepare more generic

Hello,

Quoted 8 lines · Gary Bisson
Quoted 3 lines

I don't think it's worth keeping some kind of "backward compatibility" here. Just change configs/freescale_imx8mqevk_defconfig to pass the DTB name as argument.

Fair enough, I'm fine with that. However, should I keep the check on the arguments number to throw an error if no argument is provided?

Or is the check on UBOOT_DTB existence sufficient?

I think the latter is sufficient.

Or, alternatively, change the script radically to use getopt to avoid using positional arguments. But I don't think it's worth the effort for now, just keep things simple.

Quoted 10 lines

I'll wait for a day before respinning the series to see if there are other comments.

Also, not related to the patch, the series doesn't appear "properly" in the mailing list archive, patches aren't answers to the cover letter. Other strange thing in Patchwork, patch 4/5 is part of "Untitled series #56383" instead of the real series, is it normal?
I just want to make sure I'm not missing some settings in my git-send-email config although it just seems that the server received/treated the emails in the wrong order.

This is a known patchwork limitation. Your e-mails arrived out of order (I was initially missing patch 3/5 here and the cover letter, and they arrived a few minutes later). When e-mails arrive out of order, patchwork gets confused and is not able to assign patches to the proper series. IOW, there's no problem on your side, it's patchwork that doesn't behave properly.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 2/5 board/boundarydevices: update post-build.sh for i.MX8MQ platforms

In reply to Gary Bisson

- Making sure to use proper ARCH for mkimage command
- Remove obsolete 6x_bootscript/6x_upgrade references
- Copy bootloader as u-boot.<defconfig_name>

---
 board/boundarydevices/common/post-build.sh | 28 ++++++++++++----------
 1 file changed, 16 insertions(+), 12 deletions(-)
board/boundarydevices/common/post-build.sh +16 -12
index b8abb26540..161ec0643f 100755
@@ -6,20 +6,24 @@
 #
 
 BOARD_DIR="$(dirname $0)"
+UBOOT_DEFCONFIG="$(grep BR2_TARGET_UBOOT_BOARD_DEFCONFIG ${BR2_CONFIG} | sed 's/.*\"\(.*\)\"/\1/')"
+
+if grep -Eq "^BR2_aarch64=y$" ${BR2_CONFIG}; then
+	MKIMAGE_ARCH=arm64
+	UBOOT_BINARY=imx8-boot-sd.bin
+else
+	MKIMAGE_ARCH=arm
+	UBOOT_BINARY=u-boot.imx
+fi
 
 # bd u-boot looks for standard bootscript
-install -m 0644 -D $BINARIES_DIR/boot.scr $TARGET_DIR/boot/
-# legacy 6x_bootscript script
-$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
--n "boot script" -d $BOARD_DIR/6x_bootscript.txt $TARGET_DIR/6x_bootscript
+$HOST_DIR/bin/mkimage -A $MKIMAGE_ARCH -O linux -T script -C none -a 0 -e 0 \
+    -n "boot script" -d $BOARD_DIR/boot.cmd $TARGET_DIR/boot/boot.scr
 
 # u-boot / update script for bd upgradeu command
-if [ -e $BINARIES_DIR/u-boot.imx ];
-then
-    install -D -m 0644 $BINARIES_DIR/u-boot.imx $TARGET_DIR/u-boot.imx
-    $HOST_DIR/bin/mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
-    -n "upgrade script" -d $BOARD_DIR/upgrade.cmd $TARGET_DIR/upgrade.scr
-    # legacy 6x_upgrade script
-    $HOST_DIR/bin/mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
-    -n "upgrade script" -d $BOARD_DIR/6x_upgrade.txt $TARGET_DIR/6x_upgrade
+if [ -e $BINARIES_DIR/$UBOOT_BINARY ]; then
+    install -D -m 0644 $BINARIES_DIR/$UBOOT_BINARY \
+        $TARGET_DIR/u-boot.$UBOOT_DEFCONFIG
+    $HOST_DIR/bin/mkimage -A $MKIMAGE_ARCH -O linux -T script -C none -a 0 -e 0 \
+        -n "upgrade script" -d $BOARD_DIR/upgrade.cmd $TARGET_DIR/upgrade.scr
 fi
Signature · 1 line
2.18.0
#6 lore raw

PATCH 2/5 board/boundarydevices: update post-build.sh for i.MX8MQ platforms

Hello,

Quoted 5 lines · Gary Bisson

- Making sure to use proper ARCH for mkimage command
- Remove obsolete 6x_bootscript/6x_upgrade references
- Copy bootloader as u-boot.<defconfig_name>

This patch is doing quite a few things that are in fact separate, which kind of calls for separate patches.

Removing the use of the obsolete 6x_bootscript and 6x_upgrade scripts should be one patch, which also removes those files (in the same patch).

Then, adding support for using a ARCH/UBOOT_BINARY value that depends on BR2_aarch64 should be another patch.

Finally, why do you copy the bootloader as u-boot.<defconfig_name> ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH 2/5 board/boundarydevices: update post-build.sh for i.MX8MQ platforms

Hi Thomas,

Quoted 11 lines · Thomas Petazzoni

Hello,

Quoted 5 lines · Gary Bisson

- Making sure to use proper ARCH for mkimage command
- Remove obsolete 6x_bootscript/6x_upgrade references
- Copy bootloader as u-boot.<defconfig_name>

This patch is doing quite a few things that are in fact separate, which kind of calls for separate patches.

Ok.

Quoted 2 lines

Removing the use of the obsolete 6x_bootscript and 6x_upgrade scripts should be one patch, which also removes those files (in the same patch).

Ok.

Quoted 2 lines

Then, adding support for using a ARCH/UBOOT_BINARY value that depends on BR2_aarch64 should be another patch.

Ok.

Quoted 1 line

Finally, why do you copy the bootloader as u-boot.<defconfig_name> ?

That is actually what the upgrade.cmd looks for, it was wrong to copy it as u-boot.imx in the first place anyway.
https://git.buildroot.net/buildroot/tree/board/boundarydevices/common/upgrade.cmd#n66

Regards,
Gary

#8 lore raw

PATCH 2/5 board/boundarydevices: update post-build.sh for i.MX8MQ platforms

Hello,

Quoted 5 lines · Gary Bisson
Quoted 1 line

Finally, why do you copy the bootloader as u-boot.<defconfig_name> ?

That is actually what the upgrade.cmd looks for, it was wrong to copy it as u-boot.imx in the first place anyway.
https://git.buildroot.net/buildroot/tree/board/boundarydevices/common/upgrade.cmd#n66

And so the upgrade.cmd logic is broken today, independently from the i.MX8 addition? If so, that definitely calls for a separate patch.

(However, it's not clear to me why you had two upgrade scripts, and which one was used in which situation).

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#9 lore raw

PATCH 2/5 board/boundarydevices: update post-build.sh for i.MX8MQ platforms

Hi Thomas,

Quoted 4 lines · Thomas Petazzoni

Hello,

On Thu, 19 Jul 2018 10:03:41 +0200, Gary Bisson wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Finally, why do you copy the bootloader as u-boot.<defconfig_name> ?

That is actually what the upgrade.cmd looks for, it was wrong to copy it as u-boot.imx in the first place anyway.
https://git.buildroot.net/buildroot/tree/board/boundarydevices/common/upgrade.cmd#n66

And so the upgrade.cmd logic is broken today, independently from the i.MX8 addition? If so, that definitely calls for a separate patch.

Yes, although you could set uboot_defconfig to "imx" and then it would work(around). It became clear this wasn't the solution now that U-Boot doesn't produce u-boot.imx for ARM64.

Quoted 2 lines

(However, it's not clear to me why you had two upgrade scripts, and which one was used in which situation).

It was legacy, 6x_upgrade was created at the beginning of our i.MX6 journey. But since we switched to U-Boot v2017.07, we used standard bootdistro variables and renamed the script to be more generic:
upgrade.scr.
https://git.buildroot.net/buildroot/commit/board/boundarydevices/common?id=505ae63b

Regards,
Gary

#10 lore raw

PATCH 3/5 board/boundarydevices: remove obsolete u-boot scripts

In reply to Gary Bisson

- 6x_bootscript/6x_upgrade have been deprecated for more than a year

---
 .../boundarydevices/common/6x_bootscript.txt  | 131 ------------------
 board/boundarydevices/common/6x_upgrade.txt   |  69 ---------
 2 files changed, 200 deletions(-)
 delete mode 100644 board/boundarydevices/common/6x_bootscript.txt
 delete mode 100644 board/boundarydevices/common/6x_upgrade.txt
board/boundarydevices/common/6x_bootscript.txt deleted +0 -131
deleted file mode 100644
index af5822a88b..0000000000
@@ -1,131 +0,0 @@
-setenv bootargs ''
-
-if itest.s x6SX == "x${cpu}" || itest.s x7D == "x${cpu}"; then
-	a_script=0x80800000
-	a_zImage=0x80800000
-	a_fdt=0x83000000
-	m4=''
-	if itest.s "x1" == "x$m4enabled" ; then
-		run m4boot;
-		m4='-m4';
-	fi
-else
-	a_script=0x10800000
-	a_zImage=0x10800000
-	a_fdt=0x13000000
-fi
-
-setenv initrd_high 0xffffffff
-if itest.s "x" == "x${dtbname}" ; then
-	if itest.s x6SOLO == "x${cpu}" ; then
-		dtbname=imx6dl-${board}.dtb;
-	elif itest.s x6DL == "x${cpu}" ; then
-		dtbname=imx6dl-${board}.dtb;
-	elif itest.s x6QP == "x${cpu}" ; then
-		dtbname=imx6qp-${board}.dtb;
-	elif itest.s x6SX == "x${cpu}" ; then
-		dtbname=imx6sx-${board}${m4}.dtb;
-	elif itest.s x7D == "x${cpu}" ; then
-		dtbname=imx7d-${board}${m4}.dtb;
-	else
-		dtbname=imx6q-${board}.dtb;
-	fi
-fi
-
-if load ${dtype} ${disk}:1 ${a_script} uEnv.txt ; then
-    env import -t ${a_script} ${filesize}
-fi
-
-if itest.s x == x${bootdir} ; then
-	bootdir=/boot/
-fi
-
-if itest.s x${bootpart} == x ; then
-	bootpart=1
-fi
-
-if load ${dtype} ${disk}:${bootpart} ${a_fdt} ${bootdir}${dtbname} ; then
-	fdt addr ${a_fdt}
-	setenv fdt_high 0xffffffff
-else
-	echo "!!!! Error loading ${bootdir}${dtbname}";
-	exit;
-fi
-
-cmd_xxx_present=
-fdt resize
-if itest.s "x" != "x${cmd_custom}" ; then
-	run cmd_custom
-	cmd_xxx_present=1;
-fi
-
-if itest.s "x" != "x${cmd_hdmi}" ; then
-	run cmd_hdmi
-	cmd_xxx_present=1;
-	if itest.s x == x${allow_noncea} ; then
-		setenv bootargs ${bootargs} mxc_hdmi.only_cea=1;
-		echo "only CEA modes allowed on HDMI port";
-	else
-		setenv bootargs ${bootargs} mxc_hdmi.only_cea=0;
-		echo "non-CEA modes allowed on HDMI, audio may be affected";
-	fi
-fi
-
-if itest.s "x" != "x${cmd_lcd}" ; then
-	run cmd_lcd
-	cmd_xxx_present=1;
-fi
-if itest.s "x" != "x${cmd_lvds}" ; then
-	run cmd_lvds
-	cmd_xxx_present=1;
-fi
-if itest.s "x" != "x${cmd_lvds2}" ; then
-	run cmd_lvds2
-	cmd_xxx_present=1;
-fi
-
-if itest.s "x" == "x${cmd_xxx_present}" ; then
-	echo "!!!!!!!!!!!!!!!!"
-	echo "warning: your u-boot may be outdated, please upgrade"
-	echo "!!!!!!!!!!!!!!!!"
-fi
-
-setenv bootargs "${bootargs} console=${console},115200 vmalloc=400M consoleblank=0 rootwait fixrtc"
-
-if test "sata" = "${dtype}" ; then
-	setenv bootargs "${bootargs} root=/dev/sda${bootpart}" ;
-elif test "usb" = "${dtype}" ; then
-	setenv bootargs "${bootargs} root=/dev/sda${bootpart}" ;
-else
-	setenv bootargs "${bootargs} root=/dev/mmcblk${disk}p${bootpart}"
-fi
-
-if itest.s "x" != "x${disable_giga}" ; then
-	setenv bootargs ${bootargs} fec.disable_giga=1
-fi
-
-if itest.s "x" != "x${wlmac}" ; then
-	setenv bootargs ${bootargs} wlcore.mac=${wlmac}
-	setenv bootargs ${bootargs} wlan.mac=${wlmac}
-fi
-
-if itest.s "x" != "x${gpumem}" ; then
-	setenv bootargs ${bootargs} galcore.contiguousSize=${gpumem}
-fi
-
-if itest.s "x" != "x${cma}" ; then
-	setenv bootargs ${bootargs} cma=${cma}
-fi
-
-if itest.s "x" != "x${show_fdt}" ; then
-	fdt print /
-fi
-
-if itest.s "x" != "x${show_env}" ; then
-	printenv
-fi
-
-if load ${dtype} ${disk}:${bootpart} ${a_zImage} ${bootdir}/zImage ; then
-	bootz ${a_zImage} - ${a_fdt}
-fi
-echo "Error loading kernel image"
board/boundarydevices/common/6x_upgrade.txt deleted +0 -69

69 lines not on this page · raw message

Signature · 1 line
2.18.0
#11 lore raw

PATCH 3/5 board/boundarydevices: remove obsolete u-boot scripts

Hello,

Quoted 3 lines · Gary Bisson

- 6x_bootscript/6x_upgrade have been deprecated for more than a year

As mentioned in the review of PATCH 2/5, this should be together with the patch that drops the use of those obsolete scripts from post-build.sh.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#12 lore raw

PATCH 4/5 board/boundarydevices: add i.MX8MQ support to u-boot scripts

In reply to Gary Bisson

- Update RAM address
- Update kernel image name for ARM64
- Update U-Boot boot command for ARM64
- Remove obsolete cmd_xxx_present check
- Remove obsolete wlan.mac parameter
- Add cmd_mipi command for MIPI-DSI interface

---
 board/boundarydevices/common/boot.cmd    | 40 +++++++-------
 board/boundarydevices/common/upgrade.cmd | 69 +++++++++++++++++++++---
 2 files changed, 81 insertions(+), 28 deletions(-)
board/boundarydevices/common/boot.cmd +18 -22
index 7602b0139e..760363da9b 100644
@@ -2,6 +2,8 @@ setenv bootargs ''
 
 setenv initrd_high 0xffffffff
 m4=''
+kernelimage=zImage
+bootcommand=bootz
 a_base=0x10000000
 if itest.s x51 == "x${imx_cpu}" ; then
 	a_base=0x90000000
@@ -9,10 +11,14 @@ elif itest.s x53 == "x${imx_cpu}"; then
 	a_base=0x70000000
 elif itest.s x6SX == "x${imx_cpu}" || itest.s x7D == "x${imx_cpu}"; then
 	a_base=0x80000000
-	if itest.s "x1" == "x$m4enabled" ; then
-		run m4boot;
-		m4='-m4';
-	fi
+elif itest.s x8MQ == "x${imx_cpu}"; then
+	a_base=0x40000000
+	kernelimage=Image
+	bootcommand=booti
+fi
+if itest.s "x1" == "x${m4enabled}" ; then
+	run m4boot;
+	m4='-m4';
 fi
 
 setexpr a_script  ${a_base} + 0x00800000
@@ -39,10 +45,12 @@ if itest.s "x" == "x${fdt_file}" ; then
 		fdt_file=imx6sx-${board}${m4}.dtb;
 	elif itest.s x7D == "x${imx_cpu}" ; then
 		fdt_file=imx7d-${board}${m4}.dtb;
+	elif itest.s x8MQ == "x${imx_cpu}" ; then
+		fdt_file=imx8mq-${board}${m4}.dtb;
 	elif itest.s x51 == "x${imx_cpu}" ; then
-		fdt_file=imx51-${board}${m4}.dtb;
+		fdt_file=imx51-${board}.dtb;
 	elif itest.s x53 == "x${imx_cpu}" ; then
-		fdt_file=imx53-${board}${m4}.dtb;
+		fdt_file=imx53-${board}.dtb;
 	else
 		fdt_file=imx6q-${board}.dtb;
 	fi
@@ -66,16 +74,12 @@ else
 	exit;
 fi
 
-cmd_xxx_present=
 fdt resize
 if itest.s "x" != "x${cmd_custom}" ; then
 	run cmd_custom
-	cmd_xxx_present=1;
 fi
-
 if itest.s "x" != "x${cmd_hdmi}" ; then
 	run cmd_hdmi
-	cmd_xxx_present=1;
 	if itest.s x == x${allow_noncea} ; then
 		setenv bootargs ${bootargs} mxc_hdmi.only_cea=1;
 		echo "only CEA modes allowed on HDMI port";
@@ -87,25 +91,18 @@ fi
 
 if itest.s "x" != "x${cmd_lcd}" ; then
 	run cmd_lcd
-	cmd_xxx_present=1;
 fi
 if itest.s "x" != "x${cmd_lcd2}" ; then
 	run cmd_lcd2
-	cmd_xxx_present=1;
 fi
 if itest.s "x" != "x${cmd_lvds}" ; then
 	run cmd_lvds
-	cmd_xxx_present=1;
 fi
 if itest.s "x" != "x${cmd_lvds2}" ; then
 	run cmd_lvds2
-	cmd_xxx_present=1;
 fi
-
-if itest.s "x" == "x${cmd_xxx_present}" ; then
-	echo "!!!!!!!!!!!!!!!!"
-	echo "warning: your u-boot may be outdated, please upgrade"
-	echo "!!!!!!!!!!!!!!!!"
+if itest.s "x" != "x${cmd_mipi}" ; then
+	run cmd_mipi
 fi
 
 if test "sata" = "${devtype}" ; then
@@ -126,7 +123,6 @@ fi
 
 if itest.s "x" != "x${wlmac}" ; then
 	setenv bootargs ${bootargs} wlcore.mac=${wlmac}
-	setenv bootargs ${bootargs} wlan.mac=${wlmac}
 fi
 
 if itest.s "x" != "x${gpumem}" ; then
@@ -149,7 +145,7 @@ if itest.s "x" != "x${show_env}" ; then
 	printenv
 fi
 
-if load ${devtype} ${devnum}:${distro_bootpart} ${a_zImage} ${prefix}zImage ; then
-	bootz ${a_zImage} - ${a_fdt}
+if load ${devtype} ${devnum}:${distro_bootpart} ${a_zImage} ${prefix}${kernelimage} ; then
+	${bootcommand} ${a_zImage} - ${a_fdt}
 fi
 echo "Error loading kernel image"
board/boundarydevices/common/upgrade.cmd +63 -6

117 lines not on this page · raw message

Signature · 1 line
2.18.0
#13 lore raw

PATCH 5/5 configs/nitrogen8m: Add new defconfig

In reply to Gary Bisson

NXP i.MX8MQ based SBC with 2GB of LPDDR4 and 8GB eMMC.

More details on the platform here:
https://boundarydevices.com/product/nitrogen8m

---
 configs/nitrogen8m_defconfig | 54 ++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 configs/nitrogen8m_defconfig
configs/nitrogen8m_defconfig new file +54 -0
new file mode 100644
index 0000000000..9b758f0b97
@@ -0,0 +1,54 @@
+# Architecture
+BR2_aarch64=y
+BR2_cortex_a53=y
+
+# System
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/boundarydevices/common/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mq-nitrogen8m.dtb"
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_IMX_MKIMAGE=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+
+# Linux headers same as kernel, a 4.9 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
+
+# DDR training binaries
+BR2_PACKAGE_FREESCALE_IMX=y
+BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y
+BR2_PACKAGE_FIRMWARE_IMX=y
+
+# ARM Trusted Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y
+# Latest revision of branch boundary-imx_4.9.51_imx8m_ga
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/imx-atf/archive/67c68675.tar.gz"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mq"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nitrogen8m"
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
+# Latest revision of branch boundary-imx_v2017.03_4.9.51_imx8m_ga
+BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/u-boot-imx6/archive/b661d854.tar.gz"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_SPL=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+# Latest revision  of branch boundary-imx_4.9.x_2.0.0_ga
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/archive/7777e14d.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="boundary"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mq-nitrogen8m freescale/imx8mq-nitrogen8m-m4"
Signature · 1 line
2.18.0
#14 lore raw

PATCH 5/5 configs/nitrogen8m: Add new defconfig

Hello,

Quoted 10 lines · Gary Bisson

NXP i.MX8MQ based SBC with 2GB of LPDDR4 and 8GB eMMC.

More details on the platform here:
https://boundarydevices.com/product/nitrogen8m

---
 configs/nitrogen8m_defconfig | 54 ++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 configs/nitrogen8m_defconfig

DEVELOPERS entry + .gitlab-ci.yml update are missing.

configs/nitrogen8m_defconfig line 10

Quoted 6 lines
configs/nitrogen8m_defconfig new file +6 -0
+# System
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/boundarydevices/common/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mq-nitrogen8m.dtb"

UBOOT_DIR is properly going to be expanded by the post-build script ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#15 lore raw

PATCH 5/5 configs/nitrogen8m: Add new defconfig

Hi,

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 5 lines · Gary Bisson

NXP i.MX8MQ based SBC with 2GB of LPDDR4 and 8GB eMMC.

More details on the platform here:
https://boundarydevices.com/product/nitrogen8m

Quoted 7 lines
Quoted 5 lines
---
 configs/nitrogen8m_defconfig | 54 ++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 configs/nitrogen8m_defconfig

DEVELOPERS entry + .gitlab-ci.yml update are missing.

DEVELOPERS should be fine since I have:
F: configs/nitrogen*

.gitlab-ci.yml was forgotten indeed, I'll add it to V2.

Quoted 8 lines

configs/nitrogen8m_defconfig line 10

Quoted 6 lines
configs/nitrogen8m_defconfig new file +6 -0
+# System
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/boundarydevices/common/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mq-nitrogen8m.dtb"

UBOOT_DIR is properly going to be expanded by the post-build script ?

My understanding is that the Makefile is expanding it already. What I know for sure is that I receive the proper value in the script.

Regards,
Gary

#16 lore raw

PATCH 5/5 configs/nitrogen8m: Add new defconfig

Hello,

Quoted 4 lines · Gary Bisson
Quoted 1 line

DEVELOPERS entry + .gitlab-ci.yml update are missing.

DEVELOPERS should be fine since I have:
F: configs/nitrogen*

Ah, yes, my bad.

Quoted 11 lines
Quoted 8 lines

configs/nitrogen8m_defconfig line 10

Quoted 6 lines
configs/nitrogen8m_defconfig new file +6 -0
+# System
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/boundarydevices/common/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mq-nitrogen8m.dtb"  

UBOOT_DIR is properly going to be expanded by the post-build script ?

My understanding is that the Makefile is expanding it already. What I know for sure is that I receive the proper value in the script.

OK, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#17 lore raw

PATCH 5/5 configs/nitrogen8m: Add new defconfig

In reply to Gary Bisson
Quoted 33 lines · Gary Bisson

Hi,

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 5 lines · Gary Bisson

NXP i.MX8MQ based SBC with 2GB of LPDDR4 and 8GB eMMC.

More details on the platform here:
https://boundarydevices.com/product/nitrogen8m

Quoted 7 lines
Quoted 5 lines
---
 configs/nitrogen8m_defconfig | 54 ++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 configs/nitrogen8m_defconfig

DEVELOPERS entry + .gitlab-ci.yml update are missing.

DEVELOPERS should be fine since I have:
F: configs/nitrogen*

.gitlab-ci.yml was forgotten indeed, I'll add it to V2.

Quoted 8 lines

configs/nitrogen8m_defconfig line 10

Quoted 6 lines
configs/nitrogen8m_defconfig new file +6 -0
+# System
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/boundarydevices/common/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mq-nitrogen8m.dtb"

UBOOT_DIR is properly going to be expanded by the post-build script ?

Quoted 2 lines

My understanding is that the Makefile is expanding it already. What I know for sure is that I receive the proper value in the script.

Too late because it's already commitfed, but - you should use $(), not ${}.
With ${} it looks as if it's an environment variable, but it's actually a make variable.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#18 lore raw

PATCH 5/5 configs/nitrogen8m: Add new defconfig

Hi Arnout,

Quoted 36 lines · Arnout Vandecappelle
Quoted 33 lines · Gary Bisson

Hi,

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 5 lines · Gary Bisson

NXP i.MX8MQ based SBC with 2GB of LPDDR4 and 8GB eMMC.

More details on the platform here:
https://boundarydevices.com/product/nitrogen8m

Quoted 7 lines
Quoted 5 lines
---
 configs/nitrogen8m_defconfig | 54 ++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 configs/nitrogen8m_defconfig

DEVELOPERS entry + .gitlab-ci.yml update are missing.

DEVELOPERS should be fine since I have:
F: configs/nitrogen*

.gitlab-ci.yml was forgotten indeed, I'll add it to V2.

Quoted 8 lines

configs/nitrogen8m_defconfig line 10

Quoted 6 lines
configs/nitrogen8m_defconfig new file +6 -0
+# System
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/boundarydevices/common/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mq-nitrogen8m.dtb"

UBOOT_DIR is properly going to be expanded by the post-build script ?

Quoted 5 lines
Quoted 2 lines

My understanding is that the Makefile is expanding it already. What I know for sure is that I receive the proper value in the script.

Too late because it's already commitfed, but - you should use $(), not ${}.
With ${} it looks as if it's an environment variable, but it's actually a make variable.

Should I submit a patch or can it wait until next version bump?

Regards,
Gary

#19 lore raw

PATCH 5/5 configs/nitrogen8m: Add new defconfig

Quoted 39 lines · Gary Bisson

Hi Arnout,

Quoted 36 lines · Arnout Vandecappelle
Quoted 33 lines · Gary Bisson

Hi,

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 5 lines · Gary Bisson

NXP i.MX8MQ based SBC with 2GB of LPDDR4 and 8GB eMMC.

More details on the platform here:
https://boundarydevices.com/product/nitrogen8m

Quoted 7 lines
Quoted 5 lines
---
 configs/nitrogen8m_defconfig | 54 ++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 configs/nitrogen8m_defconfig

DEVELOPERS entry + .gitlab-ci.yml update are missing.

DEVELOPERS should be fine since I have:
F: configs/nitrogen*

.gitlab-ci.yml was forgotten indeed, I'll add it to V2.

Quoted 8 lines

configs/nitrogen8m_defconfig line 10

Quoted 6 lines
configs/nitrogen8m_defconfig new file +6 -0
+# System
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/boundarydevices/common/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mq-nitrogen8m.dtb"

UBOOT_DIR is properly going to be expanded by the post-build script ?

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

My understanding is that the Makefile is expanding it already. What I know for sure is that I receive the proper value in the script.

Too late because it's already commitfed, but - you should use $(), not ${}.
With ${} it looks as if it's an environment variable, but it's actually a make variable.

Should I submit a patch or can it wait until next version bump?

It can wait, but if you do it in a version bump people might complain that it's
an independent issue you're fixing in the same patch :-)

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF