Commit Graph

6 Commits

Author SHA1 Message Date
Matthias Reichl
dad3581441 kernel-overlays: move volatile runtime data to /run
Create the module and firmware symlink trees in /run/kernel-overlays
instead of /var/lib as recommended by FHS 3.0. This also allows us
to drop the After=var.mount ordering in the systemd service.

Signed-off-by: Matthias Reichl <hias@horus.com>
2020-01-10 12:03:23 +01:00
MilhouseVH
d4f6326142 packages: align source code licence usage with project licence 2019-03-26 18:05:50 +00:00
Matthias Reichl
23cc2e1b9b kernel-overlays-setup: fix ls error in journal if .config/firmware doesn't exist
Signed-off-by: Matthias Reichl <hias@horus.com>
2018-12-15 14:28:47 +01:00
Matthias Reichl
315421e634 linux: move .config/firmware handling to kernel overlay system
Creating an updates symlink to /storage/.config/firmware in the
kernel firmware directory makes it impossible to add firmware
overlays with an updates folder.

Furthermore bluez/hciattach only looks for firmware files directly in
the /lib/firmware directory and ignores the /lib/firmware/updates
directory. So adding BT firmware via .config/firmware didn't work.

Solve this by adding files from /storage/.config/firmware as the
last step in kernel overlays setup so firmware files from there
will show up directly under /lib/firmware and override other firmware
files installed by the system and kernel overlays.

Signed-off-by: Matthias Reichl <hias@horus.com>
2018-12-01 18:27:17 +01:00
CvH
1b9cbdaf26 spdx: packages/sysutils 2018-07-18 22:37:47 +02:00
Matthias Reichl
ad9e8dc372 Add support for kernel overlays
Core Kernel modules are now installed to
/usr/lib/kernel-overlays/base/lib/modules instead of /usr/lib/modules

Firmware files are installed to
/usr/lib/kernel-overlays/base/lib/firmware instead of /usr/lib/firmware

Packages can choose to install their modules and/or firmwareinto a
different overlay directory than base so they are not automatically enabled.

A new systemd service kernel-overlays, which is run before any modules
are loaded, adds overlays enabled via /storage/.cache/kernel-overlays/*.conf

These conf files must either contain the name of a system overlay,
which will then be searched for in /usr/lib/kernel-overlays/, or an
absolute path starting with '/'.

Overlaying is implemented by symlinking files from the overlays
to /usr/lib/modules and /usr/lib/firmware as not all platforms
support overlayfs.

This overlaying system can also be used by addons to provide optional
kernel modules and/or firmware by storing the absolute path to the addon
directory in the conf file and shipping kernel modules in
<addondir>/lib/modules/<KERNELVER>.

To save space only symlinks for modules matching the currently
running kernel version are created as addons may want to ship
modules for older kernel versions as well to be backward-compatible
to older LibreELEC versions.

Changes since v1:
- fixup kernel-overlays-service: add before kmod-static-nodes.service
  Fix static device nodes for module autoloading not being created.
- fixup kernel-overlays-service: fail if /usr/lib/modules exists
- squash kernel overlays: use get_kernel_overlay_dir in linux/package.mk
- Add support for firmware files via kernel overlays
- config/functions: include kernel overlays in addon installation

Signed-off-by: Matthias Reichl <hias@horus.com>
2017-10-12 20:04:02 +02:00