分类目录归档:DevKit8000

用SD卡制作Linux启动盘

搞嵌入式开发的朋友对从SD卡引导系统并不陌生,尤其是对类Linux的引导,一般把SD卡分成两个分区,一个是boot,基本上都是FAT32的,因为支持范围比较多,兼容性好。另一个就是Linux文件系统了。由于要把SD卡分成两个分区,不像通常一样格式化这么简单,需要一些不一样的操作手段。

前两天看了一篇文章《Linux Boot Disk Format》,虽然讲得相当详细,但是毕竟有些版本不一致的地方,很容易导致失败。所以将我的操作过程记录于此,希望能帮到需要的人。

按照Linux Boot Disk Format一文中介绍的方法,虽然成功格式化了我的SD卡,但有些地方不太一样,需要特别注意,因为一旦弄错,比如格式化了别的硬盘,那你就搬个小凳子墙角哭去吧:)

首先,用[dmesg | tail]命令显示如下信息:

[27544.407777] mmc0: new SD card at address 00c3
[27544.408026] mmcblk0: mmc0:00c3       475 MiB
[27544.408173]  mmcblk0: p1
[27577.892153] mmc0: card 00c3 removed
[27587.296689] mmc0: card claims to support voltages below the defined range. These will be ignored.
[27587.296700] mmc0: SD card claims to support the incompletely defined ‘low voltage range’. This will be ignored.

这个需要仔细看的,刚开始我去找‘sdx’,结果没有,很是奇怪。实际上,我的Ubuntu已经是10.04了,很多地方与ubuntu7还是不太一样的,比如设备显示信息会有些不同:)。
Linux Boot Disk Format》中的显示

[ 6854.215659] sdc: sdc1

我这里显示

[27544.408173]  mmcblk0: p1

所以,下面的[df -h]命令也会不太一样:

hyh@hyh-laptop:~$ df -h
文件系统            容量  已用 可用 已用% 挂载点
/dev/sdb6              49G  5.2G   41G  12% /
none                  490M  360K  489M   1% /dev
none                  494M  1.3M  492M   1% /dev/shm
none                  494M   88K  494M   1% /var/run
none                  494M     0  494M   0% /var/lock
none                  494M     0  494M   0% /lib/init/rw
/dev/sdb2              98G   59G   40G  60% /media/photo
/dev/sdb3             391G  161G  231G  41% /media/software
/dev/sdb5              49G  2.2G   47G   5% /media/sys
/dev/sdb4             346G  129G  217G  38% /media/doc
/dev/mmcblk0p1        476M   32M  444M   7% /media/A46E-7FA0

你可以看到,我的SD卡挂载到了mmcblk0,分区是p1:

/dev/mmcblk0p1        476M   32M  444M   7% /media/A46E-7FA0

现在非常非常非常的确认了我的SD卡是mmcblk0了,因为你也得非常非常非常的肯定你没搞错分区,否则又要找小凳子去了…
其实有一种可以非常非常肯定的手段来看你的SD卡是哪个的:
首先拔出SD卡,然后敲入[df -h],看看显示列表;然后插入SD卡,正确识别出来后,敲入[df -h],再看看显示列表,看看多出来的就是你的SD卡信息。

下面umount SD卡:

hyh@hyh-laptop:~$ umount /media/A46E-7FA0

选择/dev/mmcblk0,进入fdisk

hyh@hyh-laptop:~$ sudo fdisk /dev/mmcblk0
[sudo] password for hyh:

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):”就是已经进入fdisk了,并且所有操作都是针对mmcblk0的,打印一下mmcblk0的信息看看:

Command (m for help): p

Disk /dev/mmcblk0: 498 MB, 498860032 bytes
255 heads, 63 sectors/track, 60 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00819e01

Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1   *           1          61      487136+   e  W95 FAT16 (LBA)
Partition 1 has different physical/logical endings:
phys=(59, 254, 63) logical=(60, 165, 41)

删除已有分区:

Command (m for help): d
Selected partition 1

如果上面你pint你的sd卡没有显示255 heads, 63 sectors/track信息,那么你还的重做一下你的SD卡,具体操作见Linux Boot Disk Format第七步。
我的当然显示正常,所以现在略过第七步,继续往下走:

新建一个FAT32分区:

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

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))

OK了,把它标记为启动盘:

Command (m for help): a
Partition number (1-4): 1

创建Linux分区:

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

打印一下看看:

Command (m for help): p

Disk /dev/mmcblk0: 498 MB, 498860032 bytes
255 heads, 63 sectors/track, 60 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00819e01

Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1   *           1           6       48163+   c  W95 FAT32 (LBA)
/dev/mmcblk0p2               7          60      433755   83  Linux

一切OK,保存以上所有操作,注意,上面的所有操作实际上只是yy,没有真正修改SD卡!这也是高明之处!!!

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.

格式化FAT32分区,并将卷标设为“LABEL1”,当然你可以另外叫个你喜欢的名字:

hyh@hyh-laptop:~$ sudo mkfs.msdos -F 32 /dev/mmcblk0p1 -n LABEL1
mkfs.msdos 3.0.7 (24 Dec 2009)

格式化Linux分区,并将卷标设为“LABEL2”,当然你可以另外叫个你喜欢的名字:
hyh@hyh-laptop:~$ sudo mkfs.ext3 -L LABEL2 /dev/mmcblk0p2
mke2fs 1.41.11 (14-Mar-2010)
文件系统标签=LABEL2
操作系统:Linux
块大小=1024 (log=0)
分块大小=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
108544 inodes, 433752 blocks
21687 blocks (5.00%) reserved for the super user
第一个数据块=1
Maximum filesystem blocks=67633152
53 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

正在写入inode表: 完成
Creating journal (8192 blocks): 完成
Writing superblocks and filesystem accounting information: 完成

This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
hyh@hyh-laptop:~$

现在再输入[dmesg | tail],显示如下:

[27544.407777] mmc0: new SD card at address 00c3
[27544.408026] mmcblk0: mmc0:00c3       475 MiB
[27544.408173]  mmcblk0: p1
[27577.892153] mmc0: card 00c3 removed
[27587.296689] mmc0: card claims to support voltages below the defined range. These will be ignored.
[27587.296700] mmc0: SD card claims to support the incompletely defined ‘low voltage range’. This will be ignored.
[27587.323780] mmc0: new SD card at address 00c3
[27587.324030] mmcblk0: mmc0:00c3       475 MiB
[27587.324687]  mmcblk0: p1
[28479.035485]  mmcblk0: p1 p2

下面多了这么几行:

[27587.323780] mmc0: new SD card at address 00c3
[27587.324030] mmcblk0: mmc0:00c3       475 MiB
[27587.324687]  mmcblk0: p1
[28479.035485]  mmcblk0: p1 p2

打完收工!

注意:在 ubuntu 下格式化好 FAT 和 EXT3 双分区后,FAT 分区需要在 window 下重新
格式化一次,否则可能会出现无法从 SD 卡启动的情况.

另外,有时候SD卡分区被搞得很乱,或者有很多个分区,所以在清除已有分区时,一定要清除干净。比如我的一个SD卡,由于第一次分区不成功,导致里面余留了很多很奇怪的信息,其实就是分区表被破坏了,所以必须清除干净。

hyh@hyh-laptop:/media$ sudo fdisk /dev/mmcblk0
[sudo] password for hyh:

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): p

Disk /dev/mmcblk0: 498 MB, 498860032 bytes
4 heads, 16 sectors/track, 15224 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f20736b

