uboot下emmc内容烧写(拷贝)步骤

本文详细介绍了如何在uboot环境下,通过Linux系统对emmc进行分区、格式化,并将所需文件烧录到emmc中,包括使用fdisk进行分区操作、格式化为FAT16分区、挂载分区以及在uboot下验证文件拷贝等步骤。该过程对于嵌入式设备的系统启动和程序部署至关重要。
摘要由CSDN通过智能技术生成

一、目的:嵌入式开发板,通过emmc上的内核文件加载启动linux操作系统,以及存放其他程序文件。需要将所需文件先写入emmc中。

二、总体步骤是:uboot启动后,进入linux下,将emmc分区并格式化,uboot下支持fat和ext2的格式,这里用fat格式,并挂载,然后放入所需要的文件。这样重启后,进入uboot下,将emmc中的文件load到内存中运行。

三、uboot下emmc内容烧写(拷贝)步骤:

1、uboot启动后,输入mmc info有mmc的相关信息

2、通过tftp或其他方式启动linux

3、linux启动后,输入fdisk -l能看到/dev/mmcblk0的信息

4、linux下用fdisk命令对mmc分区,格式化

#fdisk /dev/mmcblk0

fdisk命令都是非常简单的。
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): m
Command action
a   toggle a bootable flag
b   edit bsd disklabel
c   toggle the dos compatibility flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
o   create a new empty DOS partition table
p   print the partition table
q   quit without saving changes
s   create a new empty Sun disklabel
t   change a partition's system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
x   extra functionality (experts only)
先P,看看sd卡的分区现状。
然后d,删除原分区
n,创建分区

Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-62528, default 1): 1
Last cylinder, +cylinders or +size{K,M,G} (1-62528, default 62528):  +1500M

t,指定分区类型,
Command (m for help): t
Selected pa

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值