[v3,5/5] docs: Update custom_kernel docs for split up of kernel scripts and tools

Message ID 20230816121423.3956608-6-stefan-koch@siemens.com
State Superseded, archived
Headers show
Series linux-custom: Split up binaries from kernel headers to kbuild packages | expand

Commit Message

Koch, Stefan Aug. 16, 2023, 12:14 p.m. UTC
Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
---
 doc/custom_kernel.md | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

Comments

Jan Kiszka Aug. 16, 2023, 1:46 p.m. UTC | #1
On 16.08.23 14:14, Koch, Stefan (DI PA DCP R&D 3) wrote:
> Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> ---
>  doc/custom_kernel.md | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md
> index 73987a5b..52e03b68 100644
> --- a/doc/custom_kernel.md
> +++ b/doc/custom_kernel.md
> @@ -38,12 +38,17 @@ The linux-custom recipe provides support for:
>   7. Allow the name of the kernel image to be changed via `KERNEL_FILE` (defaults
>      to `vmlinuz`)
>  
> - 8. Produce a `linux-headers` package which includes kernel headers and kbuild
> -    scripts/tools
> + 8. Produce a `linux-headers` package which includes kernel headers
>  
> - 9. The `linux-headers` package shall support native and cross compiles of
> -    out-of-tree kernel modules. However, when built in cross-compilation mode,
> -    it cannot be used on the target so far.
> + 9. Produce a `linux-kbuild` package for both `host` and/or `target` arch
> +    which includes kbuild scripts and tools.
> +    Setting `EXTENDED_KBUILD_MODE` to `"1"` will allow using the `-compat` and
> +    `-native` multiarch bitbake targets at cross building to run additional
> +    `target` or `host` specific builds.

Why does this need an extra control? And the semantic of that mode is
also by far not clear when looking at the variable name.

Jan

> +
> +    Then the `linux-headers` package supports native and cross compiles of
> +    out-of-tree kernel modules. Even, when built in cross-compilation mode,
> +    it can be used on the target using the `linux-kbuild` package.
>  
>   10. Produce a `linux-libc-dev` package to support user-land builds
>  
> @@ -72,8 +77,6 @@ In the future, the recipe may be extended to:
>  
>   3. Be compatible with Ubuntu
>  
> - 4. When cross-building, generate kernel-headers for both host and target
> -
>  ## Examples
>  
>  The linux-custom recipe is currently used by the linux-mainline package and is
Koch, Stefan Aug. 16, 2023, 2:25 p.m. UTC | #2
On Wed, 2023-08-16 at 15:46 +0200, Jan Kiszka wrote:
> On 16.08.23 14:14, Koch, Stefan (DI PA DCP R&D 3) wrote:
> > Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> > ---
> >  doc/custom_kernel.md | 17 ++++++++++-------
> >  1 file changed, 10 insertions(+), 7 deletions(-)
> > 
> > diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md
> > index 73987a5b..52e03b68 100644
> > --- a/doc/custom_kernel.md
> > +++ b/doc/custom_kernel.md
> > @@ -38,12 +38,17 @@ The linux-custom recipe provides support for:
> >   7. Allow the name of the kernel image to be changed via
> > `KERNEL_FILE` (defaults
> >      to `vmlinuz`)
> >  
> > - 8. Produce a `linux-headers` package which includes kernel
> > headers and kbuild
> > -    scripts/tools
> > + 8. Produce a `linux-headers` package which includes kernel
> > headers
> >  
> > - 9. The `linux-headers` package shall support native and cross
> > compiles of
> > -    out-of-tree kernel modules. However, when built in cross-
> > compilation mode,
> > -    it cannot be used on the target so far.
> > + 9. Produce a `linux-kbuild` package for both `host` and/or
> > `target` arch
> > +    which includes kbuild scripts and tools.
> > +    Setting `EXTENDED_KBUILD_MODE` to `"1"` will allow using the
> > `-compat` and
> > +    `-native` multiarch bitbake targets at cross building to run
> > additional
> > +    `target` or `host` specific builds.
> 
> Why does this need an extra control? And the semantic of that mode is
> also by far not clear when looking at the variable name.

Variable can be dropped and turned on by default.

> 
> Jan
> 
> > +
> > +    Then the `linux-headers` package supports native and cross
> > compiles of
> > +    out-of-tree kernel modules. Even, when built in cross-
> > compilation mode,
> > +    it can be used on the target using the `linux-kbuild` package.
> >  
> >   10. Produce a `linux-libc-dev` package to support user-land
> > builds
> >  
> > @@ -72,8 +77,6 @@ In the future, the recipe may be extended to:
> >  
> >   3. Be compatible with Ubuntu
> >  
> > - 4. When cross-building, generate kernel-headers for both host and
> > target
> > -
> >  ## Examples
> >  
> >  The linux-custom recipe is currently used by the linux-mainline
> > package and is
>
Jan Kiszka Aug. 16, 2023, 2:27 p.m. UTC | #3
On 16.08.23 16:25, Koch, Stefan (DI PA DCP R&D 3) wrote:
> On Wed, 2023-08-16 at 15:46 +0200, Jan Kiszka wrote:
>> On 16.08.23 14:14, Koch, Stefan (DI PA DCP R&D 3) wrote:
>>> Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
>>> ---
>>>  doc/custom_kernel.md | 17 ++++++++++-------
>>>  1 file changed, 10 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md
>>> index 73987a5b..52e03b68 100644
>>> --- a/doc/custom_kernel.md
>>> +++ b/doc/custom_kernel.md
>>> @@ -38,12 +38,17 @@ The linux-custom recipe provides support for:
>>>   7. Allow the name of the kernel image to be changed via
>>> `KERNEL_FILE` (defaults
>>>      to `vmlinuz`)
>>>  
>>> - 8. Produce a `linux-headers` package which includes kernel
>>> headers and kbuild
>>> -    scripts/tools
>>> + 8. Produce a `linux-headers` package which includes kernel
>>> headers
>>>  
>>> - 9. The `linux-headers` package shall support native and cross
>>> compiles of
>>> -    out-of-tree kernel modules. However, when built in cross-
>>> compilation mode,
>>> -    it cannot be used on the target so far.
>>> + 9. Produce a `linux-kbuild` package for both `host` and/or
>>> `target` arch
>>> +    which includes kbuild scripts and tools.
>>> +    Setting `EXTENDED_KBUILD_MODE` to `"1"` will allow using the
>>> `-compat` and
>>> +    `-native` multiarch bitbake targets at cross building to run
>>> additional
>>> +    `target` or `host` specific builds.
>>
>> Why does this need an extra control? And the semantic of that mode is
>> also by far not clear when looking at the variable name.
> 
> Variable can be dropped and turned on by default.

