OpenWrt Firmware Wizard Update – 2nd phase completion

After 4 more weeks, there has been progress regarding the agenda. The agenda for the last phase was to create the web interface using which users could download appropriate images for their devices and build custom images too.

What has been achieved

A refined version of the web application has been achieved. The functionality of creating custom images has been added to the application.

The application has been moved to ReactJS. The finished application looks like this:

Note: There are minor bugs and issues in the app which will be rectified in the later versions.

You can look at the code for the interface here and can use the interface here (currently in beta).

Next Steps

In the next phase, an openwrt tool has to be engineered which can be used for upgrading OpenWrt automatically.
A interface for the tool has to be created for LuCI which will house all the settings and preferences of the user. The tool will periodically check if there is a new version of OpenWrt, if so, then it will download and apply the upgrade package automatically.

The foundation to check if there is a new version was laid during the first phase with the JSON metadata.

OpenWrt Firmware Wizard – Update Phase 1 Completion

Following the introductory post on “OpenWrt Firmware Wizard” project for GSoC 2019, there have been a number of progress updates.
I have been working with Paul Spooren and Moritz Warning on the project for the past couple of months.

Progress Till Now

Achievements so far can be summarized as below:

  1. Appropriate modifications to the build system have been made to produce JSON for each targets and a consolidated one to be read later by the firmware selector.
  2. Metadata was stored in the buildsystem’s makefiles. Modifications to the data stored has been carried out. The DEVICE_TITLE variable was split into at most three variables namely DEVICE_VENDOR, DEVICE_MODEL and DEVIDE_VARIANT. In addition to this, DEVICE_RAM and DEVICE_FLASH has been added. We received positive response on the first from the community while the second modification is still under review.
    A sample output of this will look like this:


    I wrote a script to split the DEVICE_TITLE into the required fields which could be found here. It uses Paul’s https://github.com/aparcar/openwrt-devices for DEVICE_RAM and DEVICE_FLASH.
  3. I built a basic version of the firmware-selector for PoC and the source code for the same could be found here. It looks like this:



Next Steps

Through the next phase of the program, the following is to be achieved:

  1. Though almost everything is done regarding the Makefile metadata, but accuracy of the data has to be reviewed. Also, the addition of DEVICE_RAM and DEVICE_FLASH is still under review and is subject to change.
  2. Take community feedback and improve upon the firmware wizard. Functionality to build custom images will be added. A server backend has to be created for the generation of images and serving the same.
  3. Start working on the auto upgrade feature for OpenWrt.

GSoC 2019 – OpenWrt Firmware Wizard

The OpenWrt project is a Linux operating system targeting wireless routers. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developers, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.

Project Overview

Currently, in order to install OpenWrt on a device, the user has to go through a very confusing process. Later, upgrading to the newer version of OpenWrt is another hassle. And often the end users are not that technically literate to carry out the process smoothly.
The aim of this project is to simplify this whole process by carrying out a number of changes to the OpenWrt buildroot, web based firmware wizard, and a plugin for upgrading the system automatically.

The Project has 3 sub-parts (in order of implementation) which are described as:

  1. Creating meta-data for each target
    To get the data for the sub-parts that follow, the following are required:
    1. Modification of buildroot makefiles to output JSON file for each target device
    2. Add additional metadata of target devices to makefiles
    3. Writing a script to consolidate JSONs for the entire build into a single file to be read buy the Firmware Selector
  2. Initial Firmware Retrieval
    A webapp that helps to select the correct image and how to apply them will help the adoption of OpenWrt.
    Writing a webapp with the following set of features:
    1. Display device manufacturer / model name / hardware version / OpenWrt release / link to images
    2. Display a help for how to apply the image depending on its type (factory/sysupgrade image, rootfs/kernel image)
    3. Select model/images by typing in part of the device model name
    4. Create images with custom package selection
  3. Firmware Upgrades
    Creating a router web interface package for LuCI to check and apply new images.
    Required Features:
    1. Search for updates
    2. Apply update

Progress made till now

Till now, a variety of things have been accomplished such as:

  • Know-how of the OpenWrt build system
  • Know-how of the LuCI plugin development
  • Finalization of JSON schema
  • Project road map for the next phase

Next Phase

As we will be moving toward the next phase of the program, new progress will be made.

The deliverable at the end of the next phase will be:

Generation of JSON that can be accessed as a data source

1. Generation of JSON for each target device along with images
2. Addition of device specific metadata for a sample set
3. Creation of a consolidated JSON file from numerous target JSON files.

About Me

I’m a 20 years old undergrad student from Delhi Technological University, New Delhi, India majoring in Computer Engineering. I have interests in computer programming and design.
I have been a student with Drupal in GSoC ‘17 and my project was to port the Vote Up/Down Module to the latest version of Drupal’s Core.
I am really excited and overwhelmed to be working with my awesome mentors Moritz Warning and Paul Spooren for the summer. Upon finishing this project, I plan to be a consistent member of the community.