Skip to contentSkip to conversation

configs/octavo_osd32mp1_brk_defconfig: Add support for octavo brk board

PATCH In review Kory Maincent 3 participants 7 messages Oct 5, 2021 – Oct 19, 2021 Arm STM32

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 configs/octavo_osd32mp1_brk_defconfig: Add support for octavo brk board

Very similar to the other stm32mp157-based boards. We use the TF-A, U-boot and Linux version from ST used by the Octavo constructor.

Reference:
https://octavosystems.com/octavo_products/osd32mp1-brk/

The device tree blobs come from Octavo System:
https://github.com/octavosystems/OSD32MP1-BRK-device-tree.git

The uboot patches come from Octavo System:
https://github.com/octavosystems/BRK_Developer_Package_patches/tree/master/u-boot-v2020.01-stm32mp

It is licensed under BSD 2-Clause.

---
 DEVELOPERS                                    |    4 +
 board/octavo/brk/genimage.cfg                 |   23 +
 .../linux-dts/stm32mp157c-osd32mp1-brk.dts    | 1167 ++++++++++
 board/octavo/brk/linux.config                 |  841 +++++++
 .../brk/overlay/boot/extlinux/extlinux.conf   |    4 +
 board/octavo/brk/post-image.sh                |   39 +
 board/octavo/brk/tfa-dts/osd32mp1_ddr.dtsi    |  119 +
 .../brk/tfa-dts/stm32mp157c-osd32mp1-brk.dts  |  581 +++++
 .../0006-osd32mpp1-BRK-board-added.patch      | 1989 +++++++++++++++++
 ...2MP1-BRK-features-and-fix-formatting.patch |  976 ++++++++
 .../0008-Fix-missing-DDR-include-file.patch   |  263 +++
 ...x-Cube-programmer-GPIO-default-level.patch |   25 +
 configs/octavo_osd32mp1_brk_defconfig         |   39 +
 13 files changed, 6070 insertions(+)
 create mode 100644 board/octavo/brk/genimage.cfg
 create mode 100644 board/octavo/brk/linux-dts/stm32mp157c-osd32mp1-brk.dts
 create mode 100644 board/octavo/brk/linux.config
 create mode 100644 board/octavo/brk/overlay/boot/extlinux/extlinux.conf
 create mode 100755 board/octavo/brk/post-image.sh
 create mode 100644 board/octavo/brk/tfa-dts/osd32mp1_ddr.dtsi
 create mode 100644 board/octavo/brk/tfa-dts/stm32mp157c-osd32mp1-brk.dts
 create mode 100644 board/octavo/brk/uboot-patches/0006-osd32mpp1-BRK-board-added.patch
 create mode 100644 board/octavo/brk/uboot-patches/0007-Add-OSD32MP1-BRK-features-and-fix-formatting.patch
 create mode 100644 board/octavo/brk/uboot-patches/0008-Fix-missing-DDR-include-file.patch
 create mode 100644 board/octavo/brk/uboot-patches/0009-Fix-Cube-programmer-GPIO-default-level.patch
 create mode 100644 configs/octavo_osd32mp1_brk_defconfig
DEVELOPERS +4 -0
index 1f977190ab..f0749be912 100644
@@ -1539,6 +1539,10 @@ N:	Koen Martens <[email protected]>
 F:	package/capnproto/
 F:	package/linuxconsoletools/
 
+N:	Kory Maincent <[email protected]
+F:	board/octavo/brk/
+F:	configs/octavo_osd32mp1_brk_defconfig
+
 N:	Kurt Van Dijck <[email protected]>
 F:	package/bcusdk/
 F:	package/libpthsem/
board/octavo/brk/genimage.cfg new file +23 -0
new file mode 100644
index 0000000000..03fba8daf0
@@ -0,0 +1,23 @@
+image sdcard.img {
+	hdimage {
+		gpt = "true"
+	}
+
+	partition fsbl1 {
+		image = "%ATFBIN%"
+	}
+
+	partition fsbl2 {
+		image = "%ATFBIN%"
+	}
+
+	partition ssbl {
+		image = "u-boot.stm32"
+		size = 2M
+	}
+
+	partition rootfs {
+		image = "rootfs.ext4"
+		bootable = "yes"
+	}
+}
board/octavo/brk/linux-dts/stm32mp157c-osd32mp1-brk.dts new file +1167 -0

1,167 lines not on this page · raw message

board/octavo/brk/linux.config new file +841 -0

841 lines not on this page · raw message

board/octavo/brk/overlay/boot/extlinux/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..025eff9354
@@ -0,0 +1,4 @@
+label stm32mp157c-dk2-buildroot
+  kernel /boot/zImage
+  devicetree /boot/stm32mp157c-osd32mp1-brk.dtb
+  append root=/dev/mmcblk0p4 rootwait
board/octavo/brk/post-image.sh new file +39 -0
new file mode 100755
index 0000000000..fc2fbd1134
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+
+#
+# atf_image extracts the ATF binary image from DTB_FILE_NAME that appears in
+# BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES in ${BR_CONFIG},
+# then prints the corresponding file name for the genimage
+# configuration file
+#
+atf_image()
+{
+	local ATF_VARIABLES="$(sed -n 's/^BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="\(.*\)"$/\1/p' ${BR2_CONFIG})"
+
+	local DTB_NAME="$(sed -n 's/.*DTB_FILE_NAME=\([^ ]*\)/\1/p' <<< ${ATF_VARIABLES})"
+	local STM_NAME="tf-a-$(cut -f1 -d'.' <<< ${DTB_NAME}).stm32"
+	echo ${STM_NAME}
+}
+
+main()
+{
+	local ATFBIN="$(atf_image)"
+	if [ ! -e ${BINARIES_DIR}/${ATFBIN} ]; then
+		echo "Can not find ATF binary ${ATFBIN}"
+		exit 1
+	fi
+	local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
+	local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+	local SCRIPT_PATH=$(dirname "$0")
+
+	sed -e "s/%ATFBIN%/${ATFBIN}/" \
+		${SCRIPT_PATH}/genimage.cfg > ${GENIMAGE_CFG}
+
+	support/scripts/genimage.sh -c ${GENIMAGE_CFG}
+
+	rm -f ${GENIMAGE_CFG}
+
+	exit $?
+}
+
+main $@
board/octavo/brk/tfa-dts/osd32mp1_ddr.dtsi new file +119 -0

