宝贵(环境搭建)

1020阅读 0评论2016-09-19 文峰聊书斋
分类:LINUX

配置minicom:
# minicom -s
 Serial port setup
  A -    Serial Device      : /dev/ttyS0
     E -    Bps/Par/Bits       : 115200 8N1
     F - Hardware Flow Control : No       
     G - Software Flow Control : No 
 Save setup as dfl
USB-Serial:
# cp 50-ftdi.rules /etc/udev/rules.d/

/////////////////////////
smdk6410.h文件中    注意配置,否则uboot无法运行
/* Boot configuration (define only one of next) */
//#define CONFIG_BOOT_NOR
#define CONFIG_BOOT_NAND           //配置成从nand启动uboot
//#define CONFIG_BOOT_MOVINAND     //配置成从SD卡启动uboot
//#define CONFIG_BOOT_ONENAND
/////////////////////////
SD卡烧写:
 # write_sd /dev/sdb u-boot-movi.bin
tftp
服务:  
安装完tftp              
#yum install tftp
#yum install tftp-server
tftp文件下载目录可能在/var/lib/tftpboot 或者/tftpboot
 # vim /etc/xinetd.d/tftp
  disable = no
 # service iptables stop
 # chkconfig iptables off
 # /etc/init.d/xinetd restart
烧写u-boot:
 # tftp 50003000 u-boot-nand.bin
 # nand erase 0 30000
 # nand write 50003000 0 30000
烧写uImage:
 # tftp 50003000 zImage 
 # nand erase 40000 200000
 # nand write 50003000 40000 200000
      //zImage 烧写到40000 nandflash里了。
     //启动参数set bootcmd "nand read 50008000 40000 200000;bootm 50008000"
     //uboot再将40000地址内容读到50008000.再启动内核,zImage镜像不会被U-BOOT再次搬运,直接bootm运行

启动nfs服务:
 # vim /etc/exports
  /nfsroot *(rw) 
 # /etc/init.d/nfs restart
 # tar -xvf rootfs-qt-2.2.0.tar.bz2 -C /nfsroot
设置启动参数
从nfs挂载启动:
 set bootargs noinitrd console=ttySAC0,115200 root=/dev/nfs nfsroot=192.168.1.10:/nfsroot ip=192.168.1.20:192.168.1.10:255.255.255.0
 set bootcmd "nand read 50008000 40000 200000;bootm 50008000"
从从mtdblock2启动文件系统
#set bootargs noinitrd console=ttySAC0,115200 root=/dev/mtdblock2 

安装交叉编译器:
 # tar -xvf arm-none-linux-gnueabi-arm-2008q3-72-for-linux.tar.bz2 -C / 
 # vim /root/.bash_profile                        或者/etc/profile
  PATH=$PATH:$HOME/bin:/usr/local/arm/arm-none-linux-gnueabi/bin
  export PATH
 # source /root/.bash_profile
我忘了配置minicom之前还要配置什么呢?忘了一干二净。



////////////////////////////////////////////












 




////////////////////////////////////////////////






mkimage 工具在uboot的tools文件夹里生成



////////////////////////////////////////////////


////////////////////////////////////////////////////////////


////////////////////////////


///////////////////////////////////




上一篇:Makefile与gcc
下一篇:smdk6410板子内核编译和配置