Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642398 - sys-kernel/linux-firmware: No support for /usr merge
Summary: sys-kernel/linux-firmware: No support for /usr merge
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chí-Thanh Christopher Nguyễn
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: usrmerge, usrmerge-fixes
  Show dependency tree
 
Reported: 2017-12-27 13:31 UTC by Amit Prakash Ambasta
Modified: 2022-05-10 20:50 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Prakash Ambasta 2017-12-27 13:31:37 UTC
Currently, linux-firmware ebuild specifies insinto /lib/firmware. This is true for most other firmware e-builds.

The insinto location should however be dependent on profile. For example, for 2017.1 profiles, the insinto location should be /usr/lib/firmware instead.
Comment 1 crabbed halo ablution 2020-12-17 19:20:25 UTC
This doesn't sound practical. The kernel has /lib/firmware hardcoded.
WONTFIX?
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2021-05-13 00:10:55 UTC
Please explain what you mean with "2017.1" profile -- we don't have anything like that. Do you mean 17.1?

And why do you believe profile expects firmware in /usr/lib/firmware?
Comment 3 Amit Prakash Ambasta 2021-05-13 00:14:04 UTC
This had more to do w/ usrmerge than profile itself. Iirc, 17.x used to be called 2017.1 profile when it was just added and brought in usrmerge support.
Comment 4 Michael 'veremitz' Everitt 2021-05-13 00:37:42 UTC
(In reply to Amit Prakash Ambasta from comment #3)
> This had more to do w/ usrmerge than profile itself. Iirc, 17.x used to be
> called 2017.1 profile when it was just added and brought in usrmerge support.

no profile has ever had the full YYYY nomenclature.

/usr merge happened prior even to 17.0 profiles (13.0 era) and was distant history when 17.1 profiles were introduced. The reason for 17[.1] profiles was to adjust the lib/lib64 and /usr/lib64 paths/symlinks as multilib support changed when 64-bit libraries became available.
Comment 5 Michael 'veremitz' Everitt 2021-05-13 00:39:27 UTC
(In reply to Michael 'veremitz' Everitt from comment #4)

> /usr merge happened prior even to 17.0 profiles (13.0 era) and was distant
> history when 17.1 profiles were introduced. The reason for 17[.1] profiles
> was to adjust the lib/lib64 and /usr/lib64 paths/symlinks as multilib
- support changed when 64-bit libraries became available.
+ support change from when 64-bit libraries first became available.
Comment 6 Amit Prakash Ambasta 2021-05-13 00:52:59 UTC
Well, I am not sure at this point then. What I can definitely say, is when usrmerge was originally introduced as a flag, it allowed a gentoo system without /lib entirely (on no-multilib at least). However, some packages broke this and linux-firmware was one of them.

Feel free to resolve this as INVALID
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2021-05-13 21:47:58 UTC
No, this bug is valid.
Comment 8 Rick Farina (Zero_Chaos) gentoo-dev 2022-03-18 13:28:14 UTC
I can't find anywhere in the kernel that let's you change the /lib/firmware directory to somewhere else.  Absent that, modifying this ebuild to install into a different location would not make a lot of sense.  Can anyone provide some kernel info about how to make it check a different location?
Comment 9 Amit Prakash Ambasta 2022-03-18 13:34:22 UTC
CONFIG_EXTRA_FIRMWARE_DIR="/<mysuperawesomedirectory>/firmware"
Comment 10 amachronic 2022-03-18 20:54:24 UTC
I'm pretty sure the kernel's firmware search path is a non-issue. I checked today on a 5.15.29-gentoo-dist-hardened kernel by turning /lib/firmware itself into a symlink:

    mv /lib/firmware /usr/lib/firmware
    ln -s /usr/lib/firmware /lib/firmware

Rebooted, and dmesg shows firmware is loading just fine. So I think it's enough to install into /usr/lib/firmware for the "-split-usr" case.

The kernel's search paths are defined in drivers/base/firmware_loader/main.c, but I don't see much reason to change them because the default paths work for both split and merged /usr.
Comment 11 Mike Gilbert gentoo-dev 2022-05-10 20:49:47 UTC
I think linux firmware should continue installing to /lib/firmware, regardless of usrmerge status. There's no need to update the ebuild for this.

If /lib happens to be a symlink to /usr/lib, then the files will end up in /usr/lib/firmware.