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

2018-08-28 Thread Ryan Harkin
On 24 August 2018 at 11:43, Mike Looijmans  wrote:

> I think this should be solved in the driver actually. It probably "knows"
> which variant is there (or could be taught using devicetree or so).


I agree. That's a longer term change that will take quite some time to
filter through, if at all.

The device doesn't know which variant it is, but I'm *hoping* to add a
device tree attribute to cover this, but there has been resistance this in
the past, so it may not be an easy change to get accepted.


>
> On 24-08-18 11:04, Martin Jansa wrote:
>
>> One way to keep it allarch would be to package
>> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt
>> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
>> in 2 separate packages and handle
>> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
>> symlink with update-alternatives
>>
>> most MACHINEs won't install either of these packages and those which need
>> it will pull the right one (e.g. through MACHINE_EXTRA_RRECOMMENDS).
>>
>> In worst case someone will try to install both packages and based on u-a
>> priority one of them will win (use higher priority for the more common
>> version).
>>
>> Cheers,
>>
>> On Fri, Aug 24, 2018 at 4:53 AM Andre McCurdy > > wrote:
>>
>> On Thu, Aug 23, 2018 at 1:15 AM, Ryan Harkin > > wrote:
>>  >
>>  > 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?
>>
>> If you want to make a configurable symlink then perhaps the more usual
>> approach would be to just use a variable in the linux-firmware recipe
>> to weakly define a default target for the symlink. Machine config
>> files could then either do nothing (ie use the default) or provide
>> their own value. For example, in the linux-firmware recipe:
>>
>>BCM43430_NVRAM_SYMLINK ?= "brcmfmac43430-sdio.AP6212.txt"
>>
>>FILES_${PN}-bcm43430-nvram = " \
>>  ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt \
>>  ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt
>> \
>>  ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
>> \
>>"
>>
>>do_install() {
>>  ...
>>  ln -sf ${BCM43430_NVRAM_SYMLINK}
>> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
>>}
>>
>> And then in the machine config files of machines which need the MUR1DX
>> firmware instead of the default, add:
>>
>>BCM43430_NVRAM_SYMLINK = "brcmfmac43430-sdio.MUR1DX.txt"
>>
>> However... note that currently the linux-firmware recipe is
>> architecture independent (ie it won't be rebuilt if the target is
>> changed). Adding a machine specific symlink is going to cause problems
>> with that, so the above is still not a full solution.
>>
>>
>>
>>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-25 Thread Mike Looijmans
I think this should be solved in the driver actually. It probably "knows" 
which variant is there (or could be taught using devicetree or so).


On 24-08-18 11:04, Martin Jansa wrote:

One way to keep it allarch would be to package
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
in 2 separate packages and handle
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
symlink with update-alternatives

most MACHINEs won't install either of these packages and those which need it 
will pull the right one (e.g. through MACHINE_EXTRA_RRECOMMENDS).


In worst case someone will try to install both packages and based on u-a 
priority one of them will win (use higher priority for the more common version).


Cheers,

On Fri, Aug 24, 2018 at 4:53 AM Andre McCurdy > wrote:


On Thu, Aug 23, 2018 at 1:15 AM, Ryan Harkin mailto:ryan.har...@linaro.org>> wrote:
 >
 > 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?

If you want to make a configurable symlink then perhaps the more usual
approach would be to just use a variable in the linux-firmware recipe
to weakly define a default target for the symlink. Machine config
files could then either do nothing (ie use the default) or provide
their own value. For example, in the linux-firmware recipe:

   BCM43430_NVRAM_SYMLINK ?= "brcmfmac43430-sdio.AP6212.txt"

   FILES_${PN}-bcm43430-nvram = " \
     ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt \
     ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt \
     ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt \
   "

   do_install() {
     ...
     ln -sf ${BCM43430_NVRAM_SYMLINK}
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
   }

And then in the machine config files of machines which need the MUR1DX
firmware instead of the default, add:

   BCM43430_NVRAM_SYMLINK = "brcmfmac43430-sdio.MUR1DX.txt"

However... note that currently the linux-firmware recipe is
architecture independent (ie it won't be rebuilt if the target is
changed). Adding a machine specific symlink is going to cause problems
with that, so the above is still not a full solution.





--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-24 Thread Ryan Harkin
Hi Martin,

On 24 August 2018 at 10:04, Martin Jansa  wrote:

> One way to keep it allarch would be to package
> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt
> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
> in 2 separate packages and handle
> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
> symlink with update-alternatives
>
> most MACHINEs won't install either of these packages and those which need
> it will pull the right one (e.g. through MACHINE_EXTRA_RRECOMMENDS).
>
> In worst case someone will try to install both packages and based on u-a
> priority one of them will win (use higher priority for the more common
> version).
>

Thanks, this sounds like a good approach. I'll experiment with
update-alternatives as I haven't used it before and see if I can come up
with something sensible.


> Cheers,
>
> On Fri, Aug 24, 2018 at 4:53 AM Andre McCurdy  wrote:
>
>> On Thu, Aug 23, 2018 at 1:15 AM, Ryan Harkin 
>> wrote:
>> >
>> > 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?
>>
>> If you want to make a configurable symlink then perhaps the more usual
>> approach would be to just use a variable in the linux-firmware recipe
>> to weakly define a default target for the symlink. Machine config
>> files could then either do nothing (ie use the default) or provide
>> their own value. For example, in the linux-firmware recipe:
>>
>>   BCM43430_NVRAM_SYMLINK ?= "brcmfmac43430-sdio.AP6212.txt"
>>
>>   FILES_${PN}-bcm43430-nvram = " \
>> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt \
>> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt \
>> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt \
>>   "
>>
>>   do_install() {
>> ...
>> ln -sf ${BCM43430_NVRAM_SYMLINK}
>> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
>>   }
>>
>> And then in the machine config files of machines which need the MUR1DX
>> firmware instead of the default, add:
>>
>>   BCM43430_NVRAM_SYMLINK = "brcmfmac43430-sdio.MUR1DX.txt"
>>
>> However... note that currently the linux-firmware recipe is
>> architecture independent (ie it won't be rebuilt if the target is
>> changed). Adding a machine specific symlink is going to cause problems
>> with that, so the above is still not a full solution.
>>
>
Thanks Andre. It looks like it would work, but unless you see a problem,
I'll look at Martin's idea first.

Cheers,
Ryan.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-24 Thread Martin Jansa
One way to keep it allarch would be to package
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
in 2 separate packages and handle
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
symlink with update-alternatives

most MACHINEs won't install either of these packages and those which need
it will pull the right one (e.g. through MACHINE_EXTRA_RRECOMMENDS).

In worst case someone will try to install both packages and based on u-a
priority one of them will win (use higher priority for the more common
version).

Cheers,

On Fri, Aug 24, 2018 at 4:53 AM Andre McCurdy  wrote:

> On Thu, Aug 23, 2018 at 1:15 AM, Ryan Harkin 
> wrote:
> >
> > 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?
>
> If you want to make a configurable symlink then perhaps the more usual
> approach would be to just use a variable in the linux-firmware recipe
> to weakly define a default target for the symlink. Machine config
> files could then either do nothing (ie use the default) or provide
> their own value. For example, in the linux-firmware recipe:
>
>   BCM43430_NVRAM_SYMLINK ?= "brcmfmac43430-sdio.AP6212.txt"
>
>   FILES_${PN}-bcm43430-nvram = " \
> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt \
> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt \
> ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt \
>   "
>
>   do_install() {
> ...
> ln -sf ${BCM43430_NVRAM_SYMLINK}
> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
>   }
>
> And then in the machine config files of machines which need the MUR1DX
> firmware instead of the default, add:
>
>   BCM43430_NVRAM_SYMLINK = "brcmfmac43430-sdio.MUR1DX.txt"
>
> However... note that currently the linux-firmware recipe is
> architecture independent (ie it won't be rebuilt if the target is
> changed). Adding a machine specific symlink is going to cause problems
> with that, so the above is still not a full solution.
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-23 Thread Andre McCurdy
On Thu, Aug 23, 2018 at 1:15 AM, Ryan Harkin  wrote:
>
> 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?

If you want to make a configurable symlink then perhaps the more usual
approach would be to just use a variable in the linux-firmware recipe
to weakly define a default target for the symlink. Machine config
files could then either do nothing (ie use the default) or provide
their own value. For example, in the linux-firmware recipe:

  BCM43430_NVRAM_SYMLINK ?= "brcmfmac43430-sdio.AP6212.txt"

  FILES_${PN}-bcm43430-nvram = " \
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt \
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt \
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt \
  "

  do_install() {
...
ln -sf ${BCM43430_NVRAM_SYMLINK}
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
  }

And then in the machine config files of machines which need the MUR1DX
firmware instead of the default, add:

  BCM43430_NVRAM_SYMLINK = "brcmfmac43430-sdio.MUR1DX.txt"

However... note that currently the linux-firmware recipe is
architecture independent (ie it won't be rebuilt if the target is
changed). Adding a machine specific symlink is going to cause problems
with that, so the above is still not a full solution.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-23 Thread Khem Raj
On Wed, Aug 22, 2018 at 11:40 PM Martin Hundebøll  wrote:
>
> May I suggest using the '-r, --relative' flag from 'ln':
>
> -r, --relative
>create symbolic links relative to link location
>
> My life felt considerably better after discovering that feature :)
>

ln -r is not available everywhere, but we do have lnr implemented as
part of metadata see scripts/lnr so
feel free to use that

