How To Deploy Linaro ALIP

From XApple
Jump to: navigation, search


ALIP-ROOTFS-HOWTO (Last Update: 2015-09-02)

Description of this document

This document describes the installation procedures for creating an example root-fs for the XApp-le Linux, based on Linaro Trusty ALIP.

Important Notice: This document is for reference only. None of any ALIP images will be created and distributed by XApp-le.

What is ALIP?

	"The ALIP image emphasis is on small size, rebuildability, cross-
	 buildability and enough packages to usefully excercise a new board, 
	 including graphics and media... 
         Currently ALIP is based on LXDE (Lubuntu), with lightdm, X11 and 
	 chromium as the default graphic applications.", 
						   -- quoted from Linaro's Wiki.

Before proceeding to the following steps

Host environment: Linux machine/PC. The following procedure has been tested on Ubuntu 12.04.

Make sure the basic procedures in Build_Howto has been done.

Download and extract the Linaro ALIP rootfs image

	$ mkdir <alip_dir> 
	$ cd <alip_dir>

	$ wget
	$ sudo tar zxvf linaro-trusty-alip-20141024-684.tar.gz

The directory of the alip root-fs will be extracted to <alip_dir>/binary/.

Populate the content of the ALIP root-fs onto the SD card

Put the SD card in a card reader or a USB-SD adopter, and mount the ext4 partition on the PC.

Assume the mounted path is /media/system. All the following steps are based on this assumption.

	$ cd <alip_dir>/binary
	$ sudo cp -pr * /media/system

Install the kernel module into the root-fs

The kernel modules generated in Step 0 will be used. And, the name <sdk_root> below refers to the root directory of the source in Step 0. Then, install the modules.

	$ cd <sdk_root>/kernel
	$ sudo make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm O=../owl/out/s500_linux_bubble_gum_sd/kernel INSTALL_MOD_PATH=/media/system modules_install

Prepare Ethernet related setting in root-fs

Add the Ethernet module name in /etc/modules

	$ sudo su -c 'echo ethernet >> /media/system/etc/modules'

Fix the random mac address issue

This can be done by creating a file with the following command.

	$ sudo vi /media/system/etc/network/if-up.d/upstart-post

Below is the content of /etc/network/if-up.d/upstart-post.


	echo "Set Ethernet MAC addr" 

	if ifconfig eth > /dev/null 2>&1 && 
		( [ ! -f /config/mac_address.bin ] || 
		[ "`wc -c < /config/mac_address.bin`" != "18" ] )
		mkdir -p /config
		ifconfig eth | awk '{ print $5 }' | head -1 > /config/mac_address.bin

Change the mode of the file.

	$ sudo chmod +x /media/system/etc/network/if-up.d/upstart-post

Fix a LXDE permission problem

Add the following PAM permission for LXDM.

	$ sudo su -c 'echo "session required" >> /media/system/etc/pam.d/lxdm'

Boot the board with the SD card to perform some initialization tasks

Note: Sometimes, probably due to time stamp issue (not confirmed), during the boot time the console will prompt the user to perform a file system check process. Please press 'F' on the console.

Connect to a LAN

Connect the board to a LAN on which there exists a DHCP server (typically in a home gateway device) through the RJ-45 Ethernet connector. Check the interface name by using the following command.

	# ifconfig eth

Issue the following command to set up the network connection. (Here we assume that the network interface is eth0.)

	# dhclient eth0

You may check to see if the IP address has been assigned by 'ifconfig eth0'. Once this has been confirmed, install an automatic network manager with the command below. In this way, the network configuration can be set automatically at boot-time.

Install a network manager

	# apt-get install network-manager-gnome

Then, re-configure 'resolvconf' to enable the automatic DNS udpate service as below.

	# dpkg-reconfigure resolvconf

Extra settings and packages (Optional)

Set up the timezone

	# dpkg-reconfigure tzdata

Install other packages (example)

For example, a system monitor and some fonts are installed here.

	# sudo apt-get install nmon fonts-arphic-uming

The last step

Reboot and enjoy!

Personal tools