Versions Compared

Key

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


Table of Contents
    

Introduction

  • This document  used for upgrading firmware for describes the bring-up of RdkFwUpgradeManager in RPI RDK Broadband devices for firmware upgrade by using HTTP protocol.
  • Downloaded firmware from local/public http server with support of http protocol.

Build procedure to generate R-Pi image with Firmware upgrade

Please refer the below link for host environment set-up & flashing procedure for yocto build ,

Dunfell :

RPI 3B/3B+ Model Reference Platform

Morty:

RDK-B Raspberrypi - Host SetUp and Build Instructions#BRaspberrypi-HostSetUpandBuildInstructions-YoctoBuildSteps

Repo Steps

To  build, follow below instructions

Deck of Cards
idRepo Steps
Card
idRepo steps
labelDunfell Build
Code Block
languagebash
themeDJango
titleDunfell Build
$ mkdir <workspace dir>
$ cd <workspace dir> 
$ repo init -u https://code.rdkcentral.com/r/manifests -b dunfell -m rdkb-extsrc.xml 
$ repo sync -j`nproc` --no-clone-bundle
Card
idRepo Steps
labelMorty Build
Code Block
languagebash
themeDJango
titleMorty Build
$ mkdir <workspace dir>
$ cd <workspace dir> 
$ repo init -u https://code.rdkcentral.com/r/manifests -b rdk-next -m rdkb-extsrc.xml 
$ repo sync -j`nproc` --no-clone-bundle


Flashing the image


Info
titlesd-card size requisite

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


Command to flash the image

Generated image has to be flashed to an SD card using this command in local PC:

...

The Raspberry Pi board is connected to the PC via a USB to serial converter and the logs can be checked in console or can be connected via HDMI cable to a TV and logs will be shown in the terminal

Creating checksum file

It is necessary to flash the stable image during upgrade. So checksum file has to be created for the image to be uploaded using below command

...

After checksum file is created, place this file in tftp location along with actual image file which is expected by firmware upgrade script. Without which firmware upgrade wont be allowed by scripts

Creating Multi-Boot compatible SD-CARD if RDKB is Flashed for first time


If firmware upgrade is intended for multi-boot, it is necessary to have partizion size matching to  RDKB image size ( especially rootfs ). 

...

8. After applying close size increased to 2 GB can be seen

 

With selection of HTTP Protocol

Server Set-up :

  1. Install the apache2 http server in local pc
  2.  Add the below line in /etc/hosts (192.168.0.107(wan IP) http://www.myfirmware.com)
  3.  place the rpi image and checksum files in document root directory.

...

Note : Every reboot, You need to add the above three steps if it's local http server.










HTTP Location folder

Verify that image file and its respective md5 checksum file is present in the http folder:

keerthana@keerthana-INVALID:/var/www/html$ ls
rdkb-generic-broadband-image_default_20200529140558.rootfs.rpi-sdimg
folder rdkb-generic-broadband-image_default_20200529140558.txt


RPi - Board

  1. Flash the RDKB image supported for Firmware upgrade feature in the Rpi and verify the 2 partitions(ex. mmcblk0p1, mmcblk0p2) present under dev folder (use command ls /dev)
  2. Device auto-reboots and verify there are 2 more additional partitions are created (ex. mmcblk0p3, mmcblk0p4).
  3. Open /etc/include.properties file and verify the CLOUDURL parameter where XConf Server URL is configured
  4. Verify the image version ( cat /version.txt) displays the flashed image version
  5. Open /rdklogs/logs/swupdate.log to verify the communication from RPI board with XConf Server and the download status
  6. Verify the tftp download is happening by noticing the change of file size using below command:cd /extblock/tftpimage/imagedwnldls -lh  (use this command frequently to verify the file size change) if tftp protocol was selected in XCONF UI
  7. Verify the http download is happening by noticing the change of file size using below command : cd /extblock/httpimage/imagedwnldls -lh(use this command frequently to verify the file size change)if http protocol was selected in XCONF UI
  8. Once image download completed, the Rpi board will auto reboot and come up with downloaded image
  9.  Verify the version of booted image which shows the downloaded image version

TroubleShooting

  1.  If output.json will not be generated in /nvram folder. Please check the network connection in RPI Device.
  2. Also, check the status of swupdate service by using the below command,
    1.  systemctl status swupdate.service
  3. Check the swupdate logs in below path,
    1. cat /rdklogs/logs/swupdate.log

Conclusion

Please find the summary on firmware upgrade explained above

...