zedboard评测+试跑android的demo(1)
0赞
发表于 2012/10/14 23:49:06
阅读(5721)
说明:本次操作的在SD使用纠结的是无意中想到了,做这次的试跑的算作是一次尝试吧,虽然最终的结果是以失败告终,但是还有很有收获的
按照的xilinx提供资料,zynq目前支持的linux系统,android系统。板子上的SD卡附带的是linux的系统,那么android在哪里了?
在wiki.xilinx.com上的提到过开源操作系统android,还提供了编译好的android的文件以及编译方法(下载地址为http://git.iveia.com/support/需要注册后才能下载)。起编译好的文件列表如下:
我们所要做的就是给SD卡分区,具体的操作如下:
所有需要的环境为Ubuntu 的操作系统,下载地址为http://www.ubuntu.org.cn/download。我所使用的12.04.
1.查询下你sd所在的盘符编号:
$ sudo fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf8f0a477
Device Boot Start End Blocks Id System
/dev/sda1 * 63 124182449 62091193+ c W95 FAT32 (LBA)
/dev/sda2 124182450 976768064 426292807+ 5 Extended
/dev/sda5 124182518 229054769 52436126 7 HPFS/NTFS/exFAT
/dev/sda6 229054833 326858489 48901828+ 7 HPFS/NTFS/exFAT
/dev/sda7 326858554 675838484 174489965+ 7 HPFS/NTFS/exFAT
/dev/sda8 675838548 976768064 150464758+ 7 HPFS/NTFS/exFAT
/dev/sda1 * 63 124182449 62091193+ c W95 FAT32 (LBA)
/dev/sda2 124182450 976768064 426292807+ 5 Extended
/dev/sda5 124182518 229054769 52436126 7 HPFS/NTFS/exFAT
/dev/sda6 229054833 326858489 48901828+ 7 HPFS/NTFS/exFAT
/dev/sda7 326858554 675838484 174489965+ 7 HPFS/NTFS/exFAT
/dev/sda8 675838548 976768064 150464758+ 7 HPFS/NTFS/exFAT
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x624aa2e0
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x624aa2e0
Device Boot Start End Blocks Id System
/dev/sdb1 * 63 40965749 20482843+ 7 HPFS/NTFS/exFAT
/dev/sdb2 40965750 305652689 132343470 f W95 Ext'd (LBA)
/dev/sdb3 305652690 312576704 3462007+ 1c Hidden W95 FAT32 (LBA)
/dev/sdb5 40965813 102414374 30724281 7 HPFS/NTFS/exFAT
/dev/sdb6 102414438 163862999 30724281 7 HPFS/NTFS/exFAT
/dev/sdb7 163863063 225311624 30724281 7 HPFS/NTFS/exFAT
/dev/sdb8 225311688 305652689 40170501 7 HPFS/NTFS/exFAT
/dev/sdb1 * 63 40965749 20482843+ 7 HPFS/NTFS/exFAT
/dev/sdb2 40965750 305652689 132343470 f W95 Ext'd (LBA)
/dev/sdb3 305652690 312576704 3462007+ 1c Hidden W95 FAT32 (LBA)
/dev/sdb5 40965813 102414374 30724281 7 HPFS/NTFS/exFAT
/dev/sdb6 102414438 163862999 30724281 7 HPFS/NTFS/exFAT
/dev/sdb7 163863063 225311624 30724281 7 HPFS/NTFS/exFAT
/dev/sdb8 225311688 305652689 40170501 7 HPFS/NTFS/exFAT
Disk /dev/sdc: 3967 MB, 3967811584 bytes
3 heads, 2 sectors/track, 1291605 cylinders, total 7749632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
3 heads, 2 sectors/track, 1291605 cylinders, total 7749632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 8192 7749631 3870720 b W95 FAT32
/dev/sdc1 8192 7749631 3870720 b W95 FAT32
因为我电脑在中有2个硬盘,所以SD被分给了 /dev/sdc 的为止
2.指定到给那个设备分区;
$ sudo fdisk /dev/sdc
然后会显示
Command (m for help):接着开始分区
3.删除分区,创建分区,
Command (m for help): p
Disk /dev/sdc: 3967 MB, 3967811584 bytes
3 heads, 2 sectors/track, 1291605 cylinders, total 7749632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
3 heads, 2 sectors/track, 1291605 cylinders, total 7749632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 8192 7749631 3870720 b W95 FAT32
/dev/sdc1 8192 7749631 3870720 b W95 FAT32
Command (m for help): d
Selected partition 1
Selected partition 1
Command (m for help): p
Disk /dev/sdc: 3967 MB, 3967811584 bytes
3 heads, 2 sectors/track, 1291605 cylinders, total 7749632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
3 heads, 2 sectors/track, 1291605 cylinders, total 7749632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-7749631, default 2048): 2048
Last sector, +sectors or +size{K,M,G} (2048-7749631, default 7749631): 3000
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-7749631, default 2048): 2048
Last sector, +sectors or +size{K,M,G} (2048-7749631, default 7749631): 3000
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)
Selected partition 1
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)
Command (m for help): p
Disk /dev/sdc: 3967 MB, 3967811584 bytes
3 heads, 2 sectors/track, 1291605 cylinders, total 7749632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
3 heads, 2 sectors/track, 1291605 cylinders, total 7749632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 2048 3000 476+ b W95 FAT32
/dev/sdc1 2048 3000 476+ b W95 FAT32
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (1-4, default 2): 2
First sector (3001-7749631, default 3001): 3001
Last sector, +sectors or +size{K,M,G} (3001-7749631, default 7749631): 80000
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (1-4, default 2): 2
First sector (3001-7749631, default 3001): 3001
Last sector, +sectors or +size{K,M,G} (3001-7749631, default 7749631): 80000
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): b
Changed system type of partition 2 to b (W95 FAT32)
Partition number (1-4): 2
Hex code (type L to list codes): b
Changed system type of partition 2 to b (W95 FAT32)
Command (m for help): p
Disk /dev/sdc: 3967 MB, 3967811584 bytes
3 heads, 2 sectors/track, 1291605 cylinders, total 7749632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
3 heads, 2 sectors/track, 1291605 cylinders, total 7749632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 2048 3000 476+ b W95 FAT32
/dev/sdc2 3001 80000 38500 b W95 FAT32
/dev/sdc1 2048 3000 476+ b W95 FAT32
/dev/sdc2 3001 80000 38500 b W95 FAT32
已经分好2个区了,
5.接着保存分区
Command (m for help): w
The partition table has been altered!
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.
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
6.设置分区的属性
$ sudo partprobe /dev/sdc
$ sudo /sbin/mkdosfs -F 32 -n "ANDROID" /dev/sdc1
$ sudo /sbin/mkdosfs -F 32 -n "EXTERNAL" /dev/sdc1
android的文件移复制到SD中,上点启动。上面记录的是我操作的过程,最后的结果是没跑起来,看样子是boot阶段都没过。什么原因还在分析。