[embedded]Port an application by qtcreate to mini2440

2017-5-9 写技术

1. Copy arm-linux-gcc library to root file system.

#cp /opt/crosstool/gcc-4.4.3/arm-none-linux-gnueabi/lib/*  busybox/_install/lib -a

The "-a" options let soft link to new directory but not truely file.


2.Copy qt-arm library to root file system.

#cp /usr/local/Trolltech/QtEmbedded-4.8.5-arm/lib/* busybox/_install/usr/local/Trolltech/QtEmbedded-4.8.5-arm/lib -a

The path in mini2440 must as same as the host PC.


3.Edit the profile to set environment.

#vim busybox/_install/etc/profile


#Ash profile
#vim:systax=sh
#No core file by defaults
#ulimit -S -c 0>/dev/null 2>&1
USER="id -un"
LOGNAME=$USER
PS1='[\u@\h=W]#'
PATH=$PATH
HOSTNAME='/bin/hostname'
export USER LOGNAME PS1 PATH
export TSLIB_ROOT=/usr/local/tslib
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_CALIBFILE=/etc/pointerrcal
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONSOLEDEVICE=none
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSLIB_ROOT/lib:/usr/local/qt-4.8.5-arm/lib

export PATH=${PATH}:/usr/local/qt-4.8.5-arm/lib:/usr/local/qt-4.8.5-arm/bin
export QPEDIR=/usr/local/qt-4.8.5
export QTDIR=/usr/local/qt-4.8.5
export QT_QWS_FONTDIR=/usr/local/qt-4.8.5/lib/fonts
export QWS_DISPLAY=LinuxFb:mmWidth320:mmHeight:240:1
export QWS_MOUSE_PROTO=tslib:/dev/event0
export TSLIB_TSEVENTTYPE=H3600
export QT_PLUGIN_PATH=/usr/local/qt-4.8.5-arm/plugins

4.Copy application to root file system.

#cp qt-project/demo busybox/_install/usr/local/qt/


5.Make image of root file system.

#cd busybox

#mkyaffs2image _install rootfs.img


6.Download root file system to mini2440 by tftp.

#cp rootfs.img tftp-dir/

Then in u-boot command:

@#tftp 0x30008000 rootfs.img

@#nand erase 0x580000

@#nand write.yaffs 0x30008000 0x580000 0x******

标签: embedded

发表评论:

Powered by anycle 湘ICP备15001973号-1