Message ID | 20201014155549.257973-1-xnox@ubuntu.com |
---|---|
State | New |
Headers | show |
Series | [MASTER,kernel-snaps] efi: download wireless-regdb to ensure regulatory.db is in the snap | expand |
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@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@canonical.com>
On 03.11.20 16:45, Seth Forshee wrote: > 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@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. I would note that a "Makefile.efi" only exists in the Focal snap repo, so this cannot even be applied to anything else than Focal and that is at least 5.4. -Stefan > > Acked-by: Seth Forshee <seth.forshee@canonical.com> >
On 14.10.20 17:55, 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@ubuntu.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- and Applied to focal/kernel-snaps-uc20/master. Thanks. -Stefan > 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 >
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
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@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(-)