Linux -- Uncompress Source Code and Install Application Util

Post Reply
esky-sh
Posts: 1435
Joined: Sat Dec 20, 2008 4:21 am

Linux -- Uncompress Source Code and Install Application Util

Post by esky-sh » Mon May 02, 2011 7:56 pm

This section will introduce how to uncompress all the source code that users may need and install some application utilities including:
- Linux kernel source code
- Qtopia-2.2.0 source code (for x86 and arm)
- arm-qt-extended-4.4.3 source code (i.e. Qtopia4, for x86 and arm)
- QtE-4.7.0 (for ARM)
- Busybox-1.17 source code
- Sample programs code (developed by FriendlyArm)
- U-Boot
- Target file system directory
- File system image maker (for YAFFS2 and UBIFS)

Note: all source code and utilities should be uncompressed and compiled with arm-linux-gcc-4.4.1

1 Uncompress Source Code
Firstly, create a working directory: /opt/tq6410/linux
After execute command “mkdir –p /opt/tq6410/linux”, all the source code in the following steps will be uncompressed in this work directory
(1) Get Linux source code ready
In Fedora9, create a temporary director “/tmp/linux” by running the following command
#mkdir /tmp/linux
Copy all the files in the linux directory in the shipped CD to “/tmp/linux”
(2) Uncompress and install the u-boot source code
In the work directory /opt/tq6410/linux, run the commands below:
#cd /opt/tq6410/linux
#tar xvzf /tmp/linux/u-boot-tq6410-20100829.tar.gz
A u-boot-tq6410 directory will be created and it includes a complete copy of u-boot source code.
(3) Uncompress the Linux kernel source code
In the work directory /opt/tq6410/linux, run the commands below:
#cd /opt/tq6410/linux
#tar xvzf /tmp/linux/linux-2.6.28.6-20100904.tar.gz
A linux-2.6.28.6 directory will be created, it includes a complete copy of linux kernel source code.
(4) Uncompress and Install the target file system
In the work directory /opt/tq6410/linux, run the commands below:
#cd /opt/tq6410/linux
#tar xvzf /tmp/linux/rootfs_qtopia_qt4-20101120.tgz
A rootfs_qtopia-qt4 directory will be created, it includes a complete copy of linux kernel source code.
Note: 20101120 is the date for new version, the file name in the shipped CD may be different.
(5) Uncompress and install Qtopia source code
In the work directory /opt/tq6410/linux, run the commands below:
#cd /opt/tq6410/linux
#tar xvzf /tmp/linux/x86-qtopia-29199429.tar.gz
#tar xvzf /tmp/linux/arm-qtopia-20101105.tar.gz
An x86-qtopia directory and an arm-qtopia directory will be created, and their source code will be uncompressed into these two directories.
Note: in this release, supports for mouse and tp are all included in one package. And the source code for the embedded browser konquor is included too.
(6) Uncompress and install qt-extended-4.4.3 source code
In the work directory /opt/tq6410/linux, run the commands below:
#cd /opt/tq6410/linux
#tar xvzf /tmp/linux/x86-qt-extended-4.4.3-20101003.tgz
#tar xvzf /tmp/linux/arm-qt-extended-4.4.3-20101105.tgz
An x86-qt-extended-4.4.3 and an arm-qt-extended-4.4.3 will be created, and their source code will be uncompressed into these two directories.
(7) Uncompress and install QtE-4.7.0 source code
In the work directory /opt/tq6410/linux, run the commands below:
#cd /opt/tq6410/linux
#tar xvzf /tmp/linux/x86-qte-4.6.1-20100516.tar.gz
#tar xvzf /tmp/linux/arm-qte-4.7.0-20101105.tar.gz
An x86-qte-4.6.1 and an arm-qte-4.7.0 will be created, and their source code will be uncompressed into these two directories.
(8) Uncompress and install busybox source code
The Busybox is a compact Linux tool kit. Here we used busybox-1.17.2. Users can download its latest version from http://www.busybox.net
In the work directory /opt/tq6410/linux, run the commands below:
#cd /opt/tq6410/linux
#tar xvzf /tmp/linux/busybox-1.17.2-20101120.tgz
A busybox-1.17.2 directory will be created, and its source code will extracted into this directory.
Note: for the sake of users, we have made a default configuration file: fa.config.
(9) Uncompress and install Linux sample programs
In the work directory /opt/tq6410/linux, run the commands below:
#cd /opt/tq6410/linux
#tar xvzf /tmp/linux/examples-tq6410-20101110.tgz
An examples directory will be created, all the source code will be extracted into this directory.
Note: all these sample programs are developed by FriendlyARM.

2 Create Target File System
We offered the following two packages:
rootfs_qtopia_qt4-20101120.tgz
Execute the following commands:
#cd /opt/tq6410/linux
#tar xvzf /tmp/linux/ rootfs_qtopia_qt4-20101120.tgz
A rootfs_qtopia_qt4 will be created.
This package includes qtopia-2.2.0, Qtopia4 and QtE-4.7.0, busybox and some command line utilities. It has the following excellent features:
- auto detection of NFS reboot or local reboot
- auto detection of touch screen and launching the calibration utility if necessary. If no touch screen is connected system will enable the mouse.
- auto detection of command or high speed SD cards (up to maximum memory of 32G) and flash drives
- auto detection of USB mouse or touch screen
- support co-existence of a USB mouse and a touch screen (since Linux-2.6.36)

3 Install Target File System
To burn a target file system to the board you need to make the file system an image first.
We offered two tools that can be used to make file images:mkyaffs2image and mkyaffs2image-128M. The “mkyaffs2image” utility is for 64M and the “mkyaffs2image-128M” is for 128M/256M/512M/1GB.
Note: mkyaffs2image and mkyaffs2image-128M are only for SLC Nand Flash to make yaffs2 iamges and don’t apply to MLC2 Nand Flash. The generated image file’s structure is “1 Page= 2K Byte,1 Block=128K” for SLC Nand Flash(such as Samsung’s K9F2G08,k9K8G08).
For the tq6410 system we don’t have a 64M system so “mkyaffs2image-128M” can
be applied here too.
In addition for users’ sake we also developed a mkubimage-slc which is especially for
making UBIFS for SLC Nand flash. And the “mkext3image” is for EXT3. We call all these tools “mktools” uniformly. Below are the steps to install:
#tar xvzf /tmp/linux/mktools.tar.gz –C /
This will create those tools in the “/usr/sbin” directory.
Note: “C” is capitalized and means “change”. If your system has been installed a Mini2440’s mkyaffs2image it will be overwritten. But you don’t need to worry about it since they are identical

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests