> -----Original Message----- > From: Rafał Miłecki [mailto:zaj...@gmail.com] > Sent: Mittwoch, 8. Juli 2020 23:40 > To: m...@adrianschmutzler.de; 'Paul Spooren' <m...@aparcar.org>; openwrt- > de...@lists.openwrt.org > Cc: 'Rafał Miłecki' <ra...@milecki.pl>; 'Adrian Schmutzler' > <freif...@adrianschmutzler.de>; 'Petr Štetiar' <yn...@true.cz>; 'Moritz > Warning' <moritzwarn...@web.de>; 'Daniel Golle' <dan...@makrotopia.org> > Subject: Re: [PATCH] build: put DT "compatible" value as "board_name" in > profiles.json > > On 08.07.2020 21:41, m...@adrianschmutzler.de wrote: > >> -----Original Message----- > >> From: Paul Spooren [mailto:m...@aparcar.org] > >> Sent: Mittwoch, 8. Juli 2020 21:34 > >> To: Rafał Miłecki <zaj...@gmail.com>; openwrt-devel@lists.openwrt.org > >> Cc: Rafał Miłecki <ra...@milecki.pl>; Adrian Schmutzler > >> <freif...@adrianschmutzler.de>; Petr Štetiar <yn...@true.cz>; Moritz > >> Warning <moritzwarn...@web.de>; Daniel Golle > <dan...@makrotopia.org> > >> Subject: Re: [PATCH] build: put DT "compatible" value as "board_name" > >> in profiles.json > >> > >> I think the question is therefore more on how to deal with devices > >> that do not use DT? If we use a per device rootfs a line could be > >> added to /etc/os- release containing something like > >> OPENWRT_PROFILE="SpEcIaL-CaSEv100", > >> which is then shown via `ubus call system borad`. > > > > Well, one could just use something like this, which we had before the > compatible was used: > > > > https://github.com/openwrt/openwrt/blob/openwrt- > 19.07/target/linux/ram > > ips/base-files/lib/ramips.sh > > That's exactly what I was thinking about. That file does: > echo "$name" > /tmp/sysinfo/board_name > which means device-specific identifier will appear as $(board_name) > > > > There, one could just use the "profile names" instead, with "_" replaced by > "," for the few non-DT targets. > > However, this assumes a 1-to-1 relation between boards and profiles, and > I'm not sure whether that always exists. > > And somebody would have to create that by hand. > > Right. That list should be easy to verify by looking at Makefile and > platform.sh > / ramips.sh. > > > > But I somehow lost track what's the ultimate goal of the proposed changes > here, so maybe I'm not going into the right direction with this. > > I described it shortly in commit message as: > > > The purpose of "board_name" in JSON is matchine OpenWrt running > device > with JSON profile entry. > > More details: we are working on firmware updating apps that find device > appropriate firmware automatically. See luci-app-attendedsysupgrade for > example. > > We need a way for such apps to: > 1. Get device identifier (like $(board_name)) 2. Easily find matching firmware > in profiles.json using above identifier
I just had a look into bcm47xx. Is my observation correct that, at least for mips74k subtarget, there also are multiple profiles for the same board, e.g. define Device/netgear-wnr3500l-v2 DEVICE_MODEL := WNR3500L DEVICE_VARIANT := v2 DEVICE_PACKAGES := $(USB2_PACKAGES) $(Device/netgear) NETGEAR_BOARD_ID := U12H172T00_NETGEAR NETGEAR_REGION := 1 endef TARGET_DEVICES += netgear-wnr3500l-v2 define Device/netgear-wnr3500-v2 DEVICE_MODEL := WNR3500 DEVICE_VARIANT := v2 DEVICE_PACKAGES := kmod-b43 $(Device/netgear) NETGEAR_BOARD_ID := U12H127T00_NETGEAR NETGEAR_REGION := 2 endef TARGET_DEVICES += netgear-wnr3500-v2 Do these really only differ in packages and region, or is there a parameter to determine which is used from the running device? Best Adrian
openpgp-digital-signature.asc
Description: PGP signature
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel