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 |
---|
|
Card |
---|
id | Repo steps |
---|
label | Dunfell Build |
---|
| Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | Dunfell 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 |
---|
id | Repo Steps |
---|
label | Morty Build |
---|
| Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | Morty 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 |
---|
title | sd-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 :
- Install the apache2 http server in local pc
- Add the below line in /etc/hosts (192.168.0.107(wan IP) http://www.myfirmware.com)
- 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
- 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)
- Device auto-reboots and verify there are 2 more additional partitions are created (ex. mmcblk0p3, mmcblk0p4).
- Open /etc/include.properties file and verify the CLOUDURL parameter where XConf Server URL is configured
- Verify the image version ( cat /version.txt) displays the flashed image version
- Open /rdklogs/logs/swupdate.log to verify the communication from RPI board with XConf Server and the download status
- 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
- 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
- Once image download completed, the Rpi board will auto reboot and come up with downloaded image
- Verify the version of booted image which shows the downloaded image version
TroubleShooting
- If output.json will not be generated in /nvram folder. Please check the network connection in RPI Device.
- Also, check the status of swupdate service by using the below command,
- systemctl status swupdate.service
- Check the swupdate logs in below path,
- cat /rdklogs/logs/swupdate.log
Conclusion
Please find the summary on firmware upgrade explained above
...