Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1814496
  • 博文数量: 274
  • 博客积分: 2366
  • 博客等级: 大尉
  • 技术积分: 1880
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-22 09:37
文章分类

全部博文(274)

文章存档

2022年(1)

2020年(10)

2019年(7)

2018年(18)

2017年(26)

2016年(32)

2015年(43)

2014年(30)

2013年(44)

2012年(36)

2011年(17)

2010年(10)

分类: LINUX

2016-06-16 16:04:28

boot(512K)bootargs(64K) baseparam(64K) logo(384K), fastplay(2M), kernel(6M), rootfs(32M) app(12M) config(9M) fixconfig(2M)


squshfs分区划分
偏移         结束          长度          分区名
0x00000000 - 0x00300000  ==0x00300000    uboot及参数区 3M
0x00300000 - 0x00900000  ==0x00600000    kernel 6M
0x00900000 - 0x02900000  ==0x02000000    rootfs 32M
0x02900000 - 0x03500000  ==0x00c00000    app  12M
0x03500000 - 0x03e00000  ==0x00900000    config 9M
0x03e00000 - 0x04000000  ==0x00200000    fixconfig 2M


#tftp环境
setenv ipaddr 192.168.1.10;setenv serverip 192.168.1.2;sa;


#uboot
mw.b 1000000 ff 300000;tftp 1000000 fastboot-burn.bin;nand erase 0 300000;nand write 1000000 0 300000;
#kernel
mw.b 1000000 ff 600000;tftp 1000000 hi_kernel.bin;nand erase 300000 600000;nand write 1000000 300000 600000;
#rootfs
mw.b 1000000 ff 2000000;tftp 1000000 rootfs.squashfs;nand erase 900000 2000000;nand write 1000000 900000 2000000;


#启动参数
setenv bootargs 'mem=512M console=ttyAMA0,115200 root=/dev/romblock3 rootfstype=squashfs mtdparts=hinand:1M(boot),2M(fastplay),6M(kernel),32M(rootfs),9M(config),-(others) mmz=ddr,0,0,300M'
setenv bootcmd 'nand read 1000000 300000 600000;bootm 1000000';
sa;


yaffs 格式划分
偏移          结束         长度          分区名
0x00000000 - 0x00300000  ==0x00300000    uboot及参数区 3M
0x00300000 - 0x00900000  ==0x00600000    kernel 6M
0x00900000 - 0x03900000  ==0x03000000    rootfs 48M
0x03900000 - 0x04000000  ==0x00700000    config 7M
setenv bootargs 'mem=512M console=ttyAMA0,115200 root=/dev/mtdblock3 rootfstype=yaffs2 mtdparts=hinand:1M(boot),2M(fastplay),6M(kernel),48M(rootfs),7M(config),-(others) mmz=ddr,0,0,300M'
setenv bootcmd 'nand read 1000000 300000 600000;bootm 1000000';
sa;


mw.b 1000000 ff 3000000;tftp 1000000 rootfs_2k1b.yaffs;nand erase 900000 3000000;nand write.yaffs 1000000 900000 2E05400;




nfs 挂载根文件系统
1. 内核支持rootfs 文件系统


Networking  --->
        [*] Networking support
            Networking options  --->
                [*]   IP: kernel level autoconfiguration       ## 必选
                [*]     IP: DHCP support
                [*]     IP: BOOTP support
                [*]     IP: RARP support


File systems  --->
        Network File Systems  --->
            <*> NFS file system support                        ## 必选
                [*]   Provide NFSv3 client support             ## 可选
            [*] Root file system on NFS                        ## 必选
假设内核名字为uImage.nfsroot, 编译好后重新下载内核
mw.b 1000000 ff 600000;tftp 1000000 uImage.nfsroot;nand erase 300000 600000;nand write 1000000 300000 600000;


2.将HiSTBLinuxV100R003C00SPC060/pub/rootbox 目录拷贝到nfs 目录下(貌似也可以软连接而不用拷贝),
 这里为/nfs/3798rootbox, 后面这个就是工作目录


3.设置uboot启动参数, 根据实际情况来修改
setenv bootargs 'mem=512M console=ttyAMA0,115200 root=/dev/nfs rw nfsrootdebug nfsroot=192.168.1.20:/nfs/3798rootbox ip=192.168.1.22:192.168.1.20:192.168.1.1:255.255.255.0:3798:eth0:off mmz=ddr,0,0,300M'


ip=::::::::
阅读(1406) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~