119 lines not on this page · raw message

board/octavo/brk/tfa-dts/stm32mp157c-osd32mp1-brk.dts new file +581 -0

581 lines not on this page · raw message

board/octavo/brk/uboot-patches/0006-osd32mpp1-BRK-board-added.patch new file +1989 -0

216 lines not on this page · raw message

board/octavo/brk/uboot-patches/0007-Add-OSD32MP1-BRK-features-and-fix-formatting.patch new file +976 -0

976 lines not on this page · raw message

board/octavo/brk/uboot-patches/0008-Fix-missing-DDR-include-file.patch new file +263 -0

263 lines not on this page · raw message

board/octavo/brk/uboot-patches/0009-Fix-Cube-programmer-GPIO-default-level.patch new file +25 -0
new file mode 100644
index 0000000000..522a55f300

Lines of this file are not shown. View the raw message.

configs/octavo_osd32mp1_brk_defconfig new file +39 -0
new file mode 100644
index 0000000000..3cb333441d

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
2.25.1

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

Part of the diff is not shown here. View the raw message.

#1 lore raw

PATCH 2/2 configs/octavo_osd32mp1_red_defconfig: Add support for octavo red board

Very similar to the other stm32mp157-based boards. We use the TF-A, U-boot and Linux version from ST selected by the Octavo constructor.

Reference:
https://octavosystems.com/octavo_products/osd32mp1-red/

The device tree blobs come from Octavo System:
https://github.com/octavosystems/OSD32MP1-RED-Device-tree.git

The uboot patches come from Octavo System:

    https://github.com/octavosystems/osd32mp1-build-tools/tree/master/patches/u-boot-2018.11

It is licensed under BSD 3-Clause.

---
 DEVELOPERS                                    |    2 +
 board/octavo/red/genimage.cfg                 |   23 +
 board/octavo/red/linux-dts/osd32mp1-red.dts   | 1469 ++++++++++++
 .../linux-dts/stm32mp157c-osd32mp1-red.dtsi   | 2077 +++++++++++++++++
 board/octavo/red/linux.config                 |  936 ++++++++
 .../red/overlay/boot/extlinux/extlinux.conf   |    4 +
 board/octavo/red/post-image.sh                |   39 +
 board/octavo/red/tfa-dts/osd32mp1-red.dts     |  615 +++++
 ...m32mp15-osd32mp1-ddr3-1x4Gb-1066-binG.dtsi |  119 +
 ...Add-OSD32MP1-RED-Device-Tree-support.patch | 1708 ++++++++++++++
 ...-Fix-Ethernet-Clock-for-OSD32MP1-RED.patch |   32 +
 ...5_trusted_defconfig-disable-environm.patch |   32 +
 configs/octavo_osd32mp1_red_defconfig         |   39 +
 13 files changed, 7095 insertions(+)
 create mode 100644 board/octavo/red/genimage.cfg
 create mode 100644 board/octavo/red/linux-dts/osd32mp1-red.dts
 create mode 100644 board/octavo/red/linux-dts/stm32mp157c-osd32mp1-red.dtsi
 create mode 100644 board/octavo/red/linux.config
 create mode 100644 board/octavo/red/overlay/boot/extlinux/extlinux.conf
 create mode 100755 board/octavo/red/post-image.sh
 create mode 100644 board/octavo/red/tfa-dts/osd32mp1-red.dts
 create mode 100644 board/octavo/red/tfa-dts/stm32mp15-osd32mp1-ddr3-1x4Gb-1066-binG.dtsi
 create mode 100644 board/octavo/red/uboot-patches/0001-Add-OSD32MP1-RED-Device-Tree-support.patch
 create mode 100644 board/octavo/red/uboot-patches/0002-Fix-Ethernet-Clock-for-OSD32MP1-RED.patch
 create mode 100644 board/octavo/red/uboot-patches/0003-configs-stm32mp15_trusted_defconfig-disable-environm.patch
 create mode 100644 configs/octavo_osd32mp1_red_defconfig
DEVELOPERS +2 -0
index f0749be912..be2be47806 100644
@@ -1541,7 +1541,9 @@ F:	package/linuxconsoletools/
 
 N:	Kory Maincent <[email protected]
 F:	board/octavo/brk/
+F:	board/octavo/red/
 F:	configs/octavo_osd32mp1_brk_defconfig
+F:	configs/octavo_osd32mp1_red_defconfig
 
 N:	Kurt Van Dijck <[email protected]>
 F:	package/bcusdk/
board/octavo/red/genimage.cfg new file +23 -0
new file mode 100644
index 0000000000..03fba8daf0
@@ -0,0 +1,23 @@
+image sdcard.img {
+	hdimage {
+		gpt = "true"
+	}
+
+	partition fsbl1 {
+		image = "%ATFBIN%"
+	}
+
+	partition fsbl2 {
+		image = "%ATFBIN%"
+	}
+
+	partition ssbl {
+		image = "u-boot.stm32"
+		size = 2M
+	}
+
+	partition rootfs {
+		image = "rootfs.ext4"
+		bootable = "yes"
+	}
+}
board/octavo/red/linux-dts/osd32mp1-red.dts new file +1469 -0

