[OpenWrt-Devel] [PATCH 6/8] mvebu: add vendor to device names

Petr Štetiar ynezz at true.cz
Fri May 3 18:38:03 EDT 2019


Hauke Mehrtens <hauke at hauke-m.de> [2019-05-04 00:00:25]:

Hi,

> On 5/1/19 7:42 PM, Tomasz Maciej Nowak wrote:
> > Replace SoC names with vendors in device names, in few cases, and add
> > vendor to developemnt boards for easier identyfying potential firmware to
> > flash.
> 
> Will sysupgrade still work after this rename? Isn't there some script
> which checks if the image is compatible with the currently installed image?

SUPPORTED_DEVICES variable is used for this, so it's probably going to work,
but if we're willing to rename it, it might be a good idea to follow the DT
compatible naming scheme as used in other targets.

So instead of this in patch 4/8:

 -  SUPPORTED_DEVICES = $$(DEVICE_DTS)
 +  SUPPORTED_DEVICES = $$(firstword $$(DEVICE_DTS))

Tomasz should be doing following:

 -  SUPPORTED_DEVICES = $$(DEVICE_DTS)
 +  SUPPORTED_DEVICES = $(subst _,$(comma),$(1))

as currently being used in apm821xx, ath79, ipq40xx, ipq806x, kirkwood, lantiq,
omap, oxnas and ramips.

So this

> > -define Device/armada-3720-db
> > +define Device/marvell-armada-3720-db

would become

> > -define Device/armada-3720-db
> > +define Device/marvell_armada-3720-db

and this

> > -TARGET_DEVICES += armada-3720-db
> > +TARGET_DEVICES += marvell-armada-3720-db

would become 

> > -TARGET_DEVICES += armada-3720-db
> > +TARGET_DEVICES += marvell_armada-3720-db
> > -SUPPORTED_DEVICES := marvell,armada-3720-db

as the SUPPORTED_DEVICES variable would be automagically set to the same value
by the code above, following the DRY principle.

If the SUPPORTED_DEVICES variable is going to change as for example here:

> > -define Device/openblocks-ax3-4
> > +define Device/plathome_openblocks-ax3-4
> >    DEVICE_DTS := armada-xp-openblocks-ax3-4
> > -  SUPPORTED_DEVICES := $(1)
> > +  SUPPORTED_DEVICES := openblocks-ax3-4
> >    BLOCKSIZE := 128k
> >    PAGESIZE := 1
> >    IMAGES += factory.img
> >    IMAGE/factory.img := append-kernel | pad-to $$(BLOCKSIZE) | append-ubi
> >    DEVICE_TITLE := Plat'Home OpenBlocks AX3
> >  endef
> > -TARGET_DEVICES += openblocks-ax3-4
> > +TARGET_DEVICES += plathome_openblocks-ax3-4

The old `openblocks-ax3-4` name has to be added by following construct:

 SUPPORTED_DEVICES += openblocks-ax3-4

in order to support the old and new naming schemes, so the SUPPORTED_DEVICES
would actually contain `plathome,openblocks-ax3-4 openblocks-ax3-4` and allow
seamless sysupgrade experience.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list