From: Stephen Hemminger <stephen@networkplumber.org>
To: Kory Maincent <kory.maincent@bootlin.com>
Cc: David Ahern <dsahern@gmail.com>,
netdev@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH iproute2-next 1/2] scripts: Add uapi header import script
Date: Tue, 16 Sep 2025 07:41:55 -0700 [thread overview]
Message-ID: <20250916074155.48794eae@hermes.local> (raw)
In-Reply-To: <20250909-feature_uapi_import-v1-1-50269539ff8a@bootlin.com>
On Tue, 09 Sep 2025 15:21:42 +0200
Kory Maincent <kory.maincent@bootlin.com> wrote:
> Add a script to automate importing Linux UAPI headers from kernel source.
> The script handles dependency resolution and creates a commit with proper
> attribution, similar to the ethtool project approach.
>
> Usage:
> $ LINUX_GIT="$LINUX_PATH" iproute2-import-uapi [commit]
>
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
Script I use is much simpler.
#! /bin/bash
# script to copy sanitized kernel headers
if [ $# -ne 1 ]; then
echo "Usage: $0 kernel-directory"
exit 1
fi
SRC=$1
if [ ! -r $SRC/usr/include/linux/rtnetlink.h ]; then
echo "$SRC is missing headers"
exit 1
fi
if [ ! -r include/uapi/linux/rtnetlink.h ]; then
echo "$PWD is not iproute2 source"
exit 1
fi
for subdir in . rdma vdpa
do
DST=$subdir/include/uapi
echo Checking $DST
(cd $DST; find . -type f) | \
while read f
do
from=$SRC/usr/include/$f
to=$DST/$f
if ! cmp -s $from $to
then
echo Updating $f
cp $from $to
fi
done
done
next prev parent reply other threads:[~2025-09-16 14:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 13:21 [PATCH iproute2-next 0/2] Add uapi header import script Kory Maincent
2025-09-09 13:21 ` [PATCH iproute2-next 1/2] scripts: " Kory Maincent
2025-09-11 20:57 ` David Ahern
2025-09-11 21:59 ` Stephen Hemminger
2025-09-16 14:40 ` Stephen Hemminger
2025-09-16 15:20 ` David Ahern
2025-09-16 14:41 ` Stephen Hemminger [this message]
2025-09-16 16:01 ` Kory Maincent
2025-09-16 16:05 ` David Ahern
2025-09-16 16:19 ` Kory Maincent
2025-09-09 13:21 ` [PATCH iproute2-next 2/2] Update kernel headers Kory Maincent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250916074155.48794eae@hermes.local \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=kory.maincent@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.