[Buildroot] [PATCH] package/linux-firmware: fix symlink support
antoine.tenart at bootlin.com
Tue Mar 3 21:44:25 UTC 2020
On Tue, Mar 03, 2020 at 10:32:03PM +0100, Antoine Tenart wrote:
> On Tue, Mar 03, 2020 at 10:28:53PM +0100, Yann E. MORIN wrote:
> > On 2020-03-03 14:33 +0100, Antoine Tenart spake thusly:
> > > Since Linux-firmware's commit 9cfefbd7fbda ("Remove duplicate symlinks")
> > > symlinks aren't distributed anymore. They are rather created at
> > > installation time by a script provided in the project, copy-firmware.sh.
> > > The description of the symlinks is done in the WHENCE file. Since the
> > > bump to version 20200122, in commit 48cc1a89ae04, installation for many
> > > firmwares was broken as Buildroot tried to install missing symlinks from
> > > Linux-firmware.
> > >
> > > The fix is not only to remove now missing symlinks, but to add logic to
> > > create those symlinks as kernel modules will depend on them. The
> > > solution taken by this patch is to create dynamically symlinks based on
> > > their description in the WHENCE file *and* only if the file they'll
> > > point to was installed in the target directory.
> > >
> > > Fixes: 48cc1a89ae04 ("package/linux-firmware: bump to version 20200122")
> > > Cc: james.hilliard1 at gmail.com
> > > Signed-off-by: Antoine Tenart <antoine.tenart at bootlin.com>
> > I did find a problem with some symlinks that is not created.
> > Link: cxgb4/t4fw.bin -> t4fw-126.96.36.199.bin
> > The target is itself in the cxgb4/ directory, so your code does not
> > catch it as an isntalled blob, and thus does not create the symlink.
> > I anyway applied, because it at least fixes the build by dropping the
> > entries tht no longer exist as they are symlinks.
> > So this patch is just a partial fix.
> > Care to send an update to also account for the kind of symlinks above?
> Good catch! I'll have a look at this.
It seems to be fixed by:
- if test -f $(TARGET_DIR)/lib/firmware/$$d; then \
+ if test -f $(TARGET_DIR)/lib/firmware/$$(dirname $$f)/$$d; then \
I'll make some tests tomorrow.
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
More information about the buildroot