Step 7 : Post build checks

  • In this program, you are going to learn

  • How to ?

Topics in this section,

$ cd $HOME/rdkb_build/build/conf

$ cat local.conf
$ pwd
$HOME/rdkb_build/build
$ cd tmp/hosttools
  • Make sure the current directory is “openwrt”

$ pwd

$HOME/rdkb_build/build/tmp/deploy/images/raspberrypi4-64/


$ ls -l

-rw-r--r-- 1 test test 1705063 Jan  12 18.16 rdk-generic-broadband-image-raspberrypi4-64-rdk-broadband.wic.bz2
$ du -h rdk-generic-broadband-image-raspberrypi4-64-rdk-broadband.wic.bz2

17M     rdk-generic-broadband-image-raspberrypi4-64-rdk-broadband.wic.bz2
  • To extract image file following are the commands

$ pwd

$HOME/rdkb_build/build/tmp/deploy/images/raspberrypi4-64
  • After extracting you will get rdk-generic-broadband-image-raspberrypi4-64-rdk-broadband.wic.bz2

$ gunzip rdk-generic-broadband-image-raspberrypi4-64-rdk-broadband.wic.bz2

$ ls -l

rdk-generic-broadband-image-raspberrypi4-64-rdk-broadband.wic
$ file rdk-generic-broadband-image-raspberrypi4-64-rdk-broadband.wic

rdk-generic-broadband-image-raspberrypi4-64-rdk-broadband.wic: DOS/MBR boot sector; partition 1 : ID=0xc, active, start-CHS (0x40,0,1), end-CHS (0x354,2,16), startsector 8192, 100944 sectors; partition 2 : ID=0x83, start-CHS (0x380,0,1), end-CHS (0x3ff,3,32), startsector 114688, 1522894 sectors
  • kpartx: Create device maps from partition tables

$ sudo apt-get install kpartx
  • -a: Add partition mappings

  • -v: Operate verbosely

$ sudo kpartx -av rdk-generic-broadband-image-raspberrypi4-64-rdk-broadband.wic

add map loop34p1 (253:0): 0 100944 linear 7:34 8192
add map loop34p2 (253:1): 0 1522894 linear 7:34 114688

* There are 2 partitions are there in .img file
$ sudo mkdir -p /mnt/boot

$ sudo mount /dev/mapper/loop29p1 /mnt/boot

$ sudo mkdir -p /mnt/root

$ sudo mount /dev/mapper/loop29p2 /mnt/root
  • meminfo command can be used to check the space acquired by RAM.

root@raspberrypi-rdk-mc:~# cat /proc/meminfo
  • using df command we can interpret the space acquired by flash.

  • this needs to be correlated with the mount command output since this df also lists out virtual filesystem.

root@OpenWrt:/# mount
  • from the output of this two commands we can interpret the following conclusion.

    • /dev/mmcblk0p1 is mounted on /boot

    • /dev/mmcblk0p2 is on /var/lib which is nothing but /dev/root which is mounted on /

    • these two filesystem comprimises the space acquired by flash.

$ ls -l /mnt/boot

-rwxr-xr-x 1 root root   26138 Dec  6 20:55 bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root   26401 Dec  6 20:55 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root   26060 Dec  6 20:55 bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root root   27076 Dec  6 20:55 bcm2708-rpi-zero-w.dtb
-rwxr-xr-x 1 root root   27276 Dec  6 20:55 bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root root   28923 Dec  6 20:55 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root   29542 Dec  6 20:55 bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root root   27421 Dec  6 20:55 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root   49825 Dec  6 20:55 bcm2711-rpi-4-b.dtb
-rwxr-xr-x 1 root root   52456 Dec  6 20:55 bootcode.bin
-rwxr-xr-x 1 root root       0 Dec  6 20:55 bootfiles-20210527.stamp
-rwxr-xr-x 1 root root     153 Dec  6 20:55 cmdline.txt
-rwxr-xr-x 1 root root   36237 Dec  6 20:55 config.txt
-rwxr-xr-x 1 root root    3191 Dec  6 20:55 fixup4cd.dat
-rwxr-xr-x 1 root root    5448 Dec  6 20:55 fixup4.dat
-rwxr-xr-x 1 root root    8452 Dec  6 20:55 fixup4db.dat
-rwxr-xr-x 1 root root    8452 Dec  6 20:55 fixup4x.dat
-rwxr-xr-x 1 root root    3191 Dec  6 20:55 fixup_cd.dat
-rwxr-xr-x 1 root root    7314 Dec  6 20:55 fixup.dat
-rwxr-xr-x 1 root root   10298 Dec  6 20:55 fixup_db.dat
-rwxr-xr-x 1 root root   10300 Dec  6 20:55 fixup_x.dat
-rwxr-xr-x 1 root root 6828536 Dec  6 20:55 kernel7.img
drwxr-xr-x 2 root root    4096 Dec  6 20:55 overlays
-rwxr-xr-x 1 root root  793340 Dec  6 20:55 start4cd.elf
-rwxr-xr-x 1 root root 3722664 Dec  6 20:55 start4db.elf
-rwxr-xr-x 1 root root 2229120 Dec  6 20:55 start4.elf
-rwxr-xr-x 1 root root 2981480 Dec  6 20:55 start4x.elf
-rwxr-xr-x 1 root root  793340 Dec  6 20:55 start_cd.elf
-rwxr-xr-x 1 root root 4794632 Dec  6 20:55 start_db.elf
-rwxr-xr-x 1 root root 2953312 Dec  6 20:55 start.elf
-rwxr-xr-x 1 root root 3705000 Dec  6 20:55 start_x.elf

$ ls -l /mnt/root

