• Introduction
    The Firmware upgrade will upgrade higher or lower version of the current image in BPI target with the help of Xconf server and TFTP/HTTP protocol.


  • TFTP Server Setup

    STEP 1:
    Install xinetd and tftpd-hpa application in your local PC to setup tftp server by using below command
    sudo apt-get install xinetd
    sudo apt-get install tftpd-hpa

          STEP 2:
          Create new folder ,for example "tfphome" in your PC home directory to maintain checksum file and upgrading image file.

          

   

         STEP 3:
         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.  
         

    
File : /etc/xinetd.d/tftp


  • Verify /etc/default/tftpd-hpa file content

vi /etc/default/tftpd-hpa
 

File: /etc/default/tftpd-hpa


STEP 5: Start tftp server and xinetd server using below commands.
sudo service tftpd-hpa restart
sudo /etc/init.d/xinetd restart


  • Procedure for image flashing
    • Have 2 different broadband images and copy to the linux machine
  • Flash a image to the SD card(SD card Minimum size should be 8GB)
         bzip2 -d <image>
         sudo -E bmaptool copy --nobmap <image> /dev/sdb
         Example:
         $ bzip2 -d rdk-generic-broadband-image-raspberrypi-rdk-broadband.wic.bz2
         $ sudo -E bmaptool copy --nobmap rdk-generic-broadband-image-raspberrypi-rdk-broadband.wic /dev/sd

      


  • With another image
    • Create checksum using the below command
      md5sum "<imagefile_name>" > imagefile_name.txt
    • Copy both (image as well as the checksum) to tftp server
      for Ex:
      md5sum "rdkb-generic-broadband-image_rdk-next_20251201131409.bin.wic.bz2" > rdkb-generic-broadband-image_rdk-next_20251201131409.bin.wic.bz2.txt
      cp -r rdkb-generic-broadband-image_rdk-next_20251201131409.bin.wic.bz2  rdkb-generic-broadband-image_rdk-next_20251201131409.bin.wic.bz2.txt  /home/xyz/tftphome     

