Howto Deploy Debian

From XApple
Jump to: navigation, search


About this document

This documentation introduces how to create and deploy Debian Linux images for the Actions S500 platforms.

Tool Installation

You need Debian or Ubuntu Linux as the host OS to create the images. Here, the steps described below have been tested on Debian Jessie (8.0), Ubuntu 12.04, and Ubuntu 14.04 .

First, install apt-cacher-ng to accelerate image creation, it will cache all deb files.

$ sudo add-apt-repository ppa:linaro-maintainers/tools  
$ sudo apt-get update
$ sudo apt-get install linaro-image-tools gdisk qemu-user-static apt-cacher-ng 

Note: If this first command is not found, you may need to install the package first. ($sudo apt-get install software-properties-common)

Patch the script (Optional)

If you are using Debian 8.1 (Jessie), and the python-linaro-image-tools version is too old (say, 2014.07-1 as an example), then you need to patch linaro-image-tools. Please download and apply this patch. Or, the following commands can be used to fix the problem manually.

$ sudo rm /usr/lib/python2.7/dist-packages/linaro_image_tools/media_create/boards.pyc
$ sudo sed -i -e "s|2:0C00|2:EF00|g" /usr/lib/python2.7/dist-packages/linaro_image_tools/media_create/

If you are using Ubuntu, you may need to do this with the following command.

$ sudo sed -i -e "s|2:0C00|2:EF00|g" /usr/share/pyshared/linaro_image_tools/media_create/

Debian Image Creation

Download the Debian rootfs tarball

Download the file from here

The rootfs was packed under the 'binary' top directory. Files under the binary directory will be expanded onto the final image file.

rapi@ubuntu:~/rbf$ tar tJvf debian-8.0-live-lxde-image-armhf.tar.tar.xz |head
drwxr-xr-x root/root         0 2015-09-10 23:01 binary/
drwxr-xr-x root/root         0 2015-09-10 21:05 binary/dev/
crw-r----- root/kmem       1,4 2015-01-14 00:03 binary/dev/port
brw-rw---- root/disk       1,3 2015-01-14 00:03 binary/dev/ram3
brw-rw---- root/disk       1,7 2015-01-14 00:03 binary/dev/ram7
brw-rw---- root/disk       7,6 2015-01-14 00:03 binary/dev/loop6
crw-rw-rw- root/tty        5,0 2015-01-14 00:03 binary/dev/tty
crw-rw-rw- root/root       1,3 2015-01-14 00:03 binary/dev/null
brw-rw---- root/disk      1,10 2015-01-14 00:03 binary/dev/ram10
brw-rw---- root/disk       1,6 2015-01-14 00:03 binary/dev/ram6

Download the atm7059a hwpack

Download the file from here

As a note: the downloaded hwpack_linaro-debian-atm7059a_1_armhf_unsupported.tar.gz file contains 171 precompiled deb package from Linaro.

rapi@ubuntu:~/rbf$ tar tzvf hwpack_linaro-debian-atm7059a_1_armhf_unsupported.tar.gz | grep pkgs | egrep '\.deb' |wc
    171    1026   14753

Create the image

The following command will create final image from hwpack (the hardware pack) and the Debian base image. The final image atm7059a.img can be flashed into a micro SD card with the 'dd' command.

env http_proxy="" linaro-media-create --image-file atm7059a.img \
 --dev mx53loco --part-table gpt \
 --image-size 7G --hwpack hwpack_linaro-debian-atm7059a_1_armhf_unsupported.tar.gz \
 --binary debian-8.0-live-lxde-image-armhf.tar.tar.xz

Note that the command will ask to grant permissions (twice) to when compiling the linux kernel. Please enter Y for yes.

After 'dd' the image into the microSD card, the card can be used to boot up the Debian OS on the development board. (Please note the default user and password are linaro:linaro.)

Personal tools