You are here: Projects » Remote System Update

Remote System Update
Updating hardware and software remotely, via web page

14 Mar 2017 - 16:42 | Version 29 | | , , ,

Board: Altera Arria 10 SoC Board
Tools Version: 15.0.1
State: running
Members: Radu Bacrau


This project provides an example on how the hardware and software running on an Altera Arria 10 SoC can be remotely updated through a web interface.


The project was developed as follows:
  • Started with the A10 GSRD
  • Updated the Yocto recipes to add PHP support for the included web server
  • Created a single PHP page that manages uploading and applying hardware and software updates.

Note that the intent of the project is not to deliver a fully-fledged solution. That would require the implementation of advanced features such as encryption, authentication, fallback mechanisms etc. Instead, the focus of this project is to demonstrate how the ecosystem can be easily leveraged to enable quick development. This way, the users can concentrate on adding value, and not on re-creating tools and systems that are already available.

System Components

All the software and hardware components of the A10 GSRD (which is a typical system) are presented in the picture below:


This project demonstrates how each of these hardware and software items can be remotely updated.

Note that in case of the GSRD all the files are stored on the SD card. However, the project could be updated to handle the case where the files are stored on QSPI and/or NAND Flash.

Building the Project

The project is based on the A10 GSRD v15.0.1. The hardware design, Linux device tree are reused, and only the Linux kernel and rootfilesystem need to be rebuilt.

The kernel and rootfilesystem are built by using a modified version of the Angstrom recipes that are part of the A10 GSRD v15.0.1. The modifications are included in the meta-remoteupdate layer and consist of the following:
  • Add PHP support for Lighttpd web server
  • Add New PHP page for remote update
  • Update the home page to link to the remote update PHP page

Please look at Compiling A10 GSRD v15.0.1 for details on how to setup your host for running Yocto.

The required commands for building the kernel and rootfilesystem are:
cd ~
tar xvzf angstrom-socfpga-remoteupdate.tgz
cd angstrom-socfpga-remoteupdate
MACHINE=arria10 ./ config arria10
source ./environment-angstrom-v2014.12
MACHINE=arria10 bitbake virtual/kernel remoteupdate-console-image

This will create the following files in the folder ~/angstrom-socfpga-remoteupdate/deploy/glibc/images/arria10:

File Description
remoteupdate-console-image-arria10.tar.xz Rootfilesystem archive
vmlinux Linux Kernel executable
zImage Compressed Linux Kernel image
Note that Linux Device Trees are also built, but we are not using them, since we are using the Linux Device Tree built by the Device Tree Generator, in order to include details about the FPGA soft IP peripherals.

Running the Project

1. Connect the A10 board to a network equipped with a DHCP server. A static IP can also be configured for cases where a DHCP server is not available (for example running the project with a direct connection to a computer without network access).

2. Write the SD card image to an SD card as shown in the A10GSRDV1501BootLinuxFromSDCard.

3. As U-Boot displays the countdown message press any key to stop it.

4. At the U-Boot console, change the MAC address of the board to ensure it is unique in your network, and also reduce the boot delay to 1s and then reset the system. The commands to do this are:
setenv ethaddr xx:xx:xx:xx:xx:xx
setenv bootdelay 1

Note that you only have to do the above once. Also note that xx:xx:xx:xx:xx:xx need to be replaced with a valid MAC address. Use a hex digit for each x.

5. After Linux booted up, look at the LCD screen of the board to determine the IP address of the board.

6. On the host, open a web browser, and type the IP address from the previous step (or the static IP address that was used). This will open the GSRD webpage. Under Navigation section - click on the Remote System Update link.


7. The Remote System Update page is loaded, which is composed of several sections.

A. Overview section succinctly introduces the page, and also offers the navigation links to enable the user to go back to the homepage.


B. Current Hardware and Software section presents an overview of the currently running system hardware and software components, and their versions.


Note that the versions default to "1.0" on the first boot, then they are assigned arbitrarily by the user. They are independent of the Linux kernel, U-Boot etc actual versions.

Click on the "show" link to obtain more details about the currently running system components.


C. Upload Hardware and Software Updates section allows the user to upload updated files for each of the system components.