> // Martin
>
> On 23/08/2018 08.12, Ryan Harkin wrote:
> >
> >
> > On 22 August 2018 at 23:55, Andre McCurdy  > > wrote:
> >
> > On Wed, Aug 22, 2018 at 2:56 PM, Ryan Harkin  > > wrote:
> >  > On Wed, 22 Aug 2018, 21:42 Andre McCurdy,  > > wrote:
> >  >> On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin
> > mailto:ryan.har...@linaro.org>>
> >  >> wrote:
> >  >> > On Wed, 22 Aug 2018, 20:02 Martin Jansa,
> > mailto:martin.ja...@gmail.com>> wrote:
> >  >> >>
> >  >> >> Your 1st parameter is wrong, compare again with the example I
> > gave you
> >  >> >> (don't include "brcm/" path in 1st param, because you want
> > the symlink
> >  >> >> to
> >  >> >> point to just brcmfmac43430-sdio.AP6212.txt like you did in
> > the version
> >  >> >> after cd).
> >  >> >
> >  >> > That doesn't work either. I tried it with the same result, but
> > didn't
> >  >> > send a
> >  >> > log of it. That works for you?
> >  >>
> >  >> Martin's example is correct so maybe check your tests again for
> > typos.
> >  >> It it still doesn't work then please do send a log.
> >  >>
> >  >> The link will point to whatever you define via the first
> > parameter, so
> >  >> if you changed the first parameter it shouldn't be possible to get
> >  >> "the same result".
> >  >>
> >  >>   $ mkdir foo
> >  >>   $ ln -sf test_target foo/test1
> >  >>   $ ln -sf brcm/test_target foo/test2
> >  >>   $ ls -l foo
> >  >>
> >  >>   lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
> >  >>   lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 -> brcm/test_target
> >  >
> >  > Yes, that's essentially the same as what I'm getting.
> >  >
> >  > Now try "cat foo/test1" and what happens?
> >  >
> >  > There is no file called test_target in the foo directory. And
> > neither is
> >  > there a file called brcm/test_target in the foo directory.
> >
> > Correct. The above was just an example to show that you can * create
> > symlinks * in the foo directory without cd'ing into the foo directory
> > first.
> >
> > If you'd like the symlinks in the example to point to valid targets
> > then you need to create the targets too, e.g.
> >
> >$ mkdir -p foo/brcm
> >$ echo hello > foo/test_target
> >$ echo hello2 > foo/brcm/test_target
> >
> > But note that the process of creating a symlink is always the same,
> > regardless of whether the symlink points to a valid target or not (so
> > you can run these extra commands to create the targets before or after
> > you create the symlinks).
> >
> >
> > So that doesn't work for me how I expect it to work. I must be missing
> > something fundamental here.
> >
> > The recipe is trying to create a soft link from a file in the current
> > directory to a file in the sub-directory. On my system, your example
> > creates links from a file in the sub-directory to the another file in
> > the sub-directory.
> >
> > So, to copy your example, but creating the file "test_target" from the
> > start:
> >
> > $ mkdir -p /tmp/test
> > $ cd /tmp/test
> > $ mkdir foo
> > $ echo 1 > test_target
> > $ ln -sf test_target foo/test1
> > $ ln -sf brcm/test_target foo/test2
> > $ ls -l foo
> > total 0
> > lrwxrwxrwx 1 ryan ryan 11 Aug 23 06:54 test1 -> test_target
> > lrwxrwxrwx 1 ryan ryan 16 Aug 23 06:54 test2 -> brcm/test_target
> > $ cat test_target
> > 1
> > $ cat foo/test1
> > cat: foo/test1: No such file or directory
> > $ cat foo/test2
> > cat: foo/test2: No such file or directory
> > $ echo hello > foo/test_target
> > $ echo hello2 > foo/brcm/test_target
> > bash: foo/brcm/test_target: No such file or directory
> > $ cat foo/test1
> > hello
> > $ cat foo/test2
> > cat: foo/test2: No such file or directory
> > $ cat test_target
> > 1
> > $ tree
> > .
> > ├── foo
> > │   ├── test1 -> test_target
> > │   ├── test2 -> brcm/test_target
> > │   └── test_target
> > └── test_target
> >
> > 1 directory, 4 files
> >
> > So, neither test1 nor test2 are linked to /tmp/test/test_target. test1
> > is linked to /tmp/test/foo/test_target and test2 is linked to
> > /tmp/test/brcm/test_target, which doesn't exist.
> >
> > AFAIK, when creating a softlink, you have to give it either an absolute
> > path, or a path relative to the link being created. The path cannot be
> > relative to the original file that you want to 

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

2018-08-23 Thread Ryan Harkin
On 22 August 2018 at 17:41, Martin Jansa  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 
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 
>> ---
>>  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
>>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-23 Thread Ryan Harkin
On 23 August 2018 at 08:34, Andre McCurdy  wrote:

> On Thu, Aug 23, 2018 at 12:17 AM, Ryan Harkin 
> wrote:
> > On 23 August 2018 at 08:06, Andre McCurdy  wrote:
> >> On Wed, Aug 22, 2018 at 11:12 PM, Ryan Harkin 
> >> wrote:
> >> > On 22 August 2018 at 23:55, Andre McCurdy 
> wrote:
> >> >> On Wed, Aug 22, 2018 at 2:56 PM, Ryan Harkin  >
> >> >> wrote:
> >> >> > On Wed, 22 Aug 2018, 21:42 Andre McCurdy, 
> >> >> > wrote:
> >> >> >> On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin
> >> >> >> 
> >> >> >> wrote:
> >> >> >> > On Wed, 22 Aug 2018, 20:02 Martin Jansa, <
> martin.ja...@gmail.com>
> >> >> >> > wrote:
> >> >> >> >>
> >> >> >> >> Your 1st parameter is wrong, compare again with the example I
> >> >> >> >> gave
> >> >> >> >> you
> >> >> >> >> (don't include "brcm/" path in 1st param, because you want the
> >> >> >> >> symlink
> >> >> >> >> to
> >> >> >> >> point to just brcmfmac43430-sdio.AP6212.txt like you did in the
> >> >> >> >> version
> >> >> >> >> after cd).
> >> >> >> >
> >> >> >> > That doesn't work either. I tried it with the same result, but
> >> >> >> > didn't
> >> >> >> > send a
> >> >> >> > log of it. That works for you?
> >> >> >>
> >> >> >> Martin's example is correct so maybe check your tests again for
> >> >> >> typos.
> >> >> >> It it still doesn't work then please do send a log.
> >> >> >>
> >> >> >> The link will point to whatever you define via the first
> parameter,
> >> >> >> so
> >> >> >> if you changed the first parameter it shouldn't be possible to get
> >> >> >> "the same result".
> >> >> >>
> >> >> >>   $ mkdir foo
> >> >> >>   $ ln -sf test_target foo/test1
> >> >> >>   $ ln -sf brcm/test_target foo/test2
> >> >> >>   $ ls -l foo
> >> >> >>
> >> >> >>   lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
> >> >> >>   lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 ->
> brcm/test_target
> >> >> >
> >> >> > Yes, that's essentially the same as what I'm getting.
> >> >> >
> >> >> > Now try "cat foo/test1" and what happens?
> >> >> >
> >> >> > There is no file called test_target in the foo directory. And
> neither
> >> >> > is
> >> >> > there a file called brcm/test_target in the foo directory.
> >> >>
> >> >> Correct. The above was just an example to show that you can * create
> >> >> symlinks * in the foo directory without cd'ing into the foo directory
> >> >> first.
> >> >>
> >> >> If you'd like the symlinks in the example to point to valid targets
> >> >> then you need to create the targets too, e.g.
> >> >>
> >> >>   $ mkdir -p foo/brcm
> >> >>   $ echo hello > foo/test_target
> >> >>   $ echo hello2 > foo/brcm/test_target
> >> >>
> >> >> But note that the process of creating a symlink is always the same,
> >> >> regardless of whether the symlink points to a valid target or not (so
> >> >> you can run these extra commands to create the targets before or
> after
> >> >> you create the symlinks).
> >> >
> >> > So that doesn't work for me how I expect it to work. I must be missing
> >> > something fundamental here.
> >> >
> >> > The recipe is trying to create a soft link from a file in the current
> >> > directory to a file in the sub-directory. On my system, your example
> >> > creates
> >> > links from a file in the sub-directory to the another file in the
> >> > sub-directory.
> >> >
> >> > So, to copy your example, but creating the file "test_target" from the
> >> > start:
> >> >
> >> > $ mkdir -p /tmp/test
> >> > $ cd /tmp/test
> >> > $ mkdir foo
> >> > $ echo 1 > test_target
> >>
> >> Here you are creating "test_target" in the directory which contains
> >> foo, not inside foo. So a symlink inside foo pointing to "test_target"
> >> isn't going to work.
> >
> > Exactly my point! Martin asked me to do this:
> >
> >> ln -sf brcmfmac43430-sdio.AP6212.txt
> >> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
> >
> > Which is in essence what I'm doing above. It won't work. The file
> > "brcmfmac43430-sdio.AP6212.txt" doesn't exist in the current directory.
> > That's why there's a "cd" command in there.
>
> I think you're really still quite confused about something here...
>
> You don't need to have any file existing in the current directory (or
> anywhere else) in order to create a symlink. The symlink exists on
> it's own. Creating the file that the symlink points to is an entirely
> separate step.
>
> > I think, in hind sight, the problem is that there is no path specified
> for
> > the original file. Hence, the email I've just sent, suggests I could make
> > this mod:
> >
> > -   ( cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
> > brcmfmac43430-sdio.MUR1DX.txt brcmfmac43430-sdio.txt)
> > +  ( ln -sf
> > ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
> > ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt)
> >
> >
> >
> >>
> >>
> >> > $ ln -sf test_target foo/test1
> >> > $ ln -sf brcm/test_target foo/test2
> >> > $ ls -l foo
> >> > total 0
> >> > lrwxrwxrwx 1 ryan ryan 11 Aug 23 06:54 test1 -> 

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

