All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] deb-pkg: generate correct build dependencies
@ 2018-12-13  8:07 riku.voipio
  2018-12-13 10:47 ` Masahiro Yamada
  2018-12-21  7:47 ` Manivannan Sadhasivam
  0 siblings, 2 replies; 5+ messages in thread
From: riku.voipio @ 2018-12-13  8:07 UTC (permalink / raw)
  To: linux-kbuild
  Cc: yamada.masahiro, manivannan.sadhasivam, debian-kernel, Riku Voipio

From: Riku Voipio <riku.voipio@linaro.org>

bison/flex is now needed always for building since genksyms is always
generated. Some build dependencies depend on kernel configuration,
enable them as needed:

- libelf-dev when UNWINDER_ORC is set
- libssl-dev for SYSTEM_TRUSTED_KEYRING

Since the libssl-dev is needed for extract_cert binary, denote with
:native to install the libssl-dev for the build machines architecture,
rather than for the architecture of the kernel being built.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 scripts/package/mkdebian | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index edcad61fe3cd..c858abf4569e 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -134,6 +134,8 @@ fi
 
 mkdir -p debian/
 echo $debarch > debian/arch
+extra_build_depends=", $(if_enabled_echo UNWINDER_ORC libelf-dev)"
+extra_build_depends="$extra_build_depends, $(if_enabled_echo SYSTEM_TRUSTED_KEYRING libssl-dev:native)"
 
 # Generate a simple changelog template
 cat <<EOF > debian/changelog
@@ -170,7 +172,7 @@ Source: $sourcename
 Section: kernel
 Priority: optional
 Maintainer: $maintainer
-Build-Depends: bc, kmod, cpio
+Build-Depends: bc, kmod, cpio, bison, flex $extra_build_depends
 Homepage: http://www.kernel.org/
 
 Package: $packagename
-- 
2.19.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] deb-pkg: generate correct build dependencies
  2018-12-13  8:07 [PATCH] deb-pkg: generate correct build dependencies riku.voipio
@ 2018-12-13 10:47 ` Masahiro Yamada
  2018-12-21  7:47 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2018-12-13 10:47 UTC (permalink / raw)
  To: Riku Voipio
  Cc: Linux Kbuild mailing list, manivannan.sadhasivam, debian-kernel

On Thu, Dec 13, 2018 at 5:07 PM <riku.voipio@linaro.org> wrote:
>
> From: Riku Voipio <riku.voipio@linaro.org>


The code looks good to me.

Just a comment about the commit log.


> bison/flex is now needed always for building since genksyms is always
> generated.

I do not think this is true.

genksyms is built when CONFIG_MODVERSIONS=y
(See scripts/Makefile)

Rather, bison/flex is always needed for kconfig.





> Some build dependencies depend on kernel configuration,
> enable them as needed:
>
> - libelf-dev when UNWINDER_ORC is set
> - libssl-dev for SYSTEM_TRUSTED_KEYRING
>
> Since the libssl-dev is needed for extract_cert binary, denote with
> :native to install the libssl-dev for the build machines architecture,
> rather than for the architecture of the kernel being built.
>
> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
> ---
>  scripts/package/mkdebian | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> index edcad61fe3cd..c858abf4569e 100755
> --- a/scripts/package/mkdebian
> +++ b/scripts/package/mkdebian
> @@ -134,6 +134,8 @@ fi
>
>  mkdir -p debian/
>  echo $debarch > debian/arch
> +extra_build_depends=", $(if_enabled_echo UNWINDER_ORC libelf-dev)"
> +extra_build_depends="$extra_build_depends, $(if_enabled_echo SYSTEM_TRUSTED_KEYRING libssl-dev:native)"
>
>  # Generate a simple changelog template
>  cat <<EOF > debian/changelog
> @@ -170,7 +172,7 @@ Source: $sourcename
>  Section: kernel
>  Priority: optional
>  Maintainer: $maintainer
> -Build-Depends: bc, kmod, cpio
> +Build-Depends: bc, kmod, cpio, bison, flex $extra_build_depends
>  Homepage: http://www.kernel.org/
>
>  Package: $packagename
> --
> 2.19.2
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] deb-pkg: generate correct build dependencies
  2018-12-13  8:07 [PATCH] deb-pkg: generate correct build dependencies riku.voipio
  2018-12-13 10:47 ` Masahiro Yamada
@ 2018-12-21  7:47 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2018-12-21  7:47 UTC (permalink / raw)
  To: riku.voipio; +Cc: linux-kbuild, yamada.masahiro, debian-kernel

On Thu, Dec 13, 2018 at 10:07:11AM +0200, riku.voipio@linaro.org wrote:
> From: Riku Voipio <riku.voipio@linaro.org>
> 
> bison/flex is now needed always for building since genksyms is always
> generated. Some build dependencies depend on kernel configuration,
> enable them as needed:
> 
> - libelf-dev when UNWINDER_ORC is set
> - libssl-dev for SYSTEM_TRUSTED_KEYRING
> 
> Since the libssl-dev is needed for extract_cert binary, denote with
> :native to install the libssl-dev for the build machines architecture,
> rather than for the architecture of the kernel being built.
> 
> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>

Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Regards,
Mani

