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

Compare with Current View Page History

« Previous Version 2 Next »


    


This Page is under Development

Introduction-Mulitboot

This page is dedicated for switching the images (broadband to video) specifically for techsummit-2019

Steps for Multiboot support and MultiSDCard Partitioning and Image Flashing automatically

Precondition:

All the SD cards should be fully formatted. Use Disk tool to cleanup SD card data.

Steps:

1) Keep all the below files in same location:

       i) Broadband image to be flashed

      ii) Video image to be flashed

     iii) extract.sh script file

     iv) multiSDcard_partition.sh

      v) threadSD.sh

     vi) The file where all the SD card partition names and their respective sizes are mentioned (For ex. sd_part_size)

2) Connect all the SD card with host PC and execute the command : sudo fdisk -l - it will list all the SD card partitions with their respective size

3) Write all the partition names and their respective size in a text file. (For example content of sd_part_size looks like:

            amrita@amrita-OptiPlex-9020:/tftp_files$ cat sd_part_size

             /dev/sdb 15.6

            /dev/sdc 32.0

            /dev/sde 31.9

           /dev/sdg 31.9

[Here we have taken 1 SD card of 16GB and 3 others of 32GB each.]

4) Execute the script below:

     bash multiSDcard_partition.sh <Broadband image> <Video image> <SD card details_filename>

    For example:

    bash multiSDcard_partition.sh rdkb-generic-broadband-image_default_20191009085525.rootfs.rpi-sdimg rdk-generic-hybrid-refapp-thunder-  image_default_20190924125426.rootfs.rpi-sdimg sd_part_size

5) Once script execution gets over pull out each SD card and verify the multiboot feature on each of them, it should be working fine

Note: We have tested with 4 SD cards out if which 1 is 16Gb and rest of the 3 cards are 32GB each. Overall process took approximately 6min  time to get completed. Host PC having 8GB RAM.

RDK- Broadband Image Flashing in SDcard Steps

1. Flash the Broadband image in SD card

Image Flashing Command
sudo dd if=<RPIimage-sdimg> of=</dev/sdc> bs=4M

Example: sudo dd if=rdk-generic-hybrid-refapp-thunder-image_default_20190829072513.rootfs.rpi-sdimg of=/dev/sdc bs=4M


2. Resizing and partition creation

RDK- Video Image Copying in SDcard Steps


3.  Keep RDK-Video image in the host machine
4. Extracting the RDK-Video image into the extblock directory

video data extract
sudo sh extract.sh <video-image file>
For ex. sudo sh extract.sh rdk-generic-hybrid-refapp-thunder-image_default_20190924125426.rootfs.rpi-sdimg

After executing the above script, Linux kernel and RootFS of RDK-Video image would be present in the extblock directory


5. To Copy the RDK-Video image in  Partition-P4 

  •     Create mount directory and execute mount  for the partition 4 
video data extract
For ex. 
mkdir videomnt
sudo mount /dev/sdb4 videomnt

In above command, storage partition 4 will get mounted to videomnt directory
  • Copy the RDK-Video image which is present in the extblock
video data extract
sudo cp -r extblock/v* videomnt/


6. Copy the vrootfs backup data into partition 4  storage bank, to ensure it will acts as video bank as well 

video data extract
sudo cp -r extblock/vrootfs_backup_data/* videomnt/


7. Unmount videomnt directory as below

video data extract
sudo umount videomnt

Switching to RDK-Video Image from RDK-Broadband 

8. Now Boot up the SD card in RPI-> it should come up with BB image in partition (P2)


9.  Log into the R-Pi from Host PC execute the below command

       ssh root@<RPI-Board IP>

10. To load the video image which is present in the storage execute the script bank_video_switch.sh

Switching to Video Image
root@RaspberryPi-Gateway:/lib/rdk# sh bank_video_switch.sh


11.  R-Pi should boot up with video image. Ensure that the ethernet connection is available for R-Pi.

NOTE:

Ensure that while mounting the SD card in host machine it may have different device names like /dev/sdc * and /dev/sdd * .  Please check host machine accordingly while using device name.

  • No labels