• Stars
    star
    277
  • Rank 143,801 (Top 3 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created almost 7 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An image on demand server for OpenWrt based distributions

Attendedsysupgrade Server (GSoC 2017)

codecov Code style: black PyPi

This project simplifies the sysupgrade process for upgrading the firmware of devices running OpenWrt or distributions based on it. These tools offer an easy way to reflash the router with a new firmware version (including all packages) without the need to use opkg.

ASU is based on an API to request custom firmware images with any selection of packages pre-installed. This avoids the need to set up a build environment, and makes it possible to create a custom firmware image even using a mobile device.

Clients of the Sysupgrade Server

OpenWrt Firmware Selector

Simple web interface using vanilla JavaScript currently developed by @mwarning. It offers a device search based on model names and show links either to official images or requests images via the asu API. Please join in the development at GitLab repository

ofs

LuCI app

The package luci-app-attendedsysupgrade offers a simple tool under System > Attended Sysupgrade. It requests a new firmware image that includes the current set of packages, waits until it's built and flashes it. If "Keep Configuration" is checked in the GUI, the device upgrades to the new firmware without any need to re-enter any configuration or re-install any packages.

luci

CLI

The auc package performs the same process as the luci-app-attendedsysupgrade from SSH/the command line.

auc

Server

The server listens for image requests and, if valid, automatically generates them. It coordinates several OpenWrt ImageBuilders and caches the resulting images in a Redis database. If an image is cached, the server can provide it immediately without rebuilding.

Active server

Run your own server

For security reasons each build happens inside a container so that one build can't affect another build. For this to work a Podman container runs an API service so workers can themselfs execute builds inside containers.

Please install Podman and test if it works:

podman run --rm -it docker.io/library/alpine:latest

Once Podman works, install podman-compose:

pip install podman-compose

Now it's possible to run all services via podman-compose:

mkdir -p ./asu-service/public/
podman-compose up -d

This will start the server, the Podman API container and two workers. The first run needs a few minutes since available packages are parsed from teh upstream server. Once the server is running, it's possible to request images via the API on http://localhost:8000. Modify podman-compose.yml to change the port.

Production

For production it's recommended to use a reverse proxy like nginx or caddy.

System requirements

  • 2 GB RAM (4 GB recommended)
  • 2 CPU cores (4 cores recommended)
  • 50 GB disk space (200 GB recommended)

Development

After cloning this repository, create a Python virtual environment and install the dependencies:

Running the server

poetry install
poetry run flask run

Running a worker

poetry run rq worker

API

The API is documented via OpenAPI and can be viewed interactively on the server:

https://sysupgrade.openwrt.org/ui/

More Repositories

1

openwrt

This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
C
17,849
star
2

luci

LuCI - OpenWrt Configuration Interface
JavaScript
5,848
star
3

packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
Makefile
3,774
star
4

mt76

mac80211 driver for MediaTek MT76x0e, MT76x2e, MT7603, MT7615, MT7628 and MT7688
C
694
star
5

docker

Docker containers of the ImageBuilder and SDK
Dockerfile
417
star
6

routing

OpenWrt Routing Packages
Shell
311
star
7

odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
C
159
star
8

chaos_calmer

Legacy OpenWrt "Chaos Calmer" release branch
C
131
star
9

telephony

The telephony packages feed
Makefile
99
star
10

mtk-wifi-gpl

MediaTek 802.11ac GPL driver
C
94
star
11

odhcp6c

This repository is a mirror of https://git.openwrt.org/?p=project/odhcp6c.git. It is for reference only and is not active for checks-ins or reporting issues; issues should be reported at: https://bugs.openwrt.org. Pull requests will be accepted which will be merged in odhcp6c.git
C
74
star
12

archive

Historical pre-merge OpenWrt archive
C
60
star
13

video

Makefile
49
star
14

omcproxy

OpenWrt embedded IGMPv3/MLDv2 Proxy
C
31
star
15

gh-action-sdk

GitHub CI action to build packages via SDK
Shell
23
star
16

buildscripts

Build and maintenance scripts for OpenWrt releases
Shell
23
star
17

qosify

[MIRROR] OpenWrt QoS implementation based one eBPF + CAKE
C
21
star
18

firmware-selector-openwrt-org

This repository is being migrated over from GitLab, ymmv
JavaScript
19
star
19

packages-abandoned

Feed for abandoned OpenWrt packages
Makefile
19
star
20

bcm63xx-next

Linux for Broadcom BCM63xx SoC
C
18
star
21

usteer

[MIRROR] OpenWrt AP service for client steering
C
15
star
22

netifd

[MIRROR] OpenWrt Network interface configuration daemon
C
14
star
23

firewall4

[MIRROR] OpenWrt nftables firewall
UnrealScript
14
star
24

targets

Feed for OpenWrt targets not maintained in mainline anymore
Makefile
13
star
25

uci

[MIRROR] OpenWrt Unified Configuration Interface
C
13
star
26

cypress-nvram

brcmfmac nvram files
12
star
27

libubox

[MIRROR] C utility functions for OpenWrt
C
11
star
28

firmware_qca-wireless

[MIRROR] Qualcomm Wireless Device BDF
9
star
29

buildbot

OpenWrt buildbot configuration
Python
9
star
30

ubus

[MIRROR] OpenWrt system message/RPC bus
C
9
star
31

rpcd

[MIRROR] OpenWrt ubus RPC daemon
C
7
star
32

usign

[MIRROR] Tiny signify replacement
C
7
star
33

unetd

[MIRROR] WireGuard based VPN connection manager for OpenWrt
C
6
star
34

bcm63xx-cfe

BCM63xx CFE binaries
6
star
35

uhttpd

[MIRROR] Tiny HTTP server
C
6
star
36

uclient

[MIRROR] libubox HTTP client library
C
6
star
37

firmware-utils

[MIRROR] OpenWrt firmware image utilities
C
5
star
38

ustream-ssl

[MIRROR] ustream SSL wrapper
C
5
star
39

mdnsd

[MIRROR] OpenWrt MDNS daemon
C
5
star
40

udebug

[MIRROR] OpenWrt debugging helper library/service
C
5
star
41

opkg-lede

[MIRROR] LEDE fork of Opkg
C
5
star
42

branding

This repository contains logos and color definitions used by OpenWrt
4
star
43

libnl-tiny

[MIRROR] Tiny OpenWrt fork of libnl
C
4
star
44

actions-shared-workflows

4
star
45

ustp

[MIRROR] OpenWrt MSTP/RSTP/STP daemon
C
4
star
46

ugps

[MIRROR] OpenWrt GPS daemon
C
4
star
47

uqmi

[MIRROR] Tiny QMI command line utility
C
4
star
48

firewall3

[MIRROR] OpenWrt firewall configuration utility
C
4
star
49

toh

JavaScript
4
star
50

iwinfo

[MIRROR] Library for accessing wireless device drivers
C
4
star
51

fstools

[MIRROR] OpenWrt filesystem utilities
C
3
star
52

relayd

[MIRROR] IPv4 pseudo-bridge routing daemon
C
3
star
53

jsonpath

[MIRROR] JSON parsing utility
C
3
star
54

make_ext4fs

[MIRROR] Standalone fork of Android make_ext4fs utility
C
3
star
55

procd

[MIRROR] OpenWrt service / process manager
C
3
star
56

ubox

[MIRROR] OpenWrt core utilities
C
3
star
57

librpc-uclibc

[MIRROR] Standalone librpc forked from uclibc
C
3
star
58

umbim

[MIRROR] OpenWrt MBIM modem utility
Perl
3
star
59

mountd

[MIRROR] OpenWrt automount daemon
C
3
star
60

cgi-io

[MIRROR] CGI utility for handling up/downloading of files etc.
C
3
star
61

urngd

[MIRROR] Micro non-physical true random number generator based on timing jitter
C
3
star
62

ucert

[MIRROR] OpenWrt usign certificate wrapper
C
3
star
63

bcm63xx_u-boot

[MIRROR] Broadcom-s U-Boot
C
2
star
64

bcm63xx_atf

[MIRROR] Broadcom-s Trusted Firmware A
C
2
star
65

broadcom-sprom

Broadcom BCMA/SSB Fallback SPROMs
2
star
66

usbmode

[MIRROR] usbmode - usb_modeswitch replacement
C
2
star
67

forum-old

HTML
2
star
68

fwtool

[MIRROR] Utility for appending and extracting firmware metadata and signatures
C
1
star