am3359制作微型计算机,AM3354学习记录-硬件及其开发环境篇
1.1 开发环境的搭建1.1.1 路由器方式的NFS启动1) 通过路由器的方式来启动NFS文件系统设置路由器局域网的网关:192.168.1.1,然后将开发板和PC都连接在路由器的LAN端口,并且采用DCHP的方式来实现tftp和nfs。2) uEnv.txtserverip=192.168.1.27rootpath=/opt/TI-sdk-am335x-evm/targetNFSbootfile
1.1 开发环境的搭建
1.1.1 路由器方式的NFS启动
1) 通过路由器的方式来启动NFS文件系统
设置路由器局域网的网关:192.168.1.1,然后将开发板和PC都连接在路由器的LAN端口,并且采用DCHP的方式来实现tftp和nfs。
2) uEnv.txt
serverip=192.168.1.27
rootpath=/opt/TI-sdk-am335x-evm/targetNFS
bootfile=uImage-am335x-evm.bin
ip_method=dhcp
tftp_nfs_boot=echo BooTIng from network...; dhcp ${loadaddr} ${bootfile}; run net_args; bootm ${loadaddr}
uenvcmd=run tftp_nfs_boot
1.1.2 Root用户登陆
#sudo passwd root
#******
#******
#sudo –s –H 切换到root用户
然后就可以重启虚拟机,以用户root来登陆
1.1.3 中文字库问题
#locale –a 查看
是否有zh_CN,zh_CN.gb18030,zh_CN.gb2312等
#vim /var/lib/locales/supported.d/local

#dpkg-reconfigure locales
#locale-gen zh_CN.GB18030
#locale-gen zh_CN.GB2312
#locale-gen zh_CN.GBK
1.1.4 环境变量设置路径
#vim /etc/envinoment
常用的3个永久设置路径
l #vim /etc/envirnoment
l #vim /etc/profile
l #vim ~/.bashrc (/root/.bashrc)
1.1.5 设置ubuntu的上网ip
设置为 bridge连接方式,设定静态IP地址.
1.1.6 更改sh工具
#rm /bin/sh
# ln –s /bin/bash /bin/sh
#apt-get install fakeroot
1.1.7 安装必须的工具
#apt-get install vim
#apt-get install build-essenTIal
#apt-get install libtool
#apt-get install bsion(干什么用的还不清楚)
GNU autotools主要包括三个工具 autoconf, automake,libtool
1.1.8 虚拟机开发工具的安装
$ sudo apt-get install build-essenTIal libncurses-dev flex bison autoconf automake libmpfr-dev texinfo nfs-kernel-server tftpd-hpa libcloog-ppl
1.1 AM335x BeagleBone 的NFS启动
Sd卡的识别:在/media/下面显示内容
在/dev/sd* 下显示分区
卸载:#unmount /dev/sdb1
这个是在AM335X-LINUX-PSP-04.06.00.03里面找的
1) 制作sd启动盘 MLO+uboot.img+uImage+rootfs
#!/bin/bash
if [[ -z $1 || -z $2 || -z $3 || -z $4 ]]
then
echo "mksd-am335x Usage:"
echo " mksd-am335x "
echo " Example: mksd-am335x /dev/sdc MLO u-boot.img uImage nfs.tar.gz"
exit
fi
if ! [[ -e $2 ]]
then
echo "Incorrect MLO location!"
exit
fi
if ! [[ -e $3 ]]
then
echo "Incorrect u-boot.img location!"
exit
fi
if ! [[ -e $4 ]]
then
echo "Incorrect uImage location!"
exit
fi
if ! [[ -e $5 ]]
then
echo "Incorrect rootfs location!"
exit
fi
echo "All data on "$1" now will be destroyed! Continue? [y/n]"
read ans
if ! [ $ans == ‘y‘ ]
then
exit
fi
echo "[Partitioning $1...]"
DRIVE=$1
dd if=/dev/zero of=$DRIVE bs=1024 count=1024
SIZE=`fdisk -l $DRIVE | grep Disk | awk ‘{print $5}‘`
echo DISK SIZE - $SIZE bytes
CYLINDERS=`echo $SIZE/255/63/512 | bc`
echo CYLINDERS - $CYLINDERS
更多推荐




所有评论(0)