[PATCH v2 0/4] Updates for phyBOARD-Mira target

1 view
Skip to first unread message

Anton Mikanovich

unread,
Jun 25, 2024, 11:02:20 AM (11 days ago) Jun 25
to isar-...@googlegroups.com, Anton Mikanovich
This patchset switches phyboard-mira to mainline kernel and add
Bookworm distro support. This requires Barebox version update.

Changes since v1:
- Remove mainline kernel recipe sharing.
- Rebuild config fragment check skipping.

Anton Mikanovich (4):
meta-isar: Switch phyboard-mira to mainline kernel
barebox: Update to 2024.05.0
meta-isar: Add phyboard-mira-bookworm target
CI: Cover phyboard-mira-bookworm target

kas/machine/Kconfig | 2 +-
meta-isar/conf/machine/phyboard-mira.conf | 2 +-
meta-isar/conf/mc.conf | 1 +
.../multiconfig/phyboard-mira-bookworm.conf | 7 +++++
...ebox_2022.02.0.bb => barebox_2024.05.0.bb} | 2 +-
...1-of_dump-Add-a-simple-node-check-up.patch | 20 ++++++-------
...bsinstall-fix-installing-DT-overlays.patch | 30 -------------------
.../linux/linux-mainline_6.6.11.bb | 8 +++--
.../linux/linux-phy_5.10.76-phy4.bb | 16 ----------
.../recipes-kernel/linux/linux-phy_6.6.11.bb | 14 +++++++++
meta/recipes-bsp/barebox/barebox.inc | 2 +-
testsuite/citest.py | 1 +
12 files changed, 43 insertions(+), 62 deletions(-)
create mode 100644 meta-isar/conf/multiconfig/phyboard-mira-bookworm.conf
rename meta-isar/recipes-bsp/barebox/{barebox_2022.02.0.bb => barebox_2024.05.0.bb} (79%)
delete mode 100644 meta-isar/recipes-kernel/linux/files/0001-dtbsinstall-fix-installing-DT-overlays.patch
delete mode 100644 meta-isar/recipes-kernel/linux/linux-phy_5.10.76-phy4.bb
create mode 100644 meta-isar/recipes-kernel/linux/linux-phy_6.6.11.bb

--
2.34.1

Anton Mikanovich

unread,
Jun 25, 2024, 11:02:22 AM (11 days ago) Jun 25
to isar-...@googlegroups.com, Anton Mikanovich
To enable building Barebox for Bookworm targets update it to the latest
version available.

Signed-off-by: Anton Mikanovich <ami...@ilbers.de>
---
...1-of_dump-Add-a-simple-node-check-up.patch | 20 +++++++++----------
meta/recipes-bsp/barebox/barebox.inc | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
rename meta-isar/recipes-bsp/barebox/{barebox_2022.02.0.bb => barebox_2024.05.0.bb} (79%)

diff --git a/meta-isar/recipes-bsp/barebox/barebox_2022.02.0.bb b/meta-isar/recipes-bsp/barebox/barebox_2024.05.0.bb
similarity index 79%
rename from meta-isar/recipes-bsp/barebox/barebox_2022.02.0.bb
rename to meta-isar/recipes-bsp/barebox/barebox_2024.05.0.bb
index 10758b28..ad0b0c3c 100644
--- a/meta-isar/recipes-bsp/barebox/barebox_2022.02.0.bb
+++ b/meta-isar/recipes-bsp/barebox/barebox_2024.05.0.bb
@@ -10,6 +10,6 @@ SRC_URI += "https://git.pengutronix.de/cgit/barebox/snapshot/barebox-${PV}.tar.g

S = "${WORKDIR}/barebox-${PV}"

-SRC_URI[sha256sum] = "01fb3799840bde34014981557361dcae1db23764708bb7b151ec044eb022fbe8"
+SRC_URI[sha256sum] = "f57cba0be683a7e8aca8a0090e42d5913a4efb8bce762d2648f12fd666e2ebc9"

