All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf: make sure that the tools/include/uapi/asm-generic directory exists
@ 2019-05-11 14:08 Martin Jansa
  2019-05-11 14:51 ` Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Jansa @ 2019-05-11 14:08 UTC (permalink / raw)
  To: openembedded-core

* before trying to copy unistd.h into it

* older kernels don't have uapi in tools/include and do_configure fails
  with:
  DEBUG: Executing shell function do_configure
  cp: cannot create regular file '.../perf/1.0-r9/perf-1.0/tools/include/uapi/asm-generic/unistd.h':
  No such file or directory
  WARNING: exit code 1 from a shell command.

* tools/include/uapi was added in kernel 4.8 with
  https://github.com/torvalds/linux/commit/c4b6014e8bb0c8d47fe5c71ebc604f31091e5d3f
  tools: Add copy of perf_event.h to tools/include/linux/

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-kernel/perf/perf.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 546076f84b..215d0a38f9 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -238,6 +238,7 @@ do_configure_prepend () {
 
     # unistd.h can be out of sync between libc-headers and the captured version in the perf source
     # so we copy it from the sysroot unistd.h to the perf unistd.h
+    [ -d ${S}/tools/include/uapi/asm-generic/ ] || mkdir -p ${S}/tools/include/uapi/asm-generic/
     cp ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
 }
 
-- 
2.17.1



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

* Re: [PATCH] perf: make sure that the tools/include/uapi/asm-generic directory exists
  2019-05-11 14:08 [PATCH] perf: make sure that the tools/include/uapi/asm-generic directory exists Martin Jansa
@ 2019-05-11 14:51 ` Khem Raj
  2019-05-11 16:36   ` [PATCHv2] " Martin Jansa
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2019-05-11 14:51 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Sat, May 11, 2019 at 7:08 AM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> * before trying to copy unistd.h into it
>
> * older kernels don't have uapi in tools/include and do_configure fails
>   with:
>   DEBUG: Executing shell function do_configure
>   cp: cannot create regular file '.../perf/1.0-r9/perf-1.0/tools/include/uapi/asm-generic/unistd.h':
>   No such file or directory
>   WARNING: exit code 1 from a shell command.
>
> * tools/include/uapi was added in kernel 4.8 with
>   https://github.com/torvalds/linux/commit/c4b6014e8bb0c8d47fe5c71ebc604f31091e5d3f
>   tools: Add copy of perf_event.h to tools/include/linux/
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/recipes-kernel/perf/perf.bb | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
> index 546076f84b..215d0a38f9 100644
> --- a/meta/recipes-kernel/perf/perf.bb
> +++ b/meta/recipes-kernel/perf/perf.bb
> @@ -238,6 +238,7 @@ do_configure_prepend () {
>
>      # unistd.h can be out of sync between libc-headers and the captured version in the perf source
>      # so we copy it from the sysroot unistd.h to the perf unistd.h
> +    [ -d ${S}/tools/include/uapi/asm-generic/ ] || mkdir -p ${S}/tools/include/uapi/asm-generic/
>      cp ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h

you can also use
install -D 0644 ${STAGING_INCDIR}/asm-generic/unistd.h
${S}/tools/include/uapi/asm-generic/unistd.h
and get both done is one call.


>  }
>
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* [PATCHv2] perf: make sure that the tools/include/uapi/asm-generic directory exists
  2019-05-11 14:51 ` Khem Raj
@ 2019-05-11 16:36   ` Martin Jansa
  2019-05-11 20:54     ` Martin Jansa
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Jansa @ 2019-05-11 16:36 UTC (permalink / raw)
  To: openembedded-core

* before trying to copy unistd.h into it

* older kernels don't have uapi in tools/include and do_configure fails
  with:
  DEBUG: Executing shell function do_configure
  cp: cannot create regular file '.../perf/1.0-r9/perf-1.0/tools/include/uapi/asm-generic/unistd.h':
  No such file or directory
  WARNING: exit code 1 from a shell command.

* tools/include/uapi was added in kernel 4.8 with
  https://github.com/torvalds/linux/commit/c4b6014e8bb0c8d47fe5c71ebc604f31091e5d3f
  tools: Add copy of perf_event.h to tools/include/linux/

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-kernel/perf/perf.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 546076f84b..774894166c 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -238,7 +238,7 @@ do_configure_prepend () {
 
     # unistd.h can be out of sync between libc-headers and the captured version in the perf source
     # so we copy it from the sysroot unistd.h to the perf unistd.h
-    cp ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
+    install -D 0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
 }
 
 python do_package_prepend() {
-- 
2.17.1



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

* Re: [PATCHv2] perf: make sure that the tools/include/uapi/asm-generic directory exists
  2019-05-11 16:36   ` [PATCHv2] " Martin Jansa
@ 2019-05-11 20:54     ` Martin Jansa
  2019-05-14  7:30       ` [PATCHv3] " Martin Jansa
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Jansa @ 2019-05-11 20:54 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1668 bytes --]

I'm sorry, will need v3.

install: target
'lib32-perf/1.0-r9/perf-1.0/tools/include/uapi/asm-generic/unistd.h' is not
a directory

On Sat, May 11, 2019 at 6:36 PM Martin Jansa <martin.jansa@gmail.com> wrote:

> * before trying to copy unistd.h into it
>
> * older kernels don't have uapi in tools/include and do_configure fails
>   with:
>   DEBUG: Executing shell function do_configure
>   cp: cannot create regular file
> '.../perf/1.0-r9/perf-1.0/tools/include/uapi/asm-generic/unistd.h':
>   No such file or directory
>   WARNING: exit code 1 from a shell command.
>
> * tools/include/uapi was added in kernel 4.8 with
>
> https://github.com/torvalds/linux/commit/c4b6014e8bb0c8d47fe5c71ebc604f31091e5d3f
>   tools: Add copy of perf_event.h to tools/include/linux/
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/recipes-kernel/perf/perf.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/
> perf.bb
> index 546076f84b..774894166c 100644
> --- a/meta/recipes-kernel/perf/perf.bb
> +++ b/meta/recipes-kernel/perf/perf.bb
> @@ -238,7 +238,7 @@ do_configure_prepend () {
>
>      # unistd.h can be out of sync between libc-headers and the captured
> version in the perf source
>      # so we copy it from the sysroot unistd.h to the perf unistd.h
> -    cp ${STAGING_INCDIR}/asm-generic/unistd.h
> ${S}/tools/include/uapi/asm-generic/unistd.h
> +    install -D 0644 ${STAGING_INCDIR}/asm-generic/unistd.h
> ${S}/tools/include/uapi/asm-generic/unistd.h
>  }
>
>  python do_package_prepend() {
> --
> 2.17.1
>
>

[-- Attachment #2: Type: text/html, Size: 2597 bytes --]

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

* [PATCHv3] perf: make sure that the tools/include/uapi/asm-generic directory exists
  2019-05-11 20:54     ` Martin Jansa
@ 2019-05-14  7:30       ` Martin Jansa
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2019-05-14  7:30 UTC (permalink / raw)
  To: openembedded-core

* before trying to copy unistd.h into it

* older kernels don't have uapi in tools/include and do_configure fails
  with:
  DEBUG: Executing shell function do_configure
  cp: cannot create regular file '.../perf/1.0-r9/perf-1.0/tools/include/uapi/asm-generic/unistd.h':
  No such file or directory
  WARNING: exit code 1 from a shell command.

* tools/include/uapi was added in kernel 4.8 with
  https://github.com/torvalds/linux/commit/c4b6014e8bb0c8d47fe5c71ebc604f31091e5d3f
  tools: Add copy of perf_event.h to tools/include/linux/

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-kernel/perf/perf.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 546076f84b..4e603f1a32 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -238,7 +238,7 @@ do_configure_prepend () {
 
     # unistd.h can be out of sync between libc-headers and the captured version in the perf source
     # so we copy it from the sysroot unistd.h to the perf unistd.h
-    cp ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
+    install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
 }
 
 python do_package_prepend() {
-- 
2.17.1



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

end of thread, other threads:[~2019-05-14  7:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-11 14:08 [PATCH] perf: make sure that the tools/include/uapi/asm-generic directory exists Martin Jansa
2019-05-11 14:51 ` Khem Raj
2019-05-11 16:36   ` [PATCHv2] " Martin Jansa
2019-05-11 20:54     ` Martin Jansa
2019-05-14  7:30       ` [PATCHv3] " Martin Jansa

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.