utils: update-kernel-headers: Fix destination path
diff mbox series

Message ID 20260405213306.1224047-1-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • utils: update-kernel-headers: Fix destination path
Related show

Commit Message

Laurent Pinchart April 5, 2026, 9:33 p.m. UTC
The update-kernel-headers.sh script copies all headers to include/linux/
without creating subdirectories. This behaviour was correct until the
addition of linux/media/v4l2-isp.h, which should be copied to
include/linux/media/v4l2-isp.h, not include/linux/v4l2-isp.h. Fix it.

Fixes: ee8f88fc64d4 ("include: linux: Add v4l2-isp.h")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 utils/update-kernel-headers.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jacopo Mondi April 7, 2026, 10:14 a.m. UTC | #1
Hi Laurent

On Mon, Apr 06, 2026 at 12:33:06AM +0300, Laurent Pinchart wrote:
> The update-kernel-headers.sh script copies all headers to include/linux/
> without creating subdirectories. This behaviour was correct until the
> addition of linux/media/v4l2-isp.h, which should be copied to
> include/linux/media/v4l2-isp.h, not include/linux/v4l2-isp.h. Fix it.
>
> Fixes: ee8f88fc64d4 ("include: linux: Add v4l2-isp.h")

Indeed I had to manually move it

> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  utils/update-kernel-headers.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utils/update-kernel-headers.sh b/utils/update-kernel-headers.sh
> index 168a0ea36e63..f9baa66d00b4 100755
> --- a/utils/update-kernel-headers.sh
> +++ b/utils/update-kernel-headers.sh
> @@ -64,7 +64,7 @@ headers="
>  "
>
>  for header in $headers ; do
> -	name=$(basename "${header}")
> +	name="${header#*/}"

Now I wonder why "drm/drm_fourcc.h" doesn't live under "linux/" and if
"linux/media/v4l2-isp.h" should have been "media/v4l2-isp.h".

Not a question for this patch :)

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Thanks
  j

>  	cp "${install_dir}/usr/include/${header}" "${header_dir}/${name}"
>  done
>
> --
> Regards,
>
> Laurent Pinchart
>
Laurent Pinchart April 7, 2026, 10:33 a.m. UTC | #2
On Tue, Apr 07, 2026 at 12:14:49PM +0200, Jacopo Mondi wrote:
> On Mon, Apr 06, 2026 at 12:33:06AM +0300, Laurent Pinchart wrote:
> > The update-kernel-headers.sh script copies all headers to include/linux/
> > without creating subdirectories. This behaviour was correct until the
> > addition of linux/media/v4l2-isp.h, which should be copied to
> > include/linux/media/v4l2-isp.h, not include/linux/v4l2-isp.h. Fix it.
> >
> > Fixes: ee8f88fc64d4 ("include: linux: Add v4l2-isp.h")
> 
> Indeed I had to manually move it
> 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >  utils/update-kernel-headers.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/utils/update-kernel-headers.sh b/utils/update-kernel-headers.sh
> > index 168a0ea36e63..f9baa66d00b4 100755
> > --- a/utils/update-kernel-headers.sh
> > +++ b/utils/update-kernel-headers.sh
> > @@ -64,7 +64,7 @@ headers="
> >  "
> >
> >  for header in $headers ; do
> > -	name=$(basename "${header}")
> > +	name="${header#*/}"
> 
> Now I wonder why "drm/drm_fourcc.h" doesn't live under "linux/" and if

Historical reasons I think.

> "linux/media/v4l2-isp.h" should have been "media/v4l2-isp.h".

That would translate to /usr/include/media/ and I don't think we can
grap that namespace without talking with the relevant stakeholders. It
makes sense for kernel headers to all be in /usr/include/linux/.

> Not a question for this patch :)
> 
> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> 
> >  	cp "${install_dir}/usr/include/${header}" "${header_dir}/${name}"
> >  done
Barnabás Pőcze April 13, 2026, 7:11 a.m. UTC | #3
2026. 04. 05. 23:33 keltezéssel, Laurent Pinchart írta:
> The update-kernel-headers.sh script copies all headers to include/linux/
> without creating subdirectories. This behaviour was correct until the
> addition of linux/media/v4l2-isp.h, which should be copied to
> include/linux/media/v4l2-isp.h, not include/linux/v4l2-isp.h. Fix it.
> 
> Fixes: ee8f88fc64d4 ("include: linux: Add v4l2-isp.h")
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>   utils/update-kernel-headers.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/update-kernel-headers.sh b/utils/update-kernel-headers.sh
> index 168a0ea36e63..f9baa66d00b4 100755
> --- a/utils/update-kernel-headers.sh
> +++ b/utils/update-kernel-headers.sh
> @@ -64,7 +64,7 @@ headers="
>   "
>   
>   for header in $headers ; do
> -	name=$(basename "${header}")
> +	name="${header#*/}"
>   	cp "${install_dir}/usr/include/${header}" "${header_dir}/${name}"

The subdirectories will have to be created manually?

Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>


>   done
>

Patch
diff mbox series

diff --git a/utils/update-kernel-headers.sh b/utils/update-kernel-headers.sh
index 168a0ea36e63..f9baa66d00b4 100755
--- a/utils/update-kernel-headers.sh
+++ b/utils/update-kernel-headers.sh
@@ -64,7 +64,7 @@  headers="
 "
 
 for header in $headers ; do
-	name=$(basename "${header}")
+	name="${header#*/}"
 	cp "${install_dir}/usr/include/${header}" "${header_dir}/${name}"
 done