diff mbox series

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

Message ID 124e70d6301147514c30211eb43ea71523d0c36b.1643303563.git.jan.kiszka@siemens.com (mailing list archive)
State Handled Elsewhere
Headers show
Series Add cip-core-image-kernelci building and uploading system | expand

Commit Message

Jan Kiszka Jan. 27, 2022, 5:12 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

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@siemens.com>
---
 .../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 mbox series

Patch

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@siemens.com>
-#
-# 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/
 }