From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6514350167115694080 X-Received: by 10.80.201.74 with SMTP id p10mr10877428edh.7.1517311502264; Tue, 30 Jan 2018 03:25:02 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.80.169.98 with SMTP id m31ls1545645edc.0.gmail; Tue, 30 Jan 2018 03:25:01 -0800 (PST) X-Google-Smtp-Source: AH8x225czJ6B0Aop3ch8SqG9pc8HPKyt2beb9yjBv7ijDVnhDE6xjXOin40A72bYXAO7ZTVwQ5Oo X-Received: by 10.80.201.74 with SMTP id p10mr10877417edh.7.1517311501707; Tue, 30 Jan 2018 03:25:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517311501; cv=none; d=google.com; s=arc-20160816; b=bPCybcW2ROGCOXdTBMetYZhiWwMFOamcZus+9aValZ0OWPQsUJ2SLSYARKu55tVIbt K9U9QFgc0wW+BeJZr2d+sJFpw7EISFwL0Js9Y2Ijl00loITSl1dlzNbZDYWcsObFOkcy YGQH00+cuMfP6jxWrjN57epLYeTcU1ZKopr5a0oUSKEzcha7lXP9wOWusPMSO2RkZdiS sPbGotR2lZ2mlz/pUrwzOi9DrPRy6kPvIp6OM/zjpkd0Vdi0J5irQ+NjpiJcU2DvseIv BJamxCPmc3ddJvhGbn0OBRhfyXGsvr0SfcpiC6FbuNpeRoS1AFu9guPt8osPxAbHlxdA YXEw== 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:to:subject :arc-authentication-results; bh=/GPb923igsP1LSbyIr4LKCzlOb6OlF4GTA0Af410VpQ=; b=SD65/C9lb/h/BoVTuyo0E93j1arVdQ6TwvtqU83efxhtE6+7MFQJ78yQ1DMQVFjao4 7IiOftxTjPyw4Bh/BjiIGBUZrMTWcQyDVPR35mUMW6lB1bZtyRF0vfTNo7xAaHAyEQ9E NFGNtd7z1TcWa392m7JQIZkQjBl/bvHTLh/F4tA3ImWpqGBJznqoaZABU1LFBxLwMeZR Rp4QRE5VUKIsw+I/2hudzl/lrfoULkW/l8SVsamJnImPNGlihXDuhaX5iZidxYPIYHWD iWGbwNg2Y75p0nXf2FRv/9RHE+ppK8creGwOkMdF3PYc0glcgiPrPbVoyIrypau7qvHl l+Ag== 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 m19si1467336edd.4.2018.01.30.03.25.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2018 03:25:01 -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 mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w0UBP1LL002405 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Jan 2018 12:25:01 +0100 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id w0UBP0R6004910; Tue, 30 Jan 2018 12:25:01 +0100 Subject: Re: [PATCH v2] Install kernel via replaceable recipe To: Alexander Smirnov , isar-users References: <4ab8a0f9-9a34-0e20-bfe0-a447ffe134f6@siemens.com> <70d3096b-ecb4-ab4c-5361-f63b80961c32@siemens.com> <978b75b5-b6ae-6d2d-3589-0515cba06ba3@ilbers.de> From: Jan Kiszka Message-ID: <698f0c31-02ee-1682-4b34-29d26684f1f0@siemens.com> Date: Tue, 30 Jan 2018 12:25:00 +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: <978b75b5-b6ae-6d2d-3589-0515cba06ba3@ilbers.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: Iadi+xSVDEqD On 2018-01-30 12:06, Alexander Smirnov wrote: > On 01/30/2018 01:52 PM, Jan Kiszka wrote: >> On 2018-01-30 11:49, Alexander Smirnov wrote: >>> On 01/30/2018 12:34 PM, Jan Kiszka wrote: >>>> 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. >>> >>> Why it's Debian kernel? This could be a bit confusing, Isar doesn'y >>> support only official Debian kernel. For example Isar already supports >>> Raspbian which contains its own Raspbian kernel. >> >> I'm always open for better name proposals. > > So, if no reasons, I'd propose: >  - KERNEL_PACKAGE >  - KERNEL_PACKAGE_NAME > > > [...] > > >>>> +inherit dpkg-raw >>> >>> Do I understand correctly, that this recipe creates fake package that >>> has dependency from the upstream kernel? So in target rootfs 2 kernel >>> packages will be installed? >> >> Right, one empty linux-debian meta package and the real one. The former >> allows us to trivially kick out the latter in favor of a custom kernel. >> > > What is the benefit of this complexity? It's not complexity, it's simplification and cleanup over the current hard-coding approach. > If we need to have over-writable > kernel name, it would be enough to pass current DEBIAN_KERNEL variable > directly to IMAGE_INSTALL. The same result, but no extra recipe in Isar > tree and no pseudo package in target rootfs. There are several disadvantages with your approach: - you need to encode the concrete package name instead of just defining an abstracting provider - you need the same thing for linux-headers (which I'm currently very interested in as I need to build against the kernel) - it deviates from the bitbake pattern of PREFERRED_PROVIDER Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux