2016-4-16 周六;
ADB常用操作、fasboot烧写
安装USB驱动(Android adb驱动)
常用ADB操作
准备好platform-tools
基本工具
注意如果platform-tools
文件夹下的cmd.exe
运行报错的话,请将宿主机的cmd.exe
覆盖即可
启动开发板后
,连接OTG,打开cmd.exe,使用adb命令对开发板进行操作。
帮助命令
adb
services
查找设备命令
adb
devices
1 2 3 E : \T \platform - tools > adb devices List of devices attached 0123456789 ABCDEF device
登入Android的shell命令
adb
shell
返回使用exit
命令
ADB安装、卸载命令
安装应用
adb
install
<软件名>
安装之后会在Android的data/data下创建应用的包名com.
example.
hello
1 2 3 4 5 6 E:\T\platform-tools>adb install hello.apk 2248 KB/s (833416 bytes in 0.361s) pkg: /data/local/tmp/hello.apk Success E:\T\platform-tools>
卸载应用
adb
uninstall
应用的包名是com.
example.
hello
1 2 3 4 E:\T\platform-tools>adb uninstall com.example.hello Success E:\T\platform-tools>
从电脑上发送文件到设备
新建一个有内容的takethat.txt文档,方便测试
adb
push
<本地路径> <远程路径>
1 2 3 4 E :\T\platform-tools>adb push takethat.txt /data/data69 KB/s (284 bytes in 0 .003 s)E :\T\platform-tools>
从设备上下载文件到电脑
adb
pull
<开发板上文件路径> <目标电脑路径>
便于测试,先删除电脑上takethat.txt文档
1 2 3 4 E :\T\platform-tools>adb pull /data/data/takethat.txt50 KB/s (284 bytes in 0 .005 s)E :\T\platform-tools>
fastboot烧写Android
注意烧写android和烧写QtE
文件是一样的
从光盘拷贝出1.文件系统 ramdisk-uboot.img
、 system.img
、 Uboot镜像 u-boot-iTOP-4412.bin
内核镜像 zImage
到platform-tools
文件夹下
通电启动开发板,在HyperTerminal
立即 敲击回车键进入uboot (没有启动android、内核)
分区、格式化
分区
fdisk -c 0
1 2 3 4 5 6 7 8 9 iTOP-4412 .fdisk is completed partion 1 1340 4862616 2744544 0x0C 2 1026 37290 2103156 0x83 3 1026 2140446 2103156 0x83 4 302 4243602 619014 0x83 iTOP-4412
格式化
setp 1: # fatformat mmc 0:1
1 2 3 4 5 6 7 8 9 10 11 iTOP-4412 Start format MMC&d partition&d ... Partition1: Start Address(0x4a3298) , Size(0x29e0e0) ................................size checking ... Under 8G write FAT info: 32 Fat size : 0xa78 ..Erase FAT region................................................................. ................................................................................................................................................................................................................................................................................................................. .Partition1 format complete. iTOP-4412
step 2: # ext3format mmc 0:2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 iTOP-4412 Start format MMC0 partition2 ....** Partition2 is not ext2 file-system 0 ** Partition2: Start Address(0 x91aa), Size(0 x201774) Start ext2format... Wirte 0 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x91aa ....................................................................Erase inode table(0 ) - 0 x93ca.................. ...............d_indirect_point:0 xc2aa ..Wirte 1 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x491aa ....Erase inode table(1 ) - 0 x493ca.................. Wirte 2 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x891aa ..Erase inode table(2 ) - 0 x891ba.................. Wirte 3 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 xc91aa ....Erase inode table(3 ) - 0 xc93ca.................. Wirte 4 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x1091aa ..Erase inode table(4 ) - 0 x1091ba.................. Wirte 5 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x1491aa ....Erase inode table(5 ) - 0 x1493ca.................. Wirte 6 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x1891aa ..Erase inode table(6 ) - 0 x1891ba.................. Wirte 7 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x1c91aa ....Erase inode table(7 ) - 0 x1c93ca.................. Wirte 8 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x2091aa ..Erase inode table(8 ) - 0 x2091ba.................. iTOP-4412
setp 3 # ext3format mmc 0:3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 iTOP-4412 Start format MMC0 partition3 ....** Partition3 is not ext2 file-system 0 ** Partition3: Start Address(0 x20a91e), Size(0 x201774) Start ext2format... Wirte 0 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x20a91e ....................................................................Erase inode table(0 ) - 0 x20ab3e.................. ...............d_indirect_point:0 x20da1e ..Wirte 1 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x24a91e ....Erase inode table(1 ) - 0 x24ab3e.................. Wirte 2 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x28a91e ..Erase inode table(2 ) - 0 x28a92e.................. Wirte 3 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x2ca91e ....Erase inode table(3 ) - 0 x2cab3e.................. Wirte 4 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x30a91e ..Erase inode table(4 ) - 0 x30a92e.................. Wirte 5 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x34a91e ....Erase inode table(5 ) - 0 x34ab3e.................. Wirte 6 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x38a91e ..Erase inode table(6 ) - 0 x38a92e.................. Wirte 7 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x3ca91e ....Erase inode table(7 ) - 0 x3cab3e.................. Wirte 8 /9 block-group Reserved blocks for jounaling : 8202 Start write addr : 0 x40a91e ..Erase inode table(8 ) - 0 x40a92e.................. iTOP-4412
step4: # ext3format mmc 0:4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 iTOP-4412 Start format MMC0 partition4 ....** Partition4 is not ext2 file-system 0 ** Partition4: Start Address(0 x40c092), Size(0 x97206) Start ext2format... Wirte 0 /3 block-group Reserved blocks for jounaling : 4102 Start write addr : 0 x40c092 ......................Erase inode table(0 ) - 0 x40c142............................ ...........d_indirect_point:0 x40fb12 ..Wirte 1 /3 block-group Reserved blocks for jounaling : 4102 Start write addr : 0 x44c092 ....Erase inode table(1 ) - 0 x44c142............................ Wirte 2 /3 block-group Reserved blocks for jounaling : 4102 Start write addr : 0 x48c092 ..Erase inode table(2 ) - 0 x48c0a2............................
连接:
fastboot
1 2 3 4 5 6 7 8 9 10 11 iTOP-4412 # fastboot [Partition table on MoviNAND] ptn 0 name ='bootloader' start =0x0 len =N/A (use hard-coded info. (cmd: movi)) ptn 1 name ='kernel' start =N/A len =N/A (use hard-coded info. (cmd: movi)) ptn 2 name ='ramdisk' start =N/A len =0x300000(~3072KB) (use hard-coded info. (cmd: movi)) ptn 3 name ='Recovery' start =N/A len =0x600000(~6144KB) (use hard-coded info. (cmd: movi)) ptn 4 name ='system' start =0x1235400 len =0x402EE800(~1051578KB) ptn 5 name ='userdata' start =0x41523C00 len =0x402EE800(~1051578KB) ptn 6 name ='cache' start =0x81812400 len =0x12E40C00(~309507KB) ptn 7 name ='fat' start =0x94653000 len =0x53C1C000(~1372272KB) Insert a OTG cable into the connector!
在platform-tools
文件夹下运行cmd.exe
烧写uboot(由于已经烧写,则跳过)
fastboot.exe bootloader u-boot-iTOP-4412.bin
烧写zImage内核命令
fastboot.exe flash kernel zImage
注意串口不能被其他手机助手软件占用
1 2 3 4 5 6 E:\T\platform-tools>fastboot.exe flash kernel zimage sending 'kernel' (3903 KB)...OKAY [ 0.584 s] writing 'kernel' ...OKAY [ 0.403 s] finished. total time: 0.988 s
烧写ramdisk
fastboot.exe flash ramdisk ramdisk-uboot.img
1 2 3 4 5 6 7 8 E:\T\platform-tools>fastboot.exe flash ramdisk ramdisk-uboot.img sending 'ramdisk' (900 KB)... OKAY [ 0.144s] writing 'ramdisk' ... OKAY [ 0.081s] finished. total time : 0.225s E:\T\platform-tools>
烧写system文件系统
fastboot.exe flash system system.img
烧写时间稍微长一点可通过HyperTerminal
观察
1 2 3 4 5 6 7 8 E:\T\platform-tools>fastboot.exe flash system system .img sending 'system' (220323 KB)...OKAY [ 32.547 s] writing 'system' ...OKAY [ 32.626 s] finished. total time: 65.174 s E:\T\platform-tools>
输入擦除命令(擦除android用户文件)
fastboot -w
1 2 3 4 5 6 E:\T\platform-tools>fastboot -w erasing 'userdata' ...OKAY [ 1.948 s] erasing 'cache' ...OKAY [ 0.966 s] finished. total time: 2.915 s
重启开发板1 2 3 4 E :\T\platform-tools>fastboot rebootrebooting ...finished . total time: 0 .003 s
第一次Android启动需要解压和安装一些初始化文件,花费时间上一些。
1 2 [ 51.926556] acc_open[ 51.927284] acc_release
表明android起来了
制作可以烧写的TF卡
TF卡烧写方式可以烧写Android系统和Qt系统
烧写Ubuntu 预备:
插入TF卡到开发板上,进入UBOOT模式即
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 In: serial Out: serial Err: serial eMMC OPEN Success.!! !!!Notice!!! !You must close eMMC boot Partition after all image writing! !eMMC boot partition has continuity at image writing time.! !So, Do not close boot partition, Before, all images is written.! MMC read: dev # 0 , block # 48 , count 16 ...16 blocks read: OK eMMC CLOSE Success.!! Checking Boot Mode ... EMMC4.41 SYSTEM ENTER NORMAL BOOT MODE Hit any key to stop autoboot: 0 iTOP-4412 # iTOP-4412 #
Uboot版本
1 2 3 iTOP -4412 # version U -Boot 2010 .03 -dirty (Nov 13 2015 - 02 :04 :01 ) for iTOP-4412 Android
给TF卡
进行分区格式化:
iTOP-4412 # fdisk -c 1 2700 50 50
格式大小为2.7G、50M、50M
iTOP-4412 # fatformat mmc 1:1
iTOP-4412 # ext3format mmc 1:2
操作完后TF卡只剩下 11.6G,格式为FAT32
在PC上的ubuntu识别TF卡分区
1 2 3 4 5 6 7 8 9 10 11 topeet@ubuntu:~$ df -l Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 60894268 9292296 48508724 17% / udev 1747508 4 1747504 1% /dev tmpfs 702712 852 701860 1% /run none 5120 0 5120 0% /run/lock none 1756776 152 1756624 1% /run/shm /dev/sdc3 49584 4140 42884 9% /media/48037b11-e7dd-53aa-85b8-b8c6ead456a1 /dev/sdc4 49584 4140 42884 9% /media/b980254d-585b-c427-f635-620295108e60 /dev/sdc2 2721368 69664 2513464 3% /media/fbeb2efa-9ac6-ccd4-ffe2-6baf9ebd0a8a /dev/sdc1 12220736 24 12220712 1% /media/0000-3333
ubuntu文件系统拷贝到PC下的ubuntu内,并拷贝到TF卡内
1 root@ubuntu :/home/topeet
主要拷贝错误的位置,请拷贝到2.7G里,可以执行df -m
以MB查看空间
如何少写完程序,开发板老是重新启动 很有可能是这部操作错误
直接在TF卡目录下解压
1 root@ubuntu :/media/fbeb2efa- 9 ac6-ccd4-ffe2-6 baf9ebd0a8a
将TF卡插入PC宿主系统上将iTOP4412_ubuntu_12.04_for_HDMI_20141230.tar
、 u-boot-iTOP-4412.bin
zImage
zImage_sd
拷贝到TF卡上新建的F:\sdupdate
上
给EMMC分区
将TF卡插入开发板上并进入UBOOT模式
fdisk -c 0 2700 300 300
分区后烧写uboot和zImage_sd
sdfuse flash bootloader u-boot-iTOP-4412.bin
sdfuse flash kernel zImage_sd
reset
重启命令
在超级中断进入ubuntu:进入MMC中的sdupdate文件中
1 2 3 4 5 6 7 8 9 10 11 12 13 14 root@iTOP4412-ubuntu-desktop:~ Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 2721368 2026316 556812 79% / none 323312 4 323308 1% /dev none 64664 684 63980 2% /run none 5120 0 5120 0% /run/lock none 323312 24 323288 1% /run/shm /dev/mmcblk0p1 398208 4 398204 1% /media/0000-3333 /dev/mmcblk1p1 12220736 524216 11696520 5% /media/0000-3333_ /dev/mmcblk0p3 299780 16576 267732 6% /media/83ffefcb-22da-c864-fa72-2c81994dcb5b /dev/mmcblk1p4 49584 4140 42884 9% /media/b980254d-585b-c427-f635-620295108e60 /dev/mmcblk1p3 49584 4140 42884 9% /media/48037b11-e7dd-53aa-85b8-b8c6ead456a1 /dev/mmcblk0p2 2723396 69664 2515388 3% /media/a7da13a7-46b5-b281-e48f-505c836ab578 /dev/mmcblk0p4 299780 16576 267732 6% /media/0aaa3cb8-6fc6-db92-475f-796de6391848
如果没有/media挂在,请重复执行df -l
刷新查看
迅速查找相关文件
1 2 3 root@iTOP4412-ubuntu-desktop:/media# find / -name iT* /iTOP4412_ubuntu_12.04 _for_LCD_20141230.tar.gz /media/ 0000 -3333 _/sdupdate/i TOP4412_ubuntu_12.04 _for_LCD_20141230.tar.gz
将sdupdate下的iTOP4412_ubuntu_12.04_for_LCD_20141230.tar.gz拷贝到2.7G的eMMC
1 /dev/mmcblk0p2 2723396 69664 2515388 3 % /media/a7da13a7-46b5 -b281-e48f-505c836ab578
并解压
重新启动后进入uboot模式下
再烧写
重启后 就完全把ubuntu烧写到eMMC下了。
TF卡分区格式化Log
iTOP-4412 # fdisk -c 1 2700 50 50
1 2 3 4 5 6 7 8 iTOP-4412 .fdisk is completed partion 1 11946 5767168 24465408 0x0C 2 2700 32768 5529600 0x83 3 50 5562368 102400 0x83 4 50 5664768 102400 0x83
fatformat mmc 1:1
1 2 3 4 5 6 7 8 9 10 iTOP-4412 Start format MMC&d partition&d ... Partition1: Start Address(0x580000) , Size(0x1755000) ................................size checking ... Under 16G write FAT info: 32 Fat size : 0x2eaa ..Erase FAT region................................................................................................. ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... .Partition1 format complete.
ext3format mmc 1:2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 iTOP-4412 Start format MMC1 partition2 ....** Partition2 is not ext2 file-system 1 ** Partition2: Start Address(0 x8000), Size(0 x546000) Start ext2format... Wirte 0 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x8000 ................................................................................................................... .........................................................Erase inode table(0 ) - 0 x8560.................... ........................d_indirect_point:0 xb550 ..Wirte 1 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x48000 ....Erase inode table(1 ) - 0 x48560.................... Wirte 2 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x88000 ..Erase inode table(2 ) - 0 x88010.................... Wirte 3 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 xc8000 ....Erase inode table(3 ) - 0 xc8560.................... Wirte 4 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x108000 ..Erase inode table(4 ) - 0 x108010.................... Wirte 5 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x148000 ....Erase inode table(5 ) - 0 x148560.................... Wirte 6 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x188000 ..Erase inode table(6 ) - 0 x188010.................... Wirte 7 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x1c8000 ....Erase inode table(7 ) - 0 x1c8560.................... Wirte 8 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x208000 ..Erase inode table(8 ) - 0 x208010.................... Wirte 9 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x248000 ....Erase inode table(9 ) - 0 x248560.................... Wirte 10 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x288000 ..Erase inode table(10 ) - 0 x288010.................... Wirte 11 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x2c8000 ..Erase inode table(11 ) - 0 x2c8010.................... Wirte 12 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x308000 ..Erase inode table(12 ) - 0 x308010.................... Wirte 13 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x348000 ..Erase inode table(13 ) - 0 x348010.................... Wirte 14 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x388000 ..Erase inode table(14 ) - 0 x388010.................... Wirte 15 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x3c8000 ..Erase inode table(15 ) - 0 x3c8010.................... Wirte 16 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x408000 ..Erase inode table(16 ) - 0 x408010.................... Wirte 17 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x448000 ..Erase inode table(17 ) - 0 x448010.................... Wirte 18 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x488000 ..Erase inode table(18 ) - 0 x488010.................... Wirte 19 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x4c8000 ..Erase inode table(19 ) - 0 x4c8010.................... Wirte 20 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x508000 ..Erase inode table(20 ) - 0 x508010.................... Wirte 21 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x548000 ..Erase inode table(21 ) - 0 x548010....................
EMMC分区log fdisk -c 0 2700 300 300
1 2 3 4 5 6 7 iTOP-4412 .fdisk is completed partion 1 389 6809154 798006 0x0C 2 2702 37290 5533836 0x83 3 302 5571126 619014 0x83
fatformat mmc 0:1
1 2 3 4 5 6 7 8 9 iTOP-4412 Start format MMC&d partition&d ... Partition1: Start Address(0x67e642) , Size(0xc2d36) ................................size checking ... Under 8G write FAT info: 32 Fat size : 0x30b ..Erase FAT region............................................................................................................ .Partition1 format complete.
ext3format mmc 0:2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 iTOP-4412 Start format MMC0 partition2 ....** Partition2 is not ext2 file-system 0 ** Partition2: Start Address(0 x91aa), Size(0 x54708c) Start ext2format... Wirte 0 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x91aa ............................................................................................................................................................................Erase inode table(0 ) - 0 x970a.................... ........................d_indirect_point:0 xc702 ..Wirte 1 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x491aa ....Erase inode table(1 ) - 0 x4970a.................... Wirte 2 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x891aa ..Erase inode table(2 ) - 0 x891ba.................... Wirte 3 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 xc91aa ....Erase inode table(3 ) - 0 xc970a.................... Wirte 4 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x1091aa ..Erase inode table(4 ) - 0 x1091ba.................... Wirte 5 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x1491aa ....Erase inode table(5 ) - 0 x14970a.................... Wirte 6 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x1891aa ..Erase inode table(6 ) - 0 x1891ba.................... Wirte 7 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x1c91aa ....Erase inode table(7 ) - 0 x1c970a.................... Wirte 8 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x2091aa ..Erase inode table(8 ) - 0 x2091ba.................... Wirte 9 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x2491aa ....Erase inode table(9 ) - 0 x24970a.................... Wirte 10 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x2891aa ..Erase inode table(10 ) - 0 x2891ba.................... Wirte 11 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x2c91aa ..Erase inode table(11 ) - 0 x2c91ba.................... Wirte 12 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x3091aa ..Erase inode table(12 ) - 0 x3091ba.................... Wirte 13 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x3491aa ..Erase inode table(13 ) - 0 x3491ba.................... Wirte 14 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x3891aa ..Erase inode table(14 ) - 0 x3891ba.................... Wirte 15 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x3c91aa ..Erase inode table(15 ) - 0 x3c91ba.................... Wirte 16 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x4091aa ..Erase inode table(16 ) - 0 x4091ba.................... Wirte 17 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x4491aa ..Erase inode table(17 ) - 0 x4491ba.................... Wirte 18 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x4891aa ..Erase inode table(18 ) - 0 x4891ba.................... Wirte 19 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x4c91aa ..Erase inode table(19 ) - 0 x4c91ba.................... Wirte 20 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x5091aa ..Erase inode table(20 ) - 0 x5091ba.................... Wirte 21 /22 block-group Reserved blocks for jounaling : 16402 Start write addr : 0 x5491aa ..Erase inode table(21 ) - 0 x5491ba....................
ext3format mmc 0:3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 iTOP-4412 Start format MMC0 partition3 ....** Partition3 is not ext2 file-system 0 ** Partition3: Start Address(0 x550236), Size(0 x97206) Start ext2format... Wirte 0 /3 block-group Reserved blocks for jounaling : 4102 Start write addr : 0 x550236 ......................Erase inode table(0 ) - 0 x5502e6............................ ...........d_indirect_point:0 x553cb6 ..Wirte 1 /3 block-group Reserved blocks for jounaling : 4102 Start write addr : 0 x590236 ....Erase inode table(1 ) - 0 x5902e6............................ Wirte 2 /3 block-group Reserved blocks for jounaling : 4102 Start write addr : 0 x5d0236 ..Erase inode table(2 ) - 0 x5d0246...........................
ext3format mmc 0:4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 iTOP-4412 Start format MMC0 partition4 ....** Partition4 is not ext2 file-system 0 ** Partition4: Start Address(0 x5e743c), Size(0 x97206) Start ext2format... Wirte 0 /3 block-group Reserved blocks for jounaling : 4102 Start write addr : 0 x5e743c ......................Erase inode table(0 ) - 0 x5e74ec............................ ...........d_indirect_point:0 x5eaebc ..Wirte 1 /3 block-group Reserved blocks for jounaling : 4102 Start write addr : 0 x62743c ....Erase inode table(1 ) - 0 x6274ec............................ Wirte 2 /3 block-group Reserved blocks for jounaling : 4102 Start write addr : 0 x66743c ..Erase inode table(2 ) - 0 x66744c...........................
烧写uboot与zImage_sd的日志 sdfuse flash bootloader u-boot-iTOP-4412.bin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 iTOP-4412 # sdfuse flash bootloader u-boot-iTOP-4412. bin SD sclk_mmc is 400 K HZ SD sclk_mmc is 50000 K HZ SD sclk_mmc is 50000 K HZ [Fusing Image from SD Card.] [Partition table on MoviNAND] ptn 0 name ='bootloader' start=0x0 len=N/A (use hard-coded info . (cmd: movi)) ptn 1 name ='kernel' start=N/A len=N/A (use hard-coded info . (cmd: movi)) ptn 2 name ='ramdisk' start=N/A len=0x300000 (~3072 KB) (use hard-coded info . (cmd: movi)) ptn 3 name ='Recovery' start=N/A len=0x600000 (~6144 KB) (use hard-coded info . (cmd: movi)) ptn 4 name ='system' start=0x1235400 len=0xA8E11800 (~2766918 KB) ptn 5 name ='userdata' start=0xAA046C00 len=0x12E40C00 (~309507 KB) ptn 6 name ='cache' start=0xBCE87800 len=0x12E40C00 (~309507 KB) ptn 7 name ='fat' start=0xCFCC8400 len=0x185A6C00 (~399003 KB) Partition : bootloader, File: /sdupdate/u-boot-iTOP-4412. bin Partition1: Start Address(0x580000 ), Size(0x1755000 ) reading /sdupdate/u-boot-iTOP-4412. bin 454656 (0x0006f000 ) bytes read flashing 'bootloader' writing bootloader.. 0 , 1038 eMMC OPEN Success.!! !!!Notice !!! !You must close eMMC boot Partition after all image writing! !eMMC boot partition has continuity at image writing time .! !So, Do not close boot partition , Before , all images is written.! MMC write : dev # 0 , block # 0 , count 1038. 1038 blocks write finish 1038 blocks verify1: OK eMMC CLOSE Success.!! completed partition 'bootloader' flashed
sdfuse flash kernel zImage_sd
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 iTOP-4412 # sdfuse flash kernel zImage_sd SD sclk_mmc is 400K HZ SD sclk_mmc is 50000K HZ SD sclk_mmc is 50000K HZ [Fusing Image from SD Card.] [Partition table on MoviNAND] ptn 0 name ='bootloader' start =0x0 len =N/A (use hard-coded info. (cmd: movi)) ptn 1 name ='kernel' start =N/A len =N/A (use hard-coded info. (cmd: movi)) ptn 2 name ='ramdisk' start =N/A len =0x300000(~3072KB) (use hard-coded info. (cmd: movi)) ptn 3 name ='Recovery' start =N/A len =0x600000(~6144KB) (use hard-coded info. (cmd: movi)) ptn 4 name ='system' start =0x1235400 len =0xA8E11800(~2766918KB) ptn 5 name ='userdata' start =0xAA046C00 len =0x12E40C00(~309507KB) ptn 6 name ='cache' start =0xBCE87800 len =0x12E40C00(~309507KB) ptn 7 name ='fat' start =0xCFCC8400 len =0x185A6C00(~399003KB) Partition: kernel, File: /sdupdate/zImage_sd Partition1: Start Address(0x580000), Size(0x1755000) reading /sdupdate/zImage_sd 4009704 (0x003d2ee8) bytes read flashing 'kernel' writing kernel.. 1120, 12288 MMC write: dev # 0, block # 1120, count 12288. 12288 blocks write finish 12288 blocks written: OK completed partition 'kernel' flashed
搭建最小系统 配置Busybox
进入配置busybox界面 在ubuntu新建一个目录,将busybox拷贝进去,并解压
执行
1 root@ubuntu :~/busybox/busybox- 1_25_0
进入配置busybox的界面
配置编译器
make menuconfig
Busybox Settings —>Cross Compiler prefix —>arm-none-linux-gnueabi-
配置二进制文件安装目录
Installation Options (“make install” behavior) —> (./_install) BusyBox installation prefix (NEW) —>../system
在SecurtCRT按键盘CTRL+backspace即可删除字符
退出并保存
编译和安装Busybox
先确认 宿主linux是编译器是arm-
1 export PATH =$PATH :/usr/local/arm/arm- 2009 q3/bin
执行make编译Busybox
注意使用busybox-1_25_0.tar.gz作为编译,可能会报错
1 2 3 4 5 6 miscutils/nandwrite.c: In function miscutils/nandwrite.c:151 : error : miscutils/nandwrite.c:151 : error : (Each undeclared identifier is reported only once miscutils/nandwrite.c:151 : error : for each function it appears in .) make[1 ]: *** [miscutils/nandwrite.o] Error 1 make: *** [miscutils] Error 2
安装
返回上一级则有system
这个文件
继续完善最小系统 在system目录下新建文件夹
1 root@ubuntu :~/busybox/system
在etc目录里下新建文件夹
1 root@ubuntu :~/busybox/system/etc
在新创建的文件init.d继续再次创建文件夹
1 root@ubuntu :~/busybox/system/etc/rc .d
返回system目录下进入var目录再新建文件夹
1 root@ubuntu :~/busybox/system/var
将eth0-setting passwd profile三个文件拷贝进去,将文件的权限改为755
1 root@ubuntu :~/busybox/system/etc
进入system目录下的etc目录里将 将ifconfig-eth0和rcS两个文件拷贝进去,将文件的权限改为755。
进入 etc/rc.d/init.d目录
返回到system目录下,进入lib文件夹下将编译器的库文件复制到该目录下:
1 root@ubuntu:~/busybox/ system/lib# cp /u sr/local/ arm/arm-2009q3/ arm-none-linux-gnueabi/libc/ lib/* ./
用打包工具使用make_ext4fs打包成二进制文件
生成了img文件。
开始烧写最小系统
1.