ACK/cmt: [PATCH][MASTER][kernel-snaps] efi: download wireless-regdb to ensure regulatory.db is in the snap
Seth Forshee
seth.forshee at canonical.com
Tue Nov 3 15:45:33 UTC 2020
On Wed, Oct 14, 2020 at 04:55:49PM +0100, Dimitri John Ledkov wrote:
> Makefile.vmlinuz uses apt to install dependencies, which recursively
> resolves dependies when preparing chroot/. It installs
> linux-modules-extra-$(KVER)-$(FLAVOUR) which depends on crda, which
> depends on wireless-regdb, which installs /lib/firmware/regulatory.db.
>
> Makefile.efi instead downloads and unpacks individual debs, ignoring
> recursive dependencies. This resulted in wireless-regdb not getting
> installed in the chroot, and thus UC20 efi based kernel snaps have no
> wifi regulatory db.
>
> BugLink: https://launchpad.net/bugs/1899805
>
> Signed-off-by: Dimitri John Ledkov <xnox at ubuntu.com>
> ---
> Patch for
> $ git clone -b master https://git.launchpad.net/~canonical-kernel-snaps/+git/kernel-snaps-uc20
>
> Makefile.efi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile.efi b/Makefile.efi
> index 8745ebc71c..db828cf2ce 100644
> --- a/Makefile.efi
> +++ b/Makefile.efi
> @@ -28,7 +28,7 @@ endif
>
> prepare-kernel: prepare-host
> mkdir chroot
> - apt-get download linux-firmware $(KERNELDEB) linux-image-$(ABI)-$(FLAVOUR) linux-modules-$(ABI)-$(FLAVOUR)
> + apt-get download linux-firmware wireless-regdb $(KERNELDEB) linux-image-$(ABI)-$(FLAVOUR) linux-modules-$(ABI)-$(FLAVOUR)
> if [ "$(FLAVOUR)" != "lowlatency" ]; then \
> apt-get download linux-modules-extra-$(ABI)-$(FLAVOUR); \
> fi
This gets us the db files which are installed to /lib/firmware, which
should be sufficient for UC20 since 5.4 supports loading
/lib/firmware/regulatory.db signed with the key built into the kernel.
However I will point out that older kernel versions don't support the
regulatory.db file (I don't remember off the top of my head which kernel
version specifically added that support), so if this same thing is ever
wanted for any older kernel versions it may also be necessary to add
crda and /lib/crda/regulatory.bin to the snap.
Acked-by: Seth Forshee <seth.forshee at canonical.com>
More information about the kernel-team
mailing list