工具下载:http://download.csdn.net/detail/zn2857/9637426
1.连接开发板和和pc之间的usb转串口线,usb线,在pc端打开vim,启动minicom
2.使用sd卡启动开发板,进入uboot
3.输入dnw,会有如下提示
TINY4412 # dnw
OTG cable Connected!
Now, Waiting for DNW to transmit data
4.在pc中打开新的vim,输入lsusb,会有如下提示
ning@ENVY:/tiny4412/linux-3.5$ lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 1bcf:2c0e Sunplus Innovation Technology Inc.
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 003 Device 032: ID 04e8:1234 Samsung Electronics Co., Ltd
Bus 003 Device 002: ID 0458:003a KYE Systems Corp. (Mouse Systems) NetScroll+ Mini Traveler / Genius NetScroll 120
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
记住ID 04e8:1234 Samsung Electronics Co., Ltd 中的04e8:1234
5.解压下载的dnw
进入驱动目录
ning@ENVY:/$ cd /tiny4412/dnw-linux/src/driver/
打开驱动文件
ning@ENVY:/tiny4412/dnw-linux/src/driver$ vim secbulk.c
将idProduct和idVendor改为USB_DEVICE(0x04e8, 0x1234)
6.进入dnw目录
ning@ENVY:/tiny4412/dnw-linux/src/driver$ cd ../dnw/
修改下载地址
*((u_int32_t*)write_buf) = 0xc0000000;
记住这个地址,待会dnw会下载至这个地址,然后从这个地址拷贝
7.make 编译
8.拷贝dnw到制定目录
ning@ENVY:/tiny4412/dnw-linux/src/dnw$sudo cp dnw /usr/bin/
9.装载驱动
ning@ENVY:/tiny4412/dnw-linux/src/dnw$ cd ../driver/
ning@ENVY:/tiny4412/dnw-linux/src/driver$ sudo insmod secbulk.ko
为了不每次都装载可以打开
ning@ENVY:/tiny4412/dnw-linux/src/driver$sudo gedit /etc/init.d/rc.local
在文件中加入 sudo insmod /tiny4412/dnw-linux/src/driver/secbulk.ko
10.
dmesg(注意此时开发板依然显示OTG cable Connected!Now, Waiting for DNW to transmit data)
[20267.799664] secbulk:secbulk disconnected!
[20267.799881] secbulk:secbulk unloaded
[20274.612980] secbulk:secbulk loaded
[20274.613033] secbulk:secbulk probing...
[20274.613038] secbulk:bulk out endpoint found!
11.开发板操作
TINY4412 # fdisk -p 1
partion # size(MB) block start # block count partition_Id
1 695 6070812 1424478 0x0C
2 320 134244 656304 0x83
3 2057 790548 4213770 0x83
4 520 5004318 1066494 0x83
分区
TINY4412 # fdisk -c 1 320 2057 520
成功后有如下信息
Count: 10000
fdisk is completed
partion # size(MB) block start # block count partition_Id
1 695 6070812 1424478 0x0C
2 320 134244 656304 0x83
3 2057 790548 4213770 0x83
4 520 5004318 1066494 0x83
格式化emmc
TINY4412 # fatformat mmc 1:1
TINY4412 # ext3format mmc 1:2
TINY4412 # ext3format mmc 1:3
TINY4412 # ext3format mmc 1:4
打开emmc
TINY4412 # emmc open 1
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.!
第一步:在开发板输入dnw,等待pc端dnw传过来数据
TINY4412 # dnw
OTG cable Connected!
Now, Waiting for DNW to transmit data
第二步:在pc端用dnw传输数据
ning@ENVY:/tiny4412/uboot_tiny4412-master$ sudo dnw sd_fuse/tiny4412/E4412_N.bl1.bin
Filename : sd_fuse/tiny4412/E4412_N.bl1.bin
Filesize : 8192 bytes
Sum is 63a1
Writing data ...
100 8202 bytes Done!
开发板接受完毕后会有下面的提示,确认成功后将E4412_N.bl1.bin烧录到emmc
Download Done!! Download Address: 0xc0000000, Download Filesize:0x2000
Checksum is being calculated.
Checksum O.K.
TINY4412 # mmc write 1 0xc0000000 0 0x10
MMC write: dev # 1, block # 0, count 16 ... 16 blocks written: OK
第三步:在开发板输入dnw,等待pc端dnw传过来数据
TINY4412 # dnw
OTG cable Connected!
Now, Waiting for DNW to transmit data
第四步:在pc端用dnw传输数据
ning@ENVY:/tiny4412/uboot_tiny4412-master$ sudo dnw sd_fuse/tiny4412/bl2.bin
Filename : sd_fuse/tiny4412/bl2.bin
Filesize : 14336 bytes
Sum is 70e3
Writing data ...
100 14346 bytes Done!
开发板接受完毕后会有下面的提示,确认成功后将bl2.bin 烧录到emmcDownload Done!! Download Address: 0xc0000000, Download Filesize:0x3800
Checksum is being calculated.
Checksum O.K.
TINY4412 # mmc write 1 0xc0000000 0x10 0x1c
MMC write: dev # 1, block # 16, count 28 ... 28 blocks written: OK
第五步:在开发板输入dnw,等待pc端dnw传过来数据
TINY4412 # dnw
OTG cable Connected!
Now, Waiting for DNW to transmit data
第六步:在pc端用dnw传输数据
ning@ENVY:/tiny4412/uboot_tiny4412-master$ sudo dnw u-boot.bin
Filename : u-boot.bin
Filesize : 276932 bytes
Sum is b70a
Writing data ...
100 276942 bytes Done!
开发板接受完毕后会有下面的提示,确认成功后将u-boot.bin 烧录到emmcDownload Done!! Download Address: 0xc0000000, Download Filesize:0x439c4
Checksum is being calculated.
Checksum O.K.
TINY4412 # mmc write 1 0xc0000000 0x30 0x21d
MMC write: dev # 1, block # 48, count 541 ... 541 blocks written: OK
第七步:在开发板输入dnw,等待pc端dnw传过来数据
TINY4412 # dnw
OTG cable Connected!
Now, Waiting for DNW to transmit data
第六步:在pc端用dnw传输数据
ning@ENVY:/tiny4412/uboot_tiny4412-master$ sudo dnw sd_fuse/tiny4412/E4412_tzsw.bin
Filename : sd_fuse/tiny4412/E4412_tzsw.bin
Filesize : 94208 bytes
Sum is de09
Writing data ...
100 94218 bytes Done!
开发板接受完毕后会有下面的提示,确认成功后将E4412_tzsw.bin 烧录到emmcDownload Done!! Download Address: 0xc0000000, Download Filesize:0x17000
Checksum is being calculated.
Checksum O.K.
TINY4412 # mmc write 1 0xc0000000 0x2c0 0xB8
MMC write: dev # 1, block # 704, count 184 ... 184 blocks written: OK
关闭emmc
TINY4412 # emmc close 1
eMMC CLOSE Success.!!
TINY4412 #
选择emmc启动开发板
OK
U-Boot 2010.12 (Sep 19 2016 - 20:22:54) for TINY4412
CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]
APLL = 1400MHz, MPLL = 800MHz
Board: TINY4412
DRAM: 1023 MiB
vdd_arm: 1.2
vdd_int: 1.0
vdd_mif: 1.1
BL1 version: N/A (TrustZone Enabled BSP)
Checking Boot Mode ... EMMC4.41
REVISION: 1.1
MMC Device 0: 3728 MB
MMC Device 1: 15193 MB
MMC Device 2: N/A
Net: No ethernet found.
Hit any key to stop autoboot: 0
reading kernel..device 0 Start 1057, Count 12288
MMC read: dev # 0, block # 1057, count 12288 ... 12288 blocks read: OK
completed
Boot with zImage
Starting kernel ...