Using as rootfs containing qtopia

Source: Internet
Author: User

Development Environment:

OS: Linux Ubuntu 8.10

The arm operating system is set to/home/flykof/_ install

QtopiaSecurity route entry:/opt/Qtopia

Arm Board: long high-tech 6410

Use the example:

1. Cross-compiler: 3.4.1 (/usr/local/ARM/3.4.1 /)

2.Qtopia:QtopiaOpensource-4.3.3

3. tslib: tslib1.3

4. zlib: zlib-1.2.3

5. zoneinfo

6. busybox1.14.3

7.

Zookeeper Process1 (Proceed firstQtopiaAlways ready):

1. zookeeper zlib

Case-Based failover is a common feature,QtopiaThe Zookeeper function is also used. Therefore, add zlib to the arm toolchain first.

# Tar xvzf zlib-1.2.3.tar.gz

# Cd zlib-1.2.3

#./Configure -- shared -- prefix =/usr/local/ARM/3.4.1/ARM-Linux

After the makefile is generated, modify the variable makefile, and change it

Cc = arm-Linux-gcc

Ldshared = arm-Linux-gcc-shared-wl,-soname, libz. so.1

CPP = arm-Linux-gcc-e

AR = arm-Linux-ar RC

Ranlib = arm-Linux-ranlib

Save and then open

# Make

# Make install

Add zlib to arm toolchain

2. zookeeper tslib

BecauseQtopiaTslib is used. Therefore, you must add tslib to the arm toolchain before using the tslib program.

# Tar jxf tslib-1.3.tar.bz2

# Cd tslib-1.3

#./Autogen. Sh

#./Configure -- Host = arm-Linux -- prefix =/usr/local/ARM/3.4.1/ARM-Linux

After the makefile is generated, modify the plugin plug-ins/makefile to make the following settings and find the following line:

Ldflags: = $ (ldflags)-rpath $ (plugin_dir)

Change

Ldflags: = $ (ldflags)-rpath 'CD $ (plugin_dir) & pwd'

# Make

# Make install

After the installation is complete, tslib will be installed on the arm toolchain, so that the arm toolchain can directly use tslib programs. AfterQtopiaIt is set to use tslib as the indicator of the operation function, and arm toolchain can only leverage the function of connecting to and connecting tslib.

3. SecurityQtopiaModify arm toolchain

First, arm toolchain 3.4.1 must be modified as follows:

# Cp/usr/local/ARM/3.4.1/

# Vi arm-Linux/include/Linux/videodev2.h

Add a line to it

# Define v4l2_pix_fmt_sbggr8 v4l2_fourcc ('B', 'A', '8', '1')/* 8 bgbg... grgr ..*/

Save and exit

# Vi arm-Linux/sys-include/Linux/videodev2.h

Add a line to it

# Define v4l2_pix_fmt_sbggr8 v4l2_fourcc ('B', 'A', '8', '1')/* 8 bgbg... grgr ..*/

Save and exit

4. zookeeperQtopia

Zookeeper and Security DepartmentQtopiaSteps are as follows:QtopiaProgramming suiteQtopia-Opensource-src-4.3.3.tar.gz

# Tar xvzfQtopia-Opensource-src-4.3.3.tar.gz

# Mkdir build-Qtopia(QtopiaThe required zookeeper is not allowed inQtopiaIn the source tree, you must create another object as a response)

Start CreationQtopia

# Cd build-Qtopia

#../Qtopia-Opensource-4.3.3/configure-release-Prefix =/opt/Qtopia-Image =/home/flykof/_ install/opt/Qtopia/-Xplatform Linux-arm-G ++-arch arm-no-qvfb-displaysize 480x270-no-modem-extra-qtopiacore-config'-release-xplatform qws/Linux -Arm-G ++-Embedded ARM-qconfig qpe-QT-SQL-SQLite-Depths 8, 16, 32-QT-KBD-tty-QT-KBD-USB-no-mouse-linuxtp-QT-mouse-tslib-QT-GFX-transformed'

# Make

# Make install

5. The response letter shows the response

QtopiaMany toolchains also need to provide the function description when reading data, so we also need to transfer the related function description to arm filesystem.QtopiaWhen the operation is completed, these functions can be automatically linked.

In the/home/flykof/_ Install file, submit the Lib information in the zookeeper website.

# Cd/usr/local/ARM/3.4.1/ARM-Linux/lib)

# Cp-Ax libdl */home/flykof/_ install/lib

# Cp-Ax libfreetype. So */home/flykof/_ install/lib

# Cp-Ax libpthread */home/flykof/_ install/lib

# Cp-Ax librt */home/flykof/_ install/lib

# Cp-Ax libstdc ++. So */home/flykof/_ install/lib

# Cp-Ax libgcc_s.so */home/flykof/_ install/lib

# Cp-Ax libcrypt */home/flykof/_ install/lib

# Cp-Ax libz. So */home/flykof/_ install/lib

# Rm-f/home/flykof/_ install/lib/* ". A "and ". la ", these functions will be used only at the end of the pipeline, and will not be used during the pipeline)

Resolve a href = "zoneinfo.tar.gz"> zoneinfo.tar.gz to zoneinfo (skip this step if zoneinfo already exists in the current project)

# Mv zoneinfo/home/flykof/_ install/usr/share)

If the hardware allows, you can directly copy the cross-compiler lib to the Lib.

6. Installing tslib

We have previously added tslib to arm toolchain. Now we must upload tslib to arm filesystem,QtopiaWhen reading a line, you need to use tslib-related function

# Cd/usr/local/ARM/3.4.1/ARM-Linux/lib)

# Cp-Ax libts */home/flykof/_ install/lib

# Cp-Ax libm. So */home/flykof/_ install/lib)

# Cp-Ax libm-*/home/flykof/_ install/lib

# Rm-f/home/flykof/_ install/lib/* ". A "and ". la ", these functions will be used only at the end of the pipeline, and will not be used during the pipeline)

# Cd/usr/local/ARM/3.4.1/ARM-Linux/bin (switch to the arm bin category of toolchain)

# Cp-Ax ts_calibrate/home/flykof/_ install/bin (transfer the TS calibration program to arm filesystem)

# Cd/usr/local/ARM/3.4.1/ARM-Linux/share (switch to the arm share category in toolchain)

# Cp-Ax TS/home/flykof/_ install/etc (migrate ts plugins into the/etc directory of arm filesystem)

# Cd tslib-1.3 (switch to tslib source tree)

# Cp ETC/ts. CONF/home/flykof/_ install/etc

# Vi/home/flykof/_ install/etc/ts. conf (strongswan ts. conf)

Pending

# Module mousebuts

# Remove

Module mousebuts

Save and exit

If you already haveRootfsNext, check whether the Linux core has an active traffic control screen./Dev/TS, Run the command "ARM Linux" and "shell ,"CAT/dev/TS", Then I will touch the risk control screens to see if there are any production resources (there will be a bunch of images). Some Words mean that the Linux core has the dynamic control screens, in this case, tslib can be run correctly. If not, modify the Linux core settings to enable the Linux core to activate the dynamic control screen. In this step,QtopiaThe basic example of the rows already exists.QtopiaIf noRootfsPlease proceed.

Zookeeper Process2 (ProductionRootfs):

1. Cross-region authentication busybox

# Make arch = arm-Linux cross_complie = arm-Linux-menuconfig

Specify the following options:

1. Select dynamic route into the dynamic route Entry Mode (build shared libbusybox)

2. cross_complier prefix (ARM-Linux)

3. Determine the Security category (./install)

# Make

# Make install

In order to use a lower version of cross-compiler, many problems may occur during make. The problem and solution methods are as follows:

Error 1:

Miscutils/ionice. C: 25: Error: 'sys _ ioprio_set 'undeclared (first use in this function)

# DEFINE _ nr_ioprio_set (_ nr_syscall_base + 314) // 0x90013a

# DEFINE _ nr_ioprio_get (_ nr_syscall_base + 315) // 0x90013b

# Define sys_ioprio_get _ nr_ioprio_get

# Define sys_ioprio_set _ nr_ioprio_set

Error 2:

Networking/interface. C: 818: Error: 'arphrd _ InfiniBand 'undeclared here (not in a function)

# Define arphrd_infiniband 32

Error 3:

Util-Linux/acpid. C: 145: Error: 'ev _ SW 'undeclared (first use in this function)

# Define ev_sw 0x05

Error 4:

Util-Linux/acpid. C: 146: Error: 'sw _ lid' undeclared (first use in this function)

# Define sw_lid 0x00

Error 5:

/Usr/local/ARM/3.4.1/lib/GCC/ARM-Linux/3.4.1 /.. /.. /.. /.. /ARM-Linux/sys-include/Linux/FD. h: 342: Error: variable or field '_ user' declared void

# DEFINE _ User

2. Producer CreationRootfsContents

Target Location:/home/flykof/_ install

Busybox location:/tools/busybox/busybox-1.14.3

2.2 becauseQtopiaMake install, so there will be opt/Qtopia& Lib and other resources exist. Do not delete them.

# Cd/home/flykof/_ install

# Mkdir bin Dev etc lib proc sbin sys usr mnt tmp VaR

# Cp-RfD/tools/busybox/busybox-1.14.3/_ install)

# Cp-RfD/tools/busybox/busybox-1.14.3/examples/bootfloppy/etc/*./etc/

# CD etc

# Vim Profile

2.3 modify the content of the profile as follows:

Echo

Echo-n "processing/etc/profile ..."

# No-op

Echo "set search library path"

LD_LIBRARY_PATH =/lib:/usr/lib

Export LD_LIBRARY_PATH

Echo "Set User path"

Path =/bin:/sbin:/usr/bin:/usr/sbin

Export path

Echo "set PS1"

Export PS1 = "[$ user @ dmatek] \ $"

Echo "done"

Echo

Three environment variables will be set here: LD_LIBRARY_PATH, path, and PS1 (the delimiter seen on the terminal)

2.4 import the inittab into the following content:

# Vim inittab

: Sysinit:/etc/init. d/RC

: Askfirst:-/bin/sh

: Restart:/sbin/init

Tty0: askfirst:-/bin/sh

: Once:/usr/etc/rc. Local

: Ctrlaltdel:/sbin/reboot

: Shutdown:/bin/umount-a-r

Sysinit means that when the server is started, all necessary settings can be related to this role.

Askfirst start an "askfirst" shell on the console

Tty0: askfirst must have this line Ctrl + C to use

2.5 import fstab into the following content:

# Vim fstab

None/proc defaults 0 0

None/tmp ramfs defaults 0 0

Mdev/dev ramfs defaults 0 0

Sysfs/sys sysfs defaults 0 0

None/opt/Qtopia/Applications/ramfs defaults 0 0

The last line is becauseQtopiaError:/opt/Qtopia/Applications/can't write, so it is necessary to set this category to ramfs format for ingress,/tmp and/dev are also set to ramfs,/dev in thisRootfsMdev is used for self-production. Therefore, users need to be able to upload data./tmp is a lot of applications that need to be used when they are busy !!

2.6 merge the RCS into the following content:

# Vim init. d/RCS

#! /Bin/sh

Echo "processing RC. s"

Echo "Mount all"

/Bin/Mount-

/Bin/mknod/dev/console C 5 1

/Bin/mknod/dev/null C 1 3

/Bin/mknod/dev/ttysac0 C 204 64

/Bin/mknod/dev/ttysac1 C 204 65

/Bin/mknod/dev/ttysac2 C 204 66

Echo "Starting mdevd ...."

/Bin/ECHO/sbin/mdev> proc/sys/kernel/hotplug

Mdev-S

Ln-S/dev/ts0/dev/TS

/Etc/init. d/Qtopia. Sh

Echo "*************************************"

Echo "create by KHK"

Echo "u9211048@ccms.nkfust.edu.tw"

Echo "*************************************"

This is the first example of an attack after the machine is started. First, Mount all the things first, and create some possibly used nod nodes (not to do ), then, use mdev to set the cursor, and then point ts0 to the cursor to set ts, because the real Cursor Is ts, And the last row isQtopia. Sh to configure the GUI interface.

2.7 and the other will be completed laterQtopia. Sh, used to setQtopiaEnvironment Change Data and industry rows:

# Vim init. d/Qtopia. Sh

PendingQtopia. Sh volume into the following content:

#! /Bin/sh

ExportQtopia=/Opt/Qtopia

Export Home = $Qtopia

Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $Qtopia/Lib

Export tslib_tseventtype = h3600

Export tslib_tsdevice =/dev/TS

Export tslib_conffile =/etc/ts. conf

Export tslib_consoledevice = none

Export tslib_calibfile =/etc/pointercal

Export tslib_plugindir =/etc/TS/plugins

Export qws_size = 480*270

Export qws_mouse_proto = "tslib: $ tslib_tsdevice"

Export qws_keyboard = "tty USB"

Export pointercal_file =/etc/pointercal

Export Path = $ path: $Qtopia/Bin

If [-F "$ tslib_calibfile"]; then

Qpe &

Else

Ts_calibrate

Qpe &

Fi

2.8 At this time, the trial system has been completed. However, if no console & null settings are available under the dev project, it cannot be mounted at the beginning, therefore, you need to manually set up the hosts and set up the hosts so that the root permission is required.

# CD ../dev

# Mknod-m 600 console C 5 1

# Mknod-M 666 null C 1 3

At this time, you should be able to drive normallyRootfsBut if you have not added all the Lib libraries, there may be fewer library traps. You just need to configure the libraries on your own.

2.9 Alternatively, you can upload passwd & shadow & groupRootfs(Root permission required)

# CD ../etc

CP/etc passwd Shadow Group ./

2.10 Finally, upload the mkcramfs program to the same region as _ install, and then upload the line:

Mkcramfs _ install/root_tmp.cramfs

You can view the problem by inserting the case into the board, but there are still some problems to be resolved.

Additional information:

Http://flykof.pixnet.net/blog/post/23068651

Http://www.zychip.com/html/support/qtopia_install/index.php

Http://www.jollen.org/blog/2007/01/arm9_bootstrap_root_filesystem.html

Http://blog.chinaunix.net/u/16231/showart_2024339.html

Long and high throughput: design practices for arm9-s3c2440 and embedded Linux 2.6.24

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.