From: Quirin Gylstorff <Quirin.Gylstorff@siemens.com>
To: jan.kiszka@siemens.com, felix.moessbauer@siemens.com,
cip-dev@lists.cip-project.org
Subject: [cip-dev][isar-cip-core][PATCH v2] swupdate: Add recipe for 2022.12 for bullseye and buster
Date: Thu, 11 May 2023 17:39:38 +0200 [thread overview]
Message-ID: <20230511153938.860495-1-Quirin.Gylstorff@siemens.com> (raw)
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
This allows modified swupdate builds in cip-core. It also
adds the option to use suricatta-lua instead of the default
suricatta-hawkbit to communicate with a webserver.
`suricatta-lua` is currently in use for internal projects. Some of these
projects are planned to be released as open source.
To enable suricatta-lua add the following line to the local.conf:
```
OVERRIDE .= " :suricatta-lua"
```
or add the following line to the swupdate recipe.
```
DEB_BUILD_PROFILES += "pkg.swupdate.suricattalua"
```
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
Changes v2:
- Add usage of `suricatta-lua` the to commit message
- Add missing space to DEB_BUILD_PROFILES
conf/distro/cip-core-bookworm.conf | 1 +
conf/distro/cip-core-bullseye.conf | 4 +++
conf/distro/cip-core-buster.conf | 1 +
...eferences.swupdate-bullseye-backports.conf | 3 ++
kas/opt/swupdate.yml | 1 +
...d-rules-Add-option-for-suricatta_lua.patch | 30 ++++++++++++++++
.../swupdate/swupdate_2022.12+dfsg-4-gbp.bb | 35 +++++++++++++++++++
7 files changed, 75 insertions(+)
create mode 100644 conf/distro/preferences.swupdate-bullseye-backports.conf
create mode 100644 recipes-core/swupdate/files/0001-d-rules-Add-option-for-suricatta_lua.patch
create mode 100644 recipes-core/swupdate/swupdate_2022.12+dfsg-4-gbp.bb
diff --git a/conf/distro/cip-core-bookworm.conf b/conf/distro/cip-core-bookworm.conf
index de2e435..f05d3d3 100644
--- a/conf/distro/cip-core-bookworm.conf
+++ b/conf/distro/cip-core-bookworm.conf
@@ -12,5 +12,6 @@
require conf/distro/debian-bookworm.conf
require cip-core-common.inc
+PREFERRED_VERSION_swupdate ?= "2022.12%"
PREFERRED_VERSION_linux-cip ?= "5.10.%"
PREFERRED_VERSION_linux-cip-rt ?= "5.10.%"
diff --git a/conf/distro/cip-core-bullseye.conf b/conf/distro/cip-core-bullseye.conf
index 3a0550c..9c83054 100644
--- a/conf/distro/cip-core-bullseye.conf
+++ b/conf/distro/cip-core-bullseye.conf
@@ -12,5 +12,9 @@
require conf/distro/debian-bullseye.conf
require cip-core-common.inc
+DISTRO_APT_SOURCES:append:swupdate = " conf/distro/debian-bullseye-backports.list"
+DISTRO_APT_PREFERENCES:append:swupdate = " conf/distro/preferences.swupdate-bullseye-backports.conf"
+
+PREFERRED_VERSION_swupdate ?= "2022.12%"
PREFERRED_VERSION_linux-cip ?= "5.10.%"
PREFERRED_VERSION_linux-cip-rt ?= "5.10.%"
diff --git a/conf/distro/cip-core-buster.conf b/conf/distro/cip-core-buster.conf
index c5cb39c..4e9a4a7 100644
--- a/conf/distro/cip-core-buster.conf
+++ b/conf/distro/cip-core-buster.conf
@@ -12,5 +12,6 @@
require conf/distro/debian-buster.conf
require cip-core-common.inc
+PREFERRED_VERSION_swupdate ?= "2021.11%"
PREFERRED_VERSION_linux-cip ?= "4.19.%"
PREFERRED_VERSION_linux-cip-rt ?= "4.19.%"
diff --git a/conf/distro/preferences.swupdate-bullseye-backports.conf b/conf/distro/preferences.swupdate-bullseye-backports.conf
new file mode 100644
index 0000000..a2377bb
--- /dev/null
+++ b/conf/distro/preferences.swupdate-bullseye-backports.conf
@@ -0,0 +1,3 @@
+Package: dh-nodejs
+Pin: release n=bullseye-backports
+Pin-Priority: 801
diff --git a/kas/opt/swupdate.yml b/kas/opt/swupdate.yml
index 29b7dd6..1528b09 100644
--- a/kas/opt/swupdate.yml
+++ b/kas/opt/swupdate.yml
@@ -17,6 +17,7 @@ header:
local_conf_header:
image-option-swupdate: |
CIP_IMAGE_OPTIONS:append = " swupdate.inc"
+ OVERRIDES .= ":swupdate"
wic-swu: |
IMAGE_TYPEDEP:wic += "squashfs"
diff --git a/recipes-core/swupdate/files/0001-d-rules-Add-option-for-suricatta_lua.patch b/recipes-core/swupdate/files/0001-d-rules-Add-option-for-suricatta_lua.patch
new file mode 100644
index 0000000..0be5a71
--- /dev/null
+++ b/recipes-core/swupdate/files/0001-d-rules-Add-option-for-suricatta_lua.patch
@@ -0,0 +1,30 @@
+From 00fc691802e671594cea1d0a5e880d255e04b7f0 Mon Sep 17 00:00:00 2001
+From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
+Date: Wed, 3 May 2023 16:02:37 +0200
+Subject: [PATCH] d/rules: Add option for suricatta_lua
+
+This allows to use lua plugins as suricatta backends. It is optional
+as it overrides the default HAWKBIT backend.
+
+Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
+---
+ debian/rules | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/debian/rules b/debian/rules
+index 57da4ca7..91106fbd 100755
+--- a/debian/rules
++++ b/debian/rules
+@@ -56,6 +56,9 @@ endif
+ ifneq (,$(filter pkg.swupdate.p11,$(DEB_BUILD_PROFILES)))
+ echo CONFIG_PKCS11=y >> configs/debian_defconfig
+ endif
++ifneq (,$(filter pkg.swupdate.suricattalua,$(DEB_BUILD_PROFILES)))
++ echo CONFIG_SURICATTA_LUA=y >> configs/debian_defconfig
++endif
+ ifneq (,$(LUA_VERSION))
+ echo CONFIG_LUAPKG=\"lua$(LUA_VERSION)\" >> configs/debian_defconfig
+ echo CONFIG_LUASCRIPTHANDLER=y >> configs/debian_defconfig
+--
+2.39.2
+
diff --git a/recipes-core/swupdate/swupdate_2022.12+dfsg-4-gbp.bb b/recipes-core/swupdate/swupdate_2022.12+dfsg-4-gbp.bb
new file mode 100644
index 0000000..f5478a3
--- /dev/null
+++ b/recipes-core/swupdate/swupdate_2022.12+dfsg-4-gbp.bb
@@ -0,0 +1,35 @@
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2023
+#
+# Authors:
+# Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+
+inherit dpkg-gbp
+
+require swupdate.inc
+
+DEPENDS += "libebgenv-dev"
+
+DEB_BUILD_PROFILES += "nodoc"
+DEB_BUILD_OPTIONS += "nodoc"
+
+SRC_URI = "git://salsa.debian.org/debian/swupdate.git;protocol=https;branch=debian/master"
+SRCREV ="aa9edf070567fa5b3e942c270633a8feef49dad8"
+SRC_URI += "file://0001-d-rules-Add-option-for-suricatta_lua.patch"
+
+# deactivate signing and hardware compability for simple a/b rootfs update
+DEB_BUILD_PROFILES += "pkg.swupdate.nosigning"
+DEB_BUILD_PROFILES += "pkg.swupdate.nohwcompat"
+DEB_BUILD_PROFILES:append:suricatta-lua = " pkg.swupdate.suricattalua"
+
+# Disable cross for arm and arm64 on bullseye
+ISAR_CROSS_COMPILE:bullseye = "0"
+
+# add cross build and deactivate testing for arm based builds
+DEB_BUILD_PROFILES += "cross nocheck"
+DEB_BUILD_PROFILES:append:bullseye = " pkg.swupdate.bpo"
+
--
2.39.2
next reply other threads:[~2023-05-11 15:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 15:39 Quirin Gylstorff [this message]
2023-05-14 10:54 ` [cip-dev][isar-cip-core][PATCH v2] swupdate: Add recipe for 2022.12 for bullseye and buster Jan Kiszka
2023-05-15 7:40 ` Gylstorff Quirin
2023-05-15 2:29 ` MOESSBAUER, Felix
2023-05-15 7:08 ` Gylstorff Quirin
2023-05-22 7:32 ` Christian Storm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230511153938.860495-1-Quirin.Gylstorff@siemens.com \
--to=quirin.gylstorff@siemens.com \
--cc=cip-dev@lists.cip-project.org \
--cc=felix.moessbauer@siemens.com \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.