[OE-core] [RFC 3/3] linux-firmware: MACHINEOVERRIDES for BCM43430 NVRAM

Ryan Harkin ryan.harkin at linaro.org
Thu Aug 23 08:15:03 UTC 2018


On 22 August 2018 at 17:41, Martin Jansa <martin.jansa at gmail.com> wrote:
>
> The "cd ${D}${nonarch_base_libdir}/firmware/brcm/" doesn't seem to be
needed, just include the path in 2nd ln parameter.

Thanks Martin, and sorry for being so dumb. I'll send another series at
some point, but for now, the patch looks like this:

diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index 8c54f28..70d4f6a 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -226,6 +226,18 @@ do_install() {
        ( cd ${D}${nonarch_base_libdir}/firmware ; ln -sf ti-connectivity/*
. )
 }

+# Adding bcm43430-nvram-{module type} to MACHINEOVERRIDES will create a
+# softlink for the module specific NVRAM file to the filename expected
+# by the Linux kernel
+FILES_${PN}-bcm43430-nvram_append_bcm43430-nvram-mur1dx = "
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt"
+do_install_append_bcm43430-nvram-mur1dx() {
+       ln -sf brcmfmac43430-sdio.MUR1DX.txt
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
+}
+FILES_${PN}-bcm43430-nvram_append_bcm43430-nvram-ap6212 =
"${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt"
+do_install_append_bcm43430-nvram-ap6212() {
+       ln -sf brcmfmac43430-sdio.AP6212.txt
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
+}
+

So now the ln issue is resolved, I'm not convinced my MACHINEOVERRIDES is
the correct approach. Does anyone have any feedback on how I can improve
that?

As per my cover letter, I originally wanted to be able to provide a
MACHINE_EXTRA_RRECOMMENDS, or similar, but I'm not familiar with how to get
an _append to apply based on that variable, unless I tested it incorrectly
(again).

If I add, say, "linux-firmware-bcm43430-nvram-mur1dx" to
MACHINE_EXTRA_RRECOMMENDS,
should this work:

+FILES_${PN}-bcm43430-nvram_append_${PN}-bcm43430-nvram-mur1dx = "
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt"
+do_install_append_${PN}-bcm43430-nvram-mur1dx() {
+       ln -sf brcmfmac43430-sdio.MUR1DX.txt
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
+}

Or is there a better way of achieving this?


>
>
> On Wed, Aug 22, 2018 at 6:30 PM Ryan Harkin <ryan.harkin at linaro.org>
wrote:
>>
>> The Linux kernel currently expects a single NVRAM file for BCM43430
>> named brcmfmac43430-sdio.txt.
>>
>> Allow the machine to specify an override to link its module specific
>> NVRAM to the filename expected by the kernel.
>>
>> Signed-off-by: Ryan Harkin <ryan.harkin at linaro.org>
>> ---
>>  meta/recipes-kernel/linux-firmware/linux-firmware_git.bb | 12
++++++++++++
>>  1 file changed, 12 insertions(+)
>>
>> diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
>> index 8c54f28..b647abc 100644
>> --- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
>> +++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
>> @@ -226,6 +226,18 @@ do_install() {
>>         ( cd ${D}${nonarch_base_libdir}/firmware ; ln -sf
ti-connectivity/* . )
>>  }
>>
>> +# Adding bcm43430-nvram-{module type} to MACHINEOVERRIDES will create a
>> +# softlink for the module specific NVRAM file to the filename expected
>> +# by the Linux kernel
>> +FILES_${PN}-bcm43430-nvram_append_bcm43430-nvram-mur1dx = "
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt"
>> +do_install_append_bcm43430-nvram-mur1dx() {
>> +       ( cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
brcmfmac43430-sdio.MUR1DX.txt brcmfmac43430-sdio.txt)
>> +}
>> +FILES_${PN}-bcm43430-nvram_append_bcm43430-nvram-ap6212 =
"${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt"
>> +do_install_append_bcm43430-nvram-ap6212() {
>> +       ( cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
brcmfmac43430-sdio.AP6212.txt brcmfmac43430-sdio.txt)
>> +}
>> +
>>
>>  PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
>>               ${PN}-mt7601u-license ${PN}-mt7601u \
>> --
>> 2.7.4
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180823/de0dbeb7/attachment-0002.html>


More information about the Openembedded-core mailing list