diff mbox series

[isar-cip-core,v3,5/6] customizations: Factor out a common.inc

Message ID 7f039c5d636de4d8d8e781dc384956c69e8d7716.1643303563.git.jan.kiszka@siemens.com (mailing list archive)
State New
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>

This can be re-used by other customization recipes.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../{customizations.bb => common.inc}         |  4 +--
 recipes-core/customizations/customizations.bb | 27 ++-----------------
 2 files changed, 4 insertions(+), 27 deletions(-)
 copy recipes-core/customizations/{customizations.bb => common.inc} (90%)
diff mbox series

Patch

diff --git a/recipes-core/customizations/customizations.bb b/recipes-core/customizations/common.inc
similarity index 90%
copy from recipes-core/customizations/customizations.bb
copy to recipes-core/customizations/common.inc
index d302b4a..d3eb7b8 100644
--- a/recipes-core/customizations/customizations.bb
+++ b/recipes-core/customizations/common.inc
@@ -1,7 +1,7 @@ 
 #
 # CIP Core, generic profile
 #
-# Copyright (c) Siemens AG, 2019
+# Copyright (c) Siemens AG, 2019-2022
 #
 # Authors:
 #  Jan Kiszka <jan.kiszka@siemens.com>
@@ -11,7 +11,7 @@ 
 
 inherit dpkg-raw
 
-DESCRIPTION = "CIP Core image demo & customizations"
+FILESPATH_append := ":${FILE_DIRNAME}/files"
 
 SRC_URI = " \
     file://postinst \
diff --git a/recipes-core/customizations/customizations.bb b/recipes-core/customizations/customizations.bb
index d302b4a..96e88dd 100644
--- a/recipes-core/customizations/customizations.bb
+++ b/recipes-core/customizations/customizations.bb
@@ -1,7 +1,7 @@ 
 #
 # CIP Core, generic profile
 #
-# Copyright (c) Siemens AG, 2019
+# Copyright (c) Siemens AG, 2019-2022
 #
 # Authors:
 #  Jan Kiszka <jan.kiszka@siemens.com>
@@ -9,29 +9,6 @@ 
 # SPDX-License-Identifier: MIT
 #
 
-inherit dpkg-raw
+require common.inc
 
 DESCRIPTION = "CIP Core image demo & customizations"
-
-SRC_URI = " \
-    file://postinst \
-    file://ethernet \
-    file://99-silent-printk.conf"
-
-WIRELESS_FIRMWARE_PACKAGE ?= ""
-INSTALL_WIRELESS_TOOLS ??= "0"
-
-DEPENDS += "sshd-regen-keys"
-
-DEBIAN_DEPENDS = " \
-    ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys \
-    ${@(', iw, wireless-regdb, ' + d.getVar('WIRELESS_FIRMWARE_PACKAGE')) \
-	if d.getVar('INSTALL_WIRELESS_TOOLS') == '1' else ''}"
-
-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/
-}