From: Jan Kiszka <jan.kiszka@siemens.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v2 5/8] Provide include file for easy custom kernel builds
Date: Sun, 11 Feb 2018 16:16:21 +0100 [thread overview]
Message-ID: <72c70fcb-a3a0-97b7-6ee1-51545923075e@siemens.com> (raw)
In-Reply-To: <20180209200415.19dd80a4@mmd1pvb1c.ad001.siemens.net>
On 2018-02-09 20:04, Henning Schild wrote:
> Am Fri, 9 Feb 2018 18:54:12 +0100
> schrieb Jan Kiszka <jan.kiszka@siemens.com>:
>
>> On 2018-02-09 18:30, Henning Schild wrote:
>>> Am Thu, 8 Feb 2018 18:22:56 +0100
>>> schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:
>>>
>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>> 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 <jan.kiszka@siemens.com>
>>>> ---
>>>> 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
next prev parent reply other threads:[~2018-02-11 15:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 17:22 [PATCH v2 0/8] Provide infrastructure and examples for custom kernels and modules Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 1/8] Forward proxy settings to dpkg build Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 2/8] Prioritize isar-apt repo over all others Jan Kiszka
2018-02-09 16:46 ` Henning Schild
2018-02-09 16:52 ` Jan Kiszka
2018-02-09 17:15 ` Henning Schild
2018-02-08 17:22 ` [PATCH v2 3/8] Replace SRC_DIR with S Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 4/8] Install kernel via replaceable recipe Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 5/8] Provide include file for easy custom kernel builds Jan Kiszka
2018-02-09 16:59 ` Henning Schild
2018-02-09 17:24 ` Jan Kiszka
2018-02-09 17:31 ` Henning Schild
2018-02-09 17:30 ` Henning Schild
2018-02-09 17:54 ` Jan Kiszka
2018-02-09 19:04 ` Henning Schild
2018-02-11 15:16 ` Jan Kiszka [this message]
2018-02-09 17:57 ` [PATCH v3 " Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 6/8] Add custom kernel examples Jan Kiszka
2018-02-09 17:01 ` Henning Schild
2018-02-08 17:22 ` [PATCH v2 7/8] Provide include file for easy custom module builds Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 8/8] Add exemplary kernel module Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=72c70fcb-a3a0-97b7-6ee1-51545923075e@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox