iTOP-4412开发板使用

使用环境:win7 旗舰64位,VMware11 使用使用板上提供的ubuntu12.04,用VMWARE直接打开虚拟机,因为之前开发epc9600开发板,所以虚拟机网络已经设置过,加载ubuntu12.04后发现可直接联网.

交叉编译工具链已经存放在/usr/local/arm/arm-2009q3/bin,而且在/root/.bashrc里已经export PATH=$PATH:/usr/local/arm/arm-2009q3/bin,且export PATH=$PATH:/usr/local/ndk/android-ndk-r8b,但没起作用要source .bashrc,这样每次登陆root用户都要cd /root , source .bashrc

改变方法,vi /home/topeet/.bahsrc

添加export PATH=$PATH:/usr/local/arm/arm-2009q3/bin  export PATH=$PATH:/usr/local/ndk/android-ndk-r8b

这样只要登录root用户,环境变量自动就好了。

可以发现/root/.bashrc最后还有两行

#export PATH=$PATH:/usr/local/arm/4.4.1/bin
#export PATH=$PATH:/usr/local/arm/4.3.2/libexec/gcc,都被注释掉了。正两行都是添加环境变量的,但这两行添加的交叉编译器名称和/usr/local/arm/arm-2009q3/bin里的是一样的,不能同时生效,应该是切换工具链时使用

 

参照ubuntu14.04.32 vmware11开发环境搭建 http://www.cnblogs.com/cenglinjinran/p/4583784.html 安装vmware tools

sudo apt-get update

 sudo apt-get install nfs-kernel-server 

升级linux内核到3.5????????????????升级不成功,内核不断自重启,返回3.0

但原本的3.0镜像不支持nfs,需要重新编译内核使他支持nfs文件挂载,重新配置内核,开启nfs后成功。

 

使用buildroot重新烧写根文件系统

1、配置编译buildroot,生成 /opt/share/buildroot-2014.05/output/image/root.tar。

开发板自带的根文件系统解压至/Linux+QT/root.b/,

rm -rf /opt/share/root/*

tar -xvf  /opt/share/buildroot-2014.05/output/images/rootfs.tar -C  /opt/share/root

rm /opt/share/root/dev/console 

cp -rf  /opt/share/root.b/etc/firmware/   /opt/share/root/etc/

cp   /opt/share/root.b/etc/rc.d/init.d/netd   /opt/share/root/etc/

cp    /opt/share/root.b/etc/eth0-setting   /opt/share/root/etc/

cp   /opt/share/root.b/etc/init.d/ifconfig-eth0   /opt/share/root/etc/init.d/

cp   /opt/share/root.b/etc/inetd.conf   /opt/share/root/etc/

cp  /mnt/hgfs/soft/epc9600/wqy-microhei.ttf   /opt/share/root/usr/lib/fonts

vi   /opt/share/root/etc/init.d/rcS

将原根文件系统各文件/etc/init.d/rcS 文件中的下列部分添加到新生成的文件系统etc/init.d/rcS最后。

umask 022

trap ":" INT QUIT TSTP

[ -e /proc/1 ] || /bin/mount -n -t proc none /proc
[ -e /sys/class ] || /bin/mount -n -t sysfs none /sys
[ -e /dev/tty ] || /bin/mount -t ramfs none /dev

/sbin/mdev -s
# mounting file system specified in /etc/fstab
mkdir -p /dev/pts
mkdir -p /dev/shm
/bin/mount -n -t devpts none /dev/pts -o mode=0622
/bin/mount -n -t tmpfs tmpfs /dev/shm
/bin/mount -n -t ramfs none /tmp
/bin/mount -n -t ramfs none /var

mkdir -p /var/log
mkdir -p /var/www
mkdir -p /var/run
mkdir -p /var/lib/lighttpd

 

ln -sf /dev/ttyS2 /dev/tty2
ln -sf /dev/ttyS2 /dev/tty3
ln -sf /dev/ttyS2 /dev/tty4

amixer cset numid=5 127
amixer cset numid=6 1
amixer cset numid=30 8,0
amixer cset numid=40 1
amixer cset numid=43 1
amixer cset numid=47 1

syslogd

/etc/netd start

echo "*************************************" > /dev/ttySAC2
echo " http://www.gainuo.com " > /dev/ttySAC2
echo "*************************************" > /dev/ttySAC2

sleep 2

/etc/firmware/load_firmware

/sbin/ifconfig lo 127.0.0.1

/etc/init.d/ifconfig-eth0

echo 0 > /proc/sys/kernel/hung_task_timeout_secs

echo "Starting Qt, please waiting..." > /dev/ttySAC2

#configure tslib1.1

export TSLIB_ROOT=/
export TSLIB_TSDEVICE=/dev/input/event2
export TSLIB_TSEVENTTYPE=input
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0

export QT_QWS_FONTDIR=/usr/lib/fonts

if [ -c /dev/input/event2 ]; then
export QWS_MOUSE_PROTO='Tslib:/dev/input/event2'
if [ -e /etc/pointercal ] ; then
fsize=$(/bin/ls -al /etc/pointercal | cut -d' ' -f 23)
echo $fsize
if [ $fsize -ge "1" ]; then
echo "/etc/pointercal is exit"
else
echo "/etc/pointercal is empty"
rm /etc/pointercal
/usr/bin/ts_calibrate
fi
else
echo "/etc/pointercal not found"
/usr/bin/ts_calibrate
fi
else
export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice"
#>/etc/pointercal 
fi

export HOME=/root

cd /usr/share/qt/demos/embedded/fluidlauncher
./fluidlauncher -qws &

cd  ~/

mount -t nfs  192.168.1.57:/opt/share /mnt/   -o nolock

#must run this shell
/bin/sh

 

 echo  > /opt/share/root/etc/init.d/ifconfig-eth0

echo nameserver 192.168.1.1 > /opt/share/root/etc/resolv.conf

2、cd /home/topeet/Linux+QT   make_ext4fs -s -l 314572800 -a root -L linux system.img root  生成根文件镜像

3、烧录镜像到开发板,进入uboot命令行,sdfuse flash system system.img,reset。

 

你可能感兴趣的:(top)