Firmware Wizard

On the OpenWrt side, OpenWrt would need to be build with Global build settings ---> [*] Create JSON info files per build image. The generated json files would need to get merged (I use a python script for that) and the result be placed into the release folder (at least somewhere predictable).
Since past releases do not support the creation of json files, I can only create the json data by hand/script.

On the firmware selector side, I need to enhance it to handle new releases and different download paths.
The current setting does not work for that: https://github.com/mwarning/yet_another_firmware_selector/blob/master/www/config.js#L8
It would be nice when a new release does not need a change in the selectors config.js.

EDIT: I have added the 19.07 release. It is just a copy of the the snapshot data. Now the script to generate the data.json would need to be added to the server. The data.json would now also need to contain the download link template for each release in the file.

@richb-hanover-priv can you provide a full set of json files for openwrt master (some snapshot)? That would help testing and extending the selector. It looks like those can be only be generated by building all images. I do not have the computer resources to do that.

Yes. This approach finally does not rely on heuristics. My only concern is the size of the data.json. I wonder what the size would be.

Does this help (remove the -n to do the actual rsync)?

rsync -avm -n --include='*.json' --include='*/' --exclude='*' rsync://downloads.openwrt.org/downloads/snapshots/targets/'

How do I modify the command to download the files instead of just listing them?

  • nvm. found it, I have to remove -n

@tmomas thanks, that is awesome. I have updated the demo. The links for 19.07.0 are mostly broken, since the file names have changed between releases. That would need to be fixed by hand/heuristics...

  • The data.json for one release is 154KB in size, zip compressed it is 22KB (assuming the webserver compresses the data).
  • Additional releases should not increase the size much, since the data is mostly redundant.
  • Four JSON files were invalid due to some wild text fragments (race condition?). I fixed them by hand.

I've fixed the links for 19.07.1 and 18.06.7. Let me know if you find issues.

I wonder if it might be a good idea to also show the sha256 sum, time of build and file size.

@tmomas what do you think is missing to make it good enough for the OpenWrt website?

Looking good to me!

This should be placed where the downloads happen, i.e. on downloads.openwrt.org
Would be great though if the firmware selector page could be adapted to the current styling, and be easily adapted to a new styling of the whole site later on.

@jow What do you think about integrating https://mwarning.de/yet_another_firmware_selector/ into downloads.openwrt.org?

1 Like

A few notes:

  • adapting styling should not be a problem.
  • the json files are does not seem to get generated right now
  • for every snapshot build, a python script would need to merge the json files

EDIT: I did some manual rebranding