BAREBOX_VERSION_EXTENSION = "-isar"
diff --git a/meta-isar/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch b/meta-isar/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
index 05caba13..7352d7b3 100644
--- a/meta-isar/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
+++ b/meta-isar/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
@@ -1,4 +1,4 @@
-From 4abae0d9cc23ef055c0054e41c515e92fa5267ce Mon Sep 17 00:00:00 2001
+From cd6b45d1921a8d4b5607ef2da6186ae5ac38c2d4 Mon Sep 17 00:00:00 2001
From: Yunus Bas <y....@phytec.de>
Date: Fri, 4 Jun 2021 19:03:04 +0200
Subject: [PATCH] of_dump: Add a simple node check-up
@@ -16,29 +16,29 @@ Signed-off-by: Yunus Bas <y....@phytec.de>
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/commands/of_dump.c b/commands/of_dump.c
-index 6792af3af..d4d9c46a5 100644
+index 2508d4ce11..da6b65231b 100644
--- a/commands/of_dump.c
+++ b/commands/of_dump.c
-@@ -32,14 +32,17 @@ static int do_of_dump(int argc, char *argv[])
+@@ -35,14 +35,17 @@ static int do_of_dump(int argc, char *argv[])
int opt;
int ret = 0;
int fix = 0;
+ int exists = 0;
struct device_node *root = NULL, *node, *of_free = NULL;
char *dtbfile = NULL;
- size_t size;
const char *nodename;
+ unsigned maxpropsize = ~0;
int names_only = 0, properties_only = 0;