2018-08-23 Thread Andre McCurdy
On Thu, Aug 23, 2018 at 12:17 AM, Ryan Harkin  wrote:
> On 23 August 2018 at 08:06, Andre McCurdy  wrote:
>> On Wed, Aug 22, 2018 at 11:12 PM, Ryan Harkin 
>> wrote:
>> > On 22 August 2018 at 23:55, Andre McCurdy  wrote:
>> >> On Wed, Aug 22, 2018 at 2:56 PM, Ryan Harkin 
>> >> wrote:
>> >> > On Wed, 22 Aug 2018, 21:42 Andre McCurdy, 
>> >> > wrote:
>> >> >> On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin
>> >> >> 
>> >> >> wrote:
>> >> >> > On Wed, 22 Aug 2018, 20:02 Martin Jansa, 
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> Your 1st parameter is wrong, compare again with the example I
>> >> >> >> gave
>> >> >> >> you
>> >> >> >> (don't include "brcm/" path in 1st param, because you want the
>> >> >> >> symlink
>> >> >> >> to
>> >> >> >> point to just brcmfmac43430-sdio.AP6212.txt like you did in the
>> >> >> >> version
>> >> >> >> after cd).
>> >> >> >
>> >> >> > That doesn't work either. I tried it with the same result, but
>> >> >> > didn't
>> >> >> > send a
>> >> >> > log of it. That works for you?
>> >> >>
>> >> >> Martin's example is correct so maybe check your tests again for
>> >> >> typos.
>> >> >> It it still doesn't work then please do send a log.
>> >> >>
>> >> >> The link will point to whatever you define via the first parameter,
>> >> >> so
>> >> >> if you changed the first parameter it shouldn't be possible to get
>> >> >> "the same result".
>> >> >>
>> >> >>   $ mkdir foo
>> >> >>   $ ln -sf test_target foo/test1
>> >> >>   $ ln -sf brcm/test_target foo/test2
>> >> >>   $ ls -l foo
>> >> >>
>> >> >>   lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
>> >> >>   lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 -> brcm/test_target
>> >> >
>> >> > Yes, that's essentially the same as what I'm getting.
>> >> >
>> >> > Now try "cat foo/test1" and what happens?
>> >> >
>> >> > There is no file called test_target in the foo directory. And neither
>> >> > is
>> >> > there a file called brcm/test_target in the foo directory.
>> >>
>> >> Correct. The above was just an example to show that you can * create
>> >> symlinks * in the foo directory without cd'ing into the foo directory
>> >> first.
>> >>
>> >> If you'd like the symlinks in the example to point to valid targets
>> >> then you need to create the targets too, e.g.
>> >>
>> >>   $ mkdir -p foo/brcm
>> >>   $ echo hello > foo/test_target
>> >>   $ echo hello2 > foo/brcm/test_target
>> >>
>> >> But note that the process of creating a symlink is always the same,
>> >> regardless of whether the symlink points to a valid target or not (so
>> >> you can run these extra commands to create the targets before or after
>> >> you create the symlinks).
>> >
>> > So that doesn't work for me how I expect it to work. I must be missing
>> > something fundamental here.
>> >
>> > The recipe is trying to create a soft link from a file in the current
>> > directory to a file in the sub-directory. On my system, your example
>> > creates
>> > links from a file in the sub-directory to the another file in the
>> > sub-directory.
>> >
>> > So, to copy your example, but creating the file "test_target" from the
>> > start:
>> >
>> > $ mkdir -p /tmp/test
>> > $ cd /tmp/test
>> > $ mkdir foo
>> > $ echo 1 > test_target
>>
>> Here you are creating "test_target" in the directory which contains
>> foo, not inside foo. So a symlink inside foo pointing to "test_target"
>> isn't going to work.
>
> Exactly my point! Martin asked me to do this:
>
>> ln -sf brcmfmac43430-sdio.AP6212.txt
>> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
>
> Which is in essence what I'm doing above. It won't work. The file
> "brcmfmac43430-sdio.AP6212.txt" doesn't exist in the current directory.
> That's why there's a "cd" command in there.

I think you're really still quite confused about something here...

You don't need to have any file existing in the current directory (or
anywhere else) in order to create a symlink. The symlink exists on
it's own. Creating the file that the symlink points to is an entirely
separate step.

> I think, in hind sight, the problem is that there is no path specified for
> the original file. Hence, the email I've just sent, suggests I could make
> this mod:
>
> -   ( cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
> brcmfmac43430-sdio.MUR1DX.txt brcmfmac43430-sdio.txt)
> +  ( ln -sf
> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt)
>
>
>
>>
>>
>> > $ ln -sf test_target foo/test1
>> > $ ln -sf brcm/test_target foo/test2
>> > $ ls -l foo
>> > total 0
>> > lrwxrwxrwx 1 ryan ryan 11 Aug 23 06:54 test1 -> test_target
>> > lrwxrwxrwx 1 ryan ryan 16 Aug 23 06:54 test2 -> brcm/test_target
>> > $ cat test_target
>> > 1
>> > $ cat foo/test1
>> > cat: foo/test1: No such file or directory
>> > $ cat foo/test2
>> > cat: foo/test2: No such file or directory
>>
>> All as expected given that none of the symlink targets exist yet.
>>
>> > $ echo hello > 

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

2018-08-23 Thread Andre McCurdy
On Thu, Aug 23, 2018 at 12:08 AM, Ryan Harkin  wrote:
> On 23 August 2018 at 07:39, Martin Hundebøll  wrote:
>>
>> May I suggest using the '-r, --relative' flag from 'ln':
>>
>>-r, --relative
>>   create symbolic links relative to link location
>>
>> My life felt considerably better after discovering that feature :)
>
> Thanks Martin Hundebøll! Yes, that works for me.
>
> So, Martin Jansa, I could make this change:
>
> -   ( cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
> brcmfmac43430-sdio.MUR1DX.txt brcmfmac43430-sdio.txt)
> +  ( ln -sfr
> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt)

This is kind of crazy - you are giving an absolute path and then
asking ln to convert it into a relative path for you... but the
conversion process is trivial: just remove the entire path! You don't
need to ask ln to do that for you.

> Of course, if I'm not going to "cd" into the firmware repo, I'll have to use
> absolute paths on both sides of the "ln" command anyway. So I could drop the
> 'r' param and it should still work. Eg:
>
> -   ( cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
> brcmfmac43430-sdio.MUR1DX.txt brcmfmac43430-sdio.txt)
> +  ( ln -sf
> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt)

This will create a symlink which points to the target using an
absolute path. ie it's not equivalent to the other examples given so
far.

> I'm still not sure this is any neater, though, as it involves using the path
> twice. Is there a maintainer here who has a preference?
>
> FWIW, the TI line that I copied was added by Koen Kooi, who I've added to
> the CC:
>
> 8c7adb6  2011-10-09  linux-firmware: update, merge in OE classic updates,
> fix p..   [Koen Kooi]

