* [xenomai-images][PATCH 1/4] Update to Isar 0.9
[not found] <cover.1659361657.git.jan.kiszka@siemens.com>
@ 2022-08-01 13:47 ` Jan Kiszka
2022-08-01 13:47 ` [xenomai-images][PATCH 2/4] ci: Make alternative DNS server configuration configurable Jan Kiszka
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2022-08-01 13:47 UTC (permalink / raw)
To: xenomai
From: Jan Kiszka <jan.kiszka@siemens.com>
This brings changes to image types that are almost easy to account for
and permit to drop our downstream patch. Also the image file name changed,
so adjust test jobs, readme and start-qemu.sh.
There was one catch: qemu-machine.inc did not weak-assign IMAGE_FSTYPES,
which is now important as opt-ci.yml must be able to overwrite it.
The Isar update itself fixes logging issues, thus helps a lot with
analyzing failing builds, specifically in CI.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
README.md | 2 +-
conf/machine/beagle-bone-black.conf | 2 +-
conf/machine/hikey.conf | 2 +-
conf/machine/qemu-machine.inc | 2 +-
conf/machine/x86-64-efi.conf | 2 +-
.../0001-classes-ext4.img-Compress.patch | 31 -------------------
kas.yml | 2 +-
opt-ci.yml | 12 ++-----
start-qemu.sh | 2 +-
tests/jobs/xenomai-qemu-amd64.yml | 2 +-
tests/jobs/xenomai-qemu-arm64.yml | 2 +-
tests/jobs/xenomai-qemu-armhf.yml | 2 +-
12 files changed, 12 insertions(+), 51 deletions(-)
delete mode 100644 isar-patches/0001-classes-ext4.img-Compress.patch
diff --git a/README.md b/README.md
index b38e131..5f6c4c7 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@ armhf(`board-beagle-bone-black.yml`) and arm64(`board-hikey.yml`) targets.
Each physical target will generate ready-to-boot images under
`build/tmp/deploy/images/`. To flash, e.g., the HiKey image to an SD card, run
- dd if=build/tmp/deploy/images/hikey/demo-image-hikey-xenomai-demo-hikey.wic.img \
+ dd if=build/tmp/deploy/images/hikey/demo-image-hikey-xenomai-demo-hikey.wic \
of=/dev/<medium-device> bs=1M status=progress
## CI Build
diff --git a/conf/machine/beagle-bone-black.conf b/conf/machine/beagle-bone-black.conf
index c0f85c5..d454326 100644
--- a/conf/machine/beagle-bone-black.conf
+++ b/conf/machine/beagle-bone-black.conf
@@ -13,7 +13,7 @@ DISTRO_ARCH = "armhf"
IMAGE_INSTALL += "u-boot-script"
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
DTB_FILES = "am335x-boneblack.dtb"
IMAGER_INSTALL += "u-boot-omap"
IMAGE_PREINSTALL += "fake-hwclock"
diff --git a/conf/machine/hikey.conf b/conf/machine/hikey.conf
index 6ad4611..344a3de 100644
--- a/conf/machine/hikey.conf
+++ b/conf/machine/hikey.conf
@@ -11,7 +11,7 @@
DISTRO_ARCH = "arm64"
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
IMAGER_INSTALL += "${GRUB_BOOTLOADER_INSTALL}"
IMAGE_PREINSTALL_append = " firmware-ti-connectivity"
diff --git a/conf/machine/qemu-machine.inc b/conf/machine/qemu-machine.inc
index 7771a11..27475eb 100644
--- a/conf/machine/qemu-machine.inc
+++ b/conf/machine/qemu-machine.inc
@@ -9,7 +9,7 @@
# SPDX-License-Identifier: MIT
#
-IMAGE_FSTYPES = "ext4-img"
+IMAGE_FSTYPES ?= "ext4"
IMAGE_INSTALL_remove += "expand-on-first-boot"
ROOTFS_EXTRA = "1024"
diff --git a/conf/machine/x86-64-efi.conf b/conf/machine/x86-64-efi.conf
index cb3ed85..036bdcd 100644
--- a/conf/machine/x86-64-efi.conf
+++ b/conf/machine/x86-64-efi.conf
@@ -11,5 +11,5 @@
DISTRO_ARCH = "amd64"
-IMAGE_FSTYPES ?= "wic-img"
+IMAGE_FSTYPES ?= "wic"
IMAGER_INSTALL += "${GRUB_BOOTLOADER_INSTALL}"
diff --git a/isar-patches/0001-classes-ext4.img-Compress.patch b/isar-patches/0001-classes-ext4.img-Compress.patch
deleted file mode 100644
index 6b67295..0000000
--- a/isar-patches/0001-classes-ext4.img-Compress.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 915eec01cf660b160b1eab551c60fba4aac13b4b Mon Sep 17 00:00:00 2001
-From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
-Date: Fri, 17 Apr 2020 11:32:39 +0200
-Subject: [PATCH] classes/ext4.img: Compress
-
-change owner and add compress option
-
-Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
----
- meta/classes/ext4-img.bbclass | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
-index 334dc64..dc091d9 100644
---- a/meta/classes/ext4-img.bbclass
-+++ b/meta/classes/ext4-img.bbclass
-@@ -17,6 +17,11 @@ do_ext4_image() {
-
- sudo chroot ${BUILDCHROOT_DIR} /sbin/mke2fs ${MKE2FS_ARGS} \
- -F -d '${PP_ROOTFS}' '${PP_DEPLOY}/${EXT4_IMAGE_FILE}'
-+ sudo chown $(id -u):$(id -g) ${DEPLOY_DIR_IMAGE}/${EXT4_IMAGE_FILE}
-+
-+ if [ "${COMPRESS}" = "gz" ]; then
-+ gzip ${DEPLOY_DIR_IMAGE}/${EXT4_IMAGE_FILE}
-+ fi
- }
-
- addtask ext4_image before do_image after do_image_tools
---
-2.20.1
-
diff --git a/kas.yml b/kas.yml
index 6b3b32d..2553c23 100644
--- a/kas.yml
+++ b/kas.yml
@@ -22,7 +22,7 @@ repos:
isar:
url: https://github.com/ilbers/isar.git
- refspec: a960a4e52c50ef4a15e382768eeee5fa9cfffead
+ refspec: 213b8f62fa74e87321f927fb6b4ed9db93e5cb37
layers:
meta:
diff --git a/opt-ci.yml b/opt-ci.yml
index 2feec5c..2f551b4 100644
--- a/opt-ci.yml
+++ b/opt-ci.yml
@@ -14,21 +14,13 @@ header:
includes:
- opt-debug.yml
-repos:
- isar:
- patches:
- 01-compress-ext4:
- path: isar-patches/0001-classes-ext4.img-Compress.patch
- repo: xenomai
-
# LAVA uses nfs to deploy the image to real boards. For this we need a tarball
# instead of full disk/wic image
-# For qemu we need a compressed ext4-img
+# For qemu we need a compressed ext4 image
local_conf_header:
xenomai-ci: |
ROOTFS_POSTPROCESS_COMMAND_remove = "image_postprocess_sshd_key_regen"
IMAGE_INSTALL_remove += "sshd-regen-keys"
IMAGE_INSTALL_remove += "expand-on-first-boot"
- IMAGE_FSTYPES = "${@ 'ext4-img' if d.getVar('MACHINE', True).startswith('qemu') else 'targz-img' }"
- COMPRESS = "${@ 'gz' if d.getVar('MACHINE', True).startswith('qemu') else '' }"
+ IMAGE_FSTYPES = "${@ 'ext4.gz' if d.getVar('MACHINE', True).startswith('qemu') else 'tar.gz' }"
diff --git a/start-qemu.sh b/start-qemu.sh
index 68516cc..33b6e65 100755
--- a/start-qemu.sh
+++ b/start-qemu.sh
@@ -83,7 +83,7 @@ fi
shift 1
${QEMU_PATH}${QEMU} \
- -drive file=${IMAGE_PREFIX}.ext4.img,discard=unmap,if=none,id=disk,format=raw \
+ -drive file=${IMAGE_PREFIX}.ext4,discard=unmap,if=none,id=disk,format=raw \
-m 1G -serial mon:stdio -netdev user,id=net \
-kernel ${IMAGE_PREFIX}-${KERNEL_SUFFIX} -append "${KERNEL_CMDLINE}" \
-initrd ${IMAGE_PREFIX}-initrd.img ${QEMU_EXTRA_ARGS} "$@"
diff --git a/tests/jobs/xenomai-qemu-amd64.yml b/tests/jobs/xenomai-qemu-amd64.yml
index 921c70b..166d472 100644
--- a/tests/jobs/xenomai-qemu-amd64.yml
+++ b/tests/jobs/xenomai-qemu-amd64.yml
@@ -53,7 +53,7 @@ actions:
url: ${DEPLOY_URL}/${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${TARGET}-initrd.img
rootfs:
image_arg: -drive file={rootfs},discard=unmap,if=none,id=disk,format=raw
- url: ${DEPLOY_URL}/${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${TARGET}.ext4.img.gz
+ url: ${DEPLOY_URL}/${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${TARGET}.ext4.gz
compression: gz
# BOOT_BLOCK
- boot:
diff --git a/tests/jobs/xenomai-qemu-arm64.yml b/tests/jobs/xenomai-qemu-arm64.yml
index 4907ca4..a1dcc1c 100644
--- a/tests/jobs/xenomai-qemu-arm64.yml
+++ b/tests/jobs/xenomai-qemu-arm64.yml
@@ -57,7 +57,7 @@ actions:
url: ${DEPLOY_URL}/${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${TARGET}-initrd.img
rootfs:
image_arg: -drive file={rootfs},discard=unmap,if=none,id=disk,format=raw
- url: ${DEPLOY_URL}/${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${TARGET}.ext4.img.gz
+ url: ${DEPLOY_URL}/${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${TARGET}.ext4.gz
compression: gz
# BOOT_BLOCK
- boot:
diff --git a/tests/jobs/xenomai-qemu-armhf.yml b/tests/jobs/xenomai-qemu-armhf.yml
index 9507a4f..3b5bc10 100644
--- a/tests/jobs/xenomai-qemu-armhf.yml
+++ b/tests/jobs/xenomai-qemu-armhf.yml
@@ -53,7 +53,7 @@ actions:
url: ${DEPLOY_URL}/${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${TARGET}-initrd.img
rootfs:
image_arg: -drive file={rootfs},discard=unmap,if=none,id=disk,format=raw
- url: ${DEPLOY_URL}/${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${TARGET}.ext4.img.gz
+ url: ${DEPLOY_URL}/${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${TARGET}.ext4.gz
compression: gz
# BOOT_BLOCK
- boot:
--
2.35.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [xenomai-images][PATCH 4/4] Add option to build latest kernel version
[not found] <cover.1659361657.git.jan.kiszka@siemens.com>
` (2 preceding siblings ...)
2022-08-01 13:47 ` [xenomai-images][PATCH 3/4] kconfig: Limit I-pipe kernels to supported versions Jan Kiszka
@ 2022-08-01 13:47 ` Jan Kiszka
3 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2022-08-01 13:47 UTC (permalink / raw)
To: xenomai
From: Jan Kiszka <jan.kiszka@siemens.com>
This is currently 5.19-dovetail. Permits to enable and test Xenomai
early against newer kernels. Official support will remain focused on
LTS kernels, though.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
Kconfig | 5 +++++
opt-linux-latest.yml | 18 ++++++++++++++++++
recipes-kernel/linux/linux-xenomai_latest.bb | 20 +++++++++++++++++---
3 files changed, 40 insertions(+), 3 deletions(-)
create mode 100644 opt-linux-latest.yml
diff --git a/Kconfig b/Kconfig
index af10be1..1e3371e 100644
--- a/Kconfig
+++ b/Kconfig
@@ -89,6 +89,10 @@ choice
prompt "Kernel version"
default KERNEL_5_10
+config KERNEL_LATEST
+ bool "Head of latest Dovetail branch"
+ depends on XENOMAI_LATEST
+
config KERNEL_5_15_LATEST
bool "Head of 5.15 Dovetail branch"
depends on XENOMAI_LATEST
@@ -133,6 +137,7 @@ endchoice
config KAS_INCLUDE_KERNEL
string
+ default "opt-linux-latest.yml" if KERNEL_LATEST
default "opt-linux-latest-5.15.yml" if KERNEL_5_15_LATEST
default "opt-linux-5.15.yml" if KERNEL_5_15
default "opt-linux-latest-5.10.yml" if KERNEL_5_10_LATEST
diff --git a/opt-linux-latest.yml b/opt-linux-latest.yml
new file mode 100644
index 0000000..4f4dd3b
--- /dev/null
+++ b/opt-linux-latest.yml
@@ -0,0 +1,18 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2022
+#
+# Authors:
+# Jan Kiszka <jan.kiszka@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+ version: 10
+
+local_conf_header:
+ linux-xenomai-version: |
+ PREFERRED_VERSION_linux-xenomai = "9999-%"
+ LATEST_GIT_BRANCH = "latest"
diff --git a/recipes-kernel/linux/linux-xenomai_latest.bb b/recipes-kernel/linux/linux-xenomai_latest.bb
index 4117113..9c6fdaa 100644
--- a/recipes-kernel/linux/linux-xenomai_latest.bb
+++ b/recipes-kernel/linux/linux-xenomai_latest.bb
@@ -22,6 +22,17 @@ 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'):
+ cmd = 'git ls-remote --tags --head --refs https://source.denx.de/xenomai/linux-dovetail.git | ' \
+ 'sed -e "s/.*[[:space:]]refs\/\(tags\|heads\)\///" | ' \
+ 'grep "v5\.[0-9][0-9].*-dovetail-rebase" | ' \
+ 'sort -r -n -t - -k 5 -k 6 | head -1'
+ (ret, out) = subprocess.getstatusoutput(cmd)
+ d.setVar('LATEST_KERNEL_BRANCH', out)
+}
+
# default: amd64 or i386
GIT_REPO = "${@ \
'git://github.com/xenomai-ci/ipipe.git' if is_xeno_3_0(d) \
@@ -32,7 +43,8 @@ GIT_BRANCH = "${@ \
else 'ipipe-x86-4.19.y-cip' if is_kernel(d, '4.19') \
else 'ipipe-x86-5.4.y' if is_kernel(d, '5.4') \
else 'v5.10.y-dovetail-rebase' if is_kernel(d, '5.10') \
- else 'v5.15.y-dovetail-rebase' }"
+ else 'v5.15.y-dovetail-rebase' if is_kernel(d, '5.15') \
+ else d.getVar('LATEST_KERNEL_BRANCH') }"
GIT_REPO_armhf = "${@ \
'git://github.com/xenomai-ci/ipipe.git' if is_xeno_3_0(d) \
@@ -43,7 +55,8 @@ GIT_BRANCH_armhf = "${@ \
else 'ipipe/4.19.y-cip' if is_kernel(d, '4.19') \
else 'ipipe/5.4.y' if is_kernel(d, '5.4') \
else 'v5.10.y-dovetail-rebase' if is_kernel(d, '5.10') \
- else 'v5.15.y-dovetail-rebase' }"
+ else 'v5.15.y-dovetail-rebase' if is_kernel(d, '5.15') \
+ else d.getVar('LATEST_KERNEL_BRANCH') }"
GIT_REPO_arm64 = "${@ \
'git://github.com/xenomai-ci/ipipe-arm64.git' if is_kernel(d, '4.19') or is_kernel(d, '5.4') \
@@ -52,7 +65,8 @@ GIT_BRANCH_arm64 = "${@ \
'ipipe/4.19.y-cip' if is_kernel(d, '4.19') \
else 'ipipe/5.4.y' if is_kernel(d, '5.4') \
else 'v5.10.y-dovetail-rebase' if is_kernel(d, '5.10') \
- else 'v5.15.y-dovetail-rebase' }"
+ else 'v5.15.y-dovetail-rebase' if is_kernel(d, '5.15') \
+ else d.getVar('LATEST_KERNEL_BRANCH') }"
SRC_URI += "${GIT_REPO};protocol=https;branch=${GIT_BRANCH}"
SRCREV = "${AUTOREV}"
--
2.35.3
^ permalink raw reply related [flat|nested] 4+ messages in thread