设为首页 加入收藏

TOP

在线升级uboot,内核和文件系统(二)
2014-11-24 03:32:19 来源: 作者: 【 】 浏览:1
Tags:在线升级 uboot 内核 文件 系统
ition here


burn_image $MTD $IMAGE_FILE


}




while getopts "afku" opt


do


case $opt in


a)


IMAGE_TYPE=APPS


shift 1


break;


;;



k)


IMAGE_TYPE=KERNEL


shift 1


break;


;;



f)


IMAGE_TYPE=ROOTFS


shift 1


break;


;;



u)


IMAGE_TYPE=BOOTLOADER


shift 1


break;


;;



h)


usage


;;



)


usage


;;


esac


done



IMAGE_FILE=$1


if [ ! -n "$IMAGE_FILE" ] ; then


usage


fi



if [ ! -n "$IMAGE_TYPE" ] ; then


check_image_type $IMAGE_FILE


fi



if [ $IMAGE_TYPE == BOOTLOADER ] ; then


up_bootloader $IMAGE_FILE


elif [ $IMAGE_TYPE == KERNEL ] ; then


up_kernel $IMAGE_FILE


elif [ $IMAGE_TYPE == ROOTFS ] ; then


echo "$IMAGE_FILE ***************"


up_rootfs $IMAGE_FILE


else


echo "============================================================================================"


echo "ERROR: Unknow image type: '$IMAGE_NAME'"


echo "============================================================================================"


usage


fi



文件系统如下:


[lingyun@localhost fulinux]$ ls


kernel rootfs systools u-boot


[lingyun@localhost fulinux]$ cd rootfs/


[lingyun@localhost rootfs]$ ls


ramdisk-s3c2440.gz rootfs rootfs_tree.tar.bz2 tools


[lingyun@localhost rootfs]$ cd rootfs


[lingyun@localhost rootfs]$ pwd


/home/lingyun/fulinux/rootfs/rootfs


[lingyun@localhost rootfs]$



因为上面的shell脚本需要用到两个应用程序flash_eraseallnandwrite所以需要在上面的文件系统里有这两个程序。如果没有添加方式如下:


[lingyun@localhost fulinux]$ ls


kernel rootfs systools u-boot


[lingyun@localhost fulinux]$ cd systools/


[lingyun@localhost systools]$ ls


busybox


[lingyun@localhost systools]$ cd busybox/


[lingyun@localhost busybox]$ ls


build.sh busybox-1.20.2 busybox-1.20.2.tar.bz2 patch


[lingyun@localhost busybox]$ cd busybox-1.20.2


[lingyun@localhost busybox-1.20.2]$


[lingyun@localhost busybox]$ ls


build.sh busybox-1.20.2 busybox-1.20.2.tar.bz2 patch


[lingyun@localhost busybox]$ cd busybox-1.20.2


[lingyun@localhost busybox-1.20.2]$ vt100


[lingyun@localhost busybox-1.20.2]$ make menuconfig


主目录:


Busybox Settings --->


。。。


Installation Options ("make install" behavior) --->


What kind of applet links to install (as soft-links) --->


指定文件系统的目录位置:


(/home/lingyun/fulinux/systools/busybox/../../rootfs/rootfs) BusyBox installation prefix


。。。


回到主目录:


Miscellaneous Utilities --->


选择如下的两个程序:


。。。


[*] nandwrite


。。。


[*] flash_eraseall


。。。


保存退出。


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇新版MapReduce的API编程简单模板 下一篇用OpenCL实现HEVC中ME模块的测试..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·工业机器人TCP校准中 (2025-12-25 05:19:17)
·opc 通讯协议与 TCP (2025-12-25 05:19:15)
·labview中tcp/ip通信 (2025-12-25 05:19:13)
·新书介绍《Python数 (2025-12-25 04:49:47)
·怎么利用 Python 进 (2025-12-25 04:49:45)