1,469 lines not on this page · raw message

board/octavo/red/linux-dts/stm32mp157c-osd32mp1-red.dtsi new file +2077 -0

1,499 lines not on this page · raw message

board/octavo/red/linux.config new file +936 -0

936 lines not on this page · raw message

board/octavo/red/overlay/boot/extlinux/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..a3f8a75d35

Lines of this file are not shown. View the raw message.

board/octavo/red/post-image.sh new file +39 -0
new file mode 100755
index 0000000000..fc2fbd1134

Lines of this file are not shown. View the raw message.

board/octavo/red/tfa-dts/osd32mp1-red.dts new file +615 -0

615 lines not on this page · raw message

board/octavo/red/tfa-dts/stm32mp15-osd32mp1-ddr3-1x4Gb-1066-binG.dtsi new file +119 -0

119 lines not on this page · raw message

board/octavo/red/uboot-patches/0001-Add-OSD32MP1-RED-Device-Tree-support.patch new file +1708 -0

1,708 lines not on this page · raw message

board/octavo/red/uboot-patches/0002-Fix-Ethernet-Clock-for-OSD32MP1-RED.patch new file +32 -0
new file mode 100644
index 0000000000..c5bea5fd4d

Lines of this file are not shown. View the raw message.

board/octavo/red/uboot-patches/0003-configs-stm32mp15_trusted_defconfig-disable-environm.patch new file +32 -0
new file mode 100644
index 0000000000..05ea816498

Lines of this file are not shown. View the raw message.

configs/octavo_osd32mp1_red_defconfig new file +39 -0
new file mode 100644
index 0000000000..b4f76b38d1

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 7 lines
2.25.1


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

Part of the diff is not shown here. View the raw message.

#2 lore raw
In reply to Kory Maincent

Hello,

Thanks for this work. First (minor) comment, the commit title should be:

configs/<blabla without _defconfig prefix>: new defconfig

Quoted 2 lines · On Tue, 5 Oct 2021 16:52:04 +0200 Kory Maincent <[email protected]>…

Very similar to the other stm32mp157-based boards. We use the TF-A, U-boot and Linux version from ST used by the Octavo constructor.

And here you add a sentence with the name of the board.

Quoted 11 lines

Reference:
https://octavosystems.com/octavo_products/osd32mp1-brk/

The device tree blobs come from Octavo System:
https://github.com/octavosystems/OSD32MP1-BRK-device-tree.git

The uboot patches come from Octavo System:
https://github.com/octavosystems/BRK_Developer_Package_patches/tree/master/u-boot-v2020.01-stm32mp

It is licensed under BSD 2-Clause.

What do you refer to "It" here ?

Quoted 1 line

+N: Kory Maincent <[email protected]

Typo.

DEVELOPERS N: Koen Martens <[email protected]> · line 1544

Quoted 2 lines
DEVELOPERS +2 -0
+F:	board/octavo/brk/
+F:	configs/octavo_osd32mp1_brk_defconfig

Should it be "octavosystems" instead of "octavo" ? This is a question, I agree "octavo" is shorter.

Quoted 12 lines
DEVELOPERS +1 -0
+
 N:	Kurt Van Dijck <[email protected]>
 F:	package/bcusdk/
 F:	package/libpthsem/