What would be different when building with EXTENDED_KBUILD_MODE="0"? The
kernel build be fully built for -native and -compat, right?

Jan
Koch, Stefan Aug. 18, 2023, 11:03 a.m. UTC | #4
On Wed, 2023-08-16 at 16:27 +0200, Jan Kiszka wrote:
> On 16.08.23 16:25, Koch, Stefan (DI PA DCP R&D 3) wrote:
> > On Wed, 2023-08-16 at 15:46 +0200, Jan Kiszka wrote:
> > > On 16.08.23 14:14, Koch, Stefan (DI PA DCP R&D 3) wrote:
> > > > Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> > > > ---
> > > >  doc/custom_kernel.md | 17 ++++++++++-------
> > > >  1 file changed, 10 insertions(+), 7 deletions(-)
> > > > 
> > > > diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md
> > > > index 73987a5b..52e03b68 100644
> > > > --- a/doc/custom_kernel.md
> > > > +++ b/doc/custom_kernel.md
> > > > @@ -38,12 +38,17 @@ The linux-custom recipe provides support
> > > > for:
> > > >   7. Allow the name of the kernel image to be changed via
> > > > `KERNEL_FILE` (defaults
> > > >      to `vmlinuz`)
> > > >  
> > > > - 8. Produce a `linux-headers` package which includes kernel
> > > > headers and kbuild
> > > > -    scripts/tools
> > > > + 8. Produce a `linux-headers` package which includes kernel
> > > > headers
> > > >  
> > > > - 9. The `linux-headers` package shall support native and cross
> > > > compiles of
> > > > -    out-of-tree kernel modules. However, when built in cross-
> > > > compilation mode,
> > > > -    it cannot be used on the target so far.
> > > > + 9. Produce a `linux-kbuild` package for both `host` and/or
> > > > `target` arch
> > > > +    which includes kbuild scripts and tools.
> > > > +    Setting `EXTENDED_KBUILD_MODE` to `"1"` will allow using
> > > > the
> > > > `-compat` and
> > > > +    `-native` multiarch bitbake targets at cross building to
> > > > run
> > > > additional
> > > > +    `target` or `host` specific builds.
> > > 
> > > Why does this need an extra control? And the semantic of that
> > > mode is
> > > also by far not clear when looking at the variable name.
> > 
> > Variable can be dropped and turned on by default.
> 
> What would be different when building with EXTENDED_KBUILD_MODE="0"?
> The
> kernel build be fully built for -native and -compat, right?

This is not set within linux-custom.inc, when it is 0:
d.setVar("ISAR_ENABLE_COMPAT_ARCH", "1")
d.setVar("COMPAT_DISTRO_ARCH", distro_arch)

The next patchset will set both variables by default.
Or should the user do it manually? -> Adding a hint to the docs.

> 
> Jan
>

Patch

diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md
index 73987a5b..52e03b68 100644
--- a/doc/custom_kernel.md
+++ b/doc/custom_kernel.md
@@ -38,12 +38,17 @@  The linux-custom recipe provides support for:
  7. Allow the name of the kernel image to be changed via `KERNEL_FILE` (defaults
     to `vmlinuz`)
 
- 8. Produce a `linux-headers` package which includes kernel headers and kbuild
-    scripts/tools
+ 8. Produce a `linux-headers` package which includes kernel headers
 
- 9. The `linux-headers` package shall support native and cross compiles of
-    out-of-tree kernel modules. However, when built in cross-compilation mode,
-    it cannot be used on the target so far.
+ 9. Produce a `linux-kbuild` package for both `host` and/or `target` arch
+    which includes kbuild scripts and tools.
+    Setting `EXTENDED_KBUILD_MODE` to `"1"` will allow using the `-compat` and
+    `-native` multiarch bitbake targets at cross building to run additional
+    `target` or `host` specific builds.
+
+    Then the `linux-headers` package supports native and cross compiles of
+    out-of-tree kernel modules. Even, when built in cross-compilation mode,
+    it can be used on the target using the `linux-kbuild` package.
 
  10. Produce a `linux-libc-dev` package to support user-land builds
 
@@ -72,8 +77,6 @@  In the future, the recipe may be extended to:
 
  3. Be compatible with Ubuntu
 
- 4. When cross-building, generate kernel-headers for both host and target
-
 ## Examples
 
 The linux-custom recipe is currently used by the linux-mainline package and is