Giter Site home page Giter Site logo

mwarning / openwrt-firmware-selector Goto Github PK

View Code? Open in Web Editor NEW
39.0 8.0 23.0 6.4 MB

OpenWrt firmware selector. With custom image builder support.

Home Page: https://mwarning.github.io/openwrt-firmware-selector/www/

License: Creative Commons Zero v1.0 Universal

Python 17.93% HTML 16.59% JavaScript 41.33% CSS 21.49% Shell 2.67%
openwrt firmware-selector

openwrt-firmware-selector's Introduction

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

openwrt-firmware-selector's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openwrt-firmware-selector's Issues

Allow deeplinking

When a model has been selected update the URL bar with something that can navigate back to the selection. A link that could also be shared with other people.

move content to own folder

let's move the html/css/js files into a www folder and use a dummy index.html in the root folder with a redirect to the www folder for the demo/github pages.

This would be more elegant, since we have the actual application in one folder.
The "installation" would only in moving a directory, not moving single files to get rid of the misc folder, license files, readme.md etc. by hand.

dummy index.html:

<meta http-equiv="refresh" content="0; url=https://repo.github.io/folder/index.html">

Prevent browser from caching image build time

Problem Description

In current Version 3.4.1 one can observe this behavior:
If the image-json-data got updated (i.e. via cronjob), the new image data doesn't show up in the browser. Apparently, its cached. I've notice that, when I was loading a brand new snapshot-build, but the date was still pointing out that this image would have been built a month ago. Disabling the cache in development tools fixed that immediately.

Expected Behaviour

It would be really great to have that caching somehow deactivated by default. Most users won't select that option in their browsers and would get displayed deprecated data then.

luci support

would be nice to have this project in luci
it is only html and js, so it should be possible.

but the misc-directory (incl. python) has to be changed first
#41

Show packages of custom images

Custom images offer a manifest.json which contains a dict of package and version. An example is found here. This should be viewable in the front-end.

Feature: give URL to install-instructions

It would be really cool, if there was a link to the install-instructions in ones routers wiki-page. Thus one could get special information and hints for pitfalls in installation process easily. I consider this a very handy feature for everyone flashing different types of routers often.

usage for libremesh / chef

atm this project was claimed to be the official chef.libremesh.org, the successor of the former chef (https://github.com/libremesh/chef/) which had more features than this project atm.

please provide readme, documentation oder hints:

  • how to create images for libremesh
  • how to change package-list, flavors, network-config and local settings

get rid of misc directory

the misc directory should be somewhere else, not it this project.
it might be ASU for a good place, ( or might be there already?)

Add footer

The web interface should contain a link to the source

Feature: show x86-images

Though there are images for the x86-target, they don't appear in the selector. I assume, that the profiles.json files aren't generated for x86-images.

It would be really cool, to have them displayed in the selector too. I consider this an Issue of rather low priority, as there is a workaround available via the Files-Button in the right-down-corner

Follow official style Guide

As this wizard uses the official firmware images we should ask to offer it on the main website in the downloads area. For that we should follow the official style guide here

Link only current download-files

when i build firmware several times in the same browser-window (with different additional packages) i get more and more download-icons.
see screenshot, only the two files in the center can be downloaded

Change database to Names and IDs only

I created a script that uses the tmp/.targetinfo file to generate a file called names.json looking like below. This could be used to load specific device information on demand instead of all together. Using target and id can be combined as { release }/{ target }/{ id }.json.

Would you be willing to change the current script to that?

{
  "FriendlyARM NanoPi NEO2": {
    "target": "sunxi/cortexa53",
    "id": "friendlyarm_nanopi-neo2"
  },
  "Pine64 Pine64+": {
    "target": "sunxi/cortexa53",
    "id": "pine64_pine64-plus"
  },
  "Pine64 SoPine": {
    "target": "sunxi/cortexa53",
    "id": "pine64_sopine-baseboard"
  },
  "Xunlong Orange Pi PC 2": {
    "target": "sunxi/cortexa53",
    "id": "xunlong_orangepi-pc2"
  },
  "Xunlong Orange Pi Zero Plus": {
    "target": "sunxi/cortexa53",
    "id": "xunlong_orangepi-zero-plus"
  },
  "CompuLab TrimSlice": {
    "target": "tegra",
    "id": "compulab_trimslice"
  },
  "Generic x86": {
    "target": "x86/generic",
    "id": ""
  },
  "Generic x86/legacy": {
    "target": "x86/legacy",
    "id": ""
  },
  "Geos": {
    "target": "x86/geode",
    "id": ""
  },
  "Generic x86/64": {
    "target": "x86/64",
    "id": ""
  },
  "Avnet ZedBoard": {
    "target": "zynq",
    "id": "avnet_zynq-zed"
  },
  "Digilent Zybo": {
    "target": "zynq",
    "id": "digilent_zynq-zybo"
  },
  "Digilent Zybo Z7": {
    "target": "zynq",
    "id": "digilent_zynq-zybo-z7"
  },
  "Xilinx ZC702": {
    "target": "zynq",
    "id": "xlnx_zynq-zc702"
  }
}

Problem with searching model

Very strange issue. Example: https://mwarning.github.io/openwrt-firmware-selector/www/?version=SNAPSHOT&target=ramips%2Fmt76x8&id=hilink_hlk-7628n

  • if you search hilink hlk-7627n (lowercase, write by hand) - works
  • if you search HLK-7628N (capitalcase, write by hand) - works
  • but if you search HILINK HLK-7628N (capitalcase, with space - write by hand) - No model found!
  • if you search HILINK HLK-7628n (capitalcase, with space, last lowercase - write by hand) - works

Tested on chrome (linux) and edge (linux).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.