-- while ((opt = getopt(argc, argv, "Ff:np")) > 0) {
-+ while ((opt = getopt(argc, argv, "eFf:np")) > 0) {
+- while ((opt = getopt(argc, argv, "Ff:npP:")) > 0) {
++ while ((opt = getopt(argc, argv, "eFf:npP:")) > 0) {
switch (opt) {
+ case 'e':
+ exists = 1;
case 'f':
dtbfile = optarg;
break;
-@@ -109,6 +112,9 @@ static int do_of_dump(int argc, char *argv[])
+@@ -92,6 +95,9 @@ static int do_of_dump(int argc, char *argv[])
printf("Cannot find nodepath %s\n", nodename);
ret = -ENOENT;
goto out;
@@ -47,8 +47,8 @@ index 6792af3af..d4d9c46a5 100644
+ goto out;
}

- if (names_only)
-@@ -125,6 +131,7 @@ out:
+ if (names_only && !properties_only)
+@@ -109,6 +115,7 @@ static int do_of_dump(int argc, char *argv[])

BAREBOX_CMD_HELP_START(of_dump)
BAREBOX_CMD_HELP_TEXT("Options:")
@@ -57,5 +57,5 @@ index 6792af3af..d4d9c46a5 100644
BAREBOX_CMD_HELP_OPT ("-F", "return fixed devicetree")
BAREBOX_CMD_HELP_OPT ("-n", "Print node names only, no properties")
--
-2.30.0
+2.30.2

diff --git a/meta/recipes-bsp/barebox/barebox.inc b/meta/recipes-bsp/barebox/barebox.inc
index 73694e23..33470433 100644
--- a/meta/recipes-bsp/barebox/barebox.inc
+++ b/meta/recipes-bsp/barebox/barebox.inc
@@ -7,7 +7,7 @@ DESCRIPTION ?= "The barebox is a bootloader designed for embedded systems. It \
CHANGELOG_V = "${PV}+${PR}"
MAINTAINER ?= "isar-users <isar-...@googlegroups.com>"

-DEBIAN_BUILD_DEPENDS ?= "lzop, coreutils, bison, flex"
+DEBIAN_BUILD_DEPENDS ?= "lzop, coreutils, bison, flex, lz4"

BAREBOX_CONFIG ?= ""
BAREBOX_BUILD_DIR ?= "build"
--
2.34.1

Anton Mikanovich

unread,
Jun 25, 2024, 11:02:23 AM (11 days ago) Jun 25
to isar-...@googlegroups.com, Anton Mikanovich
Add bookworm distro support for phyBOARD-Mira board.

Signed-off-by: Anton Mikanovich <ami...@ilbers.de>
---
kas/machine/Kconfig | 2 +-
meta-isar/conf/mc.conf | 1 +
meta-isar/conf/multiconfig/phyboard-mira-bookworm.conf | 7 +++++++
3 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 meta-isar/conf/multiconfig/phyboard-mira-bookworm.conf

diff --git a/kas/machine/Kconfig b/kas/machine/Kconfig
index e346348d..f23a212b 100644
--- a/kas/machine/Kconfig
+++ b/kas/machine/Kconfig
@@ -44,7 +44,7 @@ config MACHINE_NANOPI_NEO_EFI

config MACHINE_PHYBOARD_MIRA
bool "phyboard-mira"
- depends on DEBIAN_BULLSEYE
+ depends on DEBIAN_BULLSEYE || DEBIAN_BOOKWORM

config MACHINE_QEMU_AMD64_SB
bool "qemuamd64-sb"
diff --git a/meta-isar/conf/mc.conf b/meta-isar/conf/mc.conf
index fa971059..7fd638d3 100644
--- a/meta-isar/conf/mc.conf
+++ b/meta-isar/conf/mc.conf
@@ -40,6 +40,7 @@ BBMULTICONFIG = " \
imx6-sabrelite-buster \
imx6-sabrelite-bullseye \
phyboard-mira-bullseye \
+ phyboard-mira-bookworm \
nanopi-neo-buster \
nanopi-neo-bullseye \
nanopi-neo-bookworm \
diff --git a/meta-isar/conf/multiconfig/phyboard-mira-bookworm.conf b/meta-isar/conf/multiconfig/phyboard-mira-bookworm.conf
new file mode 100644
index 00000000..4cc6c1de
--- /dev/null
+++ b/meta-isar/conf/multiconfig/phyboard-mira-bookworm.conf
@@ -0,0 +1,7 @@
+# This software is a part of Isar.
+# Copyright (C) 2024 ilbers GmbH
+#
+# SPDX-License-Identifier: MIT
+
+MACHINE ?= "phyboard-mira"
+DISTRO ?= "debian-bookworm"
--
2.34.1

Anton Mikanovich

unread,
Jun 25, 2024, 11:02:23 AM (11 days ago) Jun 25
to isar-...@googlegroups.com, Anton Mikanovich
As the board is already supported by currently available 6.6.11 kernel.
Config fragment verification was moved to the separate function
check_fragments_applied() so it can be omitted.

Signed-off-by: Anton Mikanovich <ami...@ilbers.de>
---
meta-isar/conf/machine/phyboard-mira.conf | 2 +-
...bsinstall-fix-installing-DT-overlays.patch | 30 -------------------
.../linux/linux-mainline_6.6.11.bb | 8 +++--
.../linux/linux-phy_5.10.76-phy4.bb | 16 ----------
.../recipes-kernel/linux/linux-phy_6.6.11.bb | 14 +++++++++
5 files changed, 21 insertions(+), 49 deletions(-)
delete mode 100644 meta-isar/recipes-kernel/linux/files/0001-dtbsinstall-fix-installing-DT-overlays.patch
delete mode 100644 meta-isar/recipes-kernel/linux/linux-phy_5.10.76-phy4.bb
create mode 100644 meta-isar/recipes-kernel/linux/linux-phy_6.6.11.bb

diff --git a/meta-isar/conf/machine/phyboard-mira.conf b/meta-isar/conf/machine/phyboard-mira.conf
index 0bc60cb0..feec4e54 100644
--- a/meta-isar/conf/machine/phyboard-mira.conf
+++ b/meta-isar/conf/machine/phyboard-mira.conf
@@ -16,7 +16,7 @@ MKUBIFS_ARGS := "-m 0x800 -e 0x1f000 -c 8012"
UBINIZE_ARGS = "-vv -m 0x800 -p 0x20000"
IMAGE_FSTYPES ?= "ubi ubifs"

-DTB_FILES = "imx6q-phytec-mira-ff-rdk-nand.dtb"
+DTB_FILES = "imx6q-phytec-mira-rdk-nand.dtb"

IMAGE_INSTALL += "barebox"

diff --git a/meta-isar/recipes-kernel/linux/files/0001-dtbsinstall-fix-installing-DT-overlays.patch b/meta-isar/recipes-kernel/linux/files/0001-dtbsinstall-fix-installing-DT-overlays.patch
deleted file mode 100644
index 0865870d..00000000
--- a/meta-isar/recipes-kernel/linux/files/0001-dtbsinstall-fix-installing-DT-overlays.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 74c2d5edf5d9d601b1caac0cae8be785e45e9af0 Mon Sep 17 00:00:00 2001
-From: Anton Mikanovich <ami...@ilbers.de>
-Date: Tue, 8 Feb 2022 19:47:35 +0300
-Subject: [PATCH] dtbsinstall: fix installing DT overlays
-
-Add dtbo target needed for __dtbs_install to fix 'make dtbs_install'
-call. 'No rule to make target' error will occur otherwise.
-
-Signed-off-by: Anton Mikanovich <ami...@ilbers.de>
----
- scripts/Makefile.dtbinst | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
-index 50d580d77ae9..829609ce29cf 100644
---- a/scripts/Makefile.dtbinst
-+++ b/scripts/Makefile.dtbinst
-@@ -29,6 +29,9 @@ quiet_cmd_dtb_install = INSTALL $@
- $(dst)/%.dtb: $(obj)/%.dtb
- $(call cmd,dtb_install)
-
-+$(dst)/%.dtbo: $(obj)/%.dtbo
-+ $(call cmd,dtb_install)
-+
- PHONY += $(subdirs)
- $(subdirs):
- $(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@)
---
-2.25.1
-
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_6.6.11.bb b/meta-isar/recipes-kernel/linux/linux-mainline_6.6.11.bb
index d7483eb0..2287e763 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_6.6.11.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_6.6.11.bb
@@ -24,8 +24,7 @@ KERNEL_DEFCONFIG:qemuamd64 = "x86_64_defconfig"

LINUX_VERSION_EXTENSION = "-isar"

-# For testing purposes only
-dpkg_configure_kernel:append() {
+check_fragments_applied() {
grep -q "# CONFIG_MTD is not set" ${S}/debian/rules ||
cat << EOF | sed -i '/^override_dh_auto_build/ r /dev/stdin' ${S}/debian/rules
if ! grep "# CONFIG_MTD is not set" \$(O)/.config && \\
@@ -37,3 +36,8 @@ dpkg_configure_kernel:append() {
(echo "Self-check failed: CONFIG_ROOT_NFS not enabled" && exit 1)
EOF
}
+
+# For testing purposes only
+dpkg_configure_kernel:append() {
+ check_fragments_applied
+}
diff --git a/meta-isar/recipes-kernel/linux/linux-phy_5.10.76-phy4.bb b/meta-isar/recipes-kernel/linux/linux-phy_5.10.76-phy4.bb
deleted file mode 100644
index accb3c9a..00000000
--- a/meta-isar/recipes-kernel/linux/linux-phy_5.10.76-phy4.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require recipes-kernel/linux/linux-custom.inc
-
-SRC_URI += "https://git.phytec.de/linux-mainline/snapshot/linux-mainline-${PV}.tar.bz2 \
- file://0001-dtbsinstall-fix-installing-DT-overlays.patch"
-
-SRC_URI[sha256sum] = "ce0cff708da9f3dca1f6f8d6c433589fd5a5ea8db9e33114f44497ecf873f875"
-
-S = "${WORKDIR}/linux-mainline-${PV}"
-
-KBUILD_DEPENDS:append = "lzop"
-
-KERNEL_DEFCONFIG = "imx_v6_v7_defconfig"
-
-LINUX_VERSION_EXTENSION = "-isar"
-
-COMPATIBLE_MACHINE = "phyboard-mira"
diff --git a/meta-isar/recipes-kernel/linux/linux-phy_6.6.11.bb b/meta-isar/recipes-kernel/linux/linux-phy_6.6.11.bb
new file mode 100644
index 00000000..25864d1c
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/linux-phy_6.6.11.bb
@@ -0,0 +1,14 @@
+require recipes-kernel/linux/linux-mainline_6.6.11.bb
+
+SRC_URI:remove = "file://ftpm-module.cfg"
+SRC_URI:remove = "file://subdir/no-ubifs-fs.cfg"
+
+check_fragments_applied() {
+ echo "Kernel config fragments checking disabled"
+}
+
+KERNEL_DEFCONFIG = "imx_v6_v7_defconfig"
+
+LINUX_VERSION_EXTENSION = "-isar"
+
+COMPATIBLE_MACHINE = "phyboard-mira"
--
2.34.1

Anton Mikanovich

unread,
Jun 25, 2024, 11:02:24 AM (11 days ago) Jun 25
to isar-...@googlegroups.com, Anton Mikanovich
Add new muticonfig to fast CI because full already has bullseye, so it
conflicts on do_copy_bootfiles task.

Signed-off-by: Anton Mikanovich <ami...@ilbers.de>
---
testsuite/citest.py | 1 +
1 file changed, 1 insertion(+)

diff --git a/testsuite/citest.py b/testsuite/citest.py
index 42d44f6a..11b39f8f 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -132,6 +132,7 @@ class CrossTest(CIBaseTest):
'mc:qemuarm64-bookworm:isar-image-ci',
'mc:qemuarm64-focal:isar-image-base',
'mc:nanopi-neo-efi-bookworm:isar-image-base',
+ 'mc:phyboard-mira-bookworm:isar-image-base',
]

self.init()
--
2.34.1

Uladzimir Bely

unread,
Jun 30, 2024, 11:14:13 PM (5 days ago) Jun 30
to Anton Mikanovich, isar-...@googlegroups.com
Applied to next.

--
Best regards,
Uladzimir.
Reply all
Reply to author
Forward
0 new messages