ci: remove superfluous before_script
[web/firmware-selector-openwrt-org.git] / README.md
1 # Yet Another Firmware Selector
2
3 A simple OpenWrt firmware selector using autocompletion. Uses plain
4 HTML/CSS/JavaScript. Checkout the [Demo](https://mwarning.github.io/yet-another-firmware-selector/www/).
5
6 ![image](misc/screenshot.png)
7
8
9 ## Quick Run
10
11 * Download the sources and change the working directory
12 * Start webserver (e.g. `python3 -m http.server`)
13 * Go to `http://localhost:8000/www/` in your web browser
14
15 Configure with [config.js](www/config.js).
16
17 ## Attended Sysupgrade Support
18
19 This firmware selector can speak to a [ASU server](https://github.com/aparcar/asu) to build custom images. To enable the feature, the `asu_url` option in the config.js needs to be set.
20
21 ## Installation
22
23 Place the `www/` folder somewhere web accessible. Then use the `collect.py` script to update the `config.json` file:
24
25 ```
26 ./misc/collect.py scan "https://firmware.example.com/{version}/targets/{target}" ~/openwrt/bin/ www/
27 ```
28
29 This should do it.
30
31 The https link is used to access image files. There are different variables available:
32
33 * `{version}`: Version in the profiles.json files. E.g. `19.07.4` or `SNAPSHOT`.
34 * `{target}`: Main- and sub target, E.g. `ath79/generic`.
35 * `{base}`: Distinct path to the targets directory. E.g. `releases/18.06.8/targets/`
36
37 The `collect.py` script searches the `~/openwrt/bin/` directory for `profile.json` files. These are merged into `overview.json` files (one per release). The `overview.json` files are then placed into `www/data/` and `www/config.js` is updated.
38
39 To let OpenWrt create `profile.json` files, enable the build setting (`make menuconfig`):
40 `Global build settings ---> [*] Create JSON info files per build image`.
41
42 If the option is not available (OpenWrt 18.06 or 19.07.3), apply commit [openwrt/openwrt@881ed09](https://github.com/openwrt/openwrt/commit/881ed09ee6e23f6c224184bb7493253c4624fb9f).
43
44 ### Scrape
45
46 If you want to scrape the OpenWrt download website and update the `config.js`:
47
48 ```
49 ./misc/collect.py scrape https://downloads.openwrt.org www/
50 ```
51
52 ## Similar Projects
53
54 - [Gluon Firmware Selector](https://github.com/freifunk-darmstadt/gluon-firmware-selector): Original source of this project for images generated by [Gluon](https://github.com/freifunk-gluon/), now with pictures.
55 - [Freifunk Hennef Firmware Downloader](https://github.com/Freifunk-Hennef/ffhef-fw-dl): Similar to the project above, but PHP based.
56 - [LibreMesh Chef](https://github.com/libremesh/chef/): Allows to select configurations.
57 - [GSoC Firmware Selector](https://github.com/sudhanshu16/openwrt-firmware-selector/): Result of the GSoC
58 - [FFB Firmware Selector](https://github.com/freifunk-bielefeld/firmware-selector): Build for Freifunk Bielefeld