> ---
>  scripts/package/mkdebian | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> index edcad61fe3cd..c858abf4569e 100755
> --- a/scripts/package/mkdebian
> +++ b/scripts/package/mkdebian
> @@ -134,6 +134,8 @@ fi
>  
>  mkdir -p debian/
>  echo $debarch > debian/arch
> +extra_build_depends=", $(if_enabled_echo UNWINDER_ORC libelf-dev)"
> +extra_build_depends="$extra_build_depends, $(if_enabled_echo SYSTEM_TRUSTED_KEYRING libssl-dev:native)"
>  
>  # Generate a simple changelog template
>  cat <<EOF > debian/changelog
> @@ -170,7 +172,7 @@ Source: $sourcename
>  Section: kernel
>  Priority: optional
>  Maintainer: $maintainer
> -Build-Depends: bc, kmod, cpio
> +Build-Depends: bc, kmod, cpio, bison, flex $extra_build_depends
>  Homepage: http://www.kernel.org/
>  
>  Package: $packagename
> -- 
> 2.19.2
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] deb-pkg: generate correct build dependencies
  2019-03-12 17:23 Masahiro Yamada
@ 2019-03-13 17:43 ` Masahiro Yamada
  0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2019-03-13 17:43 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Ben Hutchings, Riku Voipio, Michal Marek, Linux Kernel Mailing List

On Wed, Mar 13, 2019 at 2:24 AM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> From: Riku Voipio <riku.voipio@linaro.org>
>
> bison/flex is now needed always for building for kconfig. Some build
> dependencies depend on kernel configuration, enable them as needed:
>
> - libelf-dev when UNWINDER_ORC is set
> - libssl-dev for SYSTEM_TRUSTED_KEYRING
>
> Since the libssl-dev is needed for extract_cert binary, denote with
> :native to install the libssl-dev for the build machines architecture,
> rather than for the architecture of the kernel being built.
>
> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
> Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
> Acked-by: maximilian attems <maks@stro.at>
> [masahiro.yamada: add change 'flex' to 'flex | flex:native' ]
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>


Applied to linux-kbuild.


> Hi Riku,
>
> I did not get your update, but anyway I changed
> 'flex' to 'flex | flex:native'.
>
> With this change, now I am able to cross-compile deb-pkg.
>
>
>  scripts/package/mkdebian | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> index f030961..110cd8d 100755
> --- a/scripts/package/mkdebian
> +++ b/scripts/package/mkdebian
> @@ -134,6 +134,8 @@ fi
>
>  mkdir -p debian/
>  echo $debarch > debian/arch
> +extra_build_depends=", $(if_enabled_echo UNWINDER_ORC libelf-dev)"
> +extra_build_depends="$extra_build_depends, $(if_enabled_echo SYSTEM_TRUSTED_KEYRING libssl-dev:native)"
>
>  # Generate a simple changelog template
>  cat <<EOF > debian/changelog
> @@ -170,7 +172,7 @@ Source: $sourcename
>  Section: kernel
>  Priority: optional
>  Maintainer: $maintainer
> -Build-Depends: bc, kmod, cpio
> +Build-Depends: bc, kmod, cpio, bison, flex | flex:native $extra_build_depends
>  Homepage: http://www.kernel.org/
>
>  Package: $packagename
> --
> 2.7.4
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] deb-pkg: generate correct build dependencies
@ 2019-03-12 17:23 Masahiro Yamada
  2019-03-13 17:43 ` Masahiro Yamada
  0 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2019-03-12 17:23 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Ben Hutchings, Riku Voipio, Masahiro Yamada, Michal Marek, linux-kernel

From: Riku Voipio <riku.voipio@linaro.org>

bison/flex is now needed always for building for kconfig. Some build
dependencies depend on kernel configuration, enable them as needed:

- libelf-dev when UNWINDER_ORC is set
- libssl-dev for SYSTEM_TRUSTED_KEYRING

Since the libssl-dev is needed for extract_cert binary, denote with
:native to install the libssl-dev for the build machines architecture,
rather than for the architecture of the kernel being built.

Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: maximilian attems <maks@stro.at>
[masahiro.yamada: add change 'flex' to 'flex | flex:native' ]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Hi Riku,

I did not get your update, but anyway I changed
'flex' to 'flex | flex:native'.

With this change, now I am able to cross-compile deb-pkg.


 scripts/package/mkdebian | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index f030961..110cd8d 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -134,6 +134,8 @@ fi
 
 mkdir -p debian/
 echo $debarch > debian/arch
+extra_build_depends=", $(if_enabled_echo UNWINDER_ORC libelf-dev)"
+extra_build_depends="$extra_build_depends, $(if_enabled_echo SYSTEM_TRUSTED_KEYRING libssl-dev:native)"
 
 # Generate a simple changelog template
 cat <<EOF > debian/changelog
@@ -170,7 +172,7 @@ Source: $sourcename
 Section: kernel
 Priority: optional
 Maintainer: $maintainer
-Build-Depends: bc, kmod, cpio
+Build-Depends: bc, kmod, cpio, bison, flex | flex:native $extra_build_depends
 Homepage: http://www.kernel.org/
 
 Package: $packagename
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-13 17:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13  8:07 [PATCH] deb-pkg: generate correct build dependencies riku.voipio
2018-12-13 10:47 ` Masahiro Yamada
2018-12-21  7:47 ` Manivannan Sadhasivam
2019-03-12 17:23 Masahiro Yamada
2019-03-13 17:43 ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.