From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6514350167115694080 X-Received: by 10.80.186.135 with SMTP id x7mr348680ede.0.1517308803548; Tue, 30 Jan 2018 02:40:03 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.80.169.98 with SMTP id m31ls1497962edc.0.gmail; Tue, 30 Jan 2018 02:40:02 -0800 (PST) X-Google-Smtp-Source: AH8x225rmXhKfxSrFX7FIqQGGv/Gq6A3vDJWBhWrnbwp2wtS+SYkdfhd6UnKjDr/L+84LRtBczpY X-Received: by 10.80.134.135 with SMTP id r7mr10780174eda.1.1517308802810; Tue, 30 Jan 2018 02:40:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517308802; cv=none; d=google.com; s=arc-20160816; b=N7HJvCXKhPPMC5P/i7sxTosY8+NEKvn+svGnuiw5Z5kHtDNQwCBjTQRYgTaWayhnm1 cUee7ynYS2Gp+Uot1/r8fSJRe+Jpjlm7gPSu6vp/Kbiu/8f5b+GHkucXBwcw1P/891o0 HkKdNJx+s+b9mm5+xwiAoc/PwR2KOzNngkKlZHcLmRxEfPA5LaYZ+pgLIaTwh0mr53DX ZJpd2GDM0YsO8Nz9wF4zQ5JEwVdDyASZRcKtGnjZfioEdRnuRJGgLMafg+iq4tAsQ4+h PozXmHt0E0GYKbS0mWxT3QMF7nRek8aNDG8SZZpp1jvK7Uk8JOT0IlyBi2JFuEHvufqT 9uqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=fqcBVWL/PanLYotDCmDLZNZ2arLdMWtBOkJw1o3teFk=; b=kL4oAfqDD5S7Y420n1tvaE/+R68TsjYhPmyRSiDwh0hPlAMw9W/ocnRaX0BAVWa47i axbavwZ8MKAblRkRS4Sndp4uyif1C4M0DVdF+FGH73VqbAOL4GNPSDt3XsB+6S6CE2Fr ESe5ZO3VamDAYNiLT2ndO90L2o9jLPqBnshtpehwgZBwJduu/7YFOk62TrwKZ+pTV+Sw Y1Ctka8+yaV/9Ce5Ce/RgzWGJMBt8njXp4n/CSIRAlAl9gso8OiXA1l0vM7ObpiJjzMo xFuMa39DE4x2qkIPJPMzLBpIEqqYi6g3QnDDWx51tZyF5GmqQ3N/9U2wopJiSk5EDHQK o2SA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id v28si1027785edd.3.2018.01.30.02.40.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2018 02:40:02 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w0UAe2W8010621 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 30 Jan 2018 11:40:02 +0100 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w0UAe2QI018855; Tue, 30 Jan 2018 11:40:02 +0100 Subject: Re: [PATCH v2] Install kernel via replaceable recipe To: Henning Schild Cc: isar-users References: <4ab8a0f9-9a34-0e20-bfe0-a447ffe134f6@siemens.com> <20180130113137.7fb21334@mmd1pvb1c.ad001.siemens.net> From: Jan Kiszka Message-ID: <3a165c9e-a9fb-9f48-9aca-4afba2a53fa1@siemens.com> Date: Tue, 30 Jan 2018 11:40:01 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <20180130113137.7fb21334@mmd1pvb1c.ad001.siemens.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: obF3aWX5M0V+ On 2018-01-30 11:31, Henning Schild wrote: > This one looks useful but i would like to see it in context with the > actual replacement kernel. > True. Spoiler: it works as designed. I'm just not yet done with getting the internals of that linux-custom.inc ready, but switching recipes via PREFERRED_PROVIDER_virtual/kernel works fine. > Am Tue, 30 Jan 2018 10:34:45 +0100 > schrieb "Jan Kiszka" : > >> From: Jan Kiszka >> >> This simplifies the common task of using a custom kernel instead of >> the pre-selected debian variant: Move the kernel installation into a >> dummy dpkg-raw recipe that only has the kernel package as dependency. >> >> Which recipe is used for providing the kernel can now be selected via >> the well-know PREFERRED_PROVIDER_virtual/kernel, just like in OE. >> >> The kernel package name is communicated from the target multiconfig >> file to the linux-debian recipe via the DEBIAN_KERNEL variable. >> >> Based on an idea of Henning Schild. > > Really ? I don't remember. Yours was at least the idea to use a meta package. > >> Signed-off-by: Jan Kiszka >> --- >> >> Changes in v2: >> - install kernel meta package from local repo, instead of trying to >> pre-install it from the upstream one >> (I swear I tested this and it worked, but I have no idea how it >> could...) >> >> meta-isar/conf/multiconfig/qemuamd64-jessie.conf | 2 +- >> meta-isar/conf/multiconfig/qemuamd64-stretch.conf | 3 ++- >> meta-isar/conf/multiconfig/qemuarm-jessie.conf | 2 +- >> meta-isar/conf/multiconfig/qemuarm-stretch.conf | 3 ++- >> meta-isar/conf/multiconfig/qemuarm-wheezy.conf | 2 +- >> meta-isar/conf/multiconfig/qemui386-jessie.conf | 2 +- >> meta-isar/conf/multiconfig/qemui386-stretch.conf | 3 ++- >> meta-isar/conf/multiconfig/rpi-jessie.conf | 3 ++- >> meta-isar/recipes-core/images/isar-image-base.bb | 7 ++++++- >> meta-isar/recipes-kernel/linux/linux-debian.bb | 12 ++++++++++++ >> 10 files changed, 30 insertions(+), 9 deletions(-) >> create mode 100644 meta-isar/recipes-kernel/linux/linux-debian.bb >> >> diff --git a/meta-isar/conf/multiconfig/qemuamd64-jessie.conf >> b/meta-isar/conf/multiconfig/qemuamd64-jessie.conf index >> 51d39b6..e49751f 100644 --- >> a/meta-isar/conf/multiconfig/qemuamd64-jessie.conf +++ >> b/meta-isar/conf/multiconfig/qemuamd64-jessie.conf @@ -6,7 +6,7 @@ >> MACHINE ?= "qemuamd64" DISTRO ?= "debian-jessie" >> DISTRO_ARCH ?= "amd64" >> >> -IMAGE_PREINSTALL += "linux-image-amd64" >> +DEBIAN_KERNEL ?= "linux-image-amd64" >> >> ROOTFS_DEV ?= "sda" >> >> diff --git a/meta-isar/conf/multiconfig/qemuamd64-stretch.conf >> b/meta-isar/conf/multiconfig/qemuamd64-stretch.conf index >> c59876a..f3dcd3a 100644 --- >> a/meta-isar/conf/multiconfig/qemuamd64-stretch.conf +++ >> b/meta-isar/conf/multiconfig/qemuamd64-stretch.conf @@ -8,9 +8,10 @@ >> DISTRO_ARCH ?= "amd64" >> IMAGE_PREINSTALL += " \ >> init \ >> - linux-image-amd64 \ >> " >> >> +DEBIAN_KERNEL ?= "linux-image-amd64" >> + >> ROOTFS_DEV ?= "sda" >> >> QEMU_ARCH ?= "x86_64" >> diff --git a/meta-isar/conf/multiconfig/qemuarm-jessie.conf >> b/meta-isar/conf/multiconfig/qemuarm-jessie.conf index >> ed84c6c..50a27f5 100644 --- >> a/meta-isar/conf/multiconfig/qemuarm-jessie.conf +++ >> b/meta-isar/conf/multiconfig/qemuarm-jessie.conf @@ -13,7 +13,7 @@ >> MACHINE ?= "qemuarm" DISTRO ?= "debian-jessie" >> DISTRO_ARCH ?= "armhf" >> >> -IMAGE_PREINSTALL += "linux-image-armmp" >> +DEBIAN_KERNEL ?= "linux-image-armmp" >> >> ROOTFS_DEV ?= "vda" >> >> diff --git a/meta-isar/conf/multiconfig/qemuarm-stretch.conf >> b/meta-isar/conf/multiconfig/qemuarm-stretch.conf index >> 1cce97a..9b99fb0 100644 --- >> a/meta-isar/conf/multiconfig/qemuarm-stretch.conf +++ >> b/meta-isar/conf/multiconfig/qemuarm-stretch.conf @@ -8,9 +8,10 @@ >> DISTRO_ARCH ?= "armhf" >> IMAGE_PREINSTALL += " \ >> init \ >> - linux-image-armmp \ >> " >> >> +DEBIAN_KERNEL ?= "linux-image-armmp" >> + >> ROOTFS_DEV ?= "vda" >> >> QEMU_ARCH ?= "arm" >> diff --git a/meta-isar/conf/multiconfig/qemuarm-wheezy.conf >> b/meta-isar/conf/multiconfig/qemuarm-wheezy.conf index >> 38ea191..ab163a2 100644 --- >> a/meta-isar/conf/multiconfig/qemuarm-wheezy.conf +++ >> b/meta-isar/conf/multiconfig/qemuarm-wheezy.conf @@ -13,7 +13,7 @@ >> MACHINE ?= "qemuarm" DISTRO ?= "debian-wheezy" >> DISTRO_ARCH ?= "armhf" >> >> -IMAGE_PREINSTALL += "linux-image-vexpress" >> +DEBIAN_KERNEL ?= "linux-image-vexpress" >> >> ROOTFS_DEV ?= "mmcblk0" >> >> diff --git a/meta-isar/conf/multiconfig/qemui386-jessie.conf >> b/meta-isar/conf/multiconfig/qemui386-jessie.conf index >> d589661..e3df61d 100644 --- >> a/meta-isar/conf/multiconfig/qemui386-jessie.conf +++ >> b/meta-isar/conf/multiconfig/qemui386-jessie.conf @@ -6,7 +6,7 @@ >> MACHINE ?= "qemui386" DISTRO ?= "debian-jessie" >> DISTRO_ARCH ?= "i386" >> >> -IMAGE_PREINSTALL += "linux-image-686-pae" >> +DEBIAN_KERNEL ?= "linux-image-686-pae" >> >> ROOTFS_DEV ?= "sda" >> >> diff --git a/meta-isar/conf/multiconfig/qemui386-stretch.conf >> b/meta-isar/conf/multiconfig/qemui386-stretch.conf index >> 40239e4..344783e 100644 --- >> a/meta-isar/conf/multiconfig/qemui386-stretch.conf +++ >> b/meta-isar/conf/multiconfig/qemui386-stretch.conf @@ -8,9 +8,10 @@ >> DISTRO_ARCH ?= "i386" >> IMAGE_PREINSTALL += " \ >> init \ >> - linux-image-686-pae \ >> " >> >> +DEBIAN_KERNEL ?= "linux-image-686-pae" >> + >> ROOTFS_DEV ?= "sda" >> >> QEMU_ARCH ?= "i386" >> diff --git a/meta-isar/conf/multiconfig/rpi-jessie.conf >> b/meta-isar/conf/multiconfig/rpi-jessie.conf index d1dd9d9..cfbeb3a >> 100644 --- a/meta-isar/conf/multiconfig/rpi-jessie.conf >> +++ b/meta-isar/conf/multiconfig/rpi-jessie.conf >> @@ -19,7 +19,6 @@ IMAGE_PREINSTALL += " \ >> iproute2 \ >> iputils-ping \ >> isc-dhcp-client \ >> - linux-image-rpi-rpfv \ >> lrzsz \ >> net-tools \ >> netcat-openbsd \ >> @@ -31,4 +30,6 @@ IMAGE_PREINSTALL += " \ >> vim \ >> " >> >> +DEBIAN_KERNEL ?= "linux-image-rpi-rpfv" >> + >> ROOTFS_DEV ?= "mmcblk0p2" >> diff --git a/meta-isar/recipes-core/images/isar-image-base.bb >> b/meta-isar/recipes-core/images/isar-image-base.bb index >> e359ac3..2f03cd1 100644 --- >> a/meta-isar/recipes-core/images/isar-image-base.bb +++ >> b/meta-isar/recipes-core/images/isar-image-base.bb @@ -18,12 +18,17 >> @@ PV = "1.0" >> inherit image >> >> -DEPENDS += "${IMAGE_INSTALL}" >> +PREFERRED_PROVIDER_virtual/kernel ?= "linux-debian" >> + >> +DEPENDS += "${IMAGE_INSTALL} \ >> + virtual/kernel" >> >> IMAGE_PREINSTALL += "apt \ >> dbus \ >> localepurge" >> >> +IMAGE_INSTALL += "${@d.getVar("PREFERRED_PROVIDER_virtual/kernel", >> True)}" + >> WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}" >> >> do_rootfs[dirs] = "${WORKDIR}/hooks_multistrap" >> diff --git a/meta-isar/recipes-kernel/linux/linux-debian.bb >> b/meta-isar/recipes-kernel/linux/linux-debian.bb new file mode 100644 >> index 0000000..21d20c2 >> --- /dev/null >> +++ b/meta-isar/recipes-kernel/linux/linux-debian.bb >> @@ -0,0 +1,12 @@ >> +# Debian kernel pseudo package >> +# >> +# This software is a part of ISAR. >> +# Copyright (c) Siemens AG, 2018 >> + >> +DESCRIPTION = "Prebuilt Debian kernel" >> +MAINTAINER = "ISAR project" > > Please include an email address here. > > https://www.debian.org/doc/debian-policy/#s-f-maintainer Pseudo email or the isar mailing list? Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux