From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6514350167115694080 X-Received: by 10.80.242.130 with SMTP id f2mr10825254edm.5.1517308280123; Tue, 30 Jan 2018 02:31:20 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.80.204.215 with SMTP id b23ls1471291edj.8.gmail; Tue, 30 Jan 2018 02:31:19 -0800 (PST) X-Google-Smtp-Source: AH8x2241DdmdCYxMrBPHYgDGoEFXWfxJvR29pTqlW84vQ8TpRVLKdj4Sf8HFTCeLzeALl8NrgG+t X-Received: by 10.80.146.139 with SMTP id k11mr10810237eda.4.1517308279429; Tue, 30 Jan 2018 02:31:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517308279; cv=none; d=google.com; s=arc-20160816; b=LBTkDpHWbtJqtlHjTWM7bbkp6Tp1sdqEgEKBpwnKVBWnuID6jYfHn8h/lHG4qSuzCd 7+btfnjSrkst0SN5YnSG/lv6hJislTgecA4fGpM4HL1WTihAJOQNpTWoPaqD9lZ2ASN+ RvZiJLyPgrx7mao91bt+ZuhObjd/EtaE/ELsTbYWCpZH0VhojJtI5aQPmjOVkG6MM22L 7TBYg5B6p0J+Er7RBJzOREeeDLQY+ZLtU6718LRLYTQMIMrFrxLcfwYzyPDnHoGRoavo DdjFBc/B34PgKSnTa8D3ciJmpSmUD5+tWkGZwDUnsjoIT+LBInueFlrb+LwbKsrrceou NgxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=6wvbSqy7GRsPGyEep2MZk11NhqSGBEio8qp8uGhPIy4=; b=hPWZt8NetFzosbeXSv+BxemcMOf8g+jbkh5vMcNZVQL5b+feDJvf6U0yWKXC3FbfHn hc/f+bw6IWFWibKvOTjNGZ4qI8cGMD+ejie1C+t4FQ6JCJrn8LZPkz78/VDf7zpFx2CW sA4IpDPo5AdnWxxKJ3CM47gWKskOYIy1TRr2hJzZeC+Rmz5za4IU2Wyv4Tsi33qVpmjY XL6fGqaKobneQJn4U9n6InAl8FQnrnrU67UUwjO+TzcZxKUBvIWROCyLkawTmc4JTTJf JcYxJ2bbJgKTaa1N/Gyg7P3BwasXrUUA19qng5grzzp8GOBMrpXLP2y+DGd5ZGpAl6CA MlLQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id m19si1453453edd.4.2018.01.30.02.31.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2018 02:31:19 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w0UAVIkj009628 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 30 Jan 2018 11:31:18 +0100 Received: from mmd1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40] (may be forged)) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id w0UAVIWH019488; Tue, 30 Jan 2018 11:31:18 +0100 Date: Tue, 30 Jan 2018 11:31:37 +0100 From: Henning Schild To: "Jan Kiszka" Cc: isar-users Subject: Re: [PATCH v2] Install kernel via replaceable recipe Message-ID: <20180130113137.7fb21334@mmd1pvb1c.ad001.siemens.net> In-Reply-To: <4ab8a0f9-9a34-0e20-bfe0-a447ffe134f6@siemens.com> References: <4ab8a0f9-9a34-0e20-bfe0-a447ffe134f6@siemens.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: aeMZKYrJ3DTQ This one looks useful but i would like to see it in context with the actual replacement kernel. 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. > 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 Henning > +PROVIDES = "virtual/kernel" > + > +DEBIAN_DEPENDS = "${DEBIAN_KERNEL}" > + > +inherit dpkg-raw