Skip to content

mwarning/openwrt-firmware-selector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

OpenWrt Firmware Selector

A simple OpenWrt firmware selector using autocompletion. Uses plain HTML/CSS/JavaScript. Checkout the Demo.

This is a Fork/Mirror of the official OpenWrt version, but without OpenWrt specific changes like the feedback link and continuous integration scripts.

image

Quick Run

  • Download the sources and change the working directory
  • Start webserver (e.g. python3 -m http.server)
  • Go to http://localhost:8000/www/ in your web browser

Configure with config.js.

Installation

Place the www/ folder somewhere web accessible. Then use the collect.py script to collect all the profiles.json files a OpenWrt build has generated. The data will be written to www/data/ and www/config.json will be updated:

Scrape from a web site:

./misc/collect.py https://downloads.openwrt.org  www/

or via rsync (faster):

./misc/collect.py rsync://downloads.openwrt.org/downloads  www/

or scan a local OpenWrt build folder:

./misc/collect.py ~/openwrt/bin  www/

This should do it!

Further arguments for collect.py:

  • --formatted: Output formatted JSON data.
  • --version-pattern <VERSION_PATTERN>: Only handle versions that match a regular expression.
  • --insert-latest-release: Insert an artificial release called "latest" that contains the latest image for every device.
  • --latest-release-pattern <VERSION_PATTERN>: Only handle versions that match a regular expression.

Notes about config.js

  • image_url: Download location of the actual images.
  • info_url: Link template to some information page.

Allowed variables in info_url: {id}, {target}, {version}, {title}.

Generate OpenWrt JSON

The collect.py script merges data from profile.json files generated by OpenWrt. To enable generation, go to the build settings (make menuconfig): Global build settings ---> [*] Create JSON info files per build image.

If the option is not available (OpenWrt 18.06 or 19.07.3), apply commit openwrt/openwrt@881ed09.

Attended SysUpgrade (ASU)

ASU is a build server that builds OpenWrt images with a given list of packages on request. The firmware-selector can be used as an interface to send these requests and to download the images when finished.

UCI-Defaults

The Firmware Selector allows to define a script to be placed in the /etc/uci-defaults/ folder of the OpenWrt image. These scripts are executed once on the first reboot and then deleted. See the OpenWrt documentation on this topic.

Translations

Visit weblate.org to contribute new translations or to improve them.

Similar Projects