From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 20 May 2026 10:05:06 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wPbvO-001nXt-1Z for lore@lore.pengutronix.de; Wed, 20 May 2026 10:05:06 +0200 Received: from [127.0.0.1] (helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1wPbvN-0006Vf-UN; Wed, 20 May 2026 10:05:05 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1wPbvJ-0006Uz-93; Wed, 20 May 2026 10:05:01 +0200 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wPbvI-000tmF-28; Wed, 20 May 2026 10:05:01 +0200 Received: from [::1] (helo=dude05.red.stw.pengutronix.de) by dude05.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1wPbvJ-0000000AN2U-0YSJ; Wed, 20 May 2026 10:05:01 +0200 From: Ahmad Fatoum To: distrokit@pengutronix.de Date: Wed, 20 May 2026 10:04:58 +0200 Message-ID: <20260520080500.2471785-2-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260520080500.2471785-1-a.fatoum@pengutronix.de> References: <20260520080500.2471785-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH 2/2] barebox: make use of new env/match.of_compatible feature X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ahmad Fatoum Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false We switched most boards to use a single barebox recipe a while ago. This meant that the same environment is used on all boards sharing the recipe and so we had to add some calls to the of_compatible command to prevent board-specific init script to run outside of their specific board. The newest barebox release provides an alternative in the form of board-specific environment directories: If we want /boot/9p to be specific only to arm,vexpress compatible boards, we can move it to match.of_compatible/arm,vexpress/boot/9p and it will only be available there. Let's make use of it for the two scripts that are targeting only a single board. Further simplification may be possible in future by replacing other users of the of_compatible command as well. Signed-off-by: Ahmad Fatoum --- .../{ => match.of_compatible/arm,vexpress}/boot/9p | 7 +------ .../fsl,imx8mq-evk/init/disable-imx8mq-pci | 5 +++++ .../barebox-common-defaultenv/init/disable-imx8mq-pci | 7 ------- 3 files changed, 6 insertions(+), 13 deletions(-) rename configs/platform-v7a/barebox-defaultenv/{ => match.of_compatible/arm,vexpress}/boot/9p (69%) create mode 100755 configs/platform-v7a/barebox-defaultenv/match.of_compatible/fsl,imx8mq-evk/init/disable-imx8mq-pci delete mode 100755 configs/platform-v8a/barebox-common-defaultenv/init/disable-imx8mq-pci diff --git a/configs/platform-v7a/barebox-defaultenv/boot/9p b/configs/platform-v7a/barebox-defaultenv/match.of_compatible/arm,vexpress/boot/9p similarity index 69% rename from configs/platform-v7a/barebox-defaultenv/boot/9p rename to configs/platform-v7a/barebox-defaultenv/match.of_compatible/arm,vexpress/boot/9p index 3f388a47064a..4e4985c9aff2 100644 --- a/configs/platform-v7a/barebox-defaultenv/boot/9p +++ b/configs/platform-v7a/barebox-defaultenv/match.of_compatible/arm,vexpress/boot/9p @@ -1,10 +1,5 @@ #!/bin/sh -if ! of_compatible arm,vexpress ; then - echo "9p is currently only available on QEMU ARM Vexpress" - return 1 -fi - addpart /dev/nor0 "8M@32M(kernel)" addpart /dev/nor0 "512k@40M(dtb)" global.bootm.image="/dev/nor0.kernel" @@ -12,4 +7,4 @@ global.bootm.oftree="/dev/nor0.dtb" global linux.bootargs.base="console=ttyAMA0,115200 loglevel=5 ptxdist-devel" -global linux.bootargs.root="root=/dev/root rootfstype=9p rootflags=trans=virtio" \ No newline at end of file +global linux.bootargs.root="root=/dev/root rootfstype=9p rootflags=trans=virtio" diff --git a/configs/platform-v7a/barebox-defaultenv/match.of_compatible/fsl,imx8mq-evk/init/disable-imx8mq-pci b/configs/platform-v7a/barebox-defaultenv/match.of_compatible/fsl,imx8mq-evk/init/disable-imx8mq-pci new file mode 100755 index 000000000000..a0eae2501eb9 --- /dev/null +++ b/configs/platform-v7a/barebox-defaultenv/match.of_compatible/fsl,imx8mq-evk/init/disable-imx8mq-pci @@ -0,0 +1,5 @@ +#!/bin/sh + +echo "Disabling PCI to avoid issues with older EVK revisions" +of_property -fs /soc@0/pcie@33800000 status disabled +of_property -fs /soc@0/pcie@33c00000 status disabled diff --git a/configs/platform-v8a/barebox-common-defaultenv/init/disable-imx8mq-pci b/configs/platform-v8a/barebox-common-defaultenv/init/disable-imx8mq-pci deleted file mode 100755 index 68536e7baa5f..000000000000 --- a/configs/platform-v8a/barebox-common-defaultenv/init/disable-imx8mq-pci +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if of_compatible -k fsl,imx8mq-evk; then - echo "Disabling PCI to avoid issues with older EVK revisions" - of_property -fs /soc@0/pcie@33800000 status disabled - of_property -fs /soc@0/pcie@33c00000 status disabled -fi -- 2.47.3