If you mean this line:

  ( cd ${D}/lib/firmware ; ln -sf ti-connectivity/* . )

then it's doing something quite different to what you're now trying to
do. It's creating multiple symlinks, not one.

>>
>> // Martin
>>
>> On 23/08/2018 08.12, Ryan Harkin wrote:
>>>
>>>
>>>
>>> On 22 August 2018 at 23:55, Andre McCurdy >> > wrote:
>>>
>>> On Wed, Aug 22, 2018 at 2:56 PM, Ryan Harkin >> > wrote:
>>>  > On Wed, 22 Aug 2018, 21:42 Andre McCurdy, >> > wrote:
>>>  >> On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin
>>> mailto:ryan.har...@linaro.org>>
>>>  >> wrote:
>>>  >> > On Wed, 22 Aug 2018, 20:02 Martin Jansa,
>>> mailto:martin.ja...@gmail.com>> wrote:
>>>  >> >>
>>>  >> >> Your 1st parameter is wrong, compare again with the example I
>>> gave you
>>>  >> >> (don't include "brcm/" path in 1st param, because you want
>>> the symlink
>>>  >> >> to
>>>  >> >> point to just brcmfmac43430-sdio.AP6212.txt like you did in
>>> the version
>>>  >> >> after cd).
>>>  >> >
>>>  >> > That doesn't work either. I tried it with the same result, but
>>> didn't
>>>  >> > send a
>>>  >> > log of it. That works for you?
>>>  >>
>>>  >> Martin's example is correct so maybe check your tests again for
>>> typos.
>>>  >> It it still doesn't work then please do send a log.
>>>  >>
>>>  >> The link will point to whatever you define via the first
>>> parameter, so
>>>  >> if you changed the first parameter it shouldn't be possible to
>>> get
>>>  >> "the same result".
>>>  >>
>>>  >>   $ mkdir foo
>>>  >>   $ ln -sf test_target foo/test1
>>>  >>   $ ln -sf brcm/test_target foo/test2
>>>  >>   $ ls -l foo
>>>  >>
>>>  >>   lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
>>>  >>   lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 ->
>>> brcm/test_target
>>>  >
>>>  > Yes, that's essentially the same as what I'm getting.
>>>  >
>>>  > Now try "cat foo/test1" and what happens?
>>>  >
>>>  > There is no file called test_target in the foo directory. And
>>> neither is
>>>  > there a file called brcm/test_target in the foo directory.
>>>
>>> Correct. The above was just an example to show that you can * create
>>> symlinks * in the foo directory without cd'ing into the foo directory
>>> first.
>>>
>>> If you'd like the symlinks in the example to point to valid targets
>>> then you need to create the targets too, e.g.
>>>
>>>$ mkdir -p foo/brcm
>>>$ echo hello > foo/test_target
>>>$ echo hello2 > foo/brcm/test_target
>>>
>>> But note that the process of creating a symlink is always the same,
>>> regardless of whether the symlink points to a valid target or not (so
>>> you can run these extra commands to create the targets before or
>>> after
>>> you create the symlinks).
>>>
>>>
>>> So that doesn't work for me how I expect it to 

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

2018-08-23 Thread Ryan Harkin
On 23 August 2018 at 08:06, Andre McCurdy  wrote:
>
> On Wed, Aug 22, 2018 at 11:12 PM, Ryan Harkin 
wrote:
> > On 22 August 2018 at 23:55, Andre McCurdy  wrote:
> >> On Wed, Aug 22, 2018 at 2:56 PM, Ryan Harkin 
> >> wrote:
> >> > On Wed, 22 Aug 2018, 21:42 Andre McCurdy, 
wrote:
> >> >> On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin 
> >> >> wrote:
> >> >> > On Wed, 22 Aug 2018, 20:02 Martin Jansa, 
> >> >> > wrote:
> >> >> >>
> >> >> >> Your 1st parameter is wrong, compare again with the example I
gave
> >> >> >> you
> >> >> >> (don't include "brcm/" path in 1st param, because you want the
> >> >> >> symlink
> >> >> >> to
> >> >> >> point to just brcmfmac43430-sdio.AP6212.txt like you did in the
> >> >> >> version
> >> >> >> after cd).
> >> >> >
> >> >> > That doesn't work either. I tried it with the same result, but
didn't
> >> >> > send a
> >> >> > log of it. That works for you?
> >> >>
> >> >> Martin's example is correct so maybe check your tests again for
typos.
> >> >> It it still doesn't work then please do send a log.
> >> >>
> >> >> The link will point to whatever you define via the first parameter,
so
> >> >> if you changed the first parameter it shouldn't be possible to get
> >> >> "the same result".
> >> >>
> >> >>   $ mkdir foo
> >> >>   $ ln -sf test_target foo/test1
> >> >>   $ ln -sf brcm/test_target foo/test2
> >> >>   $ ls -l foo
> >> >>
> >> >>   lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
> >> >>   lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 -> brcm/test_target
> >> >
> >> > Yes, that's essentially the same as what I'm getting.
> >> >
> >> > Now try "cat foo/test1" and what happens?
> >> >
> >> > There is no file called test_target in the foo directory. And
neither is
> >> > there a file called brcm/test_target in the foo directory.
> >>
> >> Correct. The above was just an example to show that you can * create
> >> symlinks * in the foo directory without cd'ing into the foo directory
> >> first.
> >>
> >> If you'd like the symlinks in the example to point to valid targets
> >> then you need to create the targets too, e.g.
> >>
> >>   $ mkdir -p foo/brcm
> >>   $ echo hello > foo/test_target
> >>   $ echo hello2 > foo/brcm/test_target
> >>
> >> But note that the process of creating a symlink is always the same,
> >> regardless of whether the symlink points to a valid target or not (so
> >> you can run these extra commands to create the targets before or after
> >> you create the symlinks).
> >
> > So that doesn't work for me how I expect it to work. I must be missing
> > something fundamental here.
> >
> > The recipe is trying to create a soft link from a file in the current
> > directory to a file in the sub-directory. On my system, your example
creates
> > links from a file in the sub-directory to the another file in the
> > sub-directory.
> >
> > So, to copy your example, but creating the file "test_target" from the
> > start:
> >
> > $ mkdir -p /tmp/test
> > $ cd /tmp/test
> > $ mkdir foo
> > $ echo 1 > test_target
>
> Here you are creating "test_target" in the directory which contains
> foo, not inside foo. So a symlink inside foo pointing to "test_target"
> isn't going to work.

Exactly my point! Martin asked me to do this:

> ln -sf brcmfmac43430-sdio.AP6212.txt
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt

Which is in essence what I'm doing above. It won't work. The file
"brcmfmac43430-sdio.AP6212.txt" doesn't exist in the current directory.
That's why there's a "cd" command in there.

I think, in hind sight, the problem is that there is no path specified for
the original file. Hence, the email I've just sent, suggests I could make
this mod:

-   ( cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
brcmfmac43430-sdio.MUR1DX.txt brcmfmac43430-sdio.txt)
+  ( ln -sf
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt)



>
>
> > $ ln -sf test_target foo/test1
> > $ ln -sf brcm/test_target foo/test2
> > $ ls -l foo
> > total 0
> > lrwxrwxrwx 1 ryan ryan 11 Aug 23 06:54 test1 -> test_target
> > lrwxrwxrwx 1 ryan ryan 16 Aug 23 06:54 test2 -> brcm/test_target
> > $ cat test_target
> > 1
> > $ cat foo/test1
> > cat: foo/test1: No such file or directory
> > $ cat foo/test2
> > cat: foo/test2: No such file or directory
>
> All as expected given that none of the symlink targets exist yet.
>
> > $ echo hello > foo/test_target
> > $ echo hello2 > foo/brcm/test_target
> > bash: foo/brcm/test_target: No such file or directory
>
> You can't create a file within the foo/brcm subdirectory without
> creating that subdirectory first. You've somehow missed that step -
> although it was in my example.

Well, your example said:

>  $ mkdir foo
>  $ ln -sf test_target foo/test1
>  $ ln -sf brcm/test_target foo/test2
>  $ ls -l foo

... and I was trying to show that it doesn't work. Although in fairness,
you did add the "mkdir -p foo/brcm" command in a later email. So I 

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

2018-08-23 Thread Ryan Harkin
On 23 August 2018 at 07:39, Martin Hundebøll  wrote:

> May I suggest using the '-r, --relative' flag from 'ln':
>
>-r, --relative
>   create symbolic links relative to link location
>
> My life felt considerably better after discovering that feature :)
>

Thanks Martin Hundebøll! Yes, that works for me.

So, Martin Jansa, I could make this change:

-   ( cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
brcmfmac43430-sdio.MUR1DX.txt brcmfmac43430-sdio.txt)
+  ( ln -sfr
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt)

Of course, if I'm not going to "cd" into the firmware repo, I'll have to
use absolute paths on both sides of the "ln" command anyway. So I could
drop the 'r' param and it should still work. Eg:

-   ( cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
brcmfmac43430-sdio.MUR1DX.txt brcmfmac43430-sdio.txt)
+  ( ln -sf ${D}${nonarch_base_libdir}/firmware/brcm/
brcmfmac43430-sdio.MUR1DX.txt ${D}${nonarch_base_libdir}/firmware/brcm/
brcmfmac43430-sdio.txt)

I'm still not sure this is any neater, though, as it involves using the
path twice. Is there a maintainer here who has a preference?

FWIW, the TI line that I copied was added by Koen Kooi, who I've added to
the CC:

8c7adb6  2011-10-09  linux-firmware: update, merge in OE classic updates,
fix p..   [Koen Kooi]



> // Martin
>
> On 23/08/2018 08.12, Ryan Harkin wrote:
>
>>
>>
>> On 22 August 2018 at 23:55, Andre McCurdy > armccu...@gmail.com>> wrote:
>>
>> On Wed, Aug 22, 2018 at 2:56 PM, Ryan Harkin > > wrote:
>>  > On Wed, 22 Aug 2018, 21:42 Andre McCurdy, > > wrote:
>>  >> On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin
>> mailto:ryan.har...@linaro.org>>
>>  >> wrote:
>>  >> > On Wed, 22 Aug 2018, 20:02 Martin Jansa,
>> mailto:martin.ja...@gmail.com>> wrote:
>>  >> >>
>>  >> >> Your 1st parameter is wrong, compare again with the example I
>> gave you
>>  >> >> (don't include "brcm/" path in 1st param, because you want
>> the symlink
>>  >> >> to
>>  >> >> point to just brcmfmac43430-sdio.AP6212.txt like you did in
>> the version
>>  >> >> after cd).
>>  >> >
>>  >> > That doesn't work either. I tried it with the same result, but
>> didn't
>>  >> > send a
>>  >> > log of it. That works for you?
>>  >>
>>  >> Martin's example is correct so maybe check your tests again for
>> typos.
>>  >> It it still doesn't work then please do send a log.
>>  >>
>>  >> The link will point to whatever you define via the first
>> parameter, so
>>  >> if you changed the first parameter it shouldn't be possible to get
>>  >> "the same result".
>>  >>
>>  >>   $ mkdir foo
>>  >>   $ ln -sf test_target foo/test1
>>  >>   $ ln -sf brcm/test_target foo/test2
>>  >>   $ ls -l foo
>>  >>
>>  >>   lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
>>  >>   lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 ->
>> brcm/test_target
>>  >
>>  > Yes, that's essentially the same as what I'm getting.
>>  >
>>  > Now try "cat foo/test1" and what happens?
>>  >
>>  > There is no file called test_target in the foo directory. And
>> neither is
>>  > there a file called brcm/test_target in the foo directory.
>>
>> Correct. The above was just an example to show that you can * create
>> symlinks * in the foo directory without cd'ing into the foo directory
>> first.
>>
>> If you'd like the symlinks in the example to point to valid targets
>> then you need to create the targets too, e.g.
>>
>>$ mkdir -p foo/brcm
>>$ echo hello > foo/test_target
>>$ echo hello2 > foo/brcm/test_target
>>
>> But note that the process of creating a symlink is always the same,
>> regardless of whether the symlink points to a valid target or not (so
>> you can run these extra commands to create the targets before or after
>> you create the symlinks).
>>
>>
>> So that doesn't work for me how I expect it to work. I must be missing
>> something fundamental here.
>>
>> The recipe is trying to create a soft link from a file in the current
>> directory to a file in the sub-directory. On my system, your example
>> creates links from a file in the sub-directory to the another file in the
>> sub-directory.
>>
>> So, to copy your example, but creating the file "test_target" from the
>> start:
>>
>> $ mkdir -p /tmp/test
>> $ cd /tmp/test
>> $ mkdir foo
>> $ echo 1 > test_target
>> $ ln -sf test_target foo/test1
>> $ ln -sf brcm/test_target foo/test2
>> $ ls -l foo
>> total 0
>> lrwxrwxrwx 1 ryan ryan 11 Aug 23 06:54 test1 -> test_target
>> lrwxrwxrwx 1 ryan ryan 16 Aug 23 06:54 test2 -> brcm/test_target
>> $ cat test_target
>> 1
>> $ cat foo/test1
>> cat: foo/test1: No such 

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

2018-08-23 Thread Andre McCurdy
On Wed, Aug 22, 2018 at 11:12 PM, Ryan Harkin  wrote:
> On 22 August 2018 at 23:55, Andre McCurdy  wrote:
>> On Wed, Aug 22, 2018 at 2:56 PM, Ryan Harkin 
>> wrote:
>> > On Wed, 22 Aug 2018, 21:42 Andre McCurdy,  wrote:
>> >> On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin 
>> >> wrote:
>> >> > On Wed, 22 Aug 2018, 20:02 Martin Jansa, 
>> >> > wrote:
>> >> >>
>> >> >> Your 1st parameter is wrong, compare again with the example I gave
>> >> >> you
>> >> >> (don't include "brcm/" path in 1st param, because you want the
>> >> >> symlink
>> >> >> to
>> >> >> point to just brcmfmac43430-sdio.AP6212.txt like you did in the
>> >> >> version
>> >> >> after cd).
>> >> >
>> >> > That doesn't work either. I tried it with the same result, but didn't
>> >> > send a
>> >> > log of it. That works for you?
>> >>
>> >> Martin's example is correct so maybe check your tests again for typos.
>> >> It it still doesn't work then please do send a log.
>> >>
>> >> The link will point to whatever you define via the first parameter, so
>> >> if you changed the first parameter it shouldn't be possible to get
>> >> "the same result".
>> >>
>> >>   $ mkdir foo
>> >>   $ ln -sf test_target foo/test1
>> >>   $ ln -sf brcm/test_target foo/test2
>> >>   $ ls -l foo
>> >>
>> >>   lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
>> >>   lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 -> brcm/test_target
>> >
>> > Yes, that's essentially the same as what I'm getting.
>> >
>> > Now try "cat foo/test1" and what happens?
>> >
>> > There is no file called test_target in the foo directory. And neither is
>> > there a file called brcm/test_target in the foo directory.
>>
>> Correct. The above was just an example to show that you can * create
>> symlinks * in the foo directory without cd'ing into the foo directory
>> first.
>>
>> If you'd like the symlinks in the example to point to valid targets
>> then you need to create the targets too, e.g.
>>
>>   $ mkdir -p foo/brcm
>>   $ echo hello > foo/test_target
>>   $ echo hello2 > foo/brcm/test_target
>>
>> But note that the process of creating a symlink is always the same,
>> regardless of whether the symlink points to a valid target or not (so
>> you can run these extra commands to create the targets before or after
>> you create the symlinks).
>
> So that doesn't work for me how I expect it to work. I must be missing
> something fundamental here.
>
> The recipe is trying to create a soft link from a file in the current
> directory to a file in the sub-directory. On my system, your example creates
> links from a file in the sub-directory to the another file in the
> sub-directory.
>
> So, to copy your example, but creating the file "test_target" from the
> start:
>
> $ mkdir -p /tmp/test
> $ cd /tmp/test
> $ mkdir foo
> $ echo 1 > test_target

Here you are creating "test_target" in the directory which contains
foo, not inside foo. So a symlink inside foo pointing to "test_target"
isn't going to work.

> $ ln -sf test_target foo/test1
> $ ln -sf brcm/test_target foo/test2
> $ ls -l foo
> total 0
> lrwxrwxrwx 1 ryan ryan 11 Aug 23 06:54 test1 -> test_target
> lrwxrwxrwx 1 ryan ryan 16 Aug 23 06:54 test2 -> brcm/test_target
> $ cat test_target
> 1
> $ cat foo/test1
> cat: foo/test1: No such file or directory
> $ cat foo/test2
> cat: foo/test2: No such file or directory

All as expected given that none of the symlink targets exist yet.

> $ echo hello > foo/test_target
> $ echo hello2 > foo/brcm/test_target
> bash: foo/brcm/test_target: No such file or directory

You can't create a file within the foo/brcm subdirectory without
creating that subdirectory first. You've somehow missed that step -
although it was in my example.

> $ cat foo/test1
> hello
> $ cat foo/test2
> cat: foo/test2: No such file or directory
> $ cat test_target
> 1
> $ tree
> .
> ├── foo
> │   ├── test1 -> test_target
> │   ├── test2 -> brcm/test_target
> │   └── test_target
> └── test_target
>
> 1 directory, 4 files

No real mysteries here. Everything looks as expected given the
comments above about how you creating the target files.

> So, neither test1 nor test2 are linked to /tmp/test/test_target.

As expected. For a symlink which is in the foo subdirectory, the
target would have to be "../test_target" to correctly point to your
/tmp/test/test_target file.

> test1 is
> linked to /tmp/test/foo/test_target

Not exactly. The test1 symlink in foo just points to "test_target",
there's no absolute path.

ie if you renamed the foo directory to something else then the test1
symlink would still point "test_target" and it would still be a valid
link.

> and test2 is linked to
> /tmp/test/brcm/test_target, which doesn't exist.

Again, test2 is a relative symlink, not absolute. The test2 symlink
points to a target which doesn't exist due to a missing "mkdir -p
foo/brcm" before you tried to create the target file.

> AFAIK, when creating a softlink, you have to give it either an absolute
> path, or a path relative to the link being 

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

2018-08-23 Thread Martin Hundebøll

May I suggest using the '-r, --relative' flag from 'ln':

   -r, --relative
  create symbolic links relative to link location

My life felt considerably better after discovering that feature :)

// Martin

On 23/08/2018 08.12, Ryan Harkin wrote:



On 22 August 2018 at 23:55, Andre McCurdy > wrote:


On Wed, Aug 22, 2018 at 2:56 PM, Ryan Harkin mailto:ryan.har...@linaro.org>> wrote:
 > On Wed, 22 Aug 2018, 21:42 Andre McCurdy, mailto:armccu...@gmail.com>> wrote:
 >> On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin
mailto:ryan.har...@linaro.org>>
 >> wrote:
 >> > On Wed, 22 Aug 2018, 20:02 Martin Jansa,
mailto:martin.ja...@gmail.com>> wrote:
 >> >>
 >> >> Your 1st parameter is wrong, compare again with the example I
gave you
 >> >> (don't include "brcm/" path in 1st param, because you want
the symlink
 >> >> to
 >> >> point to just brcmfmac43430-sdio.AP6212.txt like you did in
the version
 >> >> after cd).
 >> >
 >> > That doesn't work either. I tried it with the same result, but
didn't
 >> > send a
 >> > log of it. That works for you?
 >>
 >> Martin's example is correct so maybe check your tests again for
typos.
 >> It it still doesn't work then please do send a log.
 >>
 >> The link will point to whatever you define via the first
parameter, so
 >> if you changed the first parameter it shouldn't be possible to get
 >> "the same result".
 >>
 >>   $ mkdir foo
 >>   $ ln -sf test_target foo/test1
 >>   $ ln -sf brcm/test_target foo/test2
 >>   $ ls -l foo
 >>
 >>   lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
 >>   lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 -> brcm/test_target
 >
 > Yes, that's essentially the same as what I'm getting.
 >
 > Now try "cat foo/test1" and what happens?
 >
 > There is no file called test_target in the foo directory. And
neither is
 > there a file called brcm/test_target in the foo directory.

Correct. The above was just an example to show that you can * create
symlinks * in the foo directory without cd'ing into the foo directory
first.

If you'd like the symlinks in the example to point to valid targets
then you need to create the targets too, e.g.

   $ mkdir -p foo/brcm
   $ echo hello > foo/test_target
   $ echo hello2 > foo/brcm/test_target

But note that the process of creating a symlink is always the same,
regardless of whether the symlink points to a valid target or not (so
you can run these extra commands to create the targets before or after
you create the symlinks).


So that doesn't work for me how I expect it to work. I must be missing 
something fundamental here.


The recipe is trying to create a soft link from a file in the current 
directory to a file in the sub-directory. On my system, your example 
creates links from a file in the sub-directory to the another file in 
the sub-directory.


So, to copy your example, but creating the file "test_target" from the 
start:


$ mkdir -p /tmp/test
$ cd /tmp/test
$ mkdir foo
$ echo 1 > test_target
$ ln -sf test_target foo/test1
$ ln -sf brcm/test_target foo/test2
$ ls -l foo
total 0
lrwxrwxrwx 1 ryan ryan 11 Aug 23 06:54 test1 -> test_target
lrwxrwxrwx 1 ryan ryan 16 Aug 23 06:54 test2 -> brcm/test_target
$ cat test_target
1
$ cat foo/test1
cat: foo/test1: No such file or directory
$ cat foo/test2
cat: foo/test2: No such file or directory
$ echo hello > foo/test_target
$ echo hello2 > foo/brcm/test_target
bash: foo/brcm/test_target: No such file or directory
$ cat foo/test1
hello
$ cat foo/test2
cat: foo/test2: No such file or directory
$ cat test_target
1
$ tree
.
├── foo
│   ├── test1 -> test_target
│   ├── test2 -> brcm/test_target
│   └── test_target
└── test_target

1 directory, 4 files

So, neither test1 nor test2 are linked to /tmp/test/test_target. test1 
is linked to /tmp/test/foo/test_target and test2 is linked to 
/tmp/test/brcm/test_target, which doesn't exist.


AFAIK, when creating a softlink, you have to give it either an absolute 
path, or a path relative to the link being created. The path cannot be 
relative to the original file that you want to link to.


So, this will work:

$cd /tmp/test
$ ln -sf ../test_target foo/test3
$ cat foo/test3
1
$ cat /tmp/test/foo/test3
1

But that is a strange way to create the soft link, IMO.

AFAICT, for the recipe, to get rid of the "cd", I'd have to specify an 
absolute path to the original file:


+do_install_append_bcm43430-nvram-mur1dx() {
+       ( ln -sf ${PWD}/brcmfmac43430-sdio.MUR1DX.txt 
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt)


... assuming PWD is available to the recipe. There will be a proper 
Yocto variable I can use, of course, but I can't think of it right now.


Either way, Martin's example doesn't work for me. And adding the 
absolute 

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

2018-08-23 Thread Ryan Harkin
On 22 August 2018 at 23:55, Andre McCurdy  wrote:

> On Wed, Aug 22, 2018 at 2:56 PM, Ryan Harkin 
> wrote:
> > On Wed, 22 Aug 2018, 21:42 Andre McCurdy,  wrote:
> >> On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin 
> >> wrote:
> >> > On Wed, 22 Aug 2018, 20:02 Martin Jansa, 
> wrote:
> >> >>
> >> >> Your 1st parameter is wrong, compare again with the example I gave
> you
> >> >> (don't include "brcm/" path in 1st param, because you want the
> symlink
> >> >> to
> >> >> point to just brcmfmac43430-sdio.AP6212.txt like you did in the
> version
> >> >> after cd).
> >> >
> >> > That doesn't work either. I tried it with the same result, but didn't
> >> > send a
> >> > log of it. That works for you?
> >>
> >> Martin's example is correct so maybe check your tests again for typos.
> >> It it still doesn't work then please do send a log.
> >>
> >> The link will point to whatever you define via the first parameter, so
> >> if you changed the first parameter it shouldn't be possible to get
> >> "the same result".
> >>
> >>   $ mkdir foo
> >>   $ ln -sf test_target foo/test1
> >>   $ ln -sf brcm/test_target foo/test2
> >>   $ ls -l foo
> >>
> >>   lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
> >>   lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 -> brcm/test_target
> >
> > Yes, that's essentially the same as what I'm getting.
> >
> > Now try "cat foo/test1" and what happens?
> >
> > There is no file called test_target in the foo directory. And neither is
> > there a file called brcm/test_target in the foo directory.
>
> Correct. The above was just an example to show that you can * create
> symlinks * in the foo directory without cd'ing into the foo directory
> first.
>
> If you'd like the symlinks in the example to point to valid targets
> then you need to create the targets too, e.g.
>
>   $ mkdir -p foo/brcm
>   $ echo hello > foo/test_target
>   $ echo hello2 > foo/brcm/test_target
>
> But note that the process of creating a symlink is always the same,
> regardless of whether the symlink points to a valid target or not (so
> you can run these extra commands to create the targets before or after
> you create the symlinks).
>

So that doesn't work for me how I expect it to work. I must be missing
something fundamental here.

The recipe is trying to create a soft link from a file in the current
directory to a file in the sub-directory. On my system, your example
creates links from a file in the sub-directory to the another file in the
sub-directory.

So, to copy your example, but creating the file "test_target" from the
start:

$ mkdir -p /tmp/test
$ cd /tmp/test
$ mkdir foo
$ echo 1 > test_target
$ ln -sf test_target foo/test1
$ ln -sf brcm/test_target foo/test2
$ ls -l foo
total 0
lrwxrwxrwx 1 ryan ryan 11 Aug 23 06:54 test1 -> test_target
lrwxrwxrwx 1 ryan ryan 16 Aug 23 06:54 test2 -> brcm/test_target
$ cat test_target
1
$ cat foo/test1
cat: foo/test1: No such file or directory
$ cat foo/test2
cat: foo/test2: No such file or directory
$ echo hello > foo/test_target
$ echo hello2 > foo/brcm/test_target
bash: foo/brcm/test_target: No such file or directory
$ cat foo/test1
hello
$ cat foo/test2
cat: foo/test2: No such file or directory
$ cat test_target
1
$ tree
.
├── foo
│   ├── test1 -> test_target
│   ├── test2 -> brcm/test_target
│   └── test_target
└── test_target

1 directory, 4 files

So, neither test1 nor test2 are linked to /tmp/test/test_target. test1 is
linked to /tmp/test/foo/test_target and test2 is linked to
/tmp/test/brcm/test_target, which doesn't exist.

AFAIK, when creating a softlink, you have to give it either an absolute
path, or a path relative to the link being created. The path cannot be
relative to the original file that you want to link to.

So, this will work:

$cd /tmp/test
$ ln -sf ../test_target foo/test3
$ cat foo/test3
1
$ cat /tmp/test/foo/test3
1

But that is a strange way to create the soft link, IMO.

AFAICT, for the recipe, to get rid of the "cd", I'd have to specify an
absolute path to the original file:

+do_install_append_bcm43430-nvram-mur1dx() {
+   ( ln -sf ${PWD}/brcmfmac43430-sdio.MUR1DX.txt
${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt)

... assuming PWD is available to the recipe. There will be a proper Yocto
variable I can use, of course, but I can't think of it right now.

Either way, Martin's example doesn't work for me. And adding the absolute
path of the original file doesn't seem any neater or clearer than following
the TI example from the do_install a few lines up in the recipe. But I'm
happy to do it either way, so long as it works.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-22 Thread Andre McCurdy
On Wed, Aug 22, 2018 at 2:56 PM, Ryan Harkin  wrote:
> On Wed, 22 Aug 2018, 21:42 Andre McCurdy,  wrote:
>> On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin 
>> wrote:
>> > On Wed, 22 Aug 2018, 20:02 Martin Jansa,  wrote:
>> >>
>> >> Your 1st parameter is wrong, compare again with the example I gave you
>> >> (don't include "brcm/" path in 1st param, because you want the symlink
>> >> to
>> >> point to just brcmfmac43430-sdio.AP6212.txt like you did in the version
>> >> after cd).
>> >
>> > That doesn't work either. I tried it with the same result, but didn't
>> > send a
>> > log of it. That works for you?
>>
>> Martin's example is correct so maybe check your tests again for typos.
>> It it still doesn't work then please do send a log.
>>
>> The link will point to whatever you define via the first parameter, so
>> if you changed the first parameter it shouldn't be possible to get
>> "the same result".
>>
>>   $ mkdir foo
>>   $ ln -sf test_target foo/test1
>>   $ ln -sf brcm/test_target foo/test2
>>   $ ls -l foo
>>
>>   lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
>>   lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 -> brcm/test_target
>
> Yes, that's essentially the same as what I'm getting.
>
> Now try "cat foo/test1" and what happens?
>
> There is no file called test_target in the foo directory. And neither is
> there a file called brcm/test_target in the foo directory.

Correct. The above was just an example to show that you can * create
symlinks * in the foo directory without cd'ing into the foo directory
first.

If you'd like the symlinks in the example to point to valid targets
then you need to create the targets too, e.g.

  $ mkdir -p foo/brcm
  $ echo hello > foo/test_target
  $ echo hello2 > foo/brcm/test_target

But note that the process of creating a symlink is always the same,
regardless of whether the symlink points to a valid target or not (so
you can run these extra commands to create the targets before or after
you create the symlinks).
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-22 Thread Ryan Harkin
On Wed, 22 Aug 2018, 21:42 Andre McCurdy,  wrote:

> On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin 
> wrote:
> > On Wed, 22 Aug 2018, 20:02 Martin Jansa,  wrote:
> >>
> >> Your 1st parameter is wrong, compare again with the example I gave you
> >> (don't include "brcm/" path in 1st param, because you want the symlink
> to
> >> point to just brcmfmac43430-sdio.AP6212.txt like you did in the version
> >> after cd).
> >
> > That doesn't work either. I tried it with the same result, but didn't
> send a
> > log of it. That works for you?
>
> Martin's example is correct so maybe check your tests again for typos.
> It it still doesn't work then please do send a log.
>
> The link will point to whatever you define via the first parameter, so
> if you changed the first parameter it shouldn't be possible to get
> "the same result".
>
>   $ mkdir foo
>   $ ln -sf test_target foo/test1
>   $ ln -sf brcm/test_target foo/test2
>   $ ls -l foo
>
>   lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
>   lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 -> brcm/test_target
>

Yes, that's essentially the same as what I'm getting.

Now try "cat foo/test1" and what happens?

There is no file called test_target in the foo directory. And neither is
there a file called brcm/test_target in the foo directory.

>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-22 Thread Ryan Harkin
On Wed, 22 Aug 2018, 21:36 Khem Raj,  wrote:

> I wonder how it work with meta-raspverrypi now that it has its own
> packing for firmware
>

Sorry Them, I don't understand your question.


On Wed, Aug 22, 2018 at 1:10 PM Ryan Harkin  wrote:
> >
> >
> >
> > On Wed, 22 Aug 2018, 20:02 Martin Jansa,  wrote:
> >>
> >> Your 1st parameter is wrong, compare again with the example I gave you
> (don't include "brcm/" path in 1st param, because you want the symlink to
> point to just brcmfmac43430-sdio.AP6212.txt like you did in the version
> after cd).
> >
> >
> > That doesn't work either. I tried it with the same result, but didn't
> send a log of it. That works for you?
> >
> >
> >> On Wed, Aug 22, 2018 at 7:11 PM Ryan Harkin 
> wrote:
> >>>
> >>> This is curious!
> >>>
> >>> On 22 August 2018 at 17:56, Martin Jansa 
> wrote:
> 
>  cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
> brcmfmac43430-sdio.AP6212.txt brcmfmac43430-sdio.txt
> 
>  is the same as
> 
>  ln -sf brcmfmac43430-sdio.AP6212.txt
> ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
> >>>
> >>>
> >>> On my system, this is what happens when I'm in the root of the
> linux-firmware repo:
> >>>
> >>> $ ls -al brcm/*.txt
> >>> -rw-rw-r-- 1 ryan ryan 875 Aug 22 18:08
> brcm/brcmfmac43430-sdio.AP6212.txt
> >>> -rw-rw-r-- 1 ryan ryan 831 Aug 21 14:48
> brcm/brcmfmac43430-sdio.MUR1DX.txt
> >>>
> >>> $ ln -sf brcm/brcmfmac43430-sdio.AP6212.txt brcm/brcmfmac43430-sdio.txt
> >>>
> >>> $ ls -al brcm/*.txt
> >>> -rw-rw-r-- 1 ryan ryan 875 Aug 22 18:08
> brcm/brcmfmac43430-sdio.AP6212.txt
> >>> -rw-rw-r-- 1 ryan ryan 831 Aug 21 14:48
> brcm/brcmfmac43430-sdio.MUR1DX.txt
> >>> lrwxrwxrwx 1 ryan ryan  34 Aug 22 18:08 brcm/brcmfmac43430-sdio.txt ->
> brcm/brcmfmac43430-sdio.AP6212.txt
> >>>
> >>> And the file is not valid.
> >>>
> >>> $ cat brcm/brcmfmac43430-sdio.txt
> >>> cat: brcm/brcmfmac43430-sdio.txt: No such file or directory
> >>>
> >>> So perhaps I'm doing something wrong. I tried your suggestion
> originally and it didn't work for me. Maybe I made a typo or something?
> >>>
> >>>
> 
>  On Wed, Aug 22, 2018 at 6:47 PM Ryan Harkin 
> wrote:
> >
> >
> >
> > On 22 August 2018 at 17:41, Martin Jansa 
> wrote:
> >>
> >> The "cd ${D}${nonarch_base_libdir}/firmware/brcm/" doesn't seem to
> be needed, just include the path in 2nd ln parameter.
> >
> >
> > I don't think that works, or at least, it doesn't work for me, so I
> may be doing something wrong. I'm also copying the example used in the
> do_install() a few lines up as I figured that would be the preferred style
> for this recipe.
> >
> >>
> >> On Wed, Aug 22, 2018 at 6:30 PM Ryan Harkin 
> 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 
> >>> ---
> >>>  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
> >>>
> >
> >>>
> > --
> > ___
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-- 

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

2018-08-22 Thread Andre McCurdy
On Wed, Aug 22, 2018 at 1:10 PM, Ryan Harkin  wrote:
> On Wed, 22 Aug 2018, 20:02 Martin Jansa,  wrote:
>>
>> Your 1st parameter is wrong, compare again with the example I gave you
>> (don't include "brcm/" path in 1st param, because you want the symlink to
>> point to just brcmfmac43430-sdio.AP6212.txt like you did in the version
>> after cd).
>
> That doesn't work either. I tried it with the same result, but didn't send a
> log of it. That works for you?

Martin's example is correct so maybe check your tests again for typos.
It it still doesn't work then please do send a log.

The link will point to whatever you define via the first parameter, so
if you changed the first parameter it shouldn't be possible to get
"the same result".

  $ mkdir foo
  $ ln -sf test_target foo/test1
  $ ln -sf brcm/test_target foo/test2
  $ ls -l foo

  lrwxrwxrwx 1 andre andre 11 Aug 22 13:35 test1 -> test_target
  lrwxrwxrwx 1 andre andre 16 Aug 22 13:35 test2 -> brcm/test_target
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-22 Thread Khem Raj
I wonder how it work with meta-raspverrypi now that it has its own
packing for firmware
On Wed, Aug 22, 2018 at 1:10 PM Ryan Harkin  wrote:
>
>
>
> On Wed, 22 Aug 2018, 20:02 Martin Jansa,  wrote:
>>
>> Your 1st parameter is wrong, compare again with the example I gave you 
>> (don't include "brcm/" path in 1st param, because you want the symlink to 
>> point to just brcmfmac43430-sdio.AP6212.txt like you did in the version 
>> after cd).
>
>
> That doesn't work either. I tried it with the same result, but didn't send a 
> log of it. That works for you?
>
>
>> On Wed, Aug 22, 2018 at 7:11 PM Ryan Harkin  wrote:
>>>
>>> This is curious!
>>>
>>> On 22 August 2018 at 17:56, Martin Jansa  wrote:

 cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf 
 brcmfmac43430-sdio.AP6212.txt brcmfmac43430-sdio.txt

 is the same as

 ln -sf brcmfmac43430-sdio.AP6212.txt 
 ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt
>>>
>>>
>>> On my system, this is what happens when I'm in the root of the 
>>> linux-firmware repo:
>>>
>>> $ ls -al brcm/*.txt
>>> -rw-rw-r-- 1 ryan ryan 875 Aug 22 18:08 brcm/brcmfmac43430-sdio.AP6212.txt
>>> -rw-rw-r-- 1 ryan ryan 831 Aug 21 14:48 brcm/brcmfmac43430-sdio.MUR1DX.txt
>>>
>>> $ ln -sf brcm/brcmfmac43430-sdio.AP6212.txt brcm/brcmfmac43430-sdio.txt
>>>
>>> $ ls -al brcm/*.txt
>>> -rw-rw-r-- 1 ryan ryan 875 Aug 22 18:08 brcm/brcmfmac43430-sdio.AP6212.txt
>>> -rw-rw-r-- 1 ryan ryan 831 Aug 21 14:48 brcm/brcmfmac43430-sdio.MUR1DX.txt
>>> lrwxrwxrwx 1 ryan ryan  34 Aug 22 18:08 brcm/brcmfmac43430-sdio.txt -> 
>>> brcm/brcmfmac43430-sdio.AP6212.txt
>>>
>>> And the file is not valid.
>>>
>>> $ cat brcm/brcmfmac43430-sdio.txt
>>> cat: brcm/brcmfmac43430-sdio.txt: No such file or directory
>>>
>>> So perhaps I'm doing something wrong. I tried your suggestion originally 
>>> and it didn't work for me. Maybe I made a typo or something?
>>>
>>>

 On Wed, Aug 22, 2018 at 6:47 PM Ryan Harkin  wrote:
>
>
>
> On 22 August 2018 at 17:41, Martin Jansa  wrote:
>>
>> The "cd ${D}${nonarch_base_libdir}/firmware/brcm/" doesn't seem to be 
>> needed, just include the path in 2nd ln parameter.
>
>
> I don't think that works, or at least, it doesn't work for me, so I may 
> be doing something wrong. I'm also copying the example used in the 
> do_install() a few lines up as I figured that would be the preferred 
> style for this recipe.
>
>>
>> On Wed, Aug 22, 2018 at 6:30 PM Ryan Harkin  
>> 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 
>>> ---
>>>  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
>>>
>
>>>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-22 Thread Ryan Harkin
On Wed, 22 Aug 2018, 20:02 Martin Jansa,  wrote:

> Your 1st parameter is wrong, compare again with the example I gave you
> (don't include "brcm/" path in 1st param, because you want the symlink to
> point to just brcmfmac43430-sdio.AP6212.txt like you did in the version
> after cd).
>

That doesn't work either. I tried it with the same result, but didn't send
a log of it. That works for you?


On Wed, Aug 22, 2018 at 7:11 PM Ryan Harkin  wrote:
>
>> This is curious!
>>
>> On 22 August 2018 at 17:56, Martin Jansa  wrote:
>>
>>> cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
>>> brcmfmac43430-sdio.AP6212.txt brcmfmac43430-sdio.txt
>>>
>>> is the same as
>>>
>>> ln -sf brcmfmac43430-sdio.AP6212.txt ${D}${nonarch_base_libdir}/fir
>>> mware/brcm/brcmfmac43430-sdio.txt
>>>
>>
>> On my system, this is what happens when I'm in the root of the
>> linux-firmware repo:
>>
>> $ ls -al brcm/*.txt
>> -rw-rw-r-- 1 ryan ryan 875 Aug 22 18:08 brcm/brcmfmac43430-sdio.AP6212.txt
>> -rw-rw-r-- 1 ryan ryan 831 Aug 21 14:48 brcm/brcmfmac43430-sdio.MUR1DX.txt
>>
>> $ ln -sf brcm/brcmfmac43430-sdio.AP6212.txt brcm/brcmfmac43430-sdio.txt
>>
>> $ ls -al brcm/*.txt
>> -rw-rw-r-- 1 ryan ryan 875 Aug 22 18:08 brcm/brcmfmac43430-sdio.AP6212.txt
>> -rw-rw-r-- 1 ryan ryan 831 Aug 21 14:48 brcm/brcmfmac43430-sdio.MUR1DX.txt
>> lrwxrwxrwx 1 ryan ryan  34 Aug 22 18:08 brcm/brcmfmac43430-sdio.txt ->
>> brcm/brcmfmac43430-sdio.AP6212.txt
>>
>> And the file is not valid.
>>
>> $ cat brcm/brcmfmac43430-sdio.txt
>> cat: brcm/brcmfmac43430-sdio.txt: No such file or directory
>>
>> So perhaps I'm doing something wrong. I tried your suggestion originally
>> and it didn't work for me. Maybe I made a typo or something?
>>
>>
>>
>>> On Wed, Aug 22, 2018 at 6:47 PM Ryan Harkin 
>>> wrote:
>>>


 On 22 August 2018 at 17:41, Martin Jansa 
 wrote:

> The "cd ${D}${nonarch_base_libdir}/firmware/brcm/" doesn't seem to be
> needed, just include the path in 2nd ln parameter.
>

 I don't think that works, or at least, it doesn't work for me, so I may
 be doing something wrong. I'm also copying the example used in the
 do_install() a few lines up as I figured that would be the preferred style
 for this recipe.


> On Wed, Aug 22, 2018 at 6:30 PM Ryan Harkin 
> 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 
>> ---
>>  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
>>
>>

>>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-22 Thread Martin Jansa
Your 1st parameter is wrong, compare again with the example I gave you
(don't include "brcm/" path in 1st param, because you want the symlink to
point to just brcmfmac43430-sdio.AP6212.txt like you did in the version
after cd).

On Wed, Aug 22, 2018 at 7:11 PM Ryan Harkin  wrote:

> This is curious!
>
> On 22 August 2018 at 17:56, Martin Jansa  wrote:
>
>> cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
>> brcmfmac43430-sdio.AP6212.txt brcmfmac43430-sdio.txt
>>
>> is the same as
>>
>> ln -sf brcmfmac43430-sdio.AP6212.txt ${D}${nonarch_base_libdir}/fir
>> mware/brcm/brcmfmac43430-sdio.txt
>>
>
> On my system, this is what happens when I'm in the root of the
> linux-firmware repo:
>
> $ ls -al brcm/*.txt
> -rw-rw-r-- 1 ryan ryan 875 Aug 22 18:08 brcm/brcmfmac43430-sdio.AP6212.txt
> -rw-rw-r-- 1 ryan ryan 831 Aug 21 14:48 brcm/brcmfmac43430-sdio.MUR1DX.txt
>
> $ ln -sf brcm/brcmfmac43430-sdio.AP6212.txt brcm/brcmfmac43430-sdio.txt
>
> $ ls -al brcm/*.txt
> -rw-rw-r-- 1 ryan ryan 875 Aug 22 18:08 brcm/brcmfmac43430-sdio.AP6212.txt
> -rw-rw-r-- 1 ryan ryan 831 Aug 21 14:48 brcm/brcmfmac43430-sdio.MUR1DX.txt
> lrwxrwxrwx 1 ryan ryan  34 Aug 22 18:08 brcm/brcmfmac43430-sdio.txt ->
> brcm/brcmfmac43430-sdio.AP6212.txt
>
> And the file is not valid.
>
> $ cat brcm/brcmfmac43430-sdio.txt
> cat: brcm/brcmfmac43430-sdio.txt: No such file or directory
>
> So perhaps I'm doing something wrong. I tried your suggestion originally
> and it didn't work for me. Maybe I made a typo or something?
>
>
>
>> On Wed, Aug 22, 2018 at 6:47 PM Ryan Harkin 
>> wrote:
>>
>>>
>>>
>>> On 22 August 2018 at 17:41, Martin Jansa  wrote:
>>>
 The "cd ${D}${nonarch_base_libdir}/firmware/brcm/" doesn't seem to be
 needed, just include the path in 2nd ln parameter.

>>>
>>> I don't think that works, or at least, it doesn't work for me, so I may
>>> be doing something wrong. I'm also copying the example used in the
>>> do_install() a few lines up as I figured that would be the preferred style
>>> for this recipe.
>>>
>>>
 On Wed, Aug 22, 2018 at 6:30 PM Ryan Harkin 
 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 
> ---
>  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
>
>
>>>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-22 Thread Ryan Harkin
This is curious!

On 22 August 2018 at 17:56, Martin Jansa  wrote:

> cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
> brcmfmac43430-sdio.AP6212.txt brcmfmac43430-sdio.txt
>
> is the same as
>
> ln -sf brcmfmac43430-sdio.AP6212.txt ${D}${nonarch_base_libdir}/fir
> mware/brcm/brcmfmac43430-sdio.txt
>

On my system, this is what happens when I'm in the root of the
linux-firmware repo:

$ ls -al brcm/*.txt
-rw-rw-r-- 1 ryan ryan 875 Aug 22 18:08 brcm/brcmfmac43430-sdio.AP6212.txt
-rw-rw-r-- 1 ryan ryan 831 Aug 21 14:48 brcm/brcmfmac43430-sdio.MUR1DX.txt

$ ln -sf brcm/brcmfmac43430-sdio.AP6212.txt brcm/brcmfmac43430-sdio.txt

$ ls -al brcm/*.txt
-rw-rw-r-- 1 ryan ryan 875 Aug 22 18:08 brcm/brcmfmac43430-sdio.AP6212.txt
-rw-rw-r-- 1 ryan ryan 831 Aug 21 14:48 brcm/brcmfmac43430-sdio.MUR1DX.txt
lrwxrwxrwx 1 ryan ryan  34 Aug 22 18:08 brcm/brcmfmac43430-sdio.txt ->
brcm/brcmfmac43430-sdio.AP6212.txt

And the file is not valid.

$ cat brcm/brcmfmac43430-sdio.txt
cat: brcm/brcmfmac43430-sdio.txt: No such file or directory

So perhaps I'm doing something wrong. I tried your suggestion originally
and it didn't work for me. Maybe I made a typo or something?



> On Wed, Aug 22, 2018 at 6:47 PM Ryan Harkin 
> wrote:
>
>>
>>
>> On 22 August 2018 at 17:41, Martin Jansa  wrote:
>>
>>> The "cd ${D}${nonarch_base_libdir}/firmware/brcm/" doesn't seem to be
>>> needed, just include the path in 2nd ln parameter.
>>>
>>
>> I don't think that works, or at least, it doesn't work for me, so I may
>> be doing something wrong. I'm also copying the example used in the
>> do_install() a few lines up as I figured that would be the preferred style
>> for this recipe.
>>
>>
>>> On Wed, Aug 22, 2018 at 6:30 PM Ryan Harkin 
>>> 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 
 ---
  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


>>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-22 Thread Martin Jansa
cd ${D}${nonarch_base_libdir}/firmware/brcm/ ; ln -sf
brcmfmac43430-sdio.AP6212.txt brcmfmac43430-sdio.txt

is the same as

ln -sf brcmfmac43430-sdio.AP6212.txt ${D}${nonarch_base_libdir}/fir
mware/brcm/brcmfmac43430-sdio.txt

On Wed, Aug 22, 2018 at 6:47 PM Ryan Harkin  wrote:

>
>
> On 22 August 2018 at 17:41, Martin Jansa  wrote:
>
>> The "cd ${D}${nonarch_base_libdir}/firmware/brcm/" doesn't seem to be
>> needed, just include the path in 2nd ln parameter.
>>
>
> I don't think that works, or at least, it doesn't work for me, so I may be
> doing something wrong. I'm also copying the example used in the
> do_install() a few lines up as I figured that would be the preferred style
> for this recipe.
>
>
>> On Wed, Aug 22, 2018 at 6:30 PM Ryan Harkin 
>> 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 
>>> ---
>>>  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
>>>
>>>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-22 Thread Ryan Harkin
On 22 August 2018 at 17:41, Martin Jansa  wrote:

> The "cd ${D}${nonarch_base_libdir}/firmware/brcm/" doesn't seem to be
> needed, just include the path in 2nd ln parameter.
>

I don't think that works, or at least, it doesn't work for me, so I may be
doing something wrong. I'm also copying the example used in the
do_install() a few lines up as I figured that would be the preferred style
for this recipe.


> On Wed, Aug 22, 2018 at 6:30 PM Ryan Harkin 
> 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 
>> ---
>>  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
>>
>>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-22 Thread Martin Jansa
The "cd ${D}${nonarch_base_libdir}/firmware/brcm/" doesn't seem to be
needed, just include the path in 2nd ln parameter.

On Wed, Aug 22, 2018 at 6:30 PM Ryan Harkin  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 
> ---
>  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
>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-08-22 Thread Ryan Harkin
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 
---
 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

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core