Skip to contentSkip to conversation

Add evl support to xenomai-images

PATCH In review Jan Kiszka 2 participants 15 messages Jan 10, 2024 Arm/Amlogic Meson SoC support

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

v3 cover Add evl support to xenomai-images

I've picked up Clara's patches and massaged them a bit to fit them even more smoothly into xenomai-images. The result now also works on ARM and ARM64. It also comes with some cleanups for the existing code base.

Jan

CC Clara Kowalsky <[email protected]>

Clara Kowalsky (7):
linux-xenomai: Rename linux-xenomai to linux-xenomai-3
xenomai-3: Mark xenomai 3 specific configs
xenomai-4: Enable kernel build
xenomai-4: Add evl userspace
kconfig: Add build options for evl
ci: Rename xenomai 3 files
ci: Prepare for xenomai-4 test cases

Jan Kiszka (3):
Add Isar patch to permit linux-libc-dev upgrades in the sbuild
environment
Replace incorrect string strip method with replace Factor out print-revision class

 .gitlab-ci.yml                                |   6 +-
 Kconfig                                       |  66 +++++++
 ci/{xenomai_next.yml => xenomai_3_next.yml}   |   2 +-
 ...t_compat.yml => xenomai_3_next_compat.yml} |   1 -
 ci/{xenomai_next.yml => xenomai_4_next.yml}   |  10 +-
 classes/print-revision.bbclass                |  23 +++
 conf/distro/include/xenomai-version.inc       |   2 +-
 conf/distro/xenomai-demo.conf                 |   8 +-
 ...port-for-replacing-pre-installed-pac.patch | 168 ++++++++++++++++++
 kas.yml                                       |   6 +-
 opt-linux-6.6.yml => opt-evl.yml              |   4 +-
 opt-libevl-latest-release.yml                 |  19 ++
 opt-libevl-next.yml                           |  19 ++
 opt-linux-4.19.yml                            |   2 +-
 opt-linux-4.4.yml                             |   2 +-
 opt-linux-5.10.yml                            |   2 +-
 opt-linux-5.15.yml                            |   2 +-
 opt-linux-5.4.yml                             |   2 +-
 opt-linux-6.1.yml                             |   2 +-
 opt-linux-6.6.yml                             |   2 +-
 opt-linux-latest-4.19.yml                     |   2 +-
 opt-linux-latest-4.4.yml                      |   2 +-
 opt-linux-latest-5.10.yml                     |   2 +-
 opt-linux-latest-5.15.yml                     |   2 +-
 opt-linux-latest-5.4.yml                      |   2 +-
 opt-linux-latest-6.1.yml                      |   3 +-
 opt-linux-latest-6.6.yml                      |   3 +-
 opt-linux-latest.yml                          |   2 +-
 recipes-core/images/demo-image.bb             |  10 +-
 recipes-kernel/linux/files/evl.cfg            |   3 +
 ...etail.inc => linux-xenomai-3-dovetail.inc} |   2 +-
 recipes-kernel/linux/linux-xenomai-3.inc      |  25 +++
 ...enomai_4.19.bb => linux-xenomai-3_4.19.bb} |   2 +-
 ...-xenomai_4.4.bb => linux-xenomai-3_4.4.bb} |   2 +-
 ...enomai_5.10.bb => linux-xenomai-3_5.10.bb} |   2 +-
 ...enomai_5.15.bb => linux-xenomai-3_5.15.bb} |   2 +-
 ...-xenomai_5.4.bb => linux-xenomai-3_5.4.bb} |   2 +-
 ...-xenomai_6.1.bb => linux-xenomai-3_6.1.bb} |   2 +-
 ...-xenomai_6.6.bb => linux-xenomai-3_6.6.bb} |   2 +-
 ...ai_latest.bb => linux-xenomai-3_latest.bb} |   4 +-
 ...i-dovetail.inc => linux-xenomai-4-evl.inc} |   6 +-
 recipes-kernel/linux/linux-xenomai-4.inc      |  16 ++
 recipes-kernel/linux/linux-xenomai-4_6.1.bb   |  14 ++
 recipes-kernel/linux/linux-xenomai-4_6.6.bb   |  14 ++
 .../linux/linux-xenomai-4_latest.bb           |  39 ++++
 recipes-kernel/linux/linux-xenomai.inc        |  26 +--
 ...i-Take-Debian-multiarch-into-account.patch |  40 +++++
 recipes-xenomai/libevl/files/debian/compat    |   1 +
 .../libevl/files/debian/control.tmpl          |  11 ++
 recipes-xenomai/libevl/files/debian/rules     |  19 ++
 recipes-xenomai/libevl/libevl.inc             |  31 ++++
 recipes-xenomai/libevl/libevl_47.bb           |  15 ++
 recipes-xenomai/libevl/libevl_latest.bb       |  25 +++
 recipes-xenomai/libevl/libevl_master.bb       |  17 ++
 recipes-xenomai/libevl/libevl_next.bb         |   1 +
 recipes-xenomai/xenomai/xenomai.inc           |  13 +-
 56 files changed, 627 insertions(+), 85 deletions(-)
 copy ci/{xenomai_next.yml => xenomai_3_next.yml} (91%)
 rename ci/{xenomai_next_compat.yml => xenomai_3_next_compat.yml} (99%)
 rename ci/{xenomai_next.yml => xenomai_4_next.yml} (51%)
 create mode 100644 classes/print-revision.bbclass
 create mode 100644 isar-patches/0001-dpkg-Restore-support-for-replacing-pre-installed-pac.patch
 copy opt-linux-6.6.yml => opt-evl.yml (72%)
 create mode 100644 opt-libevl-latest-release.yml
 create mode 100644 opt-libevl-next.yml
 create mode 100644 recipes-kernel/linux/files/evl.cfg
 copy recipes-kernel/linux/{linux-xenomai-dovetail.inc => linux-xenomai-3-dovetail.inc} (86%)
 create mode 100644 recipes-kernel/linux/linux-xenomai-3.inc
 rename recipes-kernel/linux/{linux-xenomai_4.19.bb => linux-xenomai-3_4.19.bb} (93%)
 rename recipes-kernel/linux/{linux-xenomai_4.4.bb => linux-xenomai-3_4.4.bb} (92%)
 rename recipes-kernel/linux/{linux-xenomai_5.10.bb => linux-xenomai-3_5.10.bb} (76%)
 rename recipes-kernel/linux/{linux-xenomai_5.15.bb => linux-xenomai-3_5.15.bb} (76%)
 rename recipes-kernel/linux/{linux-xenomai_5.4.bb => linux-xenomai-3_5.4.bb} (92%)
 rename recipes-kernel/linux/{linux-xenomai_6.1.bb => linux-xenomai-3_6.1.bb} (76%)
 rename recipes-kernel/linux/{linux-xenomai_6.6.bb => linux-xenomai-3_6.6.bb} (75%)
 rename recipes-kernel/linux/{linux-xenomai_latest.bb => linux-xenomai-3_latest.bb} (97%)
 rename recipes-kernel/linux/{linux-xenomai-dovetail.inc => linux-xenomai-4-evl.inc} (50%)
 create mode 100644 recipes-kernel/linux/linux-xenomai-4.inc
 create mode 100644 recipes-kernel/linux/linux-xenomai-4_6.1.bb
 create mode 100644 recipes-kernel/linux/linux-xenomai-4_6.6.bb
 create mode 100644 recipes-kernel/linux/linux-xenomai-4_latest.bb
 create mode 100644 recipes-xenomai/libevl/files/0001-meson-setup-uapi-Take-Debian-multiarch-into-account.patch
 create mode 100644 recipes-xenomai/libevl/files/debian/compat
 create mode 100644 recipes-xenomai/libevl/files/debian/control.tmpl
 create mode 100755 recipes-xenomai/libevl/files/debian/rules
 create mode 100644 recipes-xenomai/libevl/libevl.inc
 create mode 100644 recipes-xenomai/libevl/libevl_47.bb
 create mode 100644 recipes-xenomai/libevl/libevl_latest.bb
 create mode 100644 recipes-xenomai/libevl/libevl_master.bb
 create mode 120000 recipes-xenomai/libevl/libevl_next.bb
Signature · 1 line
2.35.3
author
#1 lore raw

PATCH v3 1/10 Add Isar patch to permit linux-libc-dev upgrades in the sbuild environment

From: Jan Kiszka <[email protected]>

This will be needed by libevl. Upgrade Isar rev along that to make the patch apply.

---
 ...port-for-replacing-pre-installed-pac.patch | 168 ++++++++++++++++++
 kas.yml                                       |   6 +-
 2 files changed, 173 insertions(+), 1 deletion(-)
 create mode 100644 isar-patches/0001-dpkg-Restore-support-for-replacing-pre-installed-pac.patch
