5 Commits

Author SHA1 Message Date
Alfonso Sánchez-Beato
fe87c19891 kernel,overlord: fix component unit tests 2024-04-12 19:48:18 +01:00
alfonsosanchezbeato
1a5cef2ef6 o/snapstate: add support for kernel-modules handlers (#13748)
* kernel,overlord: use function from kernel pkg to get kernel early

mount dir.

* o/snapstate/sequence: add ancillary methods to retrieve components

for a given snap revision in the sequence. One of the methods can be
given a component type for filtering.

* o/snapstate/backend: add methods to set-up kernel-modules components

* o/snapstate: add handlers to set-up kernel-modules components

* o/snapstate: add specific setup task for kernel-modules components

* o/{devicestate,snapstate}: change name of kernel set-up tasks

* systemd: add before dependency to early mounts for local-fs.target

So dependencies are the same as when mounting in /snap, as that is
where we will do also the early mounts now.

* kernel: use normal mount points when building drivers tree

* overlord/devicestate: no need to remove early mount anymore

* overlord/snapstate: consider kernel type when ensuring the mounts

* kernel: put modules back in "updates" folder

As that gives priority to the kernel modules under that directory (see
depmod.d(5)).
2024-04-12 16:00:19 +02:00
Alfonso Sánchez-Beato
19baffdf08 kernel,overlord: use function from kernel pkg to get kernel early
mount dir.
2024-02-21 17:15:53 +00:00
Alfonso Sánchez-Beato
9712748dff kernel,overlord: modify EnsureKernelDriversTree so it can handle
kernel-modules components.
2024-02-21 07:55:42 +00:00
Alfonso Sánchez-Beato
ed956c4567 kernel: and ancillary methods
And ancillary methods:

- KernelVersionFromPlaceInfo, to find the kernel version ("uname -r")
  for a mounted snap.
- BuildKernelDriversTree, to build a tree from a mounted snap that can
  be bind-mounted to /usr/lib/{modules,firmware}.

These methods are needed to support kernel-modules components.
2024-02-06 10:35:10 +00:00