[isar-cip-core][PATCH v3 6/6] kernelci-customizations: Reuse common customizations


Jan Kiszka
 

From: Jan Kiszka <jan.kiszka@...>

We can share most of the customization steps for kernelci with the
common recipe. This comes with the theoretical risk that changes to the
latter will break the former but has the larger benefit of avoiding
duplications and gaining support for new boards etc. automatically.

Signed-off-by: Jan Kiszka <jan.kiszka@...>
---
.../files/99-silent-printk.conf | 1 -
.../kernelci-customizations/files/ethernet | 23 -------------------
.../kernelci-customizations.bb | 23 ++++---------------
3 files changed, 4 insertions(+), 43 deletions(-)
delete mode 100644 recipes-core/kernelci-customizations/files/99-silent-printk.conf
delete mode 100644 recipes-core/kernelci-customizations/files/ethernet

diff --git a/recipes-core/kernelci-customizations/files/99-silent-printk.conf b/recipes-core/kernelci-customizations/files/99-silent-printk.conf
deleted file mode 100644
index ad24d3a..0000000
--- a/recipes-core/kernelci-customizations/files/99-silent-printk.conf
+++ /dev/null
@@ -1 +0,0 @@
-kernel.printk = 3 4 1 3
diff --git a/recipes-core/kernelci-customizations/files/ethernet b/recipes-core/kernelci-customizations/files/ethernet
deleted file mode 100644
index fa47d1a..0000000
--- a/recipes-core/kernelci-customizations/files/ethernet
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# CIP Core, generic profile
-#
-# Copyright (c) Siemens AG, 2019
-#
-# Authors:
-# Jan Kiszka <jan.kiszka@...>
-#
-# SPDX-License-Identifier: MIT
-#
-
-allow-hotplug eth0
-allow-hotplug enp0s2
-allow-hotplug enp2s0
-
-# used on BBB
-iface eth0 inet dhcp
-
-# used on qemu-amd64
-iface enp0s2 inet dhcp
-
-# used on simatic-ipc227e
-iface enp2s0 inet dhcp
diff --git a/recipes-core/kernelci-customizations/kernelci-customizations.bb b/recipes-core/kernelci-customizations/kernelci-customizations.bb
index df4257c..91ad929 100644
--- a/recipes-core/kernelci-customizations/kernelci-customizations.bb
+++ b/recipes-core/kernelci-customizations/kernelci-customizations.bb
@@ -11,28 +11,13 @@
# SPDX-License-Identifier: MIT
#

-inherit dpkg-raw
+require recipes-core/customizations/common.inc

-DESCRIPTION = "CIP Core image demo & customizations"
+DESCRIPTION = "CIP Core KernelCI image customizations"

-SRC_URI = " \
- file://postinst \
- file://ethernet \
- file://dmesg.sh \
- file://99-silent-printk.conf"
-
-DEPENDS += "sshd-regen-keys"
-
-DEBIAN_DEPENDS = " \
- ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys"
-
-do_install() {
- install -v -d ${D}/etc/network/interfaces.d
- install -v -m 644 ${WORKDIR}/ethernet ${D}/etc/network/interfaces.d/
-
- install -v -d ${D}/etc/sysctl.d
- install -v -m 644 ${WORKDIR}/99-silent-printk.conf ${D}/etc/sysctl.d/
+SRC_URI += "file://dmesg.sh"

+do_install_append() {
install -v -d ${D}/opt/kernelci
install -v -m 744 ${WORKDIR}/dmesg.sh ${D}/opt/kernelci/
}
--
2.31.1

Join cip-dev@lists.cip-project.org to automatically receive all group messages.