package/linux-firmware: fix symlink support
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@gmail.com
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
[yann.morin.1998@free.fr:
- don't use a post-install hook
- consolidate grep+sed into a single sed
- split long ling
- detect ln error and exit
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>