From e244ba6d109eb91e2a5b49b58d918e89af46bd50 Mon Sep 17 00:00:00 2001 From: Ramon Moesching Date: Fri, 1 Nov 2019 16:43:44 +0100 Subject: [PATCH] wireless-regdb: fix: install firmware files into initrd crda is not longer required since kernel >=4.15 and kernel is able to load wireless regulatory database as firmware file Install wifi and regulatory firmware files in initrd and default rootfs BugzID: 60107 Signed-off-by: Ramon Moesching --- conf/distro/netmodule-linux-ostree.conf | 7 +++++++ recipes-core/images/initramfs-ostree-image.bbappend | 8 ++++++++ recipes-core/images/netmodule-linux-image.bb | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 recipes-core/images/initramfs-ostree-image.bbappend diff --git a/conf/distro/netmodule-linux-ostree.conf b/conf/distro/netmodule-linux-ostree.conf index ad4483b..d1b11df 100644 --- a/conf/distro/netmodule-linux-ostree.conf +++ b/conf/distro/netmodule-linux-ostree.conf @@ -11,3 +11,10 @@ OSTREE_COMMIT_SUBJECT = "${IMAGE_BASENAME};${EXTERNALSRC_GIT_SRCREV}" KERNEL_IMAGETYPES_sota = "fitImage" KERNEL_IMAGETYPE_sota = "fitImage" OSTREE_KERNEL = "${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE}" + +INITRAMFS_PACKAGES = "wireless-regdb-static \ + linux-firmware-wl12xx \ + linux-firmware-wl18xx \ + wlconf-bin \ + " +ROOTFS_BOOTSTRAP_INSTALL_append = " ${INITRAMFS_PACKAGES}" diff --git a/recipes-core/images/initramfs-ostree-image.bbappend b/recipes-core/images/initramfs-ostree-image.bbappend new file mode 100644 index 0000000..057a1ff --- /dev/null +++ b/recipes-core/images/initramfs-ostree-image.bbappend @@ -0,0 +1,8 @@ +ROOTFS_POSTINSTALL_COMMAND_am335x-nmhw21 += " remove_firmware_bin; " + +remove_firmware_bin() { + pwd=$PWD + cd ${IMAGE_ROOTFS}/lib/firmware + find . | egrep "wl128x-fw-4-plt.bin|wl18xx-fw-4.bin|wl18xx-conf.bin|TIInit_11.8.32.bts" -v | egrep 'bts|bin' | xargs rm + cd ${pwd} +} diff --git a/recipes-core/images/netmodule-linux-image.bb b/recipes-core/images/netmodule-linux-image.bb index 7abc27e..587a11c 100644 --- a/recipes-core/images/netmodule-linux-image.bb +++ b/recipes-core/images/netmodule-linux-image.bb @@ -27,6 +27,7 @@ FIRMWARE_am335x-nrhw20 = " \ " FIRMWARE_am335x-nmhw21 = " \ + linux-firmware-wl12xx\ linux-firmware-wl18xx\ wlconf-bin \ " @@ -52,7 +53,6 @@ BT_TOOLS = " \ IMAGE_INSTALL_append = " \ hostapd \ iw \ - crda \ wpa-supplicant \ openssh-sftp-server \ haveged \ @@ -81,6 +81,7 @@ IMAGE_INSTALL_append = " \ ${@bb.utils.contains("MACHINE_FEATURES", "toby-l2", "ublox-gsm-config", "", d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "bluetooth", "${BT_TOOLS}", "", d)} \ ${FIRMWARE} \ + wireless-regdb-static \ " IMAGE_INSTALL_append_am335x-nrhw16 = " \