[color=red][size=medium]一、格式化SD卡[/size][/color]
[size=small]$ sudo fdisk /dev/sdb
Command (m for help):d
Partition number (1-4):1[/size]
[color=red][size=medium]二、查看信息[/size][/color]
[size=small]Command (m for help):p[/size]
[color=red][size=medium]三、创建两个分区[/size]
[/color]
[size=small]Command (m for help):n
Partition number (1-4):1
第一分区从20开始
First cylinder (1-1590,default 1):20
Last cylinder, +cylinders or +size{K,M,G} (20-1590, default 1590): +200M
查看分区信息:
Command (m for help):p
第二分区从END+1(63)开始,操作步骤一样[/size]
[color=red][size=medium]四、修改第一分区格式:[/size][/color]
[size=small]Command (m for help):n
Partition number (1-4):1
保存退出:
Command (m for help):w[/size]
[color=red][size=medium]五、umount两个分区,重新保存[/size][/color]
[size=small]$sudo umount /dev/sdb1
$sudo umount /dev/sdb2
$sudo fdisk /dev/sdb
Command (m for help):w[/size]
[color=red][size=medium]六、格式化两个分区:[/size][/color]
[size=small]$sudo mkfs.msdos /dev/sdb1
$sudo mkfs.ext3 /dev/sdb2[/size]
[color=red][size=medium]七、 将uboot复制到卡上[/size][/color]
[size=small]sudo dd if=xxx.bin of=/dev/sdx bs=1 count=442
sudo dd if=xxx.bin of=/dev/sdx bs=512 skip=01 seek=1
if 后为 uboot 的路径, of 后为 SD 卡的挂载名 [/size]
[size=small]$ sudo fdisk /dev/sdb
Command (m for help):d
Partition number (1-4):1[/size]
[color=red][size=medium]二、查看信息[/size][/color]
[size=small]Command (m for help):p[/size]
[color=red][size=medium]三、创建两个分区[/size]
[/color]
[size=small]Command (m for help):n
Partition number (1-4):1
第一分区从20开始
First cylinder (1-1590,default 1):20
Last cylinder, +cylinders or +size{K,M,G} (20-1590, default 1590): +200M
查看分区信息:
Command (m for help):p
第二分区从END+1(63)开始,操作步骤一样[/size]
[color=red][size=medium]四、修改第一分区格式:[/size][/color]
[size=small]Command (m for help):n
Partition number (1-4):1
保存退出:
Command (m for help):w[/size]
[color=red][size=medium]五、umount两个分区,重新保存[/size][/color]
[size=small]$sudo umount /dev/sdb1
$sudo umount /dev/sdb2
$sudo fdisk /dev/sdb
Command (m for help):w[/size]
[color=red][size=medium]六、格式化两个分区:[/size][/color]
[size=small]$sudo mkfs.msdos /dev/sdb1
$sudo mkfs.ext3 /dev/sdb2[/size]
[color=red][size=medium]七、 将uboot复制到卡上[/size][/color]
[size=small]sudo dd if=xxx.bin of=/dev/sdx bs=1 count=442
sudo dd if=xxx.bin of=/dev/sdx bs=512 skip=01 seek=1
if 后为 uboot 的路径, of 后为 SD 卡的挂载名 [/size]