On 30 November 2017 at 09:18, Koen Kooi <koen.kooi@linaro.org> wrote:


> Op 30 nov. 2017, om 10:08 heeft Ryan Harkin <ryan.harkin@linaro.org> het volgende geschreven:
>
>
>
> On 30 November 2017 at 08:34, Koen Kooi <koen.kooi@linaro.org> wrote:
> Op 30 nov. 2017, om 09:26 heeft Ryan Harkin <ryan.harkin@linaro.org> het volgende geschreven:
> >
> > Here's another question:
> >
> > When I build for MACHINE=imx7s-warp, should meta-raspberrypi's linux-firmware recipe be running or not? Is there something in meta-raspberrypi that makes it only run on MACHINE=raspberrypi?
>
> Looking at https://github.com/agherzan/meta-raspberrypi/blob/master/recipes-kernel/linux-firmware/linux-firmware_%25.bbappend it should be included
>
> > In an OE-RPB based build, it doesn't run. I put a bbwarn statement into the bbappend file's do_install and it didn't output anything.
> >
> > But when I run it in the "other" distro, meta-raspberrypi's linux-firmware_%.bbappend is running during a warp7 build and outputting the bbwarn from meta-raspberrypi.
> >
> > Is this expected?
>
> It depends on the order and content of the other linux-firmware bbappend files, if one that sorts higher does:
>
> do_install() {
>   something
> }
>
> all the lower sorted appends will not get their do_install_append in.
>
> Anyway, try doing ‘bitbake -e linux-firmware > firmware-e.txt’ and inspecting the result, that should list the overrides and their order for every variable and method.
>
> OK, thanks for that top tip.
>
> So rpi and warp7 are both being included in the final do_install function in both OE-RPB and my other distro.
>
> Why I didn't see the bbwarn from meta-raspberrypi on OE-RPB is a different matter, especially as I'm no longer seeing either bbwarn when I build right now.

Code in methods only gets executed when that method runs and *doesn’t* run if bitbake uses sstate to restore it. So you might not see it due to caching working as intended.

Yes, I tried unsuccessfully to clean, I guess...

Eg:
bitbake -c do_cleanall linux-firmware
 


>
> But because the rpi layer is included in the manifest after/later than my layer, the rpi do_install appended commands run after the warp7 ones, so there's no way I'll ever get my firmware into the disk image with this mechanism.

Both appends touch the same file(s)?

Yes, identical filenames and locations, but different versions.

:-( 

regards,

Koen

>
>
> regards,
>
> Koen
>
> >
> >
> > On 29 November 2017 at 15:28, Koen Kooi <koen.kooi@linaro.org> wrote:
> > Op 29 nov. 2017, om 15:32 heeft Ryan Harkin <ryan.harkin@linaro.org> het volgende geschreven:
> > >
> > > Hi all,
> > >
> > > An update for those interested:
> > >
> > > brcmfmac43430-sdio.bin is provided by:
> > > openembedded-core/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb:530:
> > >
> > > brcmfmac43430-sdio.txt is provided by:
> > > recipes-kernel/linux-firmware/.linux-firmware_%.bbappend.swp
> > >
> > > So I renamed my bbappend to match the file in meta-raspberry-pi. And these are the contents:
> > >
> > > --------------------------------------------------------------------------------
> > > SRCREV_linuxfirmware = "a61ac5cf8374edbfe692d12f805a1b194f7fead2"
> > > SRCREV_recalboxbuildroot = "f648e4b54eb5e4be593746d6cc51375b22a7efbd"
> > >
> > > SRC_URI += "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git;nobranch=1;destsuffix=${S}/git1;name=linuxfirmware \
> > >             git://github.com/recalbox/recalbox-buildroot.git;protocol=https;nobranch=1;destsuffix=${S}/git2;name=recalboxbuildroot
> >
> > I think this will expand to:
> >
> > git://uri-in-recipe.git \
> > git://uri-in-bbappend.git \
> > git://github-uri-in-bbappend.git \
> >
> > And since SRCPV is used in the recipe, you’ll need to set SRCREV_FORMAT (I forget the actual variable name) to tell bitbake which repo to base SRCPV on.
> >
> > Thanks, I'll try and work out what that variable is and how to use it.
> >
> > For now, I've copied the meta-raspberrypi method and cached the files locally. I'm not sure if that is better or worse.
> >
> > Cheers,
> > Ryan.
> >
> > regards,
> >
> > Koen