Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


 

Build a boot-time image

                $ repo init -u https://code.rdkcentral.com/r/manifests -m rdkb-raspberrypi.xml -b morty

...

  1) Select ext3 partition and click on resize

 


                     

 2)  Resize the New-size (MB) attribute to 420 M and click on resize

...

Place the sd-card on rpi board slot .


On Virtual Machine(VM)


Create a file named boot-info.txt on the path ~/ (/mnt/home) at your VM.

      Note: Do not change the name of the file or change the location  , Create it as it is mentioned above.

In your boot-info.txt place the following info

     $ vi ~/boot-info.txt

Credentials:cm5hcmF5YW5hbjpDb21jYXN0==  (Encoded base 64 rdk.wiki.central credential)
Sourcepath:/mnt/home/rdkb/boot-time/test1 (

...

Path where your rootfs tar will be present on your VM)

      → Use this link to convert Encoded Credential https://www.base64encode.org  (Enter your Credential in the following format username:password)

     → Make sure the Sourcepath directory is present, if not use create it using mkdir -p /mnt/home/path

               


  Create ~/                 Create repo.sh with following content

 #!/bin/sh
RUNAT="Wednesday:12:00"

source=$(cat ~/boot-info.txt | grep Sourcepath | cut -d ":" -f2)

while [ 1 ]
do
    DATE=`/bin/date +%A:%H:%M`
    if [ $DATE. = $RUNAT. ]
    then
        rm -rf daily-build
        mkdir daily-build
        cd daily-build
        repo init -u https://code.rdkcentral.com/r/manifests -m rdkb-raspberrypi.xml -b morty
        repo sync -j4 --no-clone-bundle
       MACHINE=raspberrypi-rdk-boot-time-broadband source meta-cmf-raspberrypi/setup-environment
       cd build-raspberrypi-rdk-boot-time-broadband
       bitbake rdk-generic-broadband-boot-image -f
   fi

       
        if [ -f /mnt/home/rdkb/f  ~/daily-build/build-raspberrypi-rdk-boot-time-broadband/tmp/deploy/images/raspberrypi-rdk-boot-time-broadband/*.rootfs.tar.bz2 ]
        then
        echo " Build is been initiated and completed "
            cp ~/mnt/home/rdkb/daily-build/build-raspberrypi-rdk-boot-time-broadband/tmp/deploy/images/raspberrypi-rdk-boot-time-broadband/*.rootfs.tar.bz2 /mnt/home/rdkb/rajkumar-A/test1/${source}
        sleep 10
                stat /mnt/home/rdkb/rajkumar-A/test1/${source}/*.rootfs.tar.bz2 | grep "Size" | cut -d " " -f4 > /mnt/home/rdkb/rajkumar-A/test1/${source}/filesize.txt
        sleep 30
        rm /mnt/home/rdkb~/daily-build/build-raspberrypi-rdk-boot-time-broadband/tmp/deploy/images/raspberrypi-rdk-boot-time-broadband/*.rootfs.tar.bz2    
        fi
done

...

              $ chmod 777 ~/repo.sh

Execute the script with .(dot)

              $ . repo.sh &

...

Rename the VM key-file  to dvm_rdkb keyfile , as the script on image uses it.

     $ mv "key-file" dvm_rdkbkeyfile

Copy the key-file to kernel partition for further rootfs flash

     $ mount /dev/mmblk0p1 /mnt

     $ cp key-file /home/root/keyfile /mnt

     $ umount /mnt

 Reboot the image

...