RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Please refer the below link for host environment set-up & flashing procedure for yocto build ,
Dunfell :
RPI 3B/3B+ Model Reference Platform
Morty:
To build, follow below instructions
$ 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
$ 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
FwUpgradeManager generic changes,
Note : The above bug fixes changes are temporary given as instructions. This is not required once the change is gets merged into the appropriate repo.
$ MACHINE=raspberrypi-rdk-broadband source meta-cmf-raspberrypi/setup-environment $ bitbake rdk-generic-broadband-image
Following diagram depicts the flow of control among the components,
S.NO | DM | Value | Description |
---|---|---|---|
1 | Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadURL | http://192.168.0.8 | Value should be local/public http server url |
2 | Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadProtocol | http | Value should be auto-generated based on above parameter Input |
3 | Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload | rdkb-generic-broadband-image_rdk-next_20210525055548.rootfs.wic | Value should be Firmware Image Name . Note: This API does not reboot the device. |
4 | Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadStatus | Completed | Returns the current state of the Firmware Download operation. |
5 | Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadNow | True | Downloads and upgrades the firmware. The firmware is updated in the passive bank and marks it as active. Reboots the device and the device boots up with the active bank and updated firmware. |
sd-card size requisite
It is must to have minimal size of 8GB SD-Card for Firmware upgrade support
Generated image has to be flashed to an SD card using this command in local PC:
|
Ex:
|
The SD card is inserted to the Raspberry Pi board and booted to check for containers created.
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
It is necessary to have partizion size matching to RDKB image size ( especially rootfs ).
To make compatible, size of RDKB rootfs partition should be increased to 2 GB ( 2098 MB) from 300MB default
This resize can be achieved using gparted ui tool which should be available in host pc
gparted tool Install and usage
sudo apt-get install gparted
https://gparted.org/display-doc.php%3Fname%3Dmoving-space-between-partitions
Please resize the rootfs partition to 2098 MB or 2GB (/dev/sdb1) accordingly from below procedure as captured in various stages
2. Select the rootfs partition of format ext3 for resize/move option
3. Resize the rootfs partition by giving new size image to 2098 MiB
4. After resize , position stands as below
5.After modifying size, "Apply all operations" using tick symbol in UI which displays icon as below
6. After giving "Apply icon" position stands as below
7. After resizing is completed
8. After applying close size increased to 2 GB can be seen
Verify that rpi image file is present in the http folder. Here , document root directory as "/var/www/html"
Please check the below commands to verify the Fwupgrade Manager is running or not in rpi device,
root@RaspberryPi-Gateway:~# systemctl status RdkFwUpgradeManager ● RdkFwUpgradeManager.service - Firmware Upgrade Manager service Loaded: loaded (/lib/systemd/system/RdkFwUpgradeManager.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2021-08-13 13:20:04 UTC; 6 days ago Process: 696 ExecStart=/usr/bin/fwupgrademanager -subsys $Subsys (code=exited, status=0/SUCCESS) Main PID: 701 (fwupgrademanage) Tasks: 4 (limit: 830) CGroup: /system.slice/RdkFwUpgradeManager.service └─701 /usr/bin/fwupgrademanager -subsys eRT. Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
root@RaspberryPi-Gateway:~# dmcli eRT getv Device.DeviceInfo. CR component name is: eRT.com.cisco.spvtg.ccsp.CR subsystem_prefix eRT. getv from/to component(eRT.com.cisco.spvtg.ccsp.fwupgrademanager): Device.DeviceInfo. Execution succeed. Parameter 1 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadStatus type: string, value: Not Started Parameter 2 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadProtocol type: string, value: Parameter 3 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadURL type: string, value: Parameter 4 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload type: string, value: Parameter 5 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadNow type: bool, value: false Parameter 6 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadAndFactoryReset type: int, value: 0 Parameter 7 name: Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.RPC.DeferFWDownloadReboot type: uint, value: 290
FwUpgrade Manager Log file ,
root@RaspberryPi-Gateway:~# cat /rdklogs/logs/FwUpgradeManagerLog.txt.0 210805-16:04:07.534093 [mod=FWUPGRADEMANAGER, lvl=INFO] [tid=872] After daemonize before signal 210805-16:04:07.535782 [mod=FWUPGRADEMANAGER, lvl=INFO] [tid=872] Connect to bus daemon... 210805-16:04:07.536150 [mod=FWUPGRADEMANAGER, lvl=WARN] [tid=872] DBus is enabled 210805-16:04:07.549648 [mod=FWUPGRADEMANAGER, lvl=INFO] [tid=872] INFO: bus_handle: 0x 169ce08 210805-16:04:08.556185 [mod=FWUPGRADEMANAGER, lvl=WARN] [tid=872] Register empty object : com. 210805-16:04:08.556397 [mod=FWUPGRADEMANAGER, lvl=WARN] [tid=872] Register empty object : com.cisco. 210805-16:04:08.556525 [mod=FWUPGRADEMANAGER, lvl=WARN] [tid=872] Register empty object : com.cisco.spvtg. 210805-16:04:08.556656 [mod=FWUPGRADEMANAGER, lvl=WARN] [tid=872] Register empty object : com.cisco.spvtg.ccsp. 210805-16:04:08.558086 [mod=FWUPGRADEMANAGER, lvl=WARN] [tid=872] DM Library module name = CCSP Base Data Model 210805-16:04:08.558481 [mod=FWUPGRADEMANAGER, lvl=INFO] [tid=872] Download_Control_Flag is 1 210805-16:04:08.558714 [mod=FWUPGRADEMANAGER, lvl=INFO] [tid=872] Current FW Version is rdkb-generic-broadband-image_rdk-next_20210813103706 210805-16:04:08.558846 [mod=FWUPGRADEMANAGER, lvl=WARN] [tid=872] syscfg_get failed 210805-16:04:08.566939 [mod=FWUPGRADEMANAGER, lvl=WARN] [tid=872] DM Library module name = TR181_RdkFirmwareUpgradeManager 210805-16:04:08.568084 [mod=FWUPGRADEMANAGER, lvl=WARN] [tid=872] Search for empty object in 'dslhCpeCheckEmptyObject' root@RaspberryPi-Gateway:~#
Please run the below commands for FwUpgrade Manager,
root@RaspberryPi-Gateway:~# dmcli eRT setv Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadURL string "http://192.168.0.7" CR component name is: eRT.com.cisco.spvtg.ccsp.CR subsystem_prefix eRT. setv from/to component(eRT.com.cisco.spvtg.ccsp.fwupgrademanager): Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadURL Execution succeed. root@RaspberryPi-Gateway:~# dmcli eRT setv Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload string "rdkb-generic-broadband-image_rdk-next_20210813103706.rootfs.wic" CR component name is: eRT.com.cisco.spvtg.ccsp.CR subsystem_prefix eRT. setv from/to component(eRT.com.cisco.spvtg.ccsp.fwupgrademanager): Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload Execution succeed. root@RaspberryPi-Gateway:~# dmcli eRT setv Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadNow bool true CR component name is: eRT.com.cisco.spvtg.ccsp.CR subsystem_prefix eRT. setv from/to component(eRT.com.cisco.spvtg.ccsp.fwupgrademanager): Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadNow Execution succeed. root@RaspberryPi-Gateway:~#
root@RaspberryPi-Gateway:/# dmcli eRT getv Device.DeviceInfo. CR component name is: eRT.com.cisco.spvtg.ccsp.CR subsystem_prefix eRT. getv from/to component(eRT.com.cisco.spvtg.ccsp.fwupgrademanager): Device.DeviceInfo. Execution succeed. Parameter 1 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadStatus type: string, value: Completed Parameter 2 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadProtocol type: string, value: HTTP Parameter 3 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadURL type: string, value: http://192.168.0.7 Parameter 4 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload type: string, value: rdkb-generic-broadband-image_rdk-next_20210813103706.rootfs.wic Parameter 5 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadNow type: bool, value: false Parameter 6 name: Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareDownloadAndFactoryReset type: int, value: 0 Parameter 7 name: Device.DeviceInfo.X_RDKCENTRAL-COM_xOpsDeviceMgmt.RPC.DeferFWDownloadReboot type: uint, value: 290
The New Firmware Image is downloaded at /firmware/imagedwld and Use 'ls -lh' command to check the image size.
root@RaspberryPi-Gateway:/firmware/imagedwld# pwd /firmware/imagedwld root@RaspberryPi-Gateway:/firmware/imagedwld# ls -lh rdkb-generic-broadband-image_rdk-next_20210813103706.rootfs.wic -rw-r--r-- 1 root root 316.0M Aug 20 09:40 rdkb-generic-broadband-image_rdk-next_20210813103706.rootfs.wic root@RaspberryPi-Gateway:/firmware/imagedwld#
Use 'fdisk -l' & mount command to check the available partitions.
Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 * 8192 112525 104334 51M c W95 FAT32 (LBA) /dev/mmcblk0p2 114688 9822207 9707520 4.6G 83 Linux /dev/mmcblk0p3 9822208 14016512 4194305 2G 83 Linux /dev/mmcblk0p4 14016513 18210817 4194305 2G 83 Linux root@RaspberryPi-Gateway:/ df -h | grep extblock /dev/mmcblk0p4 1.9G 246.9M 1.5G 13% /extblock /dev/mmcblk0p1 50.8M 29.2M 21.6M 58% /extblock/bank0_linux /dev/mmcblk0p2 4.5G 95.0M 4.2G 2% /extblock/bank0_rootfs root@RaspberryPi-Gateway: mount | grep extblock /dev/mmcblk0p4 on /extblock type ext4 (rw,relatime) /dev/mmcblk0p1 on /extblock/bank0_linux type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro) /dev/mmcblk0p2 on /extblock/bank0_rootfs type ext4 (rw,relatime)
RPi - Board