hisi nfs启动环境搭建

hisilicon # print
bootdelay=1
baudrate=115200
ethaddr="00:00:23:34:45:66"
netmask="255.255.255.0"
bootfile="uImage"
bootcmd=sf probe 0;sf read 0x42000000 0x100000 0x400000;bootm 0x42000000
bootargs=mem=256M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),4M(kernel),27M(rootfs)
ipaddr=192.168.3.11
serverip=192.168.3.10
stdin=serial
stdout=serial
stderr=serial
verify=n
ver=U-Boot 2010.06 (May 26 2016 - 19:18:21)


Environment size: 433/262140 bytes
hisilicon # 








支持从NFS启动:
1、添加Nfs目录
sudo vi /etc/exports 
/home/book/nfs_root *(rw,sync,no_root_squash)
/home/book/rootfs_glibc *(rw,sync,no_root_squash)


2、重启nfs
sudo /etc/init.d/nfs-kernel-server restart


3、实验自己挂接自己
sudo mount -t  nfs 192.168.3.106:/home/book/rootfs_glibc /mnt
ls  /mnt
sudo umount /mnt


4、配置内核支持nfs启动
cd /home/book/Hi3531A_SDK_V1.0.3.0/osdrv/opensource/kernel/linux-3.10.y
sudo cp arch/arm/configs/hi3531a_full_defconfig .config
make ARCH=arm CROSS_COMPILE=arm-hisiv400-linux-  menuconfig


修改配置 
Networking support–>Networking options 
–>[*]IP: DHCP support 
–>[*]IP:BOOTP support 
–>[*]IP:RARP support


File systems  --->     
[*] Network File Systems  ---> 
<*>   NFS client support                                                      
   <*>     NFS client support for NFS version 2                                
   <*>     NFS client support for NFS version 3                                
   [*]       NFS client support for the NFSv3 ACL protocol extension           
   <*>     NFS client support for NFS version 4                                
   [*]     Provide swap over NFS support                                       
   [*]   NFS client support for NFSv4.1                                        
   (kernel.org) NFSv4.1 Implementation ID Domain                               
   [*]   Root file system on NFS             /* 必须选上 */


make ARCH=arm CROSS_COMPILE=arm-hisiv400-linux-  uImage


5、内核下载
hisilicon# mw.b 0x42000000 ff 0x400000        /* 对内存初始化*/
hisilicon# tftp 42000000 uImage  从tftp下载内核到42000000
hisilicon# sf probe 0 /*探测并初始化SPI flash*/
hisilicon# sf erase 0x100000 0x400000 /*擦除 1M大小*/   
hisilicon# sf write 0x42000000 0x100000 0x400000 /*从内存写入SPI NOR Flash*/


5、设置uboot启动参数
setenv bootargs noinitrd root=/dev/nfs rw nfsroot=192.168.3.106:/home/book/rootfs_glibc ip=192.168.3.11:192.168.3.106:192.168.3.1:255.255.255.0::eth0:off init=/linuxrc console=ttyAMA0,115200
sf probe 0;sf read 0x42000000 0x100000 0x400000;bootm 0x42000000
阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页