This doesn’t look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 ? 12158374 29994462 570754815+ 72 Unknown
Partition 1 does not end on cylinder boundary.
/dev/mmcblk0p2 ? 2635774 32886216 968014120 65 Novell Netware 386
Partition 2 does not end on cylinder boundary.
/dev/mmcblk0p3 ? 29216898 59467339 968014096 79 Unknown
Partition 3 does not end on cylinder boundary.
/dev/mmcblk0p4 ? 45088769 45089636 27749+ d Unknown
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

Command (m for help):

够乱吧?4 heads, 16 sectors/track, 15224 cylinders、四个分区。。。

那就先清了吧,重做一下SD卡!

删除第一分区:

Command (m for help): d
Partition number (1-4): 1

显示看看

Command (m for help): p

Disk /dev/mmcblk0: 498 MB, 498860032 bytes
4 heads, 16 sectors/track, 15224 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f20736b

This doesn’t look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/mmcblk0p2 ? 2635774 32886216 968014120 65 Novell Netware 386
Partition 2 does not end on cylinder boundary.
/dev/mmcblk0p3 ? 29216898 59467339 968014096 79 Unknown
Partition 3 does not end on cylinder boundary.
/dev/mmcblk0p4 ? 45088769 45089636 27749+ d Unknown
Partition 4 does not end on cylinder boundary.

由于分区表被破坏,没法对分区表做正确操作,还是先把heads和簇修正。

进入专家模式,重建分区表:

Command (m for help):
Command (m for help): x

Expert command (m for help): h
Number of heads (1-256, default 4): 255

Expert command (m for help): s
Number of sectors (1-63, default 16): 63
Warning: setting sector offset for DOS compatiblity

Expert command (m for help): c
Number of cylinders (1-1048576, default 15224): 60

Expert command (m for help): r

退出专家模式,打印看看:

Command (m for help): p

Disk /dev/mmcblk0: 498 MB, 498860032 bytes
255 heads, 63 sectors/track, 60 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f20736b

This doesn’t look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/mmcblk0p2 ? 10501 131013 968014120 65 Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(288, 115, 43) logical=(10500, 111, 30)
Partition 2 has different physical/logical endings:
phys=(367, 114, 50) logical=(131012, 158, 28)
Partition 2 does not end on cylinder boundary.
/dev/mmcblk0p3 ? 116395 236907 968014096 79 Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(366, 32, 33) logical=(116394, 188, 12)
Partition 3 has different physical/logical endings:
phys=(357, 32, 43) logical=(236906, 234, 25)
Partition 3 does not end on cylinder boundary.
/dev/mmcblk0p4 ? 179626 179629 27749+ d Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(372, 97, 50) logical=(179625, 87, 47)
Partition 4 has different physical/logical endings:
phys=(0, 10, 0) logical=(179628, 203, 42)
Partition 4 does not end on cylinder boundary.

Command (m for help):

255 heads, 63 sectors/track, 60 cylinders,一切正常。

手工清除所有分区:

Command (m for help): p

Disk /dev/mmcblk0: 498 MB, 498860032 bytes
255 heads, 63 sectors/track, 60 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f20736b

This doesn’t look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 1 6 48163+ c W95 FAT32 (LBA)
/dev/mmcblk0p2 ? 10501 131013 968014120 65 Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(288, 115, 43) logical=(10500, 111, 30)
Partition 2 has different physical/logical endings:
phys=(367, 114, 50) logical=(131012, 158, 28)
Partition 2 does not end on cylinder boundary.
/dev/mmcblk0p3 ? 116395 236907 968014096 79 Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(366, 32, 33) logical=(116394, 188, 12)
Partition 3 has different physical/logical endings:
phys=(357, 32, 43) logical=(236906, 234, 25)
Partition 3 does not end on cylinder boundary.
/dev/mmcblk0p4 ? 179626 179629 27749+ d Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(372, 97, 50) logical=(179625, 87, 47)
Partition 4 has different physical/logical endings:
phys=(0, 10, 0) logical=(179628, 203, 42)
Partition 4 does not end on cylinder boundary.

