天下无伤 发表于 2013-4-11 17:11:27

ok6410和ubuntu之间用tftp协议传输文件

昨天把ubuntu12.10底下的tftp服务器搭建好后今天就像试一下用OK6410来下载文件,下面是我的配置过程:

step1:在网上下载 u-boot-1.1.6-TQ6410.rar,即天嵌6410的uboot。用u-boot-1.1.6-TQ6410/driver/目录下的dm9000x.c和dm9000x.h两个文件替换ok6410的uboot的uboot1.1.6_256M/driver/目录下的dm9000x.c和dm9000x.h。
step2:修改smdk6410.h里配置网卡的相应代码目录为uboot1.1.6_256M/include/configs/smdk6410.h
         将网卡的配置部分改为如下内容
                      /*
                     * Hardware drivers
                     */
                      //#define CONFIG_DRIVER_SMC911X1/* we have a SMC9115 on-board */
                      //#define CONFIG_CH7033
                        #ifdef CONFIG_DRIVER_SMC911X
                        #undefCONFIG_DRIVER_CS8900
                        #define CONFIG_DRIVER_SMC911X_BASE0x18800300
                        #else
                        #define CONFIG_DRIVER_DM9000 1
                        #define CONFIG_DM9000_BASE 0x18000300 //0x20000300
                        #define DM9000_IO CONFIG_DM9000_BASE
                        #define DM9000_DATA (CONFIG_DM9000_BASE+4)
                        #define CONFIG_DM9000_USE_16BIT
                        #endif
step3:重新编译uboot
      make clean
      make smdk6410_config
      make
step4:烧写uboot 。
step5:重新启动,进入uboot界面配置好ipaddr、serverip、ethaddr
       setenv ipaddr 192.168.1.200
       setenv serverip 192.168.1.110
       setenv ethaddr00:40:52:26:0a:5b
       saveenv
step6:tftp传输
SMDK6410 # tftp c0008000 zImage   //我的下载目录是/home/yufeng/tftpshare,而在目录下有zImage 内核
Found DM9000 ID:90000a46 at address 18000300 !
DM9000 work in 16 bus width
bd->bi_entaddr: 00:40:5c:26:0a:5b
MAC:0:40:5c:26:a:5b:
TFTP from server 192.168.5.100; our IP address is 192.168.5.120
Filename 'zImage'.
Load address: 0xc0008000
Loading: T T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###################################################
done
Bytes transferred = 3586888 (36bb48 hex)
SMDK6410 #
页: [1]
查看完整版本: ok6410和ubuntu之间用tftp协议传输文件