All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: fix scripts/headers.sh to see the correct Kbuild path
@ 2014-12-03  6:52 Masahiro Yamada
  2014-12-08 21:58 ` Paul Bolle
  2015-01-13  5:24 ` Masahiro Yamada
  0 siblings, 2 replies; 5+ messages in thread
From: Masahiro Yamada @ 2014-12-03  6:52 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, linux-kernel

The exported headers were moved to "uapi" directories.
We should check the existence of arch/*/include/uapi/asm/Kbuild.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 scripts/headers.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/headers.sh b/scripts/headers.sh
index 95ece06..b164336 100755
--- a/scripts/headers.sh
+++ b/scripts/headers.sh
@@ -6,7 +6,7 @@ set -e
 
 do_command()
 {
-	if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
+	if [ -f ${srctree}/arch/$2/include/uapi/asm/Kbuild ]; then
 		make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
 	else
 		printf "Ignoring arch: %s\n" ${arch}
-- 
1.9.1


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

* Re: [PATCH] kbuild: fix scripts/headers.sh to see the correct Kbuild path
  2014-12-03  6:52 [PATCH] kbuild: fix scripts/headers.sh to see the correct Kbuild path Masahiro Yamada
@ 2014-12-08 21:58 ` Paul Bolle
  2014-12-11  1:41   ` Masahiro Yamada
  2015-01-13  5:24 ` Masahiro Yamada
  1 sibling, 1 reply; 5+ messages in thread
From: Paul Bolle @ 2014-12-08 21:58 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: linux-kbuild, linux-kernel

Masahiro,

On Wed, 2014-12-03 at 15:52 +0900, Masahiro Yamada wrote:
> The exported headers were moved to "uapi" directories.
> We should check the existence of arch/*/include/uapi/asm/Kbuild.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> ---

Does this patch fix any problems? If so, which? And why did no one
notice these problems before? Perhaps the commit explanation could
mention that.

See, none of this is obvious, at least to me, and I don't think people
reading the patch should be expected to figure this out themselves.

>  scripts/headers.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/headers.sh b/scripts/headers.sh
> index 95ece06..b164336 100755
> --- a/scripts/headers.sh
> +++ b/scripts/headers.sh
> @@ -6,7 +6,7 @@ set -e
>  
>  do_command()
>  {
> -	if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
> +	if [ -f ${srctree}/arch/$2/include/uapi/asm/Kbuild ]; then
>  		make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
>  	else
>  		printf "Ignoring arch: %s\n" ${arch}

Thanks,


Paul Bolle


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

* Re: [PATCH] kbuild: fix scripts/headers.sh to see the correct Kbuild path
  2014-12-08 21:58 ` Paul Bolle
@ 2014-12-11  1:41   ` Masahiro Yamada
  0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2014-12-11  1:41 UTC (permalink / raw)
  To: Paul Bolle; +Cc: linux-kbuild, linux-kernel

Hi Paul,


On Mon, 08 Dec 2014 22:58:33 +0100
Paul Bolle <pebolle@tiscali.nl> wrote:

> Masahiro,
> 
> On Wed, 2014-12-03 at 15:52 +0900, Masahiro Yamada wrote:
> > The exported headers were moved to "uapi" directories.
> > We should check the existence of arch/*/include/uapi/asm/Kbuild.
> > 
> > Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> > ---
> 
> Does this patch fix any problems? If so, which?


I am fixing a wrong code.

Actually, the "um" architecture does not support headers install.

 arch/um/include/asm/Kbuild exists
 arch/um/include/uapi/asm/Kbuild does not exist

Checking arch/*/include/asm/Kbuild does not work.


Moreover, the top Makefile is checking  arch/*/include/uapi/asm/Kbuild


headers_install: __headers
        $(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \
          $(error Headers not exportable for the $(SRCARCH) architecture))





> And why did no one
> notice these problems before? Perhaps the commit explanation could
> mention that.


You will notice the code below:

for arch in ${archs}; do
        case ${arch} in
        um)        # no userspace export
                ;;


"um" has already been omitted and it never reaches do_command().
That is why nobody has noticed this issue.

Uh, OK, we do not need double-checking.




Best Regards
Masahiro Yamada


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

* Re: [PATCH] kbuild: fix scripts/headers.sh to see the correct Kbuild path
  2014-12-03  6:52 [PATCH] kbuild: fix scripts/headers.sh to see the correct Kbuild path Masahiro Yamada
  2014-12-08 21:58 ` Paul Bolle
@ 2015-01-13  5:24 ` Masahiro Yamada
  2015-01-17 21:41   ` Sam Ravnborg
  1 sibling, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2015-01-13  5:24 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kbuild, linux-kernel, Michal Marek

Hi Sam,

IIRC, you mentioned scripts/headers.sh is pointless
and should be removed from the code base.

If so, this patch of mine has no point.
Could you consider removing scripts/headers.sh ?


Best Regards
Masahiro Yamada



On Wed,  3 Dec 2014 15:52:15 +0900
Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:

> The exported headers were moved to "uapi" directories.
> We should check the existence of arch/*/include/uapi/asm/Kbuild.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> ---
> 
>  scripts/headers.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/headers.sh b/scripts/headers.sh
> index 95ece06..b164336 100755
> --- a/scripts/headers.sh
> +++ b/scripts/headers.sh
> @@ -6,7 +6,7 @@ set -e
>  
>  do_command()
>  {
> -	if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
> +	if [ -f ${srctree}/arch/$2/include/uapi/asm/Kbuild ]; then
>  		make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
>  	else
>  		printf "Ignoring arch: %s\n" ${arch}
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

* Re: [PATCH] kbuild: fix scripts/headers.sh to see the correct Kbuild path
  2015-01-13  5:24 ` Masahiro Yamada
@ 2015-01-17 21:41   ` Sam Ravnborg
  0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2015-01-17 21:41 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: linux-kbuild, linux-kernel, Michal Marek

On Tue, Jan 13, 2015 at 02:24:04PM +0900, Masahiro Yamada wrote:
> Hi Sam,
> 
> IIRC, you mentioned scripts/headers.sh is pointless
> and should be removed from the code base.

Took a quik look at it.
It seems that there is use for it still.
um require some special handling.
And the HDR_ARCH_LIST feature is also implemented here.

Both could be done in other ways and the shell script
may be cleaned up a little.
But we cannot get rid of it as I initally thought.

	Sam

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

end of thread, other threads:[~2015-01-17 21:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-03  6:52 [PATCH] kbuild: fix scripts/headers.sh to see the correct Kbuild path Masahiro Yamada
2014-12-08 21:58 ` Paul Bolle
2014-12-11  1:41   ` Masahiro Yamada
2015-01-13  5:24 ` Masahiro Yamada
2015-01-17 21:41   ` Sam Ravnborg

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.