看看上面有很多分区,分区太多,分区表可能在Windows下格式化的时候就被破坏了。

一个一个的收工删除:

Command (m for help): d
Partition number (1-4): 1

Command (m for help): d
Partition number (1-4): 2

Command (m for help): p

Disk /dev/mmcblk0: 498 MB, 498860032 bytes
255 heads, 63 sectors/track, 60 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f20736b

This doesn’t look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/mmcblk0p3 ? 116395 236907 968014096 79 Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(366, 32, 33) logical=(116394, 188, 12)
Partition 3 has different physical/logical endings:
phys=(357, 32, 43) logical=(236906, 234, 25)
Partition 3 does not end on cylinder boundary.
/dev/mmcblk0p4 ? 179626 179629 27749+ d Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(372, 97, 50) logical=(179625, 87, 47)
Partition 4 has different physical/logical endings:
phys=(0, 10, 0) logical=(179628, 203, 42)
Partition 4 does not end on cylinder boundary.

Command (m for help): d
Partition number (1-4): 3

Command (m for help): d
Selected partition 4

Command (m for help): 4
4: unknown command
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)

Command (m for help): p

Disk /dev/mmcblk0: 498 MB, 498860032 bytes
255 heads, 63 sectors/track, 60 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f20736b

Device Boot Start End Blocks Id System

Command (m for help):

没有了,看看输出,与第八步一致。可以开始第九步,开始分区了。

新建一个分区:

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

将新分区改为与DOS兼容

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))

Command (m for help):

将刚刚分的第一分区设置为启动盘:

Command (m for help): a
Partition number (1-4): 1

Command (m for help):

添加第二个分区:Linux分区:

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

打印看看:

Command (m for help): p

Disk /dev/mmcblk0: 498 MB, 498860032 bytes
255 heads, 63 sectors/track, 60 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f20736b

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 1 6 48163+ c W95 FAT32 (LBA)
/dev/mmcblk0p2 7 60 433755 83 Linux

Command (m for help):

OK了,保存工作成功:

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
hyh@hyh-laptop:/media$

格式化一下第一分区,命名为boot:

hyh@hyh-laptop:/media$ sudo mkfs.msdos -F 32 /dev/mmcblk0p1 -n boot
[sudo] password for hyh:
mkfs.msdos 3.0.7 (24 Dec 2009)

格式化第二分区,命名为Linux:

hyh@hyh-laptop:/media$ sudo mkfs.ext3 -L Linux /dev/mmcblk0p2
mke2fs 1.41.11 (14-Mar-2010)
文件系统标签=Linux
操作系统:Linux
块大小=1024 (log=0)
分块大小=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
108544 inodes, 433752 blocks
21687 blocks (5.00%) reserved for the super user
第一个数据块=1
Maximum filesystem blocks=67633152
53 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

正在写入inode表: 完成
Creating journal (8192 blocks): 完成
Writing superblocks and filesystem accounting information: 完成

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
hyh@hyh-laptop:/media$

退出,到Windows下再格式化一下第一分区。
我第一次就是没做这一步就直接往里面考东西了,启动时没成功。本以为在Windows下格式化一下第一分区,再重新把东西拷贝进去不就行了吗?结果格式化时根本没看到第一分区(上次是LABEL,这次是boot),看那容量,应该是第二分区,把第二分区给干了。。。

Linux Boot Disk Format

本文介绍了如何为DevKit8000格式化SD卡,以便通过SD卡启动安装在SD卡中的Linux操作系统!


How to create a dual-partition card for DevKit8000 to boot Linux from first partition and have root file system at second partition.

一、Introduction

This guide is meant for those looking to create a dual-partition card, booting from a FAT partition that can be read by the OMAP3 ROM bootloader and Linux/Windows, then utilizing an ext3 partition for the Linux root file system.

二、Details

Text marked with [] shows user input.

