DJI Manifold Recovery and Setup

DJI Manifold Recovery and Setup

The Manifold is an embedded-Linux computer that is ideal for DJI SDK based software and application development on DJI flight platforms including the DJI Matrice 100. Featuring an NVIDIA Tegra K1 SOC (CPU+GPU+ISP in a single chip) with both standard and extended connectors and interfaces, the Manifold development board provides high flexibility and extensibility for developers.

When we have the DJI Manifold in our hands, the first step is to face the problem of how to recover the system and setup the basic software inside. This blog will show you the details about the Recovery of DJI Manifold and installing the CUDA , cuDNN and OpenCV ( OpenCV4Tegra – OpenCV 2.4.10.1 ).

The Recovery of DJI Manifold

    Prerequisites (Another new computer with the below requirements for the Recovery):
  • Linux operating system.
  • At least 16 GB of free disk space.

1. Download the system image “manifold_image_v1.0.tar.gz“. The size of image is about 983MB.
2. Open the terminal and then unzip the package file by running the commands listed below:

mkdir  ~/manifold
cd ~/manifold
sudo tar -xvpzf (your path)/manifold_image_v1.0.tar.gz  

3. Switch of the Manifold development board and remove the AC adapter from the power port.
4. Connect the Recovery USB to an USB Port on the Host computer via the Micro-B USB cable.
5. Connect the power adapter to the Manifold development board.
6. Press the power button once to boot up the system. While pressing the Recovery Button, use a pin to press and release Reset Button once. Finally, release the Recovery Button.
7. Run “lsusb” from the Host computer to check if the Manifold has entered the Recovery Mode successfully. The Manifold has entered Recovery Mode successfully if “NVIDIA”is displayed on the screen. If no such text is displayed, repeat steps 3 to 6.
8. Run the following command to restore the system to its default settings.

cd ~/manifold/Linux_for_Tegra
sudo ./flash.sh  jetson-tk1 mmcblk0p1

9. When the terminal shows the message of “flash successfully”, it means we have succeed recover the system of ubuntu on DJI Manifold.

Update apt-get sources link on DJI Manifold

    The original software sources link of armhf ubuntu system framework is so slowly that we have to find more suitable sources link. I found the old-releases.ubuntu.com or USTC software sources link of armhf would be the best choice in China after testing. It depends on you.

1. Run the command listed below to install the HTTPS package onto the operating system:

sudo apt-get install apt-transport-https

2. Backup the source list file:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

3. Run the command listed below to edit the sources list file:

sudo gedit /etc/apt/sources.list

4. Replace the sources link with the old-releases.ubuntu.com or USTC software sources link of armhf:

old-releases.ubuntu.com:

deb http://old-releases.ubuntu.com/ubuntu/ raring main universe restricted multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring main universe restricted multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-security main universe restricted multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-security main universe restricted multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-updates main universe restricted multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-updates main universe restricted multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-proposed main restricted universe multiverse

USTC:

deb https://mirrors.ustc.edu.cn/ubuntu-ports/ trusty main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ trusty main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-security main restricted universe multiverse

5. Run the update software sources command listed below:

sudo apt-get update

 The Setup of CUDA on DJI Manifold

    When you enter the ubuntu system on DJI Manifold, you maybe find the screen is flashing but don’t worried about that. We would handle this problem after the setup of CUDA.

1. Download the CUDA package “cuda-repo-l4t-r21.3-6-5-prod_6.5-42_armhf.deb “. The size of image is about 565.6MB.
2. Run the commands listed below to install the CUDA package onto the operating system:

sudo dpkg -i cuda-repo-l4t-r21.3-6-5-prod_6.5-42_armhf.deb
sudo apt-get update
sudo apt-get install cuda-toolkit-6-5

3. Set the authority of user:

sudo usermod -a -G video $USER

4. Set the envionment variables of system and take them into immediate effects:

echo "# Add CUDA bin & library paths:" >> ~/.bashrc  
echo "export PATH=/usr/local/cuda/bin:$PATH" >> ~/.bashrc  
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
source ~/.bashrc

5. Check if everything is ok:

nvcc -V

 The Setup of cuDNN on DJI Manifold

    cuDNN R2 is NVIDIA’s GPU acceleration library for deep neural networks and machine learning with CUDA 6.5

1. Download the cuDNN R2 package “cudnn-6.5-linux-ARMv7-v2.tar” from NVIDIA cuDNN. The size of image is about 18.5MB.
2. Run the commands below to install the cuDNN R2 for CUDA 6.5 package onto the operating system:

# unzip the archive
tar -zxvf cudnn-6.5-linux-ARMv7-v2.tar
cd cudnn-6.5-linux-ARMv7-v2
# copy the include file
sudo cp cudnn.h /usr/local/cuda-6.5/include
sudo cp libcudnn* /usr/local/cuda-6.5/lib

 The Setup of OpenCV4Tegra on DJI Manifold

    The setup of OpenCV4Tegra based on the setup of CUDA. OpenCV4Tegra is the CPU and GPU optimized version of OpenCV

1. Download the OpenCV4Tegra package “libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb“. The size of image is about 20.6MB.
2. Run the commands below to install the OpenCV4tegra package onto the operating system:

sudo dpkg -i libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb       
sudo apt-get update
sudo apt-get install libopencv4tegra libopencv4tegra-dev libopencv4tegra-python

3. Install some functional libraries:

# Some general development libraries  
sudo apt-get install build-essential make cmake cmake-curses-gui g++  
# libav video input/output development libraries  
sudo apt-get install libavformat-dev libavutil-dev libswscale-dev  
# Video4Linux camera development libraries  
sudo apt-get install libv4l-dev  
# Eigen3 math development libraries  
sudo apt-get install libeigen3-dev  
# OpenGL development libraries (to allow creating graphical windows)  
sudo apt-get install libglew1.6-dev  
# GTK development libraries (to allow creating graphical windows)  
sudo apt-get install libgtk2.0-dev 

4. Check if everything is ok:

pkg-config --modversion opencv

 The Setup of USB Driver on DJI Manifold

    When you connects your camera with DJI Manifold, you will find there are not ‘/dev/ttyUSB0’ or ‘/dev/ttyUSB1’ in dev list. So we have to install the USB Driver on DJI Manifold.

Run the commands below to install the USB package onto the operating system:

sudo apt-get install git   
git clone https://github.com/jetsonhacks/installGrinch.git
cd installGrinch
./installGrinch.sh

 The Setup of postFlash on DJI Manifold

    What the postFlash can bring : Chromium is installed as a browser. Firefox has issues downloading .zip files, so Chromium is a good alternative. Two other applications are also installed, aptitude and git.USB 3.0 is enabled. The default is USB 2.0, /boot/extlinux/extlinux.conf must be modified to enable USB 3.0.Two scripts are installed in /usr/local/bin. To conserve power, by default the Jetson suspends power to the USB ports when they are not in use. In a desktop environment, this can lead to issues with devices such as cameras and webcams. The first script disables USB autosuspend.Also to conserve power, the Jetson manipulates the CPU cores and GPU clock speeds. The second script sets everything up for maximum performance.

Run the commands below to install the postFlash package onto the operating system:

git clone https://github.com/jetsonhacks/postFlash.git
cd postFlash
./configureSystem.sh

发表评论