From: Antoine Tenart <antoine.tenart@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/linux-firmware: fix symlink support
Date: Tue, 3 Mar 2020 22:30:18 +0100 [thread overview]
Message-ID: <20200303213018.GH3179@kwain> (raw)
In-Reply-To: <20200303211552.GC12449@scaer>
Yann,
On Tue, Mar 03, 2020 at 10:15:52PM +0100, Yann E. MORIN wrote:
> On 2020-03-03 19:47 +0100, Antoine Tenart spake thusly:
> > On Tue, Mar 03, 2020 at 05:43:02PM +0100, Yann E. MORIN wrote:
> > > On 2020-03-03 14:33 +0100, Antoine Tenart spake thusly:
> > > > +# Some firmware are distributed as a symlink, for drivers to load them using a
> > > > +# defined name other than the real one. Since 9cfefbd7fbda ("Remove duplicate
> > > > +# symlinks") those symlink aren't distributed in linux-firmware but are created
> > > > +# automatically by its copy-firmware.sh script during the installation, which
> > > > +# parses the WHENCE file where symlinks are described. We follow the same logic
> > > > +# here, adding symlink only for firmwares installed in the target directory.
> > > > +# The grep/sed parsing is taken from the script mentioned before.
> > > > +define LINUX_FIRMWARE_CREATE_SYMLINKS
> > > > + grep -E '^Link:' $(@D)/WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; do \
> > >
> > > You can combine the grep and sed into a single sed call:
> > >
> > > sed -r -e '/^Link: (.+) -> (.+)$$/!d; s//\1 \2/' $(@D)/WHENCE
> >
> > The reasoning here was to reuse with as little change as possible the
> > code used in Linux-firmware's copy-firmware.sh script, to be easily
> > maintainable should they decide to update the link definition format.
>
> I see, and that's a good reason. Yet, I've looked at the copy-firmware
> script, and I am not impressed... I find the above to be more readable.
That is the least we can say, not impressed :-)
> > I'm not pushing for either solution, I can change this for v2 if you
> > believe the two command should still be combined.
>
> no need for a v2: the major road-block (the globs above) is not. I can
> fix the sed and hook stuff locally (I already did it).
Thanks!
Antoine
--
Antoine T?nart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2020-03-03 21:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 13:33 [Buildroot] [PATCH] package/linux-firmware: fix symlink support Antoine Tenart
2020-03-03 13:41 ` Baruch Siach
2020-03-03 15:10 ` Yann E. MORIN
2020-03-03 16:43 ` Yann E. MORIN
2020-03-03 18:47 ` Antoine Tenart
2020-03-03 21:15 ` Yann E. MORIN
2020-03-03 21:30 ` Antoine Tenart [this message]
2020-03-03 21:28 ` Yann E. MORIN
2020-03-03 21:32 ` Antoine Tenart
2020-03-03 21:44 ` Antoine Tenart
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=20200303213018.GH3179@kwain \
--to=antoine.tenart@bootlin.com \
--cc=buildroot@busybox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox