ACK/cmt: [PATCH][MASTER][kernel-snaps] efi: download wireless-regdb to ensure regulatory.db is in the snap

Stefan Bader stefan.bader at canonical.com
Wed Nov 18 09:12:59 UTC 2020


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 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.

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 at canonical.com>
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20201118/6a85e464/attachment-0001.sig>


More information about the kernel-team mailing list