isar-patches/0001-dpkg-Restore-support-for-replacing-pre-installed-pac.patch new file +168 -0
new file mode 100644
index 0000000..3132f06
@@ -0,0 +1,168 @@
+From d65b5f67405dcc83044008e589fa9ff98604d0e6 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <[email protected]>
+Date: Sun, 17 Dec 2023 17:27:01 +0100
+Subject: [PATCH] dpkg: Restore support for replacing pre-installed packages in
+ sbuild-chroot
+
+During the migration to sbuild, support for using self-built packages in
+the build environment was lost if those were already part of the
+sbuild-chroot. This restores it by adding --apt-distupgrade to the
+sbuild call. But that is not enough because sbuild will only upgrade
+packages from already configured sources, not those specified via
+--extra-repository. We therefore have to switch back to configuring
+isar-apt during sbuild-chroot creation.
+
+As rootfs_configure_isar_apt configures the isar repo under
+/isar-apt, we bind-mount the one in /home/builder/${PN} to that folder.
+Another difference is that we now need to run apt-get update explicitly,
+but only for isar-apt.
+
+And because the sbuild-chroots are now left behind with isar-apt
+configured, the configuration in imager_run can be removed (credits to
+Srinuvasan Arjunan).
+
+Signed-off-by: Jan Kiszka <[email protected]>
+---
+ meta/classes/dpkg-base.bbclass                | 27 ++++++++++---------
+ meta/classes/dpkg.bbclass                     |  5 ++--
+ meta/classes/image-tools-extension.bbclass    | 13 ---------
+ .../sbuild-chroot/sbuild-chroot.inc           |  2 --
+ 4 files changed, 18 insertions(+), 29 deletions(-)
+
+diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
+index 7b054d3f..52baf169 100644
+--- a/meta/classes/dpkg-base.bbclass
++++ b/meta/classes/dpkg-base.bbclass
+@@ -19,8 +19,6 @@ DEPENDS:append:riscv64 = "${@' crossbuild-essential-riscv64' if d.getVar('ISAR_C
+ DEB_BUILD_PROFILES ?= ""
+ DEB_BUILD_OPTIONS ?= ""
+ 
+-ISAR_APT_REPO ?= "deb [trusted=yes] file:///home/builder/${PN}/isar-apt/${DISTRO}-${DISTRO_ARCH}/apt/${DISTRO} ${DEBDISTRONAME} main"
+-
+ python do_adjust_git() {
+     import subprocess
+ 
+@@ -221,8 +219,17 @@ def isar_export_build_settings(d):
+     os.environ['DEB_BUILD_OPTIONS']  = isar_deb_build_options(d)
+     os.environ['DEB_BUILD_PROFILES'] = isar_deb_build_profiles(d)
+ 
++dpkg_schroot_create_configs() {
++    schroot_create_configs
++    sudo -s <<'EOSUDO'
++        sbuild_fstab="${SBUILD_CONF_DIR}/fstab"
++        fstab_isarapt="${WORKDIR}/isar-apt/${DISTRO}-${DISTRO_ARCH}/apt/${DISTRO} /isar-apt none rw,bind 0 0"
++        grep -qxF "${fstab_isarapt}" ${sbuild_fstab} || echo "${fstab_isarapt}" >> ${sbuild_fstab}
++EOSUDO
++}
++
+ python do_dpkg_build() {
+-    bb.build.exec_func('schroot_create_configs', d)
++    bb.build.exec_func('dpkg_schroot_create_configs', d)
+     try:
+         bb.build.exec_func("dpkg_runbuild", d)
+     finally:
+@@ -288,7 +295,7 @@ do_deploy_deb[lockfiles] = "${REPO_ISAR_DIR}/isar.lock"
+ do_deploy_deb[dirs] = "${S}"
+ 
+ python do_devshell() {
+-    bb.build.exec_func('schroot_create_configs', d)
++    bb.build.exec_func('dpkg_schroot_create_configs', d)
+ 
+     isar_export_proxies(d)
+     isar_export_ccache(d)
+@@ -297,11 +304,9 @@ python do_devshell() {
+         bb.build.exec_func('schroot_configure_ccache', d)
+ 
+     schroot = d.getVar('SBUILD_CHROOT')
+-    isar_apt = d.getVar('ISAR_APT_REPO')
+     pkg_arch = d.getVar('PACKAGE_ARCH')
+     build_arch = d.getVar('BUILD_ARCH')
+     pp_pps = os.path.join(d.getVar('PP'), d.getVar('PPS'))
+-    debdistroname = d.getVar('DEBDISTRONAME')
+ 
+     install_deps = ":" if d.getVar('BB_CURRENTTASK') == "devshell_nodeps" else f"mk-build-deps -i \
+         --host-arch {pkg_arch} --build-arch {build_arch}  \
+@@ -310,15 +315,13 @@ python do_devshell() {
+ 
+     termcmd = "schroot -d / -c {0} -u root -- sh -c ' \
+         cd {1}; \
+-        echo {2} > /etc/apt/sources.list.d/isar_apt.list; \
+-        echo \"Package: *\nPin: release n={3}\nPin-Priority: 1000\" > /etc/apt/preferences.d/isar-apt; \
+-        echo \"APT::Get::allow-downgrades 1;\" > /etc/apt/apt.conf.d/50isar-apt; \
+-        apt-get -y -q update; \
+-        {4}; \
++        apt-get -y -q update -o Dir::Etc::SourceList=\"sources.list.d/isar-apt.list\" -o Dir::Etc::SourceParts=\"-\" -o APT::Get::List-Cleanup=\"0\"; \
++        apt-get -y upgrade; \
++        {2}; \
+         export PATH=$PATH_PREPEND:$PATH; \
+         $SHELL -i \
+     '"
+-    oe_terminal(termcmd.format(schroot, pp_pps, isar_apt, debdistroname, install_deps), "Isar devshell", d)
++    oe_terminal(termcmd.format(schroot, pp_pps, install_deps), "Isar devshell", d)
+ 
+     bb.build.exec_func('schroot_delete_configs', d)
+ }
+diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
+index 1d684e98..0cdb5792 100644
+--- a/meta/classes/dpkg.bbclass
++++ b/meta/classes/dpkg.bbclass
+@@ -110,16 +110,17 @@ dpkg_runbuild() {
+     DEB_SOURCE_NAME=$(dpkg-parsechangelog --show-field Source --file ${WORKDIR}/${PPS}/debian/changelog)
+     DSC_FILE=$(find ${WORKDIR} -name "${DEB_SOURCE_NAME}*.dsc" -maxdepth 1 -print)
+ 
+-    sbuild -A -n -c ${SBUILD_CHROOT} --extra-repository="${ISAR_APT_REPO}" \
++    sbuild -A -n -c ${SBUILD_CHROOT} \
+         --host=${PACKAGE_ARCH} --build=${BUILD_ARCH} ${profiles} \
+         --no-run-lintian --no-run-piuparts --no-run-autopkgtest --resolve-alternatives \
+         --bd-uninstallable-explainer=apt \
+-        --no-apt-update \
++        --no-apt-update --apt-distupgrade \
+         --chroot-setup-commands="echo \"Package: *\nPin: release n=${DEBDISTRONAME}\nPin-Priority: 1000\" > /etc/apt/preferences.d/isar-apt" \
+         --chroot-setup-commands="echo \"APT::Get::allow-downgrades 1;\" > /etc/apt/apt.conf.d/50isar-apt" \
+         --chroot-setup-commands="rm -f /var/log/dpkg.log" \
+         --chroot-setup-commands="mkdir -p ${deb_dir}" \
+         --chroot-setup-commands="ln -sf ${ext_deb_dir}/*.deb -t ${deb_dir}/" \
++        --chroot-setup-commands="apt-get update -o Dir::Etc::SourceList=\"sources.list.d/isar-apt.list\" -o Dir::Etc::SourceParts=\"-\" -o APT::Get::List-Cleanup=\"0\"" \
+         --finished-build-commands="rm -f ${deb_dir}/sbuild-build-depends-main-dummy_*.deb" \
+         --finished-build-commands="[ -z "$(find ${deb_dir} -maxdepth 1 -name '*.deb' -print -quit)" ] || cp ${CP_FLAGS} ${deb_dir}/*.deb -t ${ext_deb_dir}/" \
+         --finished-build-commands="cp /var/log/dpkg.log ${ext_root}/dpkg_partial.log" \
+diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass
+index 58799fcf..46bdf78b 100644
+--- a/meta/classes/image-tools-extension.bbclass
++++ b/meta/classes/image-tools-extension.bbclass
+@@ -44,19 +44,6 @@ imager_run() {
+             distro="${HOST_BASE_DISTRO}-${BASE_DISTRO_CODENAME}"
+         fi
+ 
+-        # prepare isar-apt
+-        schroot -r -c ${session_id} -d / -u root -- sh -c " \
+-            mkdir -p '/etc/apt/sources.list.d'
+-            echo 'deb [trusted=yes] file:///isar-apt ${DEBDISTRONAME} main' > \
+-                '/etc/apt/sources.list.d/isar-apt.list'
+-
+-            mkdir -p '/etc/apt/preferences.d'
+-            cat << EOF > '/etc/apt/preferences.d/isar-apt'
+-Package: *
+-Pin: release n=${DEBDISTRONAME}
+-Pin-Priority: 1000
+-EOF"
+-
+         E="${@ isar_export_proxies(d)}"
+         deb_dl_dir_import ${schroot_dir} ${distro}
+         schroot -r -c ${session_id} -d / -u root -- sh -c " \
+diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
+index 39ced80b..2f07de82 100644
+--- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
++++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
+@@ -56,8 +56,6 @@ SBUILD_CHROOT_DIR = "${WORKDIR}/rootfs"
+ ROOTFSDIR = "${SBUILD_CHROOT_DIR}"
+ ROOTFS_PACKAGES = "${SBUILD_CHROOT_PREINSTALL}"
+ 
+-# We don't need /etc/apt/sources.list.d/isar-apt.list' while it's handled by sbuild
+-ROOTFS_CONFIGURE_COMMAND:remove = "rootfs_configure_isar_apt"
+ ROOTFS_POSTPROCESS_COMMAND:remove = "rootfs_cleanup_isar_apt"
+ 
+ # Do not cleanup base-apt
+-- 
+2.35.3
+
kas.yml +5 -1
index 1b2e857..2017e68 100644
@@ -22,9 +22,13 @@ repos:
 
   isar:
     url: https://github.com/ilbers/isar.git
-    commit: 216f0721265fcfe965ac48b51a0128d612d89bf4
+    commit: 853784cf1732c093acd537fbb1b0b1c54e6b59ff
     layers:
       meta:
+    patches:
+      01:
+        repo: xenomai
+        path: isar-patches/0001-dpkg-Restore-support-for-replacing-pre-installed-pac.patch
 
 bblayers_conf_header:
   standard: |
Signature · 1 line
2.35.3
author
#4 lore raw

PATCH v3 2/10 Replace incorrect string strip method with replace

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

We want the leading 'AUTOINC+' string stripped off but that is not reliably done by Python's strip() method with works per character.

---
 recipes-kernel/linux/linux-xenomai.inc | 2 +-
 recipes-xenomai/xenomai/xenomai.inc    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
recipes-kernel/linux/linux-xenomai.inc +1 -1
index ca63fea..4761d01 100644
@@ -30,7 +30,7 @@ TEMPLATE_FILES += "rules.tmpl"
 
 def get_commit(d):
     try:
-        return bb.fetch2.get_srcrev(d).strip('AUTOINC+')
+        return bb.fetch2.get_srcrev(d).replace('AUTOINC+', '')
     except bb.fetch2.FetchError:
         return ""
 
recipes-xenomai/xenomai/xenomai.inc +1 -1
index 0a32981..26ee654 100644
@@ -25,7 +25,7 @@ PACKAGE_ARCH:compat-arch = "${COMPAT_DISTRO_ARCH}"
 # use bitbake get_srcrev to get the current commit id
 def get_commit(d):
     try:
-        return bb.fetch2.get_srcrev(d).strip('AUTOINC+')
+        return bb.fetch2.get_srcrev(d).replace('AUTOINC+', '')
     except bb.fetch2.FetchError:
         return ""
 
Signature · 1 line
2.35.3
author
#5 lore raw

PATCH v3 3/10 Factor out print-revision class

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

This logic is already shared by kernel and xenomai recipes, more to come.

---
 classes/print-revision.bbclass               | 23 ++++++++++++++++++++
 recipes-kernel/linux/linux-xenomai.inc       | 14 +-----------
 recipes-kernel/linux/linux-xenomai_latest.bb |  2 +-
 recipes-xenomai/xenomai/xenomai.inc          | 13 +----------
 4 files changed, 26 insertions(+), 26 deletions(-)
 create mode 100644 classes/print-revision.bbclass
classes/print-revision.bbclass new file +23 -0
new file mode 100644
index 0000000..ca4aa7b
@@ -0,0 +1,23 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2018-2024
+#
+# Authors:
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+def get_commit(d):
+    try:
+        return bb.fetch2.get_srcrev(d).replace('AUTOINC+', '')
+    except bb.fetch2.FetchError:
+        return ""
+
+COMMIT="${@get_commit(d)}"
+
+dpkg_runbuild:prepend() {
+    bbplain $(printf "%s-%s: Building revision %.20s\n" \
+                     ${PN} ${PV} ${COMMIT})
+}
recipes-kernel/linux/linux-xenomai.inc +1 -13
index 4761d01..1d7d78a 100644
@@ -10,6 +10,7 @@
 #
 
 require recipes-kernel/linux/linux-custom.inc
+inherit print-revision
 
 FILESPATH =. "${LAYERDIR_xenomai}/recipes-kernel/linux/files:"
 
@@ -28,19 +29,6 @@ KBUILD_DEPENDS += "xenomai-kernel-source:native"
 
 TEMPLATE_FILES += "rules.tmpl"
 
-def get_commit(d):
-    try:
-        return bb.fetch2.get_srcrev(d).replace('AUTOINC+', '')
-    except bb.fetch2.FetchError:
-        return ""
-
-LINUX_COMMIT ?= "${@get_commit(d)}"
-
-dpkg_runbuild:prepend() {
-    bbplain $(printf "linux-xenomai-%s: Building revision %.20s\n" \
-                     ${PV} ${LINUX_COMMIT})
-}
-
 do_prepare_debian_rules() {
     mv ${WORKDIR}/debian/rules ${WORKDIR}/debian/rules.isar
     mv ${WORKDIR}/rules ${WORKDIR}/debian/rules
recipes-kernel/linux/linux-xenomai_latest.bb +1 -1
index c9b2513..d1b0226 100644
@@ -12,7 +12,7 @@
 
 require recipes-kernel/linux/linux-xenomai.inc
 
-PV = "9999-g${LINUX_COMMIT}"
+PV = "9999-g${COMMIT}"
 
 def is_xeno_3_0(d):
     xeno_ver = d.getVar('PREFERRED_VERSION_xenomai') or ''
recipes-xenomai/xenomai/xenomai.inc +1 -12
index 26ee654..95b2875 100644
@@ -10,6 +10,7 @@
 #
 
 inherit dpkg
+inherit print-revision
 
 PROVIDES += "xenomai-kernel-source"
 PROVIDES += "xenomai-runtime"
@@ -22,15 +23,6 @@ PROVIDES += "libxenomai1-dbgsym"
 
 PACKAGE_ARCH:compat-arch = "${COMPAT_DISTRO_ARCH}"
 
-# use bitbake get_srcrev to get the current commit id
-def get_commit(d):
-    try:
-        return bb.fetch2.get_srcrev(d).replace('AUTOINC+', '')
-    except bb.fetch2.FetchError:
-        return ""
-
-COMMIT="${@get_commit(d)}"
-
 do_prepare_build() {
     # Xenomai currently does not maintain its changelog, plus we want the
     # actual package version in there.
@@ -39,7 +31,4 @@ do_prepare_build() {
     # Remove upstream's "3.0 (native)" declaration so that we can define the
     # package version more freely.
     rm -f ${S}/debian/source/format
-
-    bbplain $(printf "xenomai-%s: Building revision %.20s\n" \
-                     ${PV} ${COMMIT})
 }
Signature · 1 line
2.35.3
author
#6 lore raw

PATCH v3 4/10 linux-xenomai: Rename linux-xenomai to linux-xenomai-3

In reply to Jan Kiszka

From: Clara Kowalsky <[email protected]>

In preparation for the integration of EVL, files are renamed. Shared parts for xenomai-3 and EVL are placed into linux-xenomai.inc.

[Jan: fix build, account for new 6.6 kernel, keep more bits in xenomai-linux.inc]
---
 conf/distro/include/xenomai-version.inc             |  2 +-
 conf/distro/xenomai-demo.conf                       |  4 +++-
 opt-linux-4.19.yml                                  |  2 +-
 opt-linux-4.4.yml                                   |  2 +-
 opt-linux-5.10.yml                                  |  2 +-
 opt-linux-5.15.yml                                  |  2 +-
 opt-linux-5.4.yml                                   |  2 +-
 opt-linux-6.1.yml                                   |  2 +-
 opt-linux-6.6.yml                                   |  2 +-
 opt-linux-latest-4.19.yml                           |  2 +-
 opt-linux-latest-4.4.yml                            |  2 +-
 opt-linux-latest-5.10.yml                           |  2 +-
 opt-linux-latest-5.15.yml                           |  2 +-
 opt-linux-latest-5.4.yml                            |  2 +-
 opt-linux-latest-6.1.yml                            |  2 +-
 opt-linux-latest-6.6.yml                            |  2 +-
 opt-linux-latest.yml                                |  2 +-
 ...ai-dovetail.inc => linux-xenomai-3-dovetail.inc} |  2 +-
 .../{linux-xenomai.inc => linux-xenomai-3.inc}      | 13 +------------
 ...inux-xenomai_4.19.bb => linux-xenomai-3_4.19.bb} |  2 +-
 ...{linux-xenomai_4.4.bb => linux-xenomai-3_4.4.bb} |  2 +-
 ...inux-xenomai_5.10.bb => linux-xenomai-3_5.10.bb} |  2 +-
 ...inux-xenomai_5.15.bb => linux-xenomai-3_5.15.bb} |  2 +-
 ...{linux-xenomai_5.4.bb => linux-xenomai-3_5.4.bb} |  2 +-
 ...{linux-xenomai_6.1.bb => linux-xenomai-3_6.1.bb} |  2 +-
 ...{linux-xenomai_6.6.bb => linux-xenomai-3_6.6.bb} |  2 +-
 ...-xenomai_latest.bb => linux-xenomai-3_latest.bb} |  2 +-
 recipes-kernel/linux/linux-xenomai.inc              | 12 ------------
 28 files changed, 29 insertions(+), 50 deletions(-)
 rename recipes-kernel/linux/{linux-xenomai-dovetail.inc => linux-xenomai-3-dovetail.inc} (86%)
 copy recipes-kernel/linux/{linux-xenomai.inc => linux-xenomai-3.inc} (52%)
 rename recipes-kernel/linux/{linux-xenomai_4.19.bb => linux-xenomai-3_4.19.bb} (93%)
 rename recipes-kernel/linux/{linux-xenomai_4.4.bb => linux-xenomai-3_4.4.bb} (92%)
 rename recipes-kernel/linux/{linux-xenomai_5.10.bb => linux-xenomai-3_5.10.bb} (76%)
 rename recipes-kernel/linux/{linux-xenomai_5.15.bb => linux-xenomai-3_5.15.bb} (76%)
 rename recipes-kernel/linux/{linux-xenomai_5.4.bb => linux-xenomai-3_5.4.bb} (92%)
 rename recipes-kernel/linux/{linux-xenomai_6.1.bb => linux-xenomai-3_6.1.bb} (76%)
 rename recipes-kernel/linux/{linux-xenomai_6.6.bb => linux-xenomai-3_6.6.bb} (75%)
 rename recipes-kernel/linux/{linux-xenomai_latest.bb => linux-xenomai-3_latest.bb} (98%)
conf/distro/include/xenomai-version.inc +1 -1
index 754a738..bed78e8 100644
@@ -22,7 +22,7 @@ XENOMAI_3_2_KERNEL_VERSION = "6.1%"
 
 # If PREFERRED_VERSION_xenomai contains any item from XENOMAI_3_0_VERSION_LIST use
 # XENOMAI_3_0_KERNEL_VERSION. Same for the other XENOMAI_*_VERSION_LIST.
-PREFERRED_VERSION_linux-xenomai ?= \
+PREFERRED_VERSION_linux-xenomai-3 ?= \
     "${@bb.utils.contains_any('PREFERRED_VERSION_xenomai', \
         '${XENOMAI_3_0_VERSION_LIST}', '${XENOMAI_3_0_KERNEL_VERSION}', \
         bb.utils.contains_any('PREFERRED_VERSION_xenomai', \
conf/distro/xenomai-demo.conf +3 -1
index c99669d..7b2b0a4 100644
@@ -11,12 +11,14 @@
 
 require conf/distro/debian-bookworm.conf
 
+XENOMAI_MAJOR_VERSION ?= "3"
+
 PREFERRED_VERSION_xenomai ?= "3.2%"
 include conf/distro/include/xenomai-version.inc
 
 HOST_DISTRO ?= "debian-bookworm"
 
-KERNEL_NAME = "xenomai"
+KERNEL_NAME = "xenomai-${XENOMAI_MAJOR_VERSION}"
 
 WKS_FILE = "${MACHINE}.wks"
 
opt-linux-4.19.yml +1 -1
index 960292d..760cfce 100644
@@ -14,4 +14,4 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "4.19%"
+    PREFERRED_VERSION_linux-xenomai-3 = "4.19%"
opt-linux-4.4.yml +1 -1
index e455a38..b026c70 100644
@@ -14,4 +14,4 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "4.4%"
+    PREFERRED_VERSION_linux-xenomai-3 = "4.4%"
opt-linux-5.10.yml +1 -1
index ec9dab3..28cf554 100644
@@ -14,4 +14,4 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "5.10%"
+    PREFERRED_VERSION_linux-xenomai-3 = "5.10%"
opt-linux-5.15.yml +1 -1
index bc0b9d2..c02ad37 100644
@@ -14,4 +14,4 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "5.15%"
+    PREFERRED_VERSION_linux-xenomai-3 = "5.15%"
opt-linux-5.4.yml +1 -1
index 1b43394..4e0ee0a 100644
@@ -14,4 +14,4 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "5.4%"
+    PREFERRED_VERSION_linux-xenomai-3 = "5.4%"
opt-linux-6.1.yml +1 -1
index e723454..76c2a8b 100644
@@ -14,4 +14,4 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "6.1%"
+    PREFERRED_VERSION_linux-xenomai-3 = "6.1%"
opt-linux-6.6.yml +1 -1
index 06e0d5d..1b0bbb4 100644
@@ -14,4 +14,4 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "6.6%"
+    PREFERRED_VERSION_linux-xenomai-3 = "6.6%"
opt-linux-latest-4.19.yml +1 -1
index c1a3040..e9272b1 100644
@@ -14,5 +14,5 @@ header:
 
 local_conf_header:
   linux-xenomai-latest: |
-    PREFERRED_VERSION_linux-xenomai = "9999-%"
+    PREFERRED_VERSION_linux-xenomai-3 = "9999-%"
     LATEST_GIT_BRANCH = "4.19"
opt-linux-latest-4.4.yml +1 -1
index d4864b7..34b57be 100644
@@ -14,5 +14,5 @@ header:
 
 local_conf_header:
   linux-xenomai-latest: |
-    PREFERRED_VERSION_linux-xenomai = "9999-%"
+    PREFERRED_VERSION_linux-xenomai-3 = "9999-%"
     LATEST_GIT_BRANCH = "4.4"
opt-linux-latest-5.10.yml +1 -1
index e9ddd7f..a60e58c 100644
@@ -14,5 +14,5 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "9999-%"
+    PREFERRED_VERSION_linux-xenomai-3 = "9999-%"
     LATEST_GIT_BRANCH = "5.10"
opt-linux-latest-5.15.yml +1 -1
index 288836f..aeca6a8 100644
@@ -14,5 +14,5 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "9999-%"
+    PREFERRED_VERSION_linux-xenomai-3 = "9999-%"
     LATEST_GIT_BRANCH = "5.15"
opt-linux-latest-5.4.yml +1 -1
index 2d15e06..e1a20e1 100644
@@ -14,5 +14,5 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "9999-%"
+    PREFERRED_VERSION_linux-xenomai-3 = "9999-%"
     LATEST_GIT_BRANCH = "5.4"
opt-linux-latest-6.1.yml +1 -1
index 3e9ef29..388f116 100644
@@ -14,5 +14,5 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "9999-%"
+    PREFERRED_VERSION_linux-xenomai-3 = "9999-%"
     LATEST_GIT_BRANCH = "6.1"
opt-linux-latest-6.6.yml +1 -1
index 7293d94..2287d4b 100644
@@ -14,5 +14,5 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "9999-%"
+    PREFERRED_VERSION_linux-xenomai-3 = "9999-%"
     LATEST_GIT_BRANCH = "6.6"
opt-linux-latest.yml +1 -1
index aab2342..795f8fe 100644
@@ -14,5 +14,5 @@ header:
 
 local_conf_header:
   linux-xenomai-version: |
-    PREFERRED_VERSION_linux-xenomai = "9999-%"
+    PREFERRED_VERSION_linux-xenomai-3 = "9999-%"
     LATEST_GIT_BRANCH = "latest"
recipes-kernel/linux/linux-xenomai-3-dovetail.inc renamed from recipes-kernel/linux/linux-xenomai-dovetail.inc +1 -1
similarity index 86%
rename from recipes-kernel/linux/linux-xenomai-dovetail.inc
rename to recipes-kernel/linux/linux-xenomai-3-dovetail.inc
index 05d775e..a8612ba 100644
@@ -9,7 +9,7 @@
 # SPDX-License-Identifier: MIT
 #
 
-require recipes-kernel/linux/linux-xenomai.inc
+require recipes-kernel/linux/linux-xenomai-3.inc
 
 SRC_URI += "git://source.denx.de/xenomai/linux-dovetail.git;protocol=https;nobranch=1"
 
recipes-kernel/linux/linux-xenomai-3.inc renamed from recipes-kernel/linux/linux-xenomai.inc +1 -12
similarity index 52%
copy from recipes-kernel/linux/linux-xenomai.inc
copy to recipes-kernel/linux/linux-xenomai-3.inc
index 1d7d78a..64ed9d0 100644
@@ -9,21 +9,10 @@
 # SPDX-License-Identifier: MIT
 #
 
-require recipes-kernel/linux/linux-custom.inc
-inherit print-revision
+require recipes-kernel/linux/linux-xenomai.inc
 
-FILESPATH =. "${LAYERDIR_xenomai}/recipes-kernel/linux/files:"
-
-XENOMAI_DEFCONFIG = "${DISTRO_ARCH}_defconfig"
-KERNEL_DEFCONFIG ?= "${XENOMAI_DEFCONFIG}"
-XENOMAI_DEBUG ?= "0"
-
-SRC_URI += "${@'file://${KERNEL_DEFCONFIG}' if d.getVar('KERNEL_DEFCONFIG') == d.getVar('XENOMAI_DEFCONFIG') else ''}"
-SRC_URI += "${@'file://common_nodbg.cfg' if d.getVar('XENOMAI_DEBUG') == '0' else ''}"
 SRC_URI += "file://rules.tmpl"
 
-S = "${WORKDIR}/git"
-
 DEPENDS += "xenomai-kernel-source"
 KBUILD_DEPENDS += "xenomai-kernel-source:native"
 
recipes-kernel/linux/linux-xenomai-3_4.19.bb renamed from recipes-kernel/linux/linux-xenomai_4.19.bb +1 -1
similarity index 93%
rename from recipes-kernel/linux/linux-xenomai_4.19.bb
rename to recipes-kernel/linux/linux-xenomai-3_4.19.bb
index 249ffb4..e6c56ca 100644
@@ -9,7 +9,7 @@
 # SPDX-License-Identifier: MIT
 #
 
-require recipes-kernel/linux/linux-xenomai.inc
+require recipes-kernel/linux/linux-xenomai-3.inc
 
 SRC_URI:append:amd64 = " git://github.com/xenomai-ci/ipipe-x86.git;protocol=https;nobranch=1"
 SRCREV:amd64 ?= "ipipe-core-4.19.266-cip86-x86-25"
recipes-kernel/linux/linux-xenomai-3_4.4.bb renamed from recipes-kernel/linux/linux-xenomai_4.4.bb +1 -1
similarity index 92%
rename from recipes-kernel/linux/linux-xenomai_4.4.bb
rename to recipes-kernel/linux/linux-xenomai-3_4.4.bb
index 2b32ae3..09ba2a7 100644
@@ -9,7 +9,7 @@
 # SPDX-License-Identifier: MIT
 #
 
-require recipes-kernel/linux/linux-xenomai.inc
+require recipes-kernel/linux/linux-xenomai-3.inc
 
 SRC_URI:append:amd64 = " git://github.com/xenomai-ci/ipipe.git;protocol=https;nobranch=1"
 SRCREV:amd64 ?= "ipipe-core-4.4.302-cip71-x86-35"
recipes-kernel/linux/linux-xenomai-3_5.10.bb renamed from recipes-kernel/linux/linux-xenomai_5.10.bb +1 -1
similarity index 76%
rename from recipes-kernel/linux/linux-xenomai_5.10.bb
rename to recipes-kernel/linux/linux-xenomai-3_5.10.bb
index 986060d..9b01708 100644
@@ -9,6 +9,6 @@
 # SPDX-License-Identifier: MIT
 #
 
-require recipes-kernel/linux/linux-xenomai-dovetail.inc
+require recipes-kernel/linux/linux-xenomai-3-dovetail.inc
 
 SRCREV ?= "v5.10.161-dovetail1"
recipes-kernel/linux/linux-xenomai-3_5.15.bb renamed from recipes-kernel/linux/linux-xenomai_5.15.bb +1 -1
similarity index 76%
rename from recipes-kernel/linux/linux-xenomai_5.15.bb
rename to recipes-kernel/linux/linux-xenomai-3_5.15.bb
index 63865eb..9c5ba27 100644
@@ -9,6 +9,6 @@
 # SPDX-License-Identifier: MIT
 #
 
-require recipes-kernel/linux/linux-xenomai-dovetail.inc
+require recipes-kernel/linux/linux-xenomai-3-dovetail.inc
 
 SRCREV ?= "v5.15.85-dovetail1"
recipes-kernel/linux/linux-xenomai-3_5.4.bb renamed from recipes-kernel/linux/linux-xenomai_5.4.bb +1 -1
similarity index 92%
rename from recipes-kernel/linux/linux-xenomai_5.4.bb
rename to recipes-kernel/linux/linux-xenomai-3_5.4.bb
index 7796cd3..827cba5 100644
@@ -9,7 +9,7 @@
 # SPDX-License-Identifier: MIT
 #
 
-require recipes-kernel/linux/linux-xenomai.inc
+require recipes-kernel/linux/linux-xenomai-3.inc
 
 SRC_URI:append:amd64 = " git://github.com/xenomai-ci/ipipe-x86.git;protocol=https;nobranch=1"
 SRCREV:amd64 ?= "ipipe-core-5.4.228-x86-12"
recipes-kernel/linux/linux-xenomai-3_6.1.bb renamed from recipes-kernel/linux/linux-xenomai_6.1.bb +1 -1
similarity index 76%
rename from recipes-kernel/linux/linux-xenomai_6.1.bb
rename to recipes-kernel/linux/linux-xenomai-3_6.1.bb
index d9655e0..1b41692 100644
@@ -9,6 +9,6 @@
 # SPDX-License-Identifier: MIT
 #
 
-require recipes-kernel/linux/linux-xenomai-dovetail.inc
+require recipes-kernel/linux/linux-xenomai-3-dovetail.inc
 
 SRCREV ?= "v6.1.11-dovetail1"
recipes-kernel/linux/linux-xenomai-3_6.6.bb renamed from recipes-kernel/linux/linux-xenomai_6.6.bb +1 -1
similarity index 75%
rename from recipes-kernel/linux/linux-xenomai_6.6.bb
rename to recipes-kernel/linux/linux-xenomai-3_6.6.bb
index 7fce714..b20eb19 100644
@@ -9,6 +9,6 @@
 # SPDX-License-Identifier: MIT
 #
 
-require recipes-kernel/linux/linux-xenomai-dovetail.inc
+require recipes-kernel/linux/linux-xenomai-3-dovetail.inc
 
 SRCREV ?= "v6.6-dovetail1"
recipes-kernel/linux/linux-xenomai-3_latest.bb renamed from recipes-kernel/linux/linux-xenomai_latest.bb +1 -1
similarity index 98%
rename from recipes-kernel/linux/linux-xenomai_latest.bb
rename to recipes-kernel/linux/linux-xenomai-3_latest.bb
index d1b0226..c65c28d 100644
@@ -10,7 +10,7 @@
 # SPDX-License-Identifier: MIT
 #
 
-require recipes-kernel/linux/linux-xenomai.inc
+require recipes-kernel/linux/linux-xenomai-3.inc
 
 PV = "9999-g${COMMIT}"
 
recipes-kernel/linux/linux-xenomai.inc +0 -12
index 1d7d78a..8c7df40 100644
@@ -20,17 +20,5 @@ XENOMAI_DEBUG ?= "0"
 
 SRC_URI += "${@'file://${KERNEL_DEFCONFIG}' if d.getVar('KERNEL_DEFCONFIG') == d.getVar('XENOMAI_DEFCONFIG') else ''}"
 SRC_URI += "${@'file://common_nodbg.cfg' if d.getVar('XENOMAI_DEBUG') == '0' else ''}"
-SRC_URI += "file://rules.tmpl"
 
 S = "${WORKDIR}/git"
-
-DEPENDS += "xenomai-kernel-source"
-KBUILD_DEPENDS += "xenomai-kernel-source:native"
-
-TEMPLATE_FILES += "rules.tmpl"
-
-do_prepare_debian_rules() {
-    mv ${WORKDIR}/debian/rules ${WORKDIR}/debian/rules.isar
-    mv ${WORKDIR}/rules ${WORKDIR}/debian/rules
-}
-addtask prepare_debian_rules after do_transform_template before do_dpkg_build
Signature · 1 line
2.35.3
author
#7 lore raw

PATCH v3 5/10 xenomai-3: Mark xenomai 3 specific configs

In reply to Jan Kiszka

From: Clara Kowalsky <[email protected]>

In preparation for the integration of EVL, a xenomai-3 override is added.

[Jan: set xenomai3 by default, drop unneeded override in linux-xenomai-3_latest]
---
 conf/distro/xenomai-demo.conf     | 2 ++
 recipes-core/images/demo-image.bb | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)
conf/distro/xenomai-demo.conf +2 -0
index 7b2b0a4..e6d690e 100644
@@ -13,6 +13,8 @@ require conf/distro/debian-bookworm.conf
 
 XENOMAI_MAJOR_VERSION ?= "3"
 
+OVERRIDES .= ":xenomai${XENOMAI_MAJOR_VERSION}"
+
 PREFERRED_VERSION_xenomai ?= "3.2%"
 include conf/distro/include/xenomai-version.inc
 
recipes-core/images/demo-image.bb +4 -4
index 540583b..db7e2c7 100644
@@ -33,7 +33,7 @@ def get_testsuite_package_names(d):
 
 # Install gdb only for older stable releases. Enables gdb tests and avoids a
 # arch missmatch for compat builds on newer releases.
-IMAGE_PREINSTALL += "${@ 'gdb' if not has_testsuite_package(d) else '' }"
+IMAGE_PREINSTALL:append:xenomai3 = " ${@ 'gdb' if not has_testsuite_package(d) else '' }"
 
 IMAGE_PREINSTALL += " \
     bash-completion less vim nano man \
@@ -41,7 +41,7 @@ IMAGE_PREINSTALL += " \
     iw wireless-tools wpasupplicant dbus \
     lsb-release"
 
-IMAGE_INSTALL += "xenomai-runtime xenomai-runtime-dbgsym"
-IMAGE_INSTALL += "${@get_testsuite_package_names(d)}"
-IMAGE_INSTALL += "libxenomai1-dbgsym"
+IMAGE_INSTALL:append:xenomai3 = " xenomai-runtime xenomai-runtime-dbgsym"
+IMAGE_INSTALL:append:xenomai3 = " ${@get_testsuite_package_names(d)}"
+IMAGE_INSTALL:append:xenomai3 = " libxenomai1-dbgsym"
 IMAGE_INSTALL += "customizations sshd-regen-keys expand-on-first-boot"
Signature · 1 line
2.35.3
author
#8 lore raw

PATCH v3 6/10 xenomai-4: Enable kernel build

In reply to Jan Kiszka

From: Clara Kowalsky <[email protected]>

This permits to build the linux-evl kernel v6.1 and v6.6.

[Jan: added latest recipe, renamed cfg file]
---
 opt-linux-latest-6.1.yml                      |  1 +
 opt-linux-latest-6.6.yml                      |  1 +
 recipes-kernel/linux/files/evl.cfg            |  3 ++
 recipes-kernel/linux/linux-xenomai-4-evl.inc  | 16 +++++++++
 recipes-kernel/linux/linux-xenomai-4.inc      | 16 +++++++++
 recipes-kernel/linux/linux-xenomai-4_6.1.bb   | 14 ++++++++
 recipes-kernel/linux/linux-xenomai-4_6.6.bb   | 14 ++++++++
 .../linux/linux-xenomai-4_latest.bb           | 35 +++++++++++++++++++
 8 files changed, 100 insertions(+)
 create mode 100644 recipes-kernel/linux/files/evl.cfg
 create mode 100644 recipes-kernel/linux/linux-xenomai-4-evl.inc
 create mode 100644 recipes-kernel/linux/linux-xenomai-4.inc
 create mode 100644 recipes-kernel/linux/linux-xenomai-4_6.1.bb
 create mode 100644 recipes-kernel/linux/linux-xenomai-4_6.6.bb
 create mode 100644 recipes-kernel/linux/linux-xenomai-4_latest.bb
opt-linux-latest-6.1.yml +1 -0
index 388f116..632a38a 100644
@@ -15,4 +15,5 @@ header:
 local_conf_header:
   linux-xenomai-version: |
     PREFERRED_VERSION_linux-xenomai-3 = "9999-%"
+    PREFERRED_VERSION_linux-xenomai-4 = "9999-%"
     LATEST_GIT_BRANCH = "6.1"
opt-linux-latest-6.6.yml +1 -0
index 2287d4b..a17e78b 100644
@@ -15,4 +15,5 @@ header:
 local_conf_header:
   linux-xenomai-version: |
     PREFERRED_VERSION_linux-xenomai-3 = "9999-%"
+    PREFERRED_VERSION_linux-xenomai-4 = "9999-%"
     LATEST_GIT_BRANCH = "6.6"
recipes-kernel/linux/files/evl.cfg new file +3 -0
new file mode 100644
index 0000000..65d9b33
@@ -0,0 +1,3 @@
+CONFIG_EVL=y
+CONFIG_EVL_SCHED_QUOTA=y
+CONFIG_EVL_SCHED_TP=y
recipes-kernel/linux/linux-xenomai-4-evl.inc new file +16 -0
new file mode 100644
index 0000000..b13d203
@@ -0,0 +1,16 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require recipes-kernel/linux/linux-xenomai-4.inc
+
+SRC_URI += "git://source.denx.de/Xenomai/xenomai4/linux-evl.git;protocol=https;nobranch=1"
+
+PV ?= "${@d.getVar('SRCREV').strip('-')[0].lstrip('v')}+"
recipes-kernel/linux/linux-xenomai-4.inc new file +16 -0
new file mode 100644
index 0000000..7827978
@@ -0,0 +1,16 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2018-2023
+#
+# Authors:
+#  Clara Kowalsky <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require recipes-kernel/linux/linux-xenomai.inc
+
+KERNEL_LIBC_DEV_DEPLOY = "1"
+
+SRC_URI += "file://evl.cfg"
recipes-kernel/linux/linux-xenomai-4_6.1.bb new file +14 -0
new file mode 100644
index 0000000..a037e4c
@@ -0,0 +1,14 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2023-2024
+#
+# Authors:
+#  Clara Kowalsky <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require recipes-kernel/linux/linux-xenomai-4-evl.inc
+
+SRCREV ?= "v6.1.61-evl2-rebase"
recipes-kernel/linux/linux-xenomai-4_6.6.bb new file +14 -0
new file mode 100644
index 0000000..f499bd0
@@ -0,0 +1,14 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2023-2024
+#
+# Authors:
+#  Clara Kowalsky <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require recipes-kernel/linux/linux-xenomai-4-evl.inc
+
+SRCREV ?= "v6.6-evl2-rebase"
recipes-kernel/linux/linux-xenomai-4_latest.bb new file +35 -0
new file mode 100644
index 0000000..c225034
@@ -0,0 +1,35 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require recipes-kernel/linux/linux-xenomai-4.inc
+
+PV = "9999-g${COMMIT}"
+
+python () {
+    import subprocess
+    if is_kernel(d, 'latest'):
+        cmd = 'git ls-remote --tags --head --refs https://source.denx.de/Xenomai/xenomai4/linux-evl.git | ' \
+              'sed -e "s/.*[[:space:]]refs\/\(tags\|heads\)\///" | ' \
+              'grep "v6\.[0-9].*-evl-rebase" | ' \
+              'sort -r -n -k 1.4 | head -1'
+        (ret, out) = subprocess.getstatusoutput(cmd)
+        d.setVar('LATEST_KERNEL_BRANCH', out)
+    else:
+        d.setVar('LATEST_KERNEL_BRANCH', 'v6.6.y-evl-rebase')
+}
+
+GIT_BRANCH = "${@ \
+    'v6.1.y-evl-rebase' if is_kernel(d, '6.1') \
+    else 'v6.6.y-evl-rebase' if is_kernel(d, '6.6') \
+    else d.getVar('LATEST_KERNEL_BRANCH') }"
+
+SRC_URI += "git://source.denx.de/Xenomai/xenomai4/linux-evl.git;protocol=https;branch=${GIT_BRANCH}"
+SRCREV = "${AUTOREV}"
Signature · 1 line
2.35.3
author
#9 lore raw

PATCH v3 7/10 xenomai-4: Add evl userspace

In reply to Jan Kiszka

From: Clara Kowalsky <[email protected]>

The libevl recipe allows building the evl userspace.

[Jan: reduced duplications, introduced opt-evl.yml and libevl_latest.bb,
added required patch for r47, added runtime deps]

---
 conf/distro/xenomai-demo.conf                 |  2 +
 opt-evl.yml                                   | 17 ++++++++
 opt-libevl-latest-release.yml                 | 19 +++++++++
 opt-libevl-next.yml                           | 19 +++++++++
 recipes-core/images/demo-image.bb             |  2 +
 .../linux/linux-xenomai-4_latest.bb           |  4 ++
 ...i-Take-Debian-multiarch-into-account.patch | 40 +++++++++++++++++++
 recipes-xenomai/libevl/files/debian/compat    |  1 +
 .../libevl/files/debian/control.tmpl          | 11 +++++
 recipes-xenomai/libevl/files/debian/rules     | 19 +++++++++
 recipes-xenomai/libevl/libevl.inc             | 31 ++++++++++++++
 recipes-xenomai/libevl/libevl_47.bb           | 15 +++++++
 recipes-xenomai/libevl/libevl_latest.bb       | 25 ++++++++++++
 recipes-xenomai/libevl/libevl_master.bb       | 17 ++++++++
 recipes-xenomai/libevl/libevl_next.bb         |  1 +
 15 files changed, 223 insertions(+)
 create mode 100644 opt-evl.yml
 create mode 100644 opt-libevl-latest-release.yml
 create mode 100644 opt-libevl-next.yml
 create mode 100644 recipes-xenomai/libevl/files/0001-meson-setup-uapi-Take-Debian-multiarch-into-account.patch
 create mode 100644 recipes-xenomai/libevl/files/debian/compat
 create mode 100644 recipes-xenomai/libevl/files/debian/control.tmpl
 create mode 100755 recipes-xenomai/libevl/files/debian/rules
 create mode 100644 recipes-xenomai/libevl/libevl.inc
 create mode 100644 recipes-xenomai/libevl/libevl_47.bb
 create mode 100644 recipes-xenomai/libevl/libevl_latest.bb
 create mode 100644 recipes-xenomai/libevl/libevl_master.bb
 create mode 120000 recipes-xenomai/libevl/libevl_next.bb
conf/distro/xenomai-demo.conf +2 -0
index e6d690e..2915dbf 100644
@@ -18,6 +18,8 @@ OVERRIDES .= ":xenomai${XENOMAI_MAJOR_VERSION}"
 PREFERRED_VERSION_xenomai ?= "3.2%"
 include conf/distro/include/xenomai-version.inc
 
+PREFERRED_VERSION_libevl ?= "4%"
+
 HOST_DISTRO ?= "debian-bookworm"
 
 KERNEL_NAME = "xenomai-${XENOMAI_MAJOR_VERSION}"
opt-evl.yml new file +17 -0
new file mode 100644
index 0000000..5cfef59
@@ -0,0 +1,17 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 14
+
+local_conf_header:
+  xenomai-4: |
+    XENOMAI_MAJOR_VERSION ?= "4"
opt-libevl-latest-release.yml new file +19 -0
new file mode 100644
index 0000000..7468b67
@@ -0,0 +1,19 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2023-2024
+#
+# Authors:
+#  Clara Kowalsky <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 14
+  includes:
+    - opt-evl.yml
+
+local_conf_header:
+  libevl-version: |
+    PREFERRED_VERSION_libevl = "latest"
opt-libevl-next.yml new file +19 -0
new file mode 100644
index 0000000..aa83d1f
@@ -0,0 +1,19 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2023-2024
+#
+# Authors:
+#  Clara Kowalsky <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 14
+  includes:
+    - opt-evl.yml
+
+local_conf_header:
+  libevl-version: |
+    PREFERRED_VERSION_libevl = "next"
recipes-core/images/demo-image.bb +2 -0
index db7e2c7..e19a038 100644
@@ -44,4 +44,6 @@ IMAGE_PREINSTALL += " \
 IMAGE_INSTALL:append:xenomai3 = " xenomai-runtime xenomai-runtime-dbgsym"
 IMAGE_INSTALL:append:xenomai3 = " ${@get_testsuite_package_names(d)}"
 IMAGE_INSTALL:append:xenomai3 = " libxenomai1-dbgsym"
+IMAGE_INSTALL:append:xenomai4 = " libevl"
+
 IMAGE_INSTALL += "customizations sshd-regen-keys expand-on-first-boot"
recipes-kernel/linux/linux-xenomai-4_latest.bb +4 -0
index c225034..c4a254f 100644
@@ -13,6 +13,10 @@ require recipes-kernel/linux/linux-xenomai-4.inc
 
 PV = "9999-g${COMMIT}"
 
+def is_kernel(d, ver):
+    linux_ver = d.getVar('LATEST_GIT_BRANCH') or ''
+    return linux_ver == ver
+
 python () {
     import subprocess
     if is_kernel(d, 'latest'):
recipes-xenomai/libevl/files/0001-meson-setup-uapi-Take-Debian-multiarch-into-account.patch new file +40 -0
new file mode 100644
index 0000000..3c1f48c
@@ -0,0 +1,40 @@
+From b4447250c7fff6940c1bb6f0308da617bebaa643 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <[email protected]>
+Date: Tue, 2 Jan 2024 14:01:19 +0100
+Subject: [PATCH] meson: setup-uapi: Take Debian multiarch into account
+
+Check also the Debian multiarch include path for the chosen architecture
+so that we can support (self-built) linux-libc-dev packages that contain
+the evl headers.
+
+Signed-off-by: Jan Kiszka <[email protected]>
+---
+ meson/setup-uapi.sh | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/meson/setup-uapi.sh b/meson/setup-uapi.sh
+index f2d0774..633c5ed 100644
+--- a/meson/setup-uapi.sh
++++ b/meson/setup-uapi.sh
+@@ -17,7 +17,17 @@ if test -r $UAPI/Kbuild; then
+     link_dir $UAPI/arch/$ARCH/include/uapi/asm/evl asm
+     link_dir $UAPI/include/uapi/asm-generic .
+ else
++    DEB_HOST_ARCH=$ARCH
++    if [ "$DEB_HOST_ARCH" = "x86" ]; then
++        DEB_HOST_ARCH=amd64
++    fi
++    DEB_HOST_MULTIARCH=$( \
++        dpkg-architecture -q DEB_HOST_MULTIARCH -a $DEB_HOST_ARCH 2>/dev/null)
+     link_dir $UAPI/evl .
+-    link_dir $UAPI/asm/evl asm
++    if [ -d $UAPI/$DEB_HOST_MULTIARCH/asm/evl ]; then
++        link_dir $UAPI/$DEB_HOST_MULTIARCH/asm/evl asm
++    else
++        link_dir $UAPI/asm/evl asm
++    fi
+     link_dir $UAPI/asm-generic .
+ fi
+-- 
+2.35.3
+
recipes-xenomai/libevl/files/debian/compat new file +1 -0
new file mode 100644
index 0000000..f599e28
@@ -0,0 +1 @@
+10
recipes-xenomai/libevl/files/debian/control.tmpl new file +11 -0
new file mode 100644
index 0000000..36eb68c
@@ -0,0 +1,11 @@
+Source: ${PN}
+Section: misc
+Priority: optional
+Standards-Version: 3.9.6
+Maintainer: Xenomai project <[email protected]>
+Build-Depends: ${DEBIAN_BUILD_DEPENDS}
+
+Package: libevl
+Architecture: ${DISTRO_ARCH}
+Description: ${DESCRIPTION}
+Depends: ${shlibs:Depends}
recipes-xenomai/libevl/files/debian/rules new file +19 -0
new file mode 100755
index 0000000..9c9148f
@@ -0,0 +1,19 @@
+#!/usr/bin/make -f
+
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+UAPI=/usr/include
+else
+UAPI=/usr/$(DEB_HOST_GNU_TYPE)/include
+endif
+
+override_dh_fixperms:
+	dh_fixperms
+
+override_dh_auto_configure:
+	dh_auto_configure -- -Duapi=$(UAPI)
+
+%:
+	dh $@ --buildsystem=meson
recipes-xenomai/libevl/libevl.inc new file +31 -0
new file mode 100644
index 0000000..405be8b
@@ -0,0 +1,31 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2023-2024
+#
+# Authors:
+#  Clara Kowalsky <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+inherit dpkg
+inherit print-revision
+
+DESCRIPTION ?= "libevl libraries and tools"
+
+SRC_URI += "file://debian"
+
+DEPENDS = "linux-xenomai-4"
+DEBIAN_BUILD_DEPENDS ?= "debhelper (>= 10), meson"
+
+TEMPLATE_FILES = "debian/control.tmpl"
+TEMPLATE_VARS += "DEBIAN_BUILD_DEPENDS"
+
+S = "${WORKDIR}/git"
+
+do_prepare_build[cleandirs] += "${S}/debian"
+do_prepare_build() {
+    cp -r ${WORKDIR}/debian ${S}
+    deb_add_changelog
+}
recipes-xenomai/libevl/libevl_47.bb new file +15 -0
new file mode 100644
index 0000000..1d93e1d
@@ -0,0 +1,15 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2023-2024
+#
+# Authors:
+#  Clara Kowalsky <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require libevl.inc
+
+SRC_URI += "git://source.denx.de/Xenomai/xenomai4/libevl.git;protocol=https;branch=master;tag=r${PV}"
+SRC_URI += "file://0001-meson-setup-uapi-Take-Debian-multiarch-into-account.patch"
recipes-xenomai/libevl/libevl_latest.bb new file +25 -0
new file mode 100644
index 0000000..2b57083
@@ -0,0 +1,25 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require libevl.inc
+
+python () {
+    import subprocess
+    cmd = 'git ls-remote --tags --head --refs https://source.denx.de/Xenomai/xenomai4/libevl.git | ' \
+          'sed -e "s/.*[[:space:]]refs\/\(tags\|heads\)\///" | grep "r[0-9]\+" | ' \
+          'sort -r -n -k 1.2 | head -1'
+    (ret, out) = subprocess.getstatusoutput(cmd)
+    d.setVar('LATEST_RELEASE', out)
+}
+
+SRC_URI += "git://source.denx.de/Xenomai/xenomai4/libevl.git;protocol=https;branch=master;tag=${LATEST_RELEASE}"
+
+CHANGELOG_V = "${@ d.getVar('LATEST_RELEASE').strip('r') }"
recipes-xenomai/libevl/libevl_master.bb new file +17 -0
new file mode 100644
index 0000000..a1809ab
@@ -0,0 +1,17 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2023-2024
+#
+# Authors:
+#  Clara Kowalsky <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require libevl.inc
+
+SRC_URI += "git://source.denx.de/Xenomai/xenomai4/libevl.git;protocol=https;branch=${PV}"
+
+CHANGELOG_V = "9999-${PV}"
+SRCREV = "${AUTOREV}"
recipes-xenomai/libevl/libevl_next.bb new file +1 -0
new file mode 120000
index 0000000..85ab518
@@ -0,0 +1 @@
+libevl_master.bb
\ No newline at end of file
Signature · 1 line
2.35.3
author
#12 lore raw

PATCH v3 8/10 kconfig: Add build options for evl

In reply to Jan Kiszka

From: Clara Kowalsky <[email protected]>

Options are included to build the linux-evl kernel v6.1 and v6.6.

[Jan: adjusted to renamed options, more kernel options, less libevl]
---
 Kconfig | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
Kconfig +66 -0
index 0f4855c..669ea65 100644
@@ -58,6 +58,20 @@ config KAS_INCLUDE_TARGET
 
 choice
 	prompt "Xenomai version"
+	default XENOMAI3
+
+config XENOMAI3
+	bool "Xenomai 3"
+
+config XENOMAI4
+	bool "Xenomai 4 / EVL"
+
+endchoice
+
+if XENOMAI3
+
+choice
+	prompt "Xenomai 3 subversion"
 	default XENOMAI_3_2
 
 config XENOMAI_LATEST
@@ -193,3 +207,55 @@ config COMPAT
 config KAS_INCLUDE_COMPAT
 	string
 	default "opt-compat.yml" if COMPAT
+
+endif	# if XENOMAI3
+
+if XENOMAI4
+
+choice
+	prompt "Kernel version"
+	default EVL_KERNEL_6_6
+
+config EVL_KERNEL_LATEST
+	bool "Head of latest EVL branch"
+
+config EVL_KERNEL_6_6_LATEST
+	bool "Head of 6.6 EVL branch"
+
+config EVL_KERNEL_6_6
+	bool "Latest 6.6 EVL release"
+
+config EVL_KERNEL_6_1_LATEST
+	bool "Head of 6.1 EVL branch"
+
+config EVL_KERNEL_6_1
+	bool "Latest 6.1 EVL release"
+
+endchoice
+
+config KAS_INCLUDE_EVL_KERNEL
+	string
+	default "opt-linux-latest.yml" if EVL_KERNEL_LATEST
+	default "opt-linux-latest-6.6.yml" if EVL_KERNEL_6_6_LATEST
+	default "opt-linux-6.6.yml" if EVL_KERNEL_6_6
+	default "opt-linux-latest-6.1.yml" if EVL_KERNEL_6_1_LATEST
+	default "opt-linux-6.1.yml" if EVL_KERNEL_6_1
+
+choice
+	prompt "libevl version"
+	default LIBEVL_NEXT
+
+config LIBEVL_NEXT
+	bool "Head of next branch"
+
+config LIBEVL_RELEASE
+	bool "Latest release"
+
+endchoice
+
+config KAS_INCLUDE_LIBEVL
+	string
+	default "opt-libevl-next.yml" if LIBEVL_NEXT
+	default "opt-libevl-latest-release.yml" if LIBEVL_RELEASE
+
+endif	# if XENOMAI4
Signature · 1 line
2.35.3
author
#14 lore raw

PATCH v3 10/10 ci: Prepare for xenomai-4 test cases

In reply to Jan Kiszka

From: Clara Kowalsky <[email protected]>

Test cases are prepared for the linux-evl kernel v6.1 and v6.6. We don't add them yet as there is no equivalent to xeno-test in libevl.

[Jan: drop unused ci files, enable qemu targets, do not hook-up yet]
---
 ci/xenomai_4_next.yml | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 ci/xenomai_4_next.yml
ci/xenomai_4_next.yml new file +21 -0
new file mode 100644
index 0000000..226c72f
@@ -0,0 +1,21 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2023-2024
+#
+# Authors:
+#  Clara Kowalsky <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+include:
+  - local: '/ci/gitlab-ci-base.yml'
+  - local: '/ci/kernel_6_1.yml'
+  - local: '/ci/kernel_6_6.yml'
+
+variables:
+  XENOMAI_BUILD_OPTION: ":opt-libevl-next.yml"
+  XENOMAI_VERSION: "next"
+  LATEST_KERNEL_VERSION: "6.6"
+  BUILD_IDENTIFIER: "evl-${XENOMAI_VERSION}_kernel-${KERNEL_VERSION}"
Signature · 1 line
2.35.3
author
#13 lore raw

PATCH v3 9/10 ci: Rename xenomai 3 files

In reply to Jan Kiszka

From: Clara Kowalsky <[email protected]>

The files for xenomai 3 obtain a corresponding name change.

[Jan: keep kernel CI files untouched, postpone xenomai 4 hook-up]
---
 .gitlab-ci.yml                                            | 6 +++---
 ci/{xenomai_next.yml => xenomai_3_next.yml}               | 2 +-
 ci/{xenomai_next_compat.yml => xenomai_3_next_compat.yml} | 1 -
 3 files changed, 4 insertions(+), 5 deletions(-)
 rename ci/{xenomai_next.yml => xenomai_3_next.yml} (91%)
 rename ci/{xenomai_next_compat.yml => xenomai_3_next_compat.yml} (99%)
.gitlab-ci.yml +3 -3
index 6e4f1df..4c20c53 100644
@@ -1,7 +1,7 @@
 #
 # Xenomai Real-Time System
 #
-# Copyright (c) Siemens AG, 2019 - 2021
+# Copyright (c) Siemens AG, 2019 - 2024
 #
 # Authors:
 #  Quirin Gylstorff <[email protected]>
@@ -44,8 +44,8 @@ stable/v3.2.x:
     include:
       - local: '/ci/xenomai_3_2_x.yml'
 
-next:
+xenomai-3/next:
   extends: .parent
   trigger:
     include:
-      - local: '/ci/xenomai_next.yml'
+      - local: '/ci/xenomai_3_next.yml'
ci/xenomai_3_next.yml renamed from ci/xenomai_next.yml +1 -1
similarity index 91%
rename from ci/xenomai_next.yml
rename to ci/xenomai_3_next.yml
index b0338c6..afd45cb 100644
@@ -15,7 +15,7 @@ include:
   - local: '/ci/kernel_5_15.yml'
   - local: '/ci/kernel_6_1.yml'
   - local: '/ci/kernel_6_6.yml'
-  - local: '/ci/xenomai_next_compat.yml'
+  - local: '/ci/xenomai_3_next_compat.yml'
 
 variables:
   XENOMAI_BUILD_OPTION: ":opt-xenomai-next.yml"
ci/xenomai_3_next_compat.yml renamed from ci/xenomai_next_compat.yml +0 -1
similarity index 99%
rename from ci/xenomai_next_compat.yml
rename to ci/xenomai_3_next_compat.yml
index f7e3146..5ccc832 100644
@@ -16,4 +16,3 @@
 
 include:
   - local: '/ci/compat_jobs.yml'
-
Signature · 1 line
2.35.3
#2 lore raw

Re: [xenomai-images][PATCH v3 01/10] Add Isar patch to permit linux-libc-dev upgrades in the sbuild environment

In reply to Jan Kiszka
Quoted 21 lines · Jan Kiszka
kas.yml +5 -1
index 1b2e857..2017e68 100644
@@ -22,9 +22,13 @@ repos:
 
   isar:
     url: https://github.com/ilbers/isar.git
-    commit: 216f0721265fcfe965ac48b51a0128d612d89bf4
+    commit: 853784cf1732c093acd537fbb1b0b1c54e6b59ff
     layers:
       meta:
+    patches:
+      01:
+        repo: xenomai
+        path: isar-patches/0001-dpkg-Restore-support-for-replacing-pre-installed-pac.patch
 
 bblayers_conf_header:
   standard: |
Signature · 1 line
2.35.3

We we're "ISAR patch free" for a long time now. Upstream first? Doesn't seem to be Xenomai or libevl specific, so I think we shouldn't carry it here.

#10 lore raw

Re: [xenomai-images][PATCH v3 07/10] xenomai-4: Add evl userspace

In reply to Jan Kiszka

recipes-xenomai/libevl/files/debian/rules

Quoted 70 lines · Jan Kiszka
recipes-xenomai/libevl/files/0001-meson-setup-uapi-Take-Debian-multiarch-into-account.patch new file +40 -0
@@ -0,0 +1,40 @@
+From b4447250c7fff6940c1bb6f0308da617bebaa643 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <[email protected]>
+Date: Tue, 2 Jan 2024 14:01:19 +0100
+Subject: [PATCH] meson: setup-uapi: Take Debian multiarch into account
+
+Check also the Debian multiarch include path for the chosen architecture
+so that we can support (self-built) linux-libc-dev packages that contain
+the evl headers.
+
+Signed-off-by: Jan Kiszka <[email protected]>
+---
+ meson/setup-uapi.sh | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/meson/setup-uapi.sh b/meson/setup-uapi.sh
+index f2d0774..633c5ed 100644
+--- a/meson/setup-uapi.sh
++++ b/meson/setup-uapi.sh
+@@ -17,7 +17,17 @@ if test -r $UAPI/Kbuild; then
+     link_dir $UAPI/arch/$ARCH/include/uapi/asm/evl asm
+     link_dir $UAPI/include/uapi/asm-generic .
+ else
++    DEB_HOST_ARCH=$ARCH
++    if [ "$DEB_HOST_ARCH" = "x86" ]; then
++        DEB_HOST_ARCH=amd64
++    fi
++    DEB_HOST_MULTIARCH=$( \
++        dpkg-architecture -q DEB_HOST_MULTIARCH -a $DEB_HOST_ARCH 2>/dev/null)
+     link_dir $UAPI/evl .
+-    link_dir $UAPI/asm/evl asm
++    if [ -d $UAPI/$DEB_HOST_MULTIARCH/asm/evl ]; then
++        link_dir $UAPI/$DEB_HOST_MULTIARCH/asm/evl asm
++    else
++        link_dir $UAPI/asm/evl asm
++    fi
+     link_dir $UAPI/asm-generic .
+ fi
+-- 
+2.35.3
+
recipes-xenomai/libevl/files/debian/compat new file +1 -0
new file mode 100644
index 0000000..f599e28
@@ -0,0 +1 @@
+10
recipes-xenomai/libevl/files/debian/control.tmpl new file +11 -0
new file mode 100644
index 0000000..36eb68c
@@ -0,0 +1,11 @@
+Source: ${PN}
+Section: misc
+Priority: optional
+Standards-Version: 3.9.6
+Maintainer: Xenomai project <[email protected]>
+Build-Depends: ${DEBIAN_BUILD_DEPENDS}
+
+Package: libevl
+Architecture: ${DISTRO_ARCH}
+Description: ${DESCRIPTION}
+Depends: ${shlibs:Depends}
recipes-xenomai/libevl/files/debian/rules new file +0 -0
new file mode 100755
index 0000000..9c9148f

Wouldn't it make sense to move the debianization into evl like we have it for Xenomai as well? In addition it would follow the "upstream first" again.

I think it has some value if someone can run dpkg-buildpackage on evl and doesn't have to use xenomai-images for building packages.

Florian

author
#3 lore raw

Re: [xenomai-images][PATCH v3 01/10] Add Isar patch to permit linux-libc-dev upgrades in the sbuild environment

In reply to Florian Bezdeka
Quoted 18 lines · Florian Bezdeka
Quoted 17 lines · Jan Kiszka
kas.yml +5 -1
index 1b2e857..2017e68 100644
@@ -22,9 +22,13 @@ repos:
 
   isar:
     url: https://github.com/ilbers/isar.git
-    commit: 216f0721265fcfe965ac48b51a0128d612d89bf4
+    commit: 853784cf1732c093acd537fbb1b0b1c54e6b59ff
     layers:
       meta:
+    patches:
+      01:
+        repo: xenomai
+        path: isar-patches/0001-dpkg-Restore-support-for-replacing-pre-installed-pac.patch
 
Quoted 9 lines
Quoted 4 lines
kas.yml +0 -0
 bblayers_conf_header:
   standard: |
Signature · 1 line
2.35.3

We we're "ISAR patch free" for a long time now. Upstream first? Doesn't seem to be Xenomai or libevl specific, so I think we shouldn't carry it here.

Isar will only look into that after the currently upcoming release they told us.

Jan

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
author
#11 lore raw

Re: [xenomai-images][PATCH v3 07/10] xenomai-4: Add evl userspace

In reply to Florian Bezdeka
Quoted 76 lines · Florian Bezdeka

recipes-xenomai/libevl/files/debian/rules

Quoted 70 lines · Jan Kiszka
recipes-xenomai/libevl/files/0001-meson-setup-uapi-Take-Debian-multiarch-into-account.patch new file +40 -0
@@ -0,0 +1,40 @@
+From b4447250c7fff6940c1bb6f0308da617bebaa643 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <[email protected]>
+Date: Tue, 2 Jan 2024 14:01:19 +0100
+Subject: [PATCH] meson: setup-uapi: Take Debian multiarch into account
+
+Check also the Debian multiarch include path for the chosen architecture
+so that we can support (self-built) linux-libc-dev packages that contain
+the evl headers.
+
+Signed-off-by: Jan Kiszka <[email protected]>
+---
+ meson/setup-uapi.sh | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/meson/setup-uapi.sh b/meson/setup-uapi.sh
+index f2d0774..633c5ed 100644
+--- a/meson/setup-uapi.sh
++++ b/meson/setup-uapi.sh
+@@ -17,7 +17,17 @@ if test -r $UAPI/Kbuild; then
+     link_dir $UAPI/arch/$ARCH/include/uapi/asm/evl asm
+     link_dir $UAPI/include/uapi/asm-generic .
+ else
++    DEB_HOST_ARCH=$ARCH
++    if [ "$DEB_HOST_ARCH" = "x86" ]; then
++        DEB_HOST_ARCH=amd64
++    fi
++    DEB_HOST_MULTIARCH=$( \
++        dpkg-architecture -q DEB_HOST_MULTIARCH -a $DEB_HOST_ARCH 2>/dev/null)
+     link_dir $UAPI/evl .
+-    link_dir $UAPI/asm/evl asm
++    if [ -d $UAPI/$DEB_HOST_MULTIARCH/asm/evl ]; then
++        link_dir $UAPI/$DEB_HOST_MULTIARCH/asm/evl asm
++    else
++        link_dir $UAPI/asm/evl asm
++    fi
+     link_dir $UAPI/asm-generic .
+ fi
+-- 
+2.35.3
+
recipes-xenomai/libevl/files/debian/compat new file +1 -0
new file mode 100644
index 0000000..f599e28
@@ -0,0 +1 @@
+10
recipes-xenomai/libevl/files/debian/control.tmpl new file +11 -0
new file mode 100644
index 0000000..36eb68c
@@ -0,0 +1,11 @@
+Source: ${PN}
+Section: misc
+Priority: optional
+Standards-Version: 3.9.6
+Maintainer: Xenomai project <[email protected]>
+Build-Depends: ${DEBIAN_BUILD_DEPENDS}
+
+Package: libevl
+Architecture: ${DISTRO_ARCH}
+Description: ${DESCRIPTION}
+Depends: ${shlibs:Depends}
recipes-xenomai/libevl/files/debian/rules new file +0 -0
new file mode 100755
index 0000000..9c9148f

Wouldn't it make sense to move the debianization into evl like we have it for Xenomai as well? In addition it would follow the "upstream first" again.

Quoted 3 lines

I think it has some value if someone can run dpkg-buildpackage on evl and doesn't have to use xenomai-images for building packages.

Yes, may be worth it. This one here is likely not yet complete. E.g., it lacks a proper split-up into multiple binary packages (lib, tools, testing etc.).

Jan

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center