From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6520199916203016192 X-Received: by 10.80.189.195 with SMTP id z3mr520126edh.8.1518362183355; Sun, 11 Feb 2018 07:16:23 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.80.185.67 with SMTP id m61ls5406265ede.4.gmail; Sun, 11 Feb 2018 07:16:22 -0800 (PST) X-Google-Smtp-Source: AH8x224PH6RDOsyEBCGUWy4WRlJH6J69qYBOdbpkkFQxAXSito3q8lWFDI9qV891X6bxzaJxDz7F X-Received: by 10.80.186.135 with SMTP id x7mr2390734ede.0.1518362182588; Sun, 11 Feb 2018 07:16:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518362182; cv=none; d=google.com; s=arc-20160816; b=TOHIpY4EjjZwVOUcHFArix7b3C8UvYyhe22nq560amaN6JJU7aFW6aCpbAPYXaOIaw wijLPR6x76ChWi6a0EdKHaYsZ7sxsw4jK958BKgkjoUmC+9Uym6a5kNrU0S1XQjU1hM6 rBc+ojBlx/KslkcJwzkTBuiOwj7YCmvy3E2vjppn+W2D45UXQlFlNYbj/J/bn9wJA3XW HMr3GYl4i1rj4ZwUCkPGI9NmH0WLa9nd+WzMwybHKqCIEXXHm8GyxYA/Yzd7+xDZ1kyL bnVS7v0BvsxiYlqPB9cMEkkMm2moConBsy6YV6BSFNR3W3+Ookh0qmujY1UUOUSIl6uu vC5g== 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=Toux/oDHFCUDDVKyLmCbUlR63p5Q5aKqiErkqYq3kCI=; b=TS46CALfSplZgh1X59EJNcaXaQMOPS+qSmYoMMQhYDc/lJLWoS+3snvRWw0WrnDuIF r094CYcomAWGnwPhjO+d3CIwzFuk4bsy58CRobjnj7WMBVKa4xLwyuS+UX89aL0JcC9s UlC2xg6mzVs6pGNYjwdEzZt9C2BlWMEAC1rssEKaJBOC8Ec4QO+7Ot9jHUbTnuaAUiD9 7h6wszmzi403T5jvMYyQoifXYQfO1WTEE/6cYPRJHYlSm7AyVnQ1OCa8vFfdciuFq4kY EyHo2VlPQYTU3koQNsYE2uzWuNb3MHkgCIG1bYXhQ1jeEsf0AcWl1sLmvExMsF2tupgu RQRw== 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 t4si426389edt.2.2018.02.11.07.16.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Feb 2018 07:16:22 -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 w1BFGLvX000962 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 11 Feb 2018 16:16:22 +0100 Received: from [167.87.32.7] ([167.87.32.7]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w1BFGLGV007171; Sun, 11 Feb 2018 16:16:21 +0100 Subject: Re: [PATCH v2 5/8] Provide include file for easy custom kernel builds To: Henning Schild Cc: isar-users References: <8ee0db162e27f31b64bc17eaf00d24f7b488806e.1518110579.git.jan.kiszka@siemens.com> <20180209183039.537f17d6@mmd1pvb1c.ad001.siemens.net> <20180209200415.19dd80a4@mmd1pvb1c.ad001.siemens.net> From: Jan Kiszka Message-ID: <72c70fcb-a3a0-97b7-6ee1-51545923075e@siemens.com> Date: Sun, 11 Feb 2018 16:16:21 +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: <20180209200415.19dd80a4@mmd1pvb1c.ad001.siemens.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: rpArUeLMqqQS On 2018-02-09 20:04, Henning Schild wrote: > Am Fri, 9 Feb 2018 18:54:12 +0100 > schrieb Jan Kiszka : > >> On 2018-02-09 18:30, Henning Schild wrote: >>> Am Thu, 8 Feb 2018 18:22:56 +0100 >>> schrieb "[ext] Jan Kiszka" : >>> >>>> From: Jan Kiszka >>>> >>>> With this include file, it becomes almost trivial to replace the >>>> distro kernel with a custom build. You just need to include >>>> linux-custom.inc, specify the source URI, define via S where the >>>> source is unpacked to and provide a defconfig. To switch to a >>>> custom kernel recipe, PREFERRED_PROVIDER_virtual/kernel has to be >>>> adjusted in local.conf or the distro conf. >>>> >>>> The approach works internally by first running "make deb-pkg" on >>>> the kernel and the repackages the output to make the binary >>>> linux-image and linux-header debs act as replacement of their >>>> distro packages. This results in a suboptimal technical >>>> implementation which may eventually be replaced by an >>>> isar-implemented deb-pkg build process. However, this is not >>>> expected to affect the user-visible interface of this include file. >>>> >>>> Signed-off-by: Jan Kiszka >>>> --- >>>> meta/recipes-kernel/linux/linux-custom.inc | 98 >>>> ++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) >>>> create mode 100644 meta/recipes-kernel/linux/linux-custom.inc >>>> >>>> diff --git a/meta/recipes-kernel/linux/linux-custom.inc >>>> b/meta/recipes-kernel/linux/linux-custom.inc new file mode 100644 >>>> index 0000000..feb96a1 >>>> --- /dev/null >>>> +++ b/meta/recipes-kernel/linux/linux-custom.inc >>>> @@ -0,0 +1,98 @@ >>>> +# Custom kernel recipe include >>>> +# >>>> +# This software is a part of ISAR. >>>> +# Copyright (c) Siemens AG, 2018 >>>> +# >>>> +# SPDX-License-Identifier: MIT >>>> + >>>> +DESCRIPTION ?= "Custom kernel" >>>> +PROVIDES = "virtual/kernel" >>>> + >>>> +inherit dpkg-base >>>> + >>>> +KERNEL_DEBIAN_DEPENDS = "initramfs-tools | linux-initramfs-tool, >>>> kmod, linux-base (>= 4.3~)" +KERNEL_HEADERS_DEBIAN_DEPENDS = >>>> "libc6, libssl1.1, gcc" +KBUILD_DEPENDS = "libssl-dev libelf-dev >>>> bc" >>> >>> These guys and the repacking are here because someone wrote a >>> build-script that does not allow customization, how about not >>> repeating that mistake and using "?=". >> >> As this is an include, you can already easily adjust after including. >> Granted, defining those as default assignment would permit >> project-wide overrides in local.conf & Co. OK, will send v3. > > Maybe i missed that so far, but could you explain why this is an > include and not a bbclass. Not that i prefer one over the other but so > far we do not seem to use .incs in Isar. I have no preference either. When I started this, I looked at linux-yocto, and that was an include at the top level. If you dig deeper, there are also kernel classes in OE. I still have a hard time finding differences between both extension methods. The only difference I see right now is that "inherit linux-kernel" would be shorter than "require recipes-kernel/linux/linux-custom.inc"... Anyway, I've remodeled this as class and will send out v3 soon. The module should stay an include as it comes with additional files. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux