[PATCH 2/2] bcm4908: build flashable & bootable firmware images

Adrian Schmutzler mail at adrianschmutzler.de
Tue Jan 19 06:30:11 EST 2021


> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Rafal Milecki
> Sent: Montag, 18. Januar 2021 12:42
> To: Adrian Schmutzler <mail at adrianschmutzler.de>
> Cc: 'Rafał Miłecki' <zajec5 at gmail.com>; noltari at gmail.com; openwrt-
> devel at lists.openwrt.org
> Subject: Re: [PATCH 2/2] bcm4908: build flashable & bootable firmware
> images
> 
> 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.

On a second thought, I think having the DEVICE_NAME based names here would still be better.
This is the logical naming based on OpenWrt build environment, and with the requirement to have device name and compatible consistent (which holds for the affected targets/devices), external builders will just have to replace one character in their (manually set) device identifier. Now we have the chance to do it right when there is still only few devices and users of this repo around.

I will write some text and throw it against Noltari and you later today ...

Best

Adrian

> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210119/ad9f74a4/attachment.sig>


More information about the openwrt-devel mailing list