drwxr-xr-x  2 root root  4096 Dec  6 20:53 bin
drwxr-xr-x  2 root root  4096 Dec  6 18:26 boot
dr-xr-x---  5 root root  4096 Dec  6 20:54 container
drwxr-xr-x  2 root root  4096 Dec  6 20:53 dev
drwxr-xr-x 48 root root  4096 Dec  6 20:55 etc
drwxr-xr-x  3 root root  4096 Dec  6 18:26 home
drwxr-xr-x  2 root root  4096 Dec  6 19:23 HrvInitScripts
drwxr-xr-x 11 root root  4096 Dec  6 20:53 lib
drwx------  2 root root 16384 Dec  6 20:55 lost+found
drwxr-xr-x  4 root root  4096 Dec  6 20:53 media
drwxr-xr-x  2 root root  4096 Dec  6 18:26 mnt
drwxr-xr-x  4 root root  4096 Dec  6 20:53 opt
dr-xr-xr-x  2 root root  4096 Dec  6 18:26 proc
lrwxrwxrwx  1 root root    24 Dec  6 19:55 QueryPowerState -> /usr/bin/QueryPowerState
lrwxrwxrwx  1 root root    19 Dec  6 19:03 rdklogctrl -> /usr/bin/rdklogctrl
lrwxrwxrwx  1 root root    21 Dec  6 19:23 rebootNow.sh -> /lib/rdk/rebootNow.sh
lrwxrwxrwx  1 root root    21 Dec  6 19:23 rebootSTB.sh -> /lib/rdk/rebootSTB.sh
drwxr-xr-x  2 root root  4096 Dec  6 20:55 run
drwxr-xr-x  2 root root  4096 Dec  6 20:53 sbin
lrwxrwxrwx  1 root root    22 Dec  6 19:54 SetPowerState -> /usr/bin/SetPowerState
dr-xr-xr-x  2 root root  4096 Dec  6 18:26 sys
drwxrwxrwt  2 root root  4096 Dec  6 18:26 tmp
drwxr-xr-x  2 root root  4096 Dec  6 19:02 usb
drwxr-xr-x  2 root root  4096 Dec  6 19:02 usb0
drwxr-xr-x  2 root root  4096 Dec  6 19:02 usb1
drwxr-xr-x 10 root root  4096 Dec  6 20:52 usr
drwxr-xr-x 10 root root  4096 Dec  6 20:53 var
-rw-r--r--  1 root root   345 Dec  6 20:53 version.txt
drwxr-xr-x  3 root root  4096 Dec  6 19:21 www
$ umount /mnt/boot

$ umount /mnt/root
  • To find the “BUILD ID” we can cat image.manifest and grep for “BUILD ID”

root'@'raspberrypi3-64-rdk-broadband:~  cat image.manifest | grep BUILD_ID
BUILD_ID=2022.01.11.07.00.00
  • Check the os-release version using the following command.

root'@'raspberrypi3-64-rdk-broadband:~  cat /etc/os-release | grep PRETTY_NAME
PRETTY_NAME="Yocto Project 3.5.1 (Dunfell)"
  • Check the version release using the following command

root'@'raspberrypi3-64-rdk-broadband:~  cat /etc/rdkb-release
Yocto Project Release 3.5.1 (Dunfell)
  • Check the rdkb version using the following command

root'@'raspberrypi3-64-rdk-broadband:~ rdk-version --version
RDK Version 2.1.0
  • Check if rdkb package is installed or not using dpkg command

root'@'raspberrypi3-64-rdk-broadband:~ dpkg -l | grep rdk
ii  rdk-core          2.1.0-1       armhf        Reference Design Kit Core Components
ii  rdk-utils         1.2.5-3       armhf        Utility tools for RDK
root@raspberrypi-rdk-mc:/# lsmod
root@raspberrypi-rdk-mc:/# find / -iname "*.ko"
root@raspberrypi-rdk-mc:/# find / -iname "*.so"
root@raspberrypi-rdk-mc:/# find / -iname "*.a"
root@raspberrypi-rdk-mc:/# find /usr/bin
root@raspberrypi-rdk-mc:/# find /usr/sbin
root@raspberrypi-rdk-mc:/# cd bin
root@raspberrypi-rdk-mc:/bin# ls -l
root@raspberrypi-rdk-mc:/# cd sbin
root@raspberrypi-rdk-mc:/sbin# ls -l
  • ps: Displays information about a selection of the active processes

root@raspberrypi-rdk-mc:/# ps
  • TODO


  • TODO


  • TODO


root@raspberrypi-rdk-mc:/# mount
root@raspberrypi-rdk-mc:/# fdisk -l
  • In this section, we will know RAM usage

root@raspberrypi-rdk-mc:/# free

              total        used        free      shared  buff/cache   available
Mem:         956080      171144      522992       11296      261944      740872
Swap:             0           0           0
root@raspberrypi-rdk-mc:/# ifconfig -a

eth0      Link encap:Ethernet  HWaddr B8:27:EB:C0:23:93
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:187109 errors:0 dropped:0 overruns:0 frame:0
          TX packets:187109 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:13879476 (13.2 MiB)  TX bytes:13879476 (13.2 MiB)

wlan0     Link encap:Ethernet  HWaddr B8:27:EB:95:76:C6
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0:avahi Link encap:Ethernet  HWaddr B8:27:EB:95:76:C6
          inet addr:169.254.10.115  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
root@raspberrypi-rdk-mc:/# iw dev

phy#0
        Interface wlan0
                ifindex 3
                wdev 0x1
                addr b8:27:eb:95:76:c6
                type managed
                channel 36 (5180 MHz), width: 20 MHz, center1: 5180 MHz
                txpower 31.00 dBm
root@raspberrypi-rdk-mc:/# iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     no wireless extensions.

br-lan    no wireless extensions.