Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

   Image is flashed to SD card before inserting to RPI board.   

sd-card size requisite

It is must to have minimal size of 8GB SD-Card for Firmware upgrade support

Command to flash the image

...

$ sudo dd if=<path to ImageName.rpi-sdimg> of=<path to SD card space> bs=4M


Ex: 

$ sudo dd if=rdk-generic-hybrid-thunder-image_default_20200302130659.rootfs.rpi-sdimg of=/dev/sdc bs=4M
317+0 records in
317+0 records out
1329594368 bytes (1.3 GB, 1.2 GiB) copied, 104.88 s, 12.7 MB/s
$ sync


The SD card is then inserted to the Raspberry Pi board and booted to check for containers created.

...

  •  Install Apache2 package
    •      sudo apt update
    •     sudo apt install apache2
  •    Check the firewall application profiles
    •     sudo ufw app list
  •    Modify firewall rules to allow Apache2
    •       sudo ufw allow 'Apache'   
  • Verify the status
    • sudo ufw status
  • Verify Apache2 service is running using systemd command
    • sudo systemctl status apache2
  • Server can be connected using http request, http://<ip of device> (ex: http://192.168.2.8)

  • Configuration files for Apache2 can be found in /etc/apache2/.
  • We should place tar file to document root folder for accessing it. Check document root folder mentioned in conf file. This can be found in path /etc/apache2/sites-available/. 

Enabling the FirmwareControl Plugin:

   FirmwareControl plugin is enabled or disabled via Controller UI. Controller UI is launched using browser via http://<board ip>

...

Plugin needs to be enabled before proceeding with firmware update.

 

RPi - Board :

  • Flash the image supported with FirmwareControl plugin feature in the RPI board and verify the 2 partitions(ex. mmcblk0p1, mmcblk0p2) present under dev folder (use command fdisk -l)
  • Execute curl request for firmware update.  During first time execution, firmware update request creates one more partition in memory(mmcblk0p3) and auto reboots to update partition table. This happens only on the first request, further requests will not result in board reboot before firmware update.
  • Once device boots up verify there are 3 partitions in /dev (ex. mmcblk0p1, mmcblk0p2, mmcblk0p3) (use command fdisk -l) .
  • Execute curl request for firmware update for second time.
  • Image tar file will be downloaded to a file in /tmp folder (ex. ImageTemp). Verify image is downloaded to /tmp
  • Reboot RPI board once firmware update process is completed manually using reboot -f command.
  • Once board boots up verify the current image version ( cat /version.txt)
  •  Verify the version of booted image which shows the downloaded image version

Conclusion

Please find the summary on firmware upgrade explained above

Limitations: 

  •  Auto reboot after firmware update is not happening currently. User has to reboot manually after completion of firmware update.
  •  RPI board will reboot before firmware update only for the first request for updating memory partition table, and user has to give request command once again for firmware update. This occurs only for the first request after board boot up.