[PATCH 2/2] bcm4908: build flashable & bootable firmware images
Rafał Miłecki
rafal at milecki.pl
Mon Jan 18 06:41:33 EST 2021
On 2021-01-18 12:29, Adrian Schmutzler wrote:
>> Do you mean "files" as "directories" (I know every dir is a file ;) )?
>> If you talk
>> about "asus,gt-ac5300", it's used by the:
>> cp -r $(COMPATIBLE)/* $@-bootfs/
>> line in the Build/bcm4908img.
>
> Ah, okay. Yes, I was referring to the directory names here. I
> personally consider a comma in a file name a bit disturbing/confusing
> and since it's not really necessary I'd simply switch to the
> underscore naming scheme (like done for images and tmp dirs. ($@)
> anyway) here.
> That would mean changing the folder name to "asus_gt-ac5300" and the
> referenced line to
>
> cp -r $(DEVICE_NAME)/* $@-bootfs/
>
> Since this is pure image building code at this point, using the device
> definition name (DEVICE_NAME) also appears the more direct approach
> here compared to the compatible which is the relevant identifier on
> the _running_ device.
I agree with that reasoning and I like that idea of reusing DEVICE_NAME.
>> As for naming, I followed what's used by the bcm63xx-cfe repo:
>> https://github.com/openwrt/bcm63xx-cfe
>
> Since these are used/selected at build time as well, I'd personally
> also haven chosen the underscore naming (according to DEVICE_NAME) for
> these.
>
> Note that if you do apply these two "changes", you get rid of the
> COMPATIBLE variable at all for the proposed patch, and this is
> probably the reason why a variable like this is not needed for "build
> steps" in the other targets (at least those I know closer by now),
> which simply use DEVICE_NAME for stuff like that. :-)
>
> I'd personally prefer going that way, as using DEVICE_NAME would be
> more consistent and expectable for this matter.
This is repository started by Álvaro, I just followed existing schema
there.
I don't really think I want to start discussion on that and suggest
another
naming schema.
One more thing to consider is that more project that just OpenWrt may
want to
use that repository. I use it e.g. in my buildroot. Such external
projects may
find DTS "compatible" string more common that OpenWrt-specific device
name.
More information about the openwrt-devel
mailing list