-
Notifications
You must be signed in to change notification settings - Fork 23
Radxa Rock Pro Setup
Since Radxa board can boot from two different storages, you need to pay attention to which image you download (http://radxa.com/Rock/prebuilt_images). Any image found in Radxa download section will end with *_update.zip or *_sdcard.zip.
- *_update.zip - This image is used when updating internal NAND Storage
- *_sdcard.zip - This image is used when updating external micro SD Card.
This tutorial will cover SD Card install/update
This document is based on radxa image radxa_rock_pro_ubuntu_14.04_server_140819_sdcard.zip. This image was downloaded from above link for Radxa Rock Pro version. Please pay close attantion when selecting image based on your hardware version.
Insert your SD Card to SD Card reader under Mac OSX or Linux. Next this is do determine what device is mapped to your SD Card
-
Under Linux Open Terminal window and issue following command
sudo fdisl -l
ordf
. Please see what /dev/sd* points to your SD Card. Pay attention to size to help figure out which cad is your. If you select wrong device you next step will destroy all your data on that device. It could be your Hard Drive. For this example I will be using /dev/sdb device.Now copy Master-Radxa-ROS-Image-14.04.img to your $HOME folder. At this point you are ready to write your image to SD card by issuing
dd of=/dev/sdb if=Master-Radxa-ROS-Image-14.04.img bs=1M
. This will copy Master-Radxa-ROS-Image-14.04.img (if - input file) to /dev/sdb (output file) using block size of 1Mb. Based on speed of your SD Card and Image size this process might take few hours. There is no output on screen still finish to error. Usually SD Card Reader/Writes are equipped with LED activity indicator. -
Under Mac OS X Open Terminal window and issue following command
diskutil list
. Please see what /dev/disk* points to your SD Card. Pay attention to size to help figure out which cad is your. If you select wrong device you next step will destroy all your data on that device. It could be your Hard Drive. For this example I will be using /dev/disk2 device.Now copy Master-Radxa-ROS-Image-14.04.img to your $HOME folder. At this point you are ready to write your image to SD card by issuing
dd of=/dev/disk2 if=Master-Radxa-ROS-Image-14.04.img bs=1M
. This will copy Master-Radxa-ROS-Image-14.04.img (if - input file) to /dev/sdb (output file) using block size of 1Mb. Based on speed of your SD Card and Image size this process might take few hours. There is no output on screen still finish to error. Usually SD Card Reader/Writes are equipped with LED activity indicator.
If you intend to use internal NAND storage you need to download image radxa_rock_pro_ubuntu_14.04_server_140819_update.zip. To update internal NAND you need to use Radxa tool found in download section on their website. Radxa update tool comes in Linux and Windows flavor.
After successful storage update (SD Card/NAND) you should be able to boot. There is a Serial headed on board that you might be able to connect using Serial TTL to USB and watch boot up process for any errors.
When successfully booted you should have ssh access to Radxa board. Root login is disabled and you should use following credentials
- User : Rock
- Pass : Rock
First thing is to install few usefull utilities that come handy in everyday use.
apt-get update
followed by
apt-get install htop
Since Radxa image comes with mysql and apache2 services installed we ned to uninstall them since we will not have use for them. Please execute following
apt-get remove mysql
followed by
apt-get remove apache2
Next step is to update irqbalance (/usr/sbin/irqbalance) service since one that did come with Radxa 14.04 image is leaking memory VERY FAST. To update irqbalance you need to install few missing utilities before building latest irqbalancer source.
apt-get install autoconf libtool automake pkg-config make
Next step is to get latest irqbalance source. You can clone or download zip from https://github.com/Irqbalance/irqbalance.
After downloading zip unzip it and go to that folder. Execute following command
./autogen.sh
followed by
./configure
followed by
make
Assuming there were no errors you should see binary file irqbalance in your folder. You can check it by issuing following command file irqbalance
. Verify that this is ARM binary image.
Next step is to shutdown running irqbalance service before copying it.
service irqbalance stop
You can use htop
or top
or ps -ef | grep irqbalance
to check is service is not running.
Before we copy new image to /usr/sbin/ safe thing to do is to make a backup.
cp /usr/sbin/irqbanance /usr/sbin/irqbalance.bak
. Now we are ready to copy new image.
cp irqbanance /usr/sbin/irqbalance
. Now are are ready to restart service.
service irqbalance start
. Again use htop
or ps -ef | grep irqbalance
to check if service is running
Since Radxa board does not enable swap you should edit sysctl.conf and add few items at the bottom of file.
vi /etc/sysctl.conf
and add all listed lines below
vm.swappiness = 0
kernel.core_pattern = /var/cores/%e-%h-%p.core
kernel.core_uses_pid = 1
fs.suid_dumpable = 1
Now we need to create /var/cores path where out code files will be places
sudo mkdir /var/cores
sudo chown root:root /var/cores
sudo chmod 770 /var/cores
Save your changes and exit from editor. Not you can issue sudo sysctl -p /etc/sysctl.conf
to reload new changes
To switch between DHCP and Static IP edit /etc/network/interfaces file You must uncommon one or the other
To setup eth0 in dhcp mode remove leading # mark
auto eth0
# iface eth0 inet dhcp
To setup eth0 in static mode remove leading # mark
auto eth0
# iface eth0 inet static
# address 192.168.1.5
# netmask 255.255.255.0
# gateway 192.168.1.254
At this point if is a great time to update entire system from online repo.
apt-get update
followed by apt-get dist-upgrade
When update finished reboot Radxa and log back in to perform cleanup.
reboot
or shutdown -r now
At this point there might be various packages left in cache that needs to be cleanup so out final Master image will be smaller.
apt-get purge
followed by apt-get autoremove
followed by apt-get autocleaan
At this point we can shutdown the board. Make sure you give about 1 minute (to be safe) for board to shutdown all services before unplugging power. Removing SD Card or power prematurely will corrupt SD Card.
Now remove SD Card and place it in SD Card reader under Ubuntu.
Install GParted utility if missing by issuing apt-get install gpart
. Not that GParted is installed and SD Card inserted to SD Card reader run gpart
from Terminal window.
In the right top corner selected SD Card you inserted. You should see two partitions.
- Windows
- Linux
By selecting Linux partition you can not resize it to be as small as possible. Make sure you leave some free space else you might have problem booting when restoring Master Image to other SD Cards. Also Make sure when writing Master Image to final SD Card you will need to use GParted and this time resize Linux partition to Maximum size by dragging the slider. Free space will be determined by your SD Card size.
-
sudo apt-get install language-pack-en-base
This will install your locale information - Go to http://wiki.ros.org/indigo/Installation/UbuntuARM
- Follow their instructions
- Make sure you change the /etc/lsb-release to Ubuntu instead of Linaro before you try installing ros-indigo-navigation