一、编译内核
cp mini210-tvp5150_linux_deconfig .config
make
没有出现错误,烧到板上,12寸屏不能显示,修改LCD参数为屏的参数,在arch/arm/mach-s5pv210/mini210-lcds.c
static struct s3cfb_lcd wvga_s70 = {
.width = 1024,
.height = 768,
.p_width = 254,
.p_height = 184,
.bpp = 32,
.freq = 62,
.timing = {
.h_fp = 12,
.h_bp = 12,
.h_sw = 4,
.v_fp = 8,
.v_fpe = 1,
.v_bp = 8,
.v_bpe = 1,
.v_sw = 4,
},
.polarity = {
.rise_vclk = 0,
.inv_hsync = 1,
.inv_vsync = 1,
.inv_vden = 0,
},
};
重新编译,OK
2. 编译RootFS
按照Tiny210手册编译,启动出错:can't open /r/dev/console
解决办法:在文件系统/dev下建立console节点,命令为sudo mknod console c 5 1
3. 修改触摸屏驱动
因为手上的屏是12寸USB接口的超声波触摸屏,Tiny210原先的驱动不适合使用
1. 下载tslib1.4:
git clone https://github.com/kergoth/tslib
2.编译
./autogen.sh
./configure --host=arm-linux --prefix=/opt/tslib CC=/opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc
make
make install
之前加入--enable-inputapi=no,编译后发现在没有input.so
3. 复制/opt/tslib目录到RootFS相应目录下
4. 修改tslib/etc/ts.conf,去掉module_raw input面前的井号及空格,行首不要留有空格
5. 修改/etc/profile,在后面加入如下代码(event2是我的输入设备):
export TSLIB_ROOT=/opt/tslib
export TSLIB_TSDEVICE=/dev/input/event2
export QWS_MOUSE_PROTO=tslib:/dev/input/event2
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
6. 在命令行下直接转入ts_calibrate,发现每次都提示校正失败,后面发现ts_calibrate是直接调用/bin/ts_calibrate,那是系统原来的,不适合这里使用,真正有用的是/opt/tslib/bin/ts_calibrate
7.修改/bin/qt4以适应我们的触摸屏,修改后的如下
#!/bin/sh
#if [ -e /etc/friendlyarm-ts-input.conf ] ; then
# . /etc/friendlyarm-ts-input.conf
#fi
#true ${TSLIB_TSDEVICE:=/dev/touchscreen}
#if grep -Ei "<ctp=(1|2|3)>" /proc/cmdline >/dev/null; then
# TSLIB_CONFFILE=/etc/ts-mt.conf
#else
# TSLIB_CONFFILE=/etc/ts.conf
#fi
#export TSLIB_TSDEVICE
#export TSLIB_CONFFILE
#export TSLIB_PLUGINDIR=/usr/lib/ts
#export TSLIB_CALIBFILE=/etc/pointercal
export QWS_DISPLAY=:1
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/bin
if [ -c ${TSLIB_TSDEVICE} ]; then
export QWS_MOUSE_PROTO="Tslib MouseMan:/dev/input/mice"
if [ ! -s /etc/pointercal ] ; then
rm /etc/pointercal
#/usr/bin/ts_calibrate
/opt/tslib/bin/ts_calibrate
fi
else
export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice"
fi
export QWS_KEYBOARD=TTY:/dev/tty1
export HOME=/root
cd /usr/local/Trolltech/QtEmbedded-4.7.0-arm/demos/embedded/fluidlauncher
./fluidlauncher -qws
hotplug
8. 输入 qt4看看修改是否成功