Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add notes on manually provisioning sd cards for rpi

...

Code Block
languagebash
# check if tftp server is running on the TDK Manager VM
vagrant@tdk-emulator-rdkb:~$ ps -ef | grep tftp
vagrant  12660 12630  0 12:17 pts/0    00:00:00 grep --color=auto tftp
root     13444 13389  0 Sep18 ?        00:00:00 sudo python /var/lib/tomcat6/webapps/rdk-test-tool/fileStore/tftp_server.py 69 /var/lib/tomcat6/webapps/rdk-test-tool/logs/logs/
root     13446 13444  0 Sep18 ?        00:00:05 python /var/lib/tomcat6/webapps/rdk-test-tool/fileStore/tftp_server.py 69 /var/lib/tomcat6/webapps/rdk-test-tool/logs/logs/

# Manually start TDK TFTP Server on a TDK VM (tftp server is used on manager to transfer agent logs from DUT)
sudo python /var/lib/tomcat6/webapps/rdk-test-tool/fileStore/tftp_server.py 69 /var/lib/tomcat6/webapps/rdk-test-tool/logs/logs/ &

# kill tftp serrver 
sudo pkill -f tftp

# to manually set the route on TDK Manager VM (this is needed if you can't connect to the webui of VM via your browser), e.g. can happen when VM was restarted abnormally
route del default
sudo route del default; sudo route add default gw 192.168.32.1 dev eth1

# to change interface or mechanism for agent log transfer (can be set to tftp/REST) edit tm.config file and restart tomcat
vi /var/lib/tomcat6/webapps/rdk-test-tool/fileStore/tm.config
sudo pkill -f tftp
sudo service tomcat6 stop 
sudo service tomcat6 start

...

 Provisioning RPI SD

...

Cards for first time use:

The CMF procedure for flashing RPI's using UBOOT for automated testing is documented in RPI flashing procedure documentation

...

To flash SD cardRDK SD cards with a prebuilt sd image:

Instructions for

...

partitioning RPI

...

SSD (from Ubuntu Host)

Best results on linux seen with GNOME Partition Editor (gparted)

Install from universal repositories, requires super user permissions to run the program.

Partitioning Info

16GB SSD Layout:

PartitionLabelDesignationFile SystemSize (MiB)
1BOOTPrimaryFat32488
2RDKPrimaryEXT42048
3UBUPrimaryEXT410240
4DATAPrimaryEXT4(Remaining Space)

GParted RPi SSD PartitionsImage Removed

...


32GB SSD Layout:

PartitionLabelDesignationFile SystemSize (MiB)
1BOOTPrimaryFat32488
2RDKPrimaryEXT410240
3UBUPrimaryEXT410240
4DATAPrimaryEXT4(Remaining Space)

GParted RPi SSD PartitionsImage Added

Instructions for flashing boot & root filesystems onto SSD (Nix)

Important: the boot partition must be populated at a bare minimum before the ssd is put into a DUT for the CMF Automation to succeed.

The partitions created in the previous section should be mounted to your filesystem, in recent ubuntu, these should mount to 

  • /media/($USER)/BOOT
  • /media/($USER)/RDK
  • /media/($USER)/UBU

...

# Acquire an RDK Build archive:
$ aws s3 ls s3://rdkcmf-artifacts/jobs/community-build-rdkv-raspberrypi/
# Choose latest build number, e.g. 1472, check files therein, then copy the build to your local workspace:
$ aws s3 cp s3://rdkcmf-artifacts/jobs/community-build-rdkv-raspberrypi/1472/test-archive-rdk-hybrid-raspberrypi-community-nightly-<build-id>.tar.gz .
# Extract the archive into a local directory:
$ mkdir rdk-hybrid && tar xvzf test-archive-rdk-hybrid-raspberrypi-community-nightly-<build-id>.tar.gz -C rdk-hybrid
# Configure u-boot as explicit kernel image for first time sd provisioning:
# Edit the file rdk-hybrid/boot/config.txt, find the line `#kernel=""` and change it to `kernel=u-boot.bin`, save and close the file.
# Copy the boot contents to BOOT partition
$ cp -r rdk-hybrid/boot /media/($USER)/BOOT
# Extract the root filesystem to RDK partition
$ tar xvjf rdk-hybrid/rootfs/rdk-generic-hybrid-wpe-image-raspberrypi-rdk-hybrid.tar.bz2 -C /media/($USER)/RDK

# Provisioning RDK-CMF-UBUNTU (WiFi Client):
# Acquire RDK-CMF-Ubuntu:
$ aws s3 ls s3://rdkcmf-artifacts/test-artifacts/test-ubuntu-artifacts
# Choose latest build number, e.g. 3, check files therein, then copy the build root file system (rootfs) to your local workspace (No need for boot filesystem):
$ aws s3 cp s3://rdkcmf-artifacts/test-artifacts/test-ubuntu-artifacts/3/ubuntu_rootfs_<build-sha>.tar.bz2 .
# Extract the archive into the SSD UBU Partition:
$ tar xvjf ubuntu_rootfs_<build-sha>.tar.bz2 -C /media/($USER)/UBU

# Ensure all Read/Write cases complete
$ sudo sync

Unmount/Eject the sd card and transfer to the DUT

Useful RPI setup links: