On Mon, Oct 16, 2017 at 12:06:23PM +0200, pau wrote:
On 16/10/17 10:28, Paul Spooren wrote:
On 10/11/17 2:21 PM, pau wrote:
A very nice improvement would be to detect which
routers are 4MB and
which ones are >4MB (this can be probably extracted from the
imagebuilder or sdk files). Then allow only the flavors which are
available for such flash space.
Nice idea, however currently there is no generic
way to find the maximal
image size.
I see two solutions:
* parse
https://lede-project.org/toh/start
* add profile row 'max_imagesize' where the image-server logs the
minimal size of a faild build request.
Also on imagebuilder (or sdk) you can find the information (not for all
models and not on a uniq generic way).
On file "target/linux/ar71xx/image/tp-link.mk" there are entries like
this one:
define Device/tl-wr841-v10
$(Device/tplink-4mlzma)
DEVICE_TITLE := TP-LINK TL-WR841N/ND v10
BOARDNAME := TL-WR841N-v9
DEVICE_PROFILE := TLWR841
TPLINK_HWID := 0x08410010
endef
So the profile for router model tl-wr841-v10 is based on another generic
profile named "tplink-4mlzma" which is defined in the same file like this:
define Device/tplink-4mlzma
$(Device/tplink)
TPLINK_FLASHLAYOUT := 4Mlzma
IMAGE_SIZE := 3904k
endef
The IMAGE_SIZE is 3.9MB (so 4MB). The same can be done with the ar71xx
ubiquity deivices (ubnt.mk) and some defined as generic on "generic.mk".
Then, we might write a script which parses all these files of
ImageBuilder and generates a JSON (which might be public on github or
somewhere else) ready to be consulted by JEFE or any other tool. Not all
router models would be on this JSON file but if 60-80% of the most
common used routers are listed we will cover most of the cases.
I suggest to rather output the information about the total flash size
along with the device names and profiles in the IB via
make info
That would be consistent in terms of how the IB does things and would
allow the update-/build-server to extract the flash size in the same
way it also gets the information about the available profiles.
Just my 2ct...
Cheers
Daniel
Actually the same might be done scrapping the TOH list of
lede-project.org. The key point would be to have one or more ways to
identify the router information (flash size) and put it on a nice JSON
online file. The script should be executed periodically to include new
models or new technics for gattering information.
On the long term we can try to push the lede team to officialy maintain
this kind of list.
The information will be returned on profile
request.
However, building a too large image, jefe.tk will inform the user to
retry with less packages. This could already be a hint to choose a
smaller flavor.
_______________________________________________
lime-dev mailing list
lime-dev(a)lists.libremesh.org
https://lists.libremesh.org/mailman/listinfo/lime-dev