一 s5p4418 支持SD/TF卡离线烧录
来源:互联网 发布:mac mysql 图形化界面 编辑:程序博客网 时间:2024/05/04 18:28
为了支持该功能,需要两个工具sd_fdisk和u-boot-head-tool。
sd_fdisk功能是对TF卡分区,u-boot-head-tool则是修改编译生成的u-boot以适合s5p4418硬件启动的要求。
两个工具的下载地址是http://download.csdn.net/detail/u010406724/8362055,
另外还需要一个脚本,来使用这两个工具sd_fusing.sh,具体的代码如下:
## Copyright (C) 2010 Samsung Electronics Co., Ltd.# http://www.samsung.com/## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License version 2 as# published by the Free Software Foundation.#####################################reader_type1="/dev/sdj"#如果是使用的新卡(或者没有烧写过s5p4418程序的卡),那么需要把disk_tf_enable设置为1(默认值),执行完成后再设置为0,除非更换卡才再次设置为1,否则请保持为0,避免顺坏tf卡中原有的数据disk_tf_enable=0 if [ -z $1 ]then echo "usage: ./sd_fusing.sh <SD Reader's device file>" exit 0fiif [ $disk_tf_enable = 1 ]thenif [ $1 = $reader_type1 ]thenpartition1="$1"'1'partition2="$1"'2'partition3="$1"'3'partition4="$1"'4'fiif [ -b $1 ]thenecho "$1 reader is identified."elseecho "$1 is NOT identified."exit 0fi##################################### make partitionecho "make sd card partition"echo "./sd_fdisk $1" ./sd_fdisk $1 dd iflag=dsync oflag=dsync if=sd_mbr.dat of=$1 rm sd_mbr.dat##################################### formatumount $partition1 2> /dev/nullumount $partition2 2> /dev/nullumount $partition3 2> /dev/nullumount $partition4 2> /dev/nullecho "mkfs.vfat -F 32 $partition1"sudo mkfs.vfat -F 32 $partition1#echo "mkfs.ext2 $partition2"#mkfs.ext2 $partition2 #echo "mkfs.ext2 $partition3"#mkfs.ext2 $partition3 #echo "mkfs.ext2 $partition4"#mkfs.ext2 $partition4 #mount $partition1fi#####################################<BL1 fusing>bl1_position=1uboot_position=64echo "2ndboot fusing"dd iflag=dsync oflag=dsync if=2ndboot.bin of=$1 seek=$bl1_position./u-boot-head-tool #对u-boot进行加头处理#####################################<u-boot fusing>echo "u-boot fusing"dd iflag=dsync oflag=dsync if=u-boot-tmp.bin of=$1 seek=$uboot_positionrm u-boot-tmp.bin#####################################<Message Display>echo "U-boot image is fused successfully."
另外当然还需要u-boot.bin和2ndboot两个文件了,这两个文件也都会在官方的系统文件中提供了。
在执行脚本之前需要确保文件如下图所示:
另外需要注意脚本中的一个变量
disk_tf_enable=0只有在使用新卡或者没有烧写过4418程序的卡时设置为1,其他都设置为0,免得因为格式化顺坏tf卡。
0 0
- 一 s5p4418 支持SD/TF卡离线烧录
- S5P4418 使用SD卡启动Android系统
- 6410 UBOOT 支持SD/SDHC卡启动 FAT32文件系统 yaffs2烧录 图片显示烧录状态
- 6410 UBOOT 支持SD/SDHC卡启动 FAT32文件系统 yaffs2烧录 图片显示烧录状态
- 6410 UBOOT 支持SD/SDHC卡启动 FAT32文件系统 yaffs2烧录 图片显示烧录状态
- 6410 UBOOT 支持SD/SDHC卡启动 FAT32文件系统 yaffs2烧录 图片显示烧录状态
- TF卡和SD卡
- micro SD(TF)卡详解
- micro SD(TF)卡详解
- BeagleBone折腾记(二):烧录SD卡系统
- SD卡和TF卡引脚定义
- TF卡及SD卡接口规范
- TF卡 SD卡接口【转】
- TF卡和SD卡理解
- Micro SD卡(TF卡)spi
- TF卡及SD卡接口规范
- SD卡和TF卡的区别
- SD卡 TF卡 接口引脚定义
- C++学习(六)
- 让我们彻底搞懂C/C++函数指针吧(二)
- 01-14-2015
- 大牛级博客
- 软件工程大作业---《苕皮段子》段子笑话APP
- 一 s5p4418 支持SD/TF卡离线烧录
- How to remove a layer when its animation completes?
- ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in
- CFRunLoop介绍(转载)
- linux 基本操作学习2
- Julia: 关于SubString
- 创建ubuntu14.04 KVM虚机
- 什么是正则表达式?浅谈 c++中的正则表达式
- 字节、位、字符、字、字长,乱了吧