board/octavo/brk/genimage.cfg new file +2 -0
new file mode 100644
index 0000000000..03fba8daf0
@@ -0,0 +1,23 @@
+image sdcard.img {
+	hdimage {

board/octavo/brk/genimage.cfg line 12

Quoted 10 lines
board/octavo/brk/genimage.cfg new file +10 -0
+		gpt = "true"
+	}
+
+	partition fsbl1 {
+		image = "%ATFBIN%"
+	}
+
+	partition fsbl2 {
+		image = "%ATFBIN%"
+	}

Do you need this custom genimage.cfg file? If so, why isn't %ATFBIN% hardcoded? Either you have a board-specific genimage.cfg that has all values hardcoded, or you share the genimage.cfg file with other boards, and it gets "tweaked" by the post-image script. But mixing both is odd.

board/octavo/brk/linux-dts/stm32mp157c-osd32mp1-brk.dts

Quoted 5 lines
board/octavo/brk/linux-dts/stm32mp157c-osd32mp1-brk.dts new file +0 -0
new file mode 100644
index 0000000000..d763b48945

That's a lot of Device Tree stuff. Since they have it in a Git repository, I was wondering if we couldn't do something better. But we don't really have a good mechanism today to download Device Tree files from a Git repo, and feed them into the TF-A/U-Boot/Linux build.

What do others think about this?

board/octavo/brk/linux.config

Quoted 3 lines
board/octavo/brk/linux.config new file +0 -0
new file mode 100644
index 0000000000..1a5a088de0

Where does this file comes from? It seems to have a lot of "useless" things enabled.

board/octavo/brk/linux.config line 107

Quoted 8 lines
board/octavo/brk/linux.config new file +8 -0
+CONFIG_NFC=m
+CONFIG_NFC_DIGITAL=m
+CONFIG_NFC_NCI=m
+CONFIG_NFC_NCI_SPI=m
+CONFIG_NFC_NCI_UART=m
+CONFIG_NFC_HCI=m
+CONFIG_NFC_SHDLC=y
+CONFIG_NFC_S3FWRN5_I2C=m

Like meh, all these NFC stuff ?

board/octavo/brk/linux.config line 138

Quoted 5 lines
board/octavo/brk/linux.config new file +5 -0
+CONFIG_AD525X_DPOT=y
+CONFIG_AD525X_DPOT_I2C=y
+CONFIG_ICS932S401=y
+CONFIG_APDS9802ALS=y
+CONFIG_ISL29003=y

These drivers are all used ?

Quoted 12 lines
board/octavo/brk/linux.config new file +12 -0
+CONFIG_EEPROM_AT24=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_ATA=y
+CONFIG_SATA_AHCI_PLATFORM=y
+CONFIG_NETDEVICES=y
+CONFIG_VIRTIO_NET=y
+CONFIG_B53_SPI_DRIVER=m
+CONFIG_B53_MDIO_DRIVER=m
+CONFIG_B53_MMAP_DRIVER=m
+CONFIG_B53_SRAB_DRIVER=m

board/octavo/brk/linux.config line 160

Quoted 10 lines
board/octavo/brk/linux.config new file +10 -0
+CONFIG_B53_SERDES=m
+CONFIG_NET_DSA_BCM_SF2=m
+CONFIG_BCMGENET=m
+CONFIG_SYSTEMPORT=m
+CONFIG_MACB=y
+CONFIG_FTGMAC100=m
+CONFIG_HIX5HD2_GMAC=y
+CONFIG_MVMDIO=y
+CONFIG_KS8851=y
+CONFIG_SMSC911X=y

Why all these networking options? Like MVMDIO, which is for Marvell platforms ?

Please review this Linux kernel configuration file.

board/octavo/brk/overlay/boot/extlinux/extlinux.conf line 1

Quoted 7 lines
board/octavo/brk/overlay/boot/extlinux/extlinux.conf new file +1 -0
new file mode 100644
index 0000000000..025eff9354
@@ -0,0 +1,4 @@
+label stm32mp157c-dk2-buildroot

Copy/paste issue here.

board/octavo/brk/post-image.sh

Quoted 8 lines
board/octavo/brk/overlay/boot/extlinux/extlinux.conf new file +3 -0
+  kernel /boot/zImage
+  devicetree /boot/stm32mp157c-osd32mp1-brk.dtb
+  append root=/dev/mmcblk0p4 rootwait
board/octavo/brk/post-image.sh new file +0 -0
new file mode 100755
index 0000000000..fc2fbd1134

Do we need this script at all ?

board/octavo/brk/uboot-patches/0006-osd32mpp1-BRK-board-added.patch

Quoted 5 lines
board/octavo/brk/uboot-patches/0006-osd32mpp1-BRK-board-added.patch new file +0 -0
new file mode 100644
index 0000000000..4ddfc5b982

0006 ? Why does it start at 0006 ?

Also, please use BR2_GLOBAL_PATCH_DIR, so put these patches in board/octavo/brk/patches/uboot/.

board/octavo/brk/uboot-patches/0006-osd32mpp1-BRK-board-added.patch line 4

Quoted 5 lines
board/octavo/brk/uboot-patches/0006-osd32mpp1-BRK-board-added.patch new file +4 -0
@@ -0,0 +1,1989 @@
+From 2efe6be348489dbdc856947eda6e5187494aefc8 Mon Sep 17 00:00:00 2001
+From: Martin Lesniak <[email protected]>
+Date: Thu, 27 Aug 2020 14:44:46 -0500
+Subject: [PATCH 1/4] osd32mpp1 BRK board added

Generate the patches with "git format-patch -N", because the 1/4 here doesn't make any sense.

board/octavo/brk/uboot-patches/0006-osd32mpp1-BRK-board-added.patch line 8

Quoted 4 lines
board/octavo/brk/uboot-patches/0006-osd32mpp1-BRK-board-added.patch new file +4 -0
+
+New board definition for Octavo's OSD32MP1-BRK
+
+Signed-off-by: neeraj.dantu <[email protected]>

We need your Signed-off-by added on the patches.

board/octavo/brk/uboot-patches/0007-Add-OSD32MP1-BRK-features-and-fix-formatting.patch

Quoted 5 lines
board/octavo/brk/uboot-patches/0007-Add-OSD32MP1-BRK-features-and-fix-formatting.patch new file +0 -0
new file mode 100644
index 0000000000..ffa9505dad

0007, why ?

board/octavo/brk/uboot-patches/0007-Add-OSD32MP1-BRK-features-and-fix-formatting.patch line 4

Quoted 5 lines
board/octavo/brk/uboot-patches/0007-Add-OSD32MP1-BRK-features-and-fix-formatting.patch new file +4 -0
@@ -0,0 +1,976 @@
+From a473ef7f04c60d7a4a878a50890730cb0e788b40 Mon Sep 17 00:00:00 2001
+From: "neeraj.dantu" <[email protected]>
+Date: Tue, 22 Sep 2020 17:30:17 -0500
+Subject: [PATCH 2/4] Add OSD32MP1-BRK features and fix formatting

Drop 2/4.

Signed-off-by needed.

Also, indicate where the patch comes from.

board/octavo/brk/uboot-patches/0009-Fix-Cube-programmer-GPIO-default-level.patch line 5

Quoted 11 lines
board/octavo/brk/uboot-patches/0009-Fix-Cube-programmer-GPIO-default-level.patch new file +5 -0
new file mode 100644
index 0000000000..522a55f300
@@ -0,0 +1,25 @@
+From 7c5db44f99c2945b510160269b73d305a4db3c96 Mon Sep 17 00:00:00 2001
+From: "neeraj.dantu" <[email protected]>
+Date: Wed, 23 Sep 2020 18:29:52 -0500
+Subject: [PATCH 4/4] Fix Cube programmer GPIO default level
+

Same comment as previous patches.

Quoted 30 lines
configs/octavo_osd32mp1_brk_defconfig new file +24 -0
new file mode 100644
index 0000000000..3cb333441d
@@ -0,0 +1,39 @@
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
+BR2_ROOTFS_OVERLAY="board/octavo/brk/overlay/"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/octavo/brk/post-image.sh"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/STMicroelectronics/linux.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v5.4-stm32mp-r1.1"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/octavo/brk/linux.config"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-osd32mp1-brk"
+BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/octavo/brk/linux-dts/*"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/STMicroelectronics/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="v2.2-stm32mp-r2.2"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1"

configs/octavo_osd32mp1_brk_defconfig line 34

Quoted 10 lines
configs/octavo_osd32mp1_brk_defconfig new file +10 -0
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH="board/octavo/brk/tfa-dts/*"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157c-osd32mp1-brk.dtb STM32MP_USB_PROGRAMMER=1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/STMicroelectronics/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2020.01-stm32mp-r1.1"
+BR2_TARGET_UBOOT_PATCH="board/octavo/brk/uboot-patches/*.patch"

Use BR2_GLOBAL_PATCH_DIRECTORIES

I don't know if using the vendor provided U-Boot repository wouldn't be better here instead of carrying those U-Boot patches forever.

Also, another thing is badly missing: a readme.txt in the board/ directory that describes how to build, flash and use this Buildroot configuration on the board.

Thanks!

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
#3 lore raw

Hello Thomas,

Thanks for the review.

Quoted 4 lines · On Tue, 5 Oct 2021 17:42:23 +0200 Thomas Petazzoni…
Quoted 2 lines

It is licensed under BSD 2-Clause.

What do you refer to "It" here ?

The devicetree and the patches. I will update it in the v2.

Quoted 5 lines

DEVELOPERS N: Koen Martens <[email protected]> · line 1544

Quoted 2 lines
DEVELOPERS +2 -0
+F:	board/octavo/brk/
+F:	configs/octavo_osd32mp1_brk_defconfig  

Should it be "octavosystems" instead of "octavo" ? This is a question, I agree "octavo" is shorter.

Let's keep octavo naming :)

Quoted 12 lines
Quoted 12 lines
board/octavo/brk/genimage.cfg new file +9 -0
@@ -0,0 +1,23 @@
+image sdcard.img {
+	hdimage {
+		gpt = "true"
+	}
+
+	partition fsbl1 {
+		image = "%ATFBIN%"
+	}
+
Quoted 8 lines

board/octavo/brk/genimage.cfg line 12

Quoted 3 lines
board/octavo/brk/genimage.cfg new file +3 -0
+	partition fsbl2 {
+		image = "%ATFBIN%"
+	}  

Do you need this custom genimage.cfg file? If so, why isn't %ATFBIN% hardcoded? Either you have a board-specific genimage.cfg that has all values hardcoded, or you share the genimage.cfg file with other boards, and it gets "tweaked" by the post-image script. But mixing both is odd.

Ah right, I will create a common folder to share those files between the red and the brk board.

Quoted 12 lines

board/octavo/brk/linux-dts/stm32mp157c-osd32mp1-brk.dts

Quoted 6 lines
(quoted diff) +0 -0

b/board/octavo/brk/linux-dts/stm32mp157c-osd32mp1-brk.dts new file mode 100644 index 0000000000..d763b48945

board/octavo/brk/linux-dts/stm32mp157c-osd32mp1-brk.dts new file +0 -0

That's a lot of Device Tree stuff. Since they have it in a Git repository, I was wondering if we couldn't do something better. But we don't really have a good mechanism today to download Device Tree files from a Git repo, and feed them into the TF-A/U-Boot/Linux build.

Quoted 8 lines

What do others think about this?

board/octavo/brk/linux.config

Quoted 3 lines
board/octavo/brk/linux.config new file +0 -0
new file mode 100644
index 0000000000..1a5a088de0  

Where does this file comes from? It seems to have a lot of "useless" things enabled.

It was the default defconfig from ST for stm32 boards.

Quoted 1 line

Please review this Linux kernel configuration file.

I will update it with the defconfig extracted from the prebuilt image in the V2. There are still lots of features enabled.

Quoted 9 lines

board/octavo/brk/linux.config line 4

Quoted 6 lines
board/octavo/brk/linux.config new file +4 -0
@@ -0,0 +1,1989 @@
+From 2efe6be348489dbdc856947eda6e5187494aefc8 Mon Sep 17 00:00:00 2001
+From: Martin Lesniak <[email protected]>
+Date: Thu, 27 Aug 2020 14:44:46 -0500
+Subject: [PATCH 1/4] osd32mpp1 BRK board added  

Generate the patches with "git format-patch -N", because the 1/4 here doesn't make any sense.

The patches come from the octavo git repository:
https://github.com/octavosystems/BRK_Developer_Package_patches/tree/master/u-boot-v2020.01-stm32mp

Do I need to reformat them?

Quoted 7 lines

board/octavo/brk/linux.config line 8

Quoted 5 lines
board/octavo/brk/linux.config new file +4 -0
+
+New board definition for Octavo's OSD32MP1-BRK
+
+Signed-off-by: neeraj.dantu <[email protected]>  

We need your Signed-off-by added on the patches.

I did not write these patches. Is it appropriate to add my-self in the Signed-off-by tag?

Quoted 2 lines

I don't know if using the vendor provided U-Boot repository wouldn't be better here instead of carrying those U-Boot patches forever.

There is no U-boot vendor repository, only the list of patches applied.

Quoted 4 lines

Also, another thing is badly missing: a readme.txt in the board/ directory that describes how to build, flash and use this Buildroot configuration on the board.

Alright

Regards,
Köry
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw

Hi Kory,

Quoted 3 lines · Köry Maincent

Hello Thomas,

Thanks for the review.

I had mostly the same comments as Thomas before I saw he already reviewed it.

@Thomas you forgot to mark the patches as Changes Requested.

Quoted 40 lines
Quoted 4 lines · On Tue, 5 Oct 2021 17:42:23 +0200 Thomas Petazzoni…
Quoted 2 lines

It is licensed under BSD 2-Clause.

What do you refer to "It" here ?

The devicetree and the patches. I will update it in the v2.

Quoted 5 lines

DEVELOPERS N: Koen Martens <[email protected]> · line 1544

Quoted 2 lines
DEVELOPERS +2 -0
+F:	board/octavo/brk/
+F:	configs/octavo_osd32mp1_brk_defconfig

Should it be "octavosystems" instead of "octavo" ? This is a question, I agree "octavo" is shorter.

Let's keep octavo naming :)

Quoted 12 lines
Quoted 12 lines
board/octavo/brk/genimage.cfg new file +9 -0
@@ -0,0 +1,23 @@
+image sdcard.img {
+	hdimage {
+		gpt = "true"
+	}
+
+	partition fsbl1 {
+		image = "%ATFBIN%"
+	}
+
Quoted 8 lines

board/octavo/brk/genimage.cfg line 12

Quoted 3 lines
board/octavo/brk/genimage.cfg new file +3 -0
+	partition fsbl2 {
+		image = "%ATFBIN%"
+	}

Do you need this custom genimage.cfg file? If so, why isn't %ATFBIN% hardcoded? Either you have a board-specific genimage.cfg that has all values hardcoded, or you share the genimage.cfg file with other boards, and it gets "tweaked" by the post-image script. But mixing both is odd.

Quoted 2 lines

Ah right, I will create a common folder to share those files between the red and the brk board.

Ask yourself if it's worth "refactoring" the commonality. Even if you
duplicate some text between the defconfig and the genimage.cfg, it's probably going to be simpler to maintain if it's just explicit. Especially since then you can simply use the basic genimage script.

Quoted 11 lines
Quoted 11 lines

board/octavo/brk/linux-dts/stm32mp157c-osd32mp1-brk.dts

Quoted 5 lines
(quoted diff) +0 -0

b/board/octavo/brk/linux-dts/stm32mp157c-osd32mp1-brk.dts new file mode 100644 index 0000000000..d763b48945

board/octavo/brk/linux-dts/stm32mp157c-osd32mp1-brk.dts new file +0 -0

That's a lot of Device Tree stuff. Since they have it in a Git repository, I was wondering if we couldn't do something better. But we don't really have a good mechanism today to download Device Tree files from a Git repo, and feed them into the TF-A/U-Boot/Linux build.

Quoted 1 line
Quoted 1 line

What do others think about this?

Yeah, I was also thinking that.

Adding support for URLs in the DTS configs shouldn't be too hard. However, the
text would be so long that it's very difficult to edit in menuconfig, or even when directly editing .config in an editor. So I think just keeping a local copy is actually more user- and maintainer-friendly.

Quoted 7 lines
Quoted 6 lines

board/octavo/brk/linux.config

Quoted 3 lines
board/octavo/brk/linux.config new file +0 -0
new file mode 100644
index 0000000000..1a5a088de0

Where does this file comes from? It seems to have a lot of "useless" things enabled.

Quoted 6 lines

It was the default defconfig from ST for stm32 boards.

Quoted 1 line

Please review this Linux kernel configuration file.

I will update it with the defconfig extracted from the prebuilt image in the V2. There are still lots of features enabled.

We generally prefer to use an in-tree defconfig, with (if necessary) a config
fragment to tweak it.

When using an in-tree defconfig, it's OK if it's a little bit too much (e.g.
contains a bunch of meh NFC stuff).

Quoted 9 lines
Quoted 8 lines

board/octavo/brk/linux.config line 4

Quoted 5 lines
board/octavo/brk/linux.config new file +4 -0
@@ -0,0 +1,1989 @@
+From 2efe6be348489dbdc856947eda6e5187494aefc8 Mon Sep 17 00:00:00 2001
+From: Martin Lesniak <[email protected]>
+Date: Thu, 27 Aug 2020 14:44:46 -0500
+Subject: [PATCH 1/4] osd32mpp1 BRK board added

Generate the patches with "git format-patch -N", because the 1/4 here doesn't make any sense.

Quoted 4 lines

The patches come from the octavo git repository:
https://github.com/octavosystems/BRK_Developer_Package_patches/tree/master/u-boot-v2020.01-stm32mp

Do I need to reformat them?

Yeah, that's annoying...

We would normally say: use the git repo instead of patches. Unfortunately
octavosystems doesn't maintain a git repo. Maybe you could ask them to do that? If they put the DTs in there as well, that would fix the DT issue as well... Although, for Linux they don't need any patches, so maintaining a fork for that would be silly.

Anyway, if you copy patches from somewhere else, whether it's with
git-format-patch or by copying, you *have* to add your Signed-off-by. Personally, I'd git am -s them in a u-boot clone, and then git format-patch them again in the usual way, so it's completely formatted the way we like it.

Quoted 9 lines
Quoted 6 lines

board/octavo/brk/linux.config line 8

Quoted 4 lines
board/octavo/brk/linux.config new file +4 -0
+
+New board definition for Octavo's OSD32MP1-BRK
+
+Signed-off-by: neeraj.dantu <[email protected]>

We need your Signed-off-by added on the patches.

I did not write these patches. Is it appropriate to add my-self in the Signed-off-by tag?

Signed-off-by is a short way for you to assert that you are entitled to
contribute the patch under U-Boot's GPL license. See
http://elinux.org/Developer_Certificate_Of_Origin for more details.

Quoted 9 lines
Quoted 2 lines

I don't know if using the vendor provided U-Boot repository wouldn't be better here instead of carrying those U-Boot patches forever.

There is no U-boot vendor repository, only the list of patches applied.

Quoted 4 lines

Also, another thing is badly missing: a readme.txt in the board/ directory that describes how to build, flash and use this Buildroot configuration on the board.

And one more thing:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
board/octavo/brk/linux.config new file +6 -0
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
+BR2_ROOTFS_OVERLAY="board/octavo/brk/overlay/"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/octavo/brk/post-image.sh"
+BR2_LINUX_KERNEL=y
Quoted 8 lines
Quoted 8 lines

board/octavo/brk/linux.config line 22

Quoted 8 lines
board/octavo/brk/linux.config new file +8 -0
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/STMicroelectronics/linux.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v5.4-stm32mp-r1.1"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/octavo/brk/linux.config"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-osd32mp1-brk"
+BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/octavo/brk/linux-dts/*"

I'm very surprised that this works... In linux.mk, there's no wildcard
expansion on the DTSs. They will be copied because the shell will expand the wildcard, but the .mk file also filters the .dts files out of the list, changes them in .dtb, and uses that as a make target and to copy to images and target. Since there's no .dts above, the DTB list will be empty.

So, does this really work?

If not, it may be a good idea to patch linux.mk to add a $(wildcard ...).
Because the scenario you have is pretty typical.

There is one other problem with it though: when developing, you can easily get
.orig and .rej and ~ files and other crap in that directory. So perhaps you should make it "board/octavo/brk/linux-dts/*.dts board/octavo/brk/linux-dts/*.dtsi"

Quoted 4 lines
Quoted 4 lines

board/octavo/brk/linux.config line 26

Quoted 4 lines
board/octavo/brk/linux.config new file +4 -0
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"

Is this needed?

Regards,
Arnout

Quoted 26 lines
Quoted 13 lines
Quoted 13 lines
board/octavo/brk/linux.config new file +13 -0
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/STMicroelectronics/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="v2.2-stm32mp-r2.2"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_DTS_PATH="board/octavo/brk/tfa-dts/*"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157c-osd32mp1-brk.dtb STM32MP_USB_PROGRAMMER=1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
Quoted 8 lines

board/octavo/brk/linux.config line 47

Quoted 8 lines
board/octavo/brk/linux.config new file +8 -0
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/STMicroelectronics/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2020.01-stm32mp-r1.1"
+BR2_TARGET_UBOOT_PATCH="board/octavo/brk/uboot-patches/*.patch"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_trusted"
+# BR2_TARGET_UBOOT_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_STM32=y
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157c-osd32mp1-brk"
+BR2_PACKAGE_HOST_GENIMAGE=y

Alright

Quoted 7 lines

Regards,
Köry
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

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

#5 lore raw

Hello Arnout,

Thanks for the review!

Quoted 5 lines · On Fri, 15 Oct 2021 22:42:17 +0200 Arnout Vandecappelle <[email protected]> wrote:
Quoted 5 lines
Quoted 4 lines

Do you need this custom genimage.cfg file? If so, why isn't %ATFBIN% hardcoded? Either you have a board-specific genimage.cfg that has all values hardcoded, or you share the genimage.cfg file with other boards, and it gets "tweaked" by the post-image script. But mixing both is odd.

Quoted 7 lines
Quoted 2 lines

Ah right, I will create a common folder to share those files between the red and the brk board.

Ask yourself if it's worth "refactoring" the commonality. Even if you
duplicate some text between the defconfig and the genimage.cfg, it's probably going to be simpler to maintain if it's just explicit. Especially since then you can simply use the basic genimage script.

Ok, indeed it will be simpler with only a specific genimage config file for each board.

Quoted 11 lines
Quoted 11 lines
Quoted 6 lines

board/octavo/brk/linux.config

Quoted 3 lines
board/octavo/brk/linux.config new file +0 -0
new file mode 100644
index 0000000000..1a5a088de0  

Where does this file comes from? It seems to have a lot of "useless" things enabled.

It was the default defconfig from ST for stm32 boards.

Quoted 1 line

Please review this Linux kernel configuration file.

Quoted 8 lines
Quoted 2 lines

I will update it with the defconfig extracted from the prebuilt image in the V2. There are still lots of features enabled.

We generally prefer to use an in-tree defconfig, with (if necessary) a
config fragment to tweak it.

When using an in-tree defconfig, it's OK if it's a little bit too much
(e.g. contains a bunch of meh NFC stuff).

Other specific stuff from ST linux. They are using multi_v7_defconfig with fragment-01-multiv7_cleanup.config and fragment-02-multiv7_addons.config in-tree defconfigs. It is currently not supported in Buildroot to use in-tree fragment configuration therefore I have extracted the defconfig generated. Have you a bettet

Quoted 24 lines
Quoted 11 lines
Quoted 10 lines

board/octavo/brk/linux.config line 4

Quoted 7 lines
board/octavo/brk/linux.config new file +4 -0
@@ -0,0 +1,1989 @@
+From 2efe6be348489dbdc856947eda6e5187494aefc8 Mon Sep 17 00:00:00 2001
+From: Martin Lesniak <[email protected]>
+Date: Thu, 27 Aug 2020 14:44:46 -0500
+Subject: [PATCH 1/4] osd32mpp1 BRK board added  

Generate the patches with "git format-patch -N", because the 1/4 here doesn't make any sense.

Quoted 4 lines

The patches come from the octavo git repository:
https://github.com/octavosystems/BRK_Developer_Package_patches/tree/master/u-boot-v2020.01-stm32mp

Do I need to reformat them?

Yeah, that's annoying...

We would normally say: use the git repo instead of patches. Unfortunately
octavosystems doesn't maintain a git repo. Maybe you could ask them to do that? If they put the DTs in there as well, that would fix the DT issue as well... Although, for Linux they don't need any patches, so maintaining a fork for that would be silly.

Quoted 4 lines

Anyway, if you copy patches from somewhere else, whether it's with
git-format-patch or by copying, you *have* to add your Signed-off-by. Personally, I'd git am -s them in a u-boot clone, and then git format-patch them again in the usual way, so it's completely formatted the way we like it.

Ok I will do that.

Quoted 23 lines

And one more thing:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
board/octavo/brk/linux.config new file +6 -0
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
+BR2_ROOTFS_OVERLAY="board/octavo/brk/overlay/"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/octavo/brk/post-image.sh"
+BR2_LINUX_KERNEL=y
Quoted 8 lines
Quoted 8 lines

board/octavo/brk/linux.config line 18

Quoted 8 lines
board/octavo/brk/linux.config new file +8 -0
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/STMicroelectronics/linux.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v5.4-stm32mp-r1.1"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/octavo/brk/linux.config"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-osd32mp1-brk"
+BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/octavo/brk/linux-dts/*"  

I'm very surprised that this works... In linux.mk, there's no wildcard
expansion on the DTSs. They will be copied because the shell will expand the wildcard, but the .mk file also filters the .dts files out of the list, changes them in .dtb, and uses that as a make target and to copy to images and target. Since there's no .dts above, the DTB list will be empty.

Quoted 1 line

So, does this really work?s/

In fact, it works because I have set the BR2_LINUX_KERNEL_INTREE_DTS_NAME configuration.

Quoted 9 lines

If not, it may be a good idea to patch linux.mk to add a $(wildcard ...).
Because the scenario you have is pretty typical.

There is one other problem with it though: when developing, you can easily
get .orig and .rej and ~ files and other crap in that directory. So perhaps you should make it

"board/octavo/brk/linux-dts/*.dts board/octavo/brk/linux-dts/*.dtsi"

If I add $(wildcard ...) and use the *.dts and *.dtsi I can remove the BR2_LINUX_KERNEL_INTREE_DTS_NAME configuration. I will do that in V2.

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

board/octavo/brk/linux.config line 22

Quoted 5 lines
board/octavo/brk/linux.config new file +4 -0
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"  

Is this needed?

not needed, indeed.

Regards,
Köry

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

#6 lore raw
Quoted 7 lines · Köry Maincent

Hello Arnout,

Thanks for the review!

On Fri, 15 Oct 2021 22:42:17 +0200
Arnout Vandecappelle <[email protected]> wrote:

[snip]

Quoted 11 lines
Quoted 5 lines

We generally prefer to use an in-tree defconfig, with (if necessary) a
config fragment to tweak it.

When using an in-tree defconfig, it's OK if it's a little bit too much
(e.g. contains a bunch of meh NFC stuff).

Other specific stuff from ST linux. They are using multi_v7_defconfig with fragment-01-multiv7_cleanup.config and fragment-02-multiv7_addons.config in-tree defconfigs. It is currently not supported in Buildroot to use in-tree fragment configuration therefore I have extracted the defconfig generated. Have you a bettet

Well, copying just the two fragments is definitely better than copying the
entire defconfig.

But you can trick the fragment files to work after all: use
$(LINUX_DIR)/arch/arm/configs/fragment-01-multiv7_cleanup.config. It only gets evaluated after the kernel is extracted, so that path is correct.

[snip]

Quoted 9 lines
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines

configs/octavo_osd32mp1_brk_defconfig line 14

Quoted 2 lines
configs/octavo_osd32mp1_brk_defconfig new file +2 -0
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-osd32mp1-brk"
+BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/octavo/brk/linux-dts/*"

I'm very surprised that this works... In linux.mk, there's no wildcard
expansion on the DTSs. They will be copied because the shell will expand the wildcard, but the .mk file also filters the .dts files out of the list, changes them in .dtb, and uses that as a make target and to copy to images and target. Since there's no .dts above, the DTB list will be empty.

Quoted 4 lines
Quoted 1 line

So, does this really work?s/

In fact, it works because I have set the BR2_LINUX_KERNEL_INTREE_DTS_NAME configuration.

Oh, that's a neat trick! I like it, possibly better than the wildcard because
more compact. It does need to be explained, though. You can add a comment in the defconfig file itself (in fact, we like to reorder the defconfig in a more logical order than simply the output of 'make savedefconfig' - cfr. e.g. configs/warp7_defconfig).

Quoted 11 lines
Quoted 8 lines

If not, it may be a good idea to patch linux.mk to add a $(wildcard ...).
Because the scenario you have is pretty typical.

There is one other problem with it though: when developing, you can easily
get .orig and .rej and ~ files and other crap in that directory. So perhaps you should make it

"board/octavo/brk/linux-dts/*.dts board/octavo/brk/linux-dts/*.dtsi"

If I add $(wildcard ...) and use the *.dts and *.dtsi I can remove the BR2_LINUX_KERNEL_INTREE_DTS_NAME configuration. I will do that in V2.

On the other hand, with the INTREE_DTS_NAME trick, it doesn't matter that the
.orig etc are there (they're just copied, nothing more). So the added complexity of wildcard etc. isn't that useful.

The best solution, I think, is for the BR2_LINUX_KERNEL_CUSTOM_DTS_PATH option
to gain support for directories (i.e. if a path in it ends with a /, it is wildcard-expanded to *.dts *.dtsi). But that's more work, requires a test in support/testing, etc.

Regards,
Arnout

Quoted 9 lines
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

configs/octavo_osd32mp1_brk_defconfig line 18

Quoted 6 lines
configs/octavo_osd32mp1_brk_defconfig new file +4 -0
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"

Is this needed?

Quoted 5 lines

not needed, indeed.

Regards,
Köry

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