Xconf Server UI Configurations

  • Create Model
    Flow: Xconf-Server ->Common ->Models
    Give ID and Description to setup Model for your device and save that details in xconf server.

          


  • Create MAC List
    Flow: Xconf-Server->Common->MAC Lists
    After entered MAC Lists page press create button to add your device MAC detail and save the details.

          


  • Create Firmware config
    Flow: Xconf-Server->Firmware->Firmware Configs
    After entered Firmware Configs page press create button to add your device firmware configuration detail.
    Give Description, File name, Version and select your model name and save the details in xconf server.
    Description: <unique Identifier>
    File Name :<Upgrading image name>
    Version: <Upgrading image name>
    Model: <Model name configured under Common Tab>

         


  • Create Firmware Rule
    Flow: Xconf-Server->Firmware->Firmware Rules
    After entered Firmware Rule page press create button to add your device firmware Rule detail.
    Please Select a Template : <MAC_RULE>
    Name : <Name difined during firmware configs creation>
    Type : <MAC_RULE>
    Build Conditions:eStbMac IN_LIST <List-Id> AND model is <Model_Name>
    Firmware Config:<select the same name defined during configs creation>

          


          


  • Edit Download Location Round Robin Filter
    Flow: Xconf-server -> Firmware -> Download Location Filter -> Edit
    After entered Download Location Filter page press Edit button to add your Download Location detail.
    Location (FQDN) : <xconf.rdkcentral.com>
    Location (full HTTP Location) : <https://xconf.rdkcentral.com/xconf/upload/>
    TFTP :< Tftp server IPv4 and IPv6 Address> 

         


        

  • Add TFTP location
    An HTTP location will be returned by default to all devices. To enable tftp(If you have the download location of the firmware as tftp, then only you need to setup this)as download location for a particular set of devices, we need to override it from firmware rules.
    Flow : Xconf-server -> Firmware ->Firmware Rules -> Define Properties -> Create

          


  • A page will be displayed with options to select the template. Select ‘DOWNLOAD_LOCATION_FILTER’ from the list.

           


  • In this 'firmware rule’ page with type 'DOWNLOAD_LOCATION_FILTER', we need to specify the ‘Build Conditions’ and ‘Action’ , The build condition should be same as that we used to set rule actions(which will set rules for our intended devices). In ‘Properties’ option under ‘Action’, add ‘firmwareDownloadProtocol’ as ‘tftp’, ‘firmwareLocation’ as ‘your tftp location IPV4 address’. This property will override the default value set from ‘Download Round Robin location filter’.

           


  • Note: Setting up IPV4 locations via ‘Download Location Round Robin Filter’ is not supported. This can be set only by the property 'firmwareLocation' from the 'Define Properties' firmware rule page.
    Just like we added tftp location and protocol here, we can also override the default value with http as well. For firmwareDownloadProtocol, add 'http' and for the 'firmwareLocation', add http location.
  • Response example for https://{xconf-ip}:{port}/xconf/swu/stb?eStbMac={mac}. Here the 'firmwareLocation' and 'firmwareDownloadProtocol' are overrided at 'Define Properties' firmware rule.
  • The 'ipv6' addresses will be one of the addresses mentioned in the 'Download Filter' page . If you don't want "ipv6FirmwareLocation", then don't setup it in 'Define Properties' or in the 'Download location filter' pages and you will get only "firmwareLocation" in the response.

           


  • Verification of Firmware test page
    Flow : Xconf-server -> Firmware -> Test Page
    Parameters : eStbMac <MAC-Address>

          


  • Client end Configurations and verification (in BPI)
    Verify the CLOUDURL URL in /etc/include.properties File
    CLOUDURL="https://xconf.rdkcentral.com/xconf/swu/stb?eStbMac="
    root@Filogic-GW:~# cat /etc/include.properties   
    LOG_PATH=/rdklogs/logs
    CRON_SPOOL=/var/spool/cron/crontabs
    CRON_FIFO_FILE=/etc/cron.d/FIFO
    PERSISTENT_PATH=/nvram
    RAMDISK_PATH=/tmp
    TEMP_LOG_PATH=/var/logs
    UTILITY_PATH=/lib/rdk
    RDK_PATH=/lib/rdk
    EROUTER_INTERFACE=erouter0
    TELEMETRY_JSON_RESPONSE=/nvram/rtl_json.txt
    
    CLOUDURL="https://xconf.rdkcentral.com/xconf/swu/stb?eStbMac="
  • Verify the contents of /etc/dcm.properties
    root@Filogic-GW:~# cat /etc/dcm.properties 
    LOG_SERVER=xconf.rdkcentral.com
    DCM_LOG_SERVER=https://xconf.rdkcentral.com/xconf/logupload.php
    DCM_LOG_SERVER_URL=https://xconf.rdkcentral.com/loguploader/getSettings
    DCM_SCP_SERVER=xconf.rdkcentral.com
    HTTP_UPLOAD_LINK=https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    DCA_UPLOAD_URL=xconf.rdkcentral.com
    
    DCM_HTTP_SERVER_URL=https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    DCM_LA_SERVER_URL=https://xconf.rdkcentral.com/xconf/logupload.php
  • Check the current image version using  “cat /version.txt”
    root@Filogic-GW:~# cat /version.txt 
    imagename:rdkb-generic-broadband-image_rdk-next_20251204071936
    BRANCH=rdk-next
    YOCTO_VERSION=kirkstone
    VERSION=6.1.12.04.25
    SPIN=0
    BUILD_TIME="2025-12-04 07:19:36"
    JENKINS_JOB=Default
    JENKINS_BUILD_NUMBER=0
    Generated on Thu Dec 04  07:19:36 UTC 2025
  • Verify if Firmware job is available using the command "crontab -l | grep fwupgrade" as shown below
    root@Filogic-GW:~# crontab -l | grep fwupgrade
    */15 * * * * /usr/bin/fwupgrade >> /var/log/fwupgrade_cron.log 2>&1
  • Automatically the Firmware upgrade job will be triggered every 15mins of current system time.
  • Once the Firmware Upgrade job is started, verify the log file - /var/log/fwupgrade.log
    cat /var/log/fwupgrade.log
    cloudFWFile     : rdkb-generic-broadband-image_rdk-next_20251103090407.bin.wic.bz2
    cloudFWLocation : 192.168.0.7
    cloudFWVersion  : rdkb-generic-broadband-image_rdk-next_20251103090407.bin.wic.bz2.txt
    cloudProto      : http
    Active root partition: /dev/mmcblk0p4
    downloading image using curl -fgLo /tmp/rdkb-generic-broadband-image_rdk-next_20251103090407.bin.wic.bz2.txt  http://192.168.0.7/rdkb-generic-broadband-image_rdk-next_20251103090407.bin.wic.bz2.txt  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100    99  100    99    0     0  42471      0 --:--:-- --:--:-- --:--:-- 49500
    Xconf-server Version: rdkb-generic-broadband-image_rdk-next_20251103090407
    Current Partition Version: rdkb-generic-broadband-image_rdk-next_20251103110434
    Passive Partition device: /dev/mmcblk0p8
    Mount successful and version.txt found at /mnt/passiveroot/version.txt
    Passive Partition Version: rdkb-generic-broadband-image_rdk-next_20251103110434
    Passive partition does not contain version.txt yet.
    Neither active nor passive have the required version. Proceeding with upgrade...
    Opened /tmp/xconf_flag for writing
    Successfully wrote to /tmp/xconf_flag
    the value of Xconf upgarde flag  is 1CR component name is: eRT.com.cisco.spvtg.ccsp.CR
    subsystem_prefix eRT.
    Execution succeed.CR component name is: eRT.com.cisco.spvtg.ccsp.CR
    subsystem_prefix eRT.
    Execution succeed.CR component name is: eRT.com.cisco.spvtg.ccsp.CR
    subsystem_prefix eRT.
    Execution succeed.CR component name is: eRT.com.cisco.spvtg.ccsp.CR
    subsystem_prefix eRT.
    Execution succeed.[INFO] Firmware upgrade is in progress.....
  • Verify the tftp/http download is happening by noticing the change of file size using below command:
    ls /mnt/bootpart/ -sh  (use this command frequently to verify the file size change)
    root@Filogic-GW:~# ls /mnt/bootpart/ -sh
    total 203M
     16K lost+found  203M rdkb-generic-broadband-image_rdk-next_20250916120622.bin.wic.bz2
    root@Filogic-GW:~# ls /mnt/bootpart/ -sh
    total 205M
     16K lost+found  205M rdkb-generic-broadband-image_rdk-next_20250916120622.bin.wic.bz2
    root@Filogic-GW:~# ls /mnt/bootpart/ -sh
    total 207M
     16K lost+found  207M rdkb-generic-broadband-image_rdk-next_20250916120622.bin.wic.bz2
    root@Filogic-GW:~# ls /mnt/bootpart/ -sh
    total 209M
  • Once image download completed, the BPI board will auto reboot and come up with downloaded image.
  • Once the board comes up, check the image loaded in the box using “cat /version.txt” command .It will be upgraded with the image from xconf-server.
    root@Filogic-GW:~# cat /version.txt 
    imagename:rdkb-generic-broadband-image_rdk-next_20250916120622
    BRANCH=rdk-next
    YOCTO_VERSION=kirkstone
    VERSION=6.1.09.16.25
    SPIN=0
    BUILD_TIME="2025-09-16 12:06:22"
    JENKINS_JOB=Default
    JENKINS_BUILD_NUMBER=0
    Generated on Tue Sep 16  12:06:22 UTC 2025

NOTE : Every time need to flash the different images . Because, here they are using the bank switching approach where the images will be stored in the cloud.
So for the next time, when you try to flash the same image to SD card , the firmware upgrade will not happen . The reason is, it will check in the bank (cloud – active and passive banks). If the image is already available in any one of the bank, then it will not go for image upgrade. 

If you want recover previous image, execute the below command and the device will boot up with the passive bank image.

root@Filogic-GW:~# /usr/bin/fwupgrade recover
[INFO] Running recovery process...
recovering base image has startedbl2 and fip 2 are ready to swapping
All done. Rebooting...
Connection to 192.168.2.15 closed by remote host.
Connection to 192.168.2.15 closed.
chtsl00601@chtsl00601-Latitude-3420:~$


  • No labels