In order to upload a new item, the following steps are required:
  • Check the "Update" checkbox for the item that needs to be updated.
  • Click on the Choose File button for the selected item, browse and select to the desire file.
  • Enter the version of the new file in the Version edit box for the selected item.
  • Click on the Upload button.

Note that the system performs some minor data validation (name and size of the files, data not entered etc) to try to prevent the user from making mistakes. A couple of examples are presented below:



D. Pending Hardware and Software Updates section presents the items that were uploaded but they are not yet used until the system is restarted.

Initially the section shows no pending updates, as nothing was uploaded yet, and the upload and discard buttons are disabled:


As updates are uploaded, they are listed accordingly, and the user has the ability to either discard or apply all of them:


8. When the user clicks the Apply & Restart button, it is first required to confirm the operation, then the system applies the changes and initiates a system restart. During system restart the web page displays a countdown message:


Note that with some DHCP servers and settings, you may obtain a different IP address when the system reboots, and because of that the web-page may not be able to connect to the target anymore. To avoid this case, it is recommended to use a static IP address on the target board.

9. After the system is restarted, the new versions of the hardware and software items are used, as shown in the example below:


Project Deliverables

The deliverables are posted at: and consist of the following:

File Description
remoteupdate-15.0.1-a10-bin.tar.gz Archive containing precompiled binaries
angstrom-socfpga-remoteupdate.tgz Archive containing Angstrom Yocto recipes
The precompiled binaries archive remoteupdate-15.0.1-a10-bin.tar.gz contains the following files:

File Description
ghrd_10as066n2.core.rbf FPGA fabric configuration rbf
ghrd_10as066n2.periph.rbf FPGA peripheral configuration rbf
ghrd_10as066n2.sof FPGA Configuration file
remoteupdate-console-image-arria10.tar.xz Root filesystem archive
sd_card_remoteupdate_a10.img.gz Compressed bootable SD card image
socfpga_arria10_socdk.dtb Linux Device Tree binary
uboot_w_dtb-mkpimage.bin Combined U-Boot and U-Boot Device Tree Image
vmlinux Linux Kernel executable
zImage Compressed Linux Kernel image
Note that only the Linux kernel and the rootfilesystem are different from the A10 GSRD 15.01, the rest of the files are identical and only included here for convenience of use.

Example Update Package

In order to provide a relevant example of updating both hardware and software, a package was created, with the following updates:
  • Update Linux kernel from 3.10-ltsi to 4.1
  • Update the hardware design from Quartus 15.0 to Quartus 15.1
  • Add remote system debug feature to both hardware and software (similar with Remote System Debug)
  • Generate the Linux device tree with SoC EDS 15.1 based on the updated hardware design
  • Update rootfs accordingly (add the 4.1 kernel modules and the mmlink application)

Note that the screenshots from the "Running the Project" section were taken by using this example update package.

The example can be used as-is, by downloading the update package from The archive contains the following items:

File Description
uboot_w_dtb-mkpimage.bin Updated U-Boot image
ghrd_10as066n2.core.rbf Updated FPGA fabric configuration file
ghrd_10as066n2.periph.rbf Updated FPGA peripheral configuration file
ghrd_10as066n2.dtb Updated Linux Device Tree
zImage Updated Linux kernel
rootfs-update.tar.gz Root filesystem updates archive
You may refer to Remote System Debug for instructions on how to exercise the Remote System Debug feature once the system is updated. The above archive also contains the sof file, which is required on host when demonstrating the Remote System Debug feature.

For reference, the sources required to build the example update package are also provided:

Refer to Compiling A10 GSRD v15.0.1 for details on how to setup your host for running Yocto. The required commands for building the Yocto recipers are:

cd ~
tar xvzf angstrom-socfpga-remotedebug-15.1.tar.gz
cd angstrom-socfpga-remotedebug-15.1
MACHINE=arria10 ./ config arria10
source ./environment-angstrom-v2014.12
MACHINE=arria10 bitbake virtual/kernel remotedebug-console-image

This will create the following files in the folder ~/angstrom-socfpga-remotedebug/deploy/glibc/images/arria10:

FileSorted ascending Description
remotedebug-console-image-arria10.tar.xz Rootfilesystem archive
vmlinux Linux Kernel executable
zImage Compressed Linux Kernel image


Give us your feedback

© 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Privacy.