1Determine which device the SD Card Reader is on your system

Plug the SD Card into the SD Card Reader and then plug the SD Card Reader into your system. After doing that, do the following to determine which device it is on your system.

$ [dmesg | tail]

[ 6854.215650] sd 7:0:0:0: [sdc] Mode Sense: 0b 00 00 08 [ 6854.215653] sd 7:0:0:0: [sdc] Assuming drive cache: write through

[ 6854.215659] sdc: sdc1

[ 6854.218079] sd 7:0:0:0: [sdc] Attached SCSI removable disk

[ 6854.218135] sd 7:0:0:0: Attached scsi generic sg2 type 0

In this case, it shows up as /dev/sdc (note sdc inside the square brackets above).

2Check to see if the automounter has mounted the SD Card

Note there may be more than one partition (only one shown in the example below).

$ [df -h]

Filesystem Size Used Avail Use% Mounted on

/dev/sdc1 400M 94M 307M 24% /media/disk

Note the “Mounted on” field in the above and use that name in the umount commands below.

3If so, unmount it

$ [umount /media/disk]

4Start fdisk

Be sure to choose the whole device (/dev/sdc), not a single partition (/dev/sdc1).

$ [sudo fdisk /dev/sdc]

5Print the partition record

So you know your starting point. Make sure to write down the number of bytes on the card (in this example, 2021654528).

Command (m for help): [p]

Disk /dev/sdc: 2021 MB, 2021654528 bytes

255 heads, 63 sectors/track, 245 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdc1 * 1 246 1974240+ c W95 FAT32 (LBA)

Partition 1 has different physical/logical endings:

phys=(244, 254, 63) logical=(245, 200, 19)

6Delete any partitions that are there already

Command (m for help): [d]

Selected partition 1

7Set the Geometry of the SD Card

If the print out above does not show 255 heads, 63 sectors/track, then do the following expert mode steps to redo the SD Card:

1)、Go into expert mode.

Command (m for help): [x]

2)、Set the number of heads to 255.

Expert Command (m for help): [h]

Number of heads (1-256, default xxx): [255]

3Set the number of sectors to 63.

Expert Command (m for help): [s]

Number of sectors (1-63, default xxx): [63]

4Now Calculate the number of Cylinders for your SD Card.

#cylinders = FLOOR (the number of Bytes on the SD Card (from above) / 255 / 63 / 512 )

So for this example: 2021654528 / 255 / 63 / 512 = 245.79. So we use 245 (i.e. truncate, don’t round).

5Set the number of cylinders to the number calculated.

Expert Command (m for help): [c]

Number of cylinders (1-256, default xxx): [enter the number you calculated]

6Return to Normal mode.

Expert Command (m for help): [r]

8Print the partition record to check your work

Command (m for help): [p]

Disk /dev/sdc: 2021 MB, 2021654528 bytes

255 heads, 63 sectors/track, 245 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

9Create the FAT32 partition for booting and transferring files from Windows

Command (m for help): [n]

Command action

e extended

p primary partition (1-4)

[p]

Partition number (1-4): [1]

First cylinder (1-245, default 1): [(press Enter)]

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-61, default 61): [+5]

Command (m for help): [t]

Selected partition 1

Hex code (type L to list codes): [c]

Changed system type of partition 1 to c (W95 FAT32 (LBA))

10Mark it as bootable

Command (m for help): [a]

Partition number (1-4): [1]

11Create the Linux partition for the root file system

Command (m for help): [n]

Command action

e extended

p primary partition (1-4)

[p]

Partition number (1-4): [2]

First cylinder (7-61, default 7): [(press Enter)]

Using default value 52

Last cylinder or +size or +sizeM or +sizeK (7-61, default 61): [(press Enter)]

Using default value 245

12Print to Check Your Work

Command (m for help): [p]

Disk /dev/sdc: 2021 MB, 2021654528 bytes

255 heads, 63 sectors/track, 245 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdc1 * 1 6 409626 c W95 FAT32 (LBA)

/dev/sdc2 7 61 1558305 83 Linux

13Save the new partition records on the SD Card

This is an important step. All the work up to now has been temporary.

Command (m for help): [w]

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

WARNING: If you have created or modified any DOS 6.x

partitions, please see the fdisk manual page for additional

information.

Syncing disks.

14Format the partitions

The two partitions are given the volume names LABEL1 and LABEL2 by these commands. You can substitute your own volume labels.

$ [sudo mkfs.msdos -F 32 /dev/sdc1 -n LABEL1]

mkfs.msdos 2.11 (12 Mar 2005)

$ [sudo mkfs.ext3 -L LABEL2 /dev/sdc2]

mke2fs 1.40-WIP (14-Nov-2006)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

195072 inodes, 389576 blocks

19478 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=402653184

12 block groups

32768 blocks per group, 32768 fragments per group

16256 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912

Writing inode tables: done

Creating journal (8192 blocks): done

Writing superblocks and filesystem accounting information:

 

 

 

最后决定购买DevKit8000及全部配件

最后决定购买DevKit8000评估套件完全配置,1680RMB,它具有强大的图形加速功能,如果能把OpenCV移植上去,那就太完美了!

http://www.broadon.cn/item.htm?id=4064505743

升级版套件:256MB SDRAM + 256MB NAND FLASH

– 基于OMAP3530处理器,板载256MByte DDR SDRAM及256MByte NAND Flash
– 支持DVI-D/S-Video/TFT-LCD三种显示输出,可输出高清信号
– 外扩USB OTG,串口,网口,摄像头,音频,SD/MMC,键盘等接口
– 支持WinCE 6.0及Linux2.6.28系统,完全兼容beagleboard

硬件特性

CPU单元:

OMAP3530应用处理器(Pin to Pin兼容OMAP3503,OMAP3515,OMAP3525处理器)
600-MHz ARM Cortex-A8 Core
430MHz TMS320C64x+ DSP Core
256MByte DDR SDRAM,32bit
256MByte NAND Flash
6层板设计
通讯接口:

1个S-VIDEO接口
1个音频输入接口
1个双声道音频输出接口
1个10/100M以太网(芯片:DM9000,RJ45接口)
1个高速USB2.0 OTG接口(芯片:TPS65930),速度达480Mbps
2个串口(1个3线RS232电平串口,1个5线TTL电平串口)
1个SD/MMC接口
1个6*6键盘接口
1个14针标准JTAG接口
1个CAMERA接口(可外接CCD和CMOS的摄像头)
4个按键(1个启动引导按键,1个复位按键及2个用户按键)
扩展接口(包含McSPI,McBSP,I2C,HDQ及SD/MMC接口)
显示单元:

1个HDMI接口(芯片:TFP410),可输出分辨率1280×720,码率30fps的DVI-D高清信号
24bit真彩色LCD接口(含4线触摸屏接口,分辨率可支持2048*2048)
电气参数:

工作温度:-40 ~ 85℃(芯片支持)
环境湿度:20% ~ 90% ,非冷凝
机械尺寸:110 mm * 95 mm
电气指标:+5V电源供电,电流150mA

订购信息

DevKit8000评估套件完全配置装箱清单:
一个DevKit8000单板  
一个4.3寸触摸屏
一个512MB SD卡
一条交叉网线
一条Mini USB A线转USB A型母头
一条Mini USB B线转USB A型公头
一个USB HUB(带电源)
一个HMDI转DVI-D转接线
一条S-Video线
一个5V 2A电源
一支触摸笔
一张光盘(使用文档、原理图、源代码及工具)

产品自需方购买日起质保半年,核心元器件除外,液晶屏不参与质保。长期提供免费的电话和Email技术支持。

DevKit8000开发板全部配件(12件)