You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Introduction

The Firmware upgrade will upgrade higher or lower version of the current image in RPI target with the help of Xconf server and Local TFTP server.

This page dedicated to bringing up and validation of Firmware upgrade in R-Pi Zero. 

Required Equipment

  • Raspberry Pi 0 Device
  • SD Card
  • Power Cable
  • OTG Cable
  • Standard USB keyboard
  • Mini HDMI connector
  • HDMI Cable
  • Television set/monitor with HDMI input

System Setup


Refer below link for RPI-0 Environment setup

RDK-C Environment Setup

Yocto Build Steps

Refer below link to build camera image

RDK-C Build Instructions for R-Pi

Image Flash Procedure

Image Flash step
$ sudo dd if="Image Name" of="Device Name" bs=4M

Example:
sudo dd if=rdk-generic-camera-image_default_20200130060729.rootfs.rpi-sdimg of=/dev/sdb bs=4M

Test Setup Block Diagram for RPI RDK-C Firmware Upgrade


Firmware Upgrade Validation Procedure

TFTP Server Setup

STEP 1:

Install xinetd and tftpd-hpa application in your local PC to setup tftp server by using below command

TFTP Server Installation Step
sudo apt-get install xinetd
sudo apt-get install tftpd-hpa


STEP 2:

Create checksum file for your upgrading image.

md5sum checksum creation
md5sum "<imagefile_name>.rootfs.rpi-sdimg" > imagefile_name.txt

for Ex:
upgrading image file is rdk-generic-camera-image_default_20200329074421.rootfs.rpi-sdimg
md5sum "rdk-generic-camera-image_default_20200329074421.rootfs.rpi-sdimg" > rdk-generic-camera-image_default_20200329074421.txt


STEP 3:

Create new folder for example "tfphome" in your PC home direcotry to maintain checksum file and upgrading image file.

Keep upgrading image file and checksum file in your created folder.

For Ex:

Keep rdk-generic-camera-image_default_20200329074421.rootfs.rpi-sdimg and rdk-generic-camera-image_default_20200329074421.txt files in your tftphome folder.


STEP 4:

Check tftp file is there or not in /etc/xinetd.d/ directory. if it is not there then create tftp file under this /etc/xinetd.d/ direcotry and add below content.

vi /etc/xinetd.d/tftp

TFTP File Content
service tftp
{
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = -c -v -s /home/xyz/tftphome ( Give upgrading file and checksum file maintained directory )
disable         = no
}


STEP 5:

Verify /etc/default/tftpd-hpa file content

vi /etc/default/tftpd-hpa

tftp-hpa File Content
# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/xyz/tftphome" ( Give upgrading file and checksum file maintained directory )
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"


STEP 6:

Start tftp server and xinetd server

sudo apt-get install xinetd
sudo apt-get install tftpd-hpa

XCONF Server Setup

STEP 1:

XConf URL
http://35.155.171.121:9093/admin/ux

Please follow the below procedure in xconf server for placing new firmware for upgrade to specific device and model ( RPI in this case ) as a reference.

               → RPI will support only tftp protocol . No http protocol support is provided yet.

STEP 2:

Verify that XConf Server configuration displays the Json response from the mentioned URL:

http://<Xconf Server IP:port no.>/xconf/swu/stb?eStbMac=<MAC address of Rpi board>

For Ex: http://35.155.171.121:9092/xconf/swu/stb?eStbMac=B8:27:EB:2E:72:2B

RPI-Board:

  1. Flash the RDKC 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: ls /extblock/tftpimage/imagedwnldls  -sh  (use this command frequently to verify the file size change)
  7. Once image download completed, the Rpi board will auto reboot and come up with downloaded image
  8.  Verify the version of booted image which shows the downloaded image version

Conclusion

Please find the summary on firmware upgrade explained above

  • Build the image RDK-C Image.
  • Ensure 8GB sd-card is available for flashing
  • Flash the build image to sd-card
  • Setup xconf server ready with rules and download location for RPI device
  • Place the upgrading image and checksum file in tftp server
  • Boot the flashed image

Note :

1. RPI will go for reboot while booting for the first time, since two more partition needs to be created which requires reboot. Depends on the image present in xconf and RPI, further reboot will happen for upgrade. Please refer to design (High level design approach - RDK Camera - 2020 - M5) for how firmware upgrade works with bank switching

2. SD card should be zero filled formatted before starting the firmware upgrade procedure. DriveWipe software is used for this. Please refer the you-tube video link for the SD card full format process.

https://youtu.be/CZhsVBEMYuk

  • No labels