⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.smc91111_eeprom

📁 u-boot-1.1.6 源码包
💻 SMC91111_EEPROM
字号:
This is the readme for the Das U-Boot standalone program smc91111The main purpose of this is to manage MAC addresses on platformswhich include the SMC91111 integrated 10/100 MAC Phy, with attachedEEPROMs.Contents:------------------------1. Ensuring U-boot's MAC address can be set in hardware2. Running the smc91111_eeprom program3. Setting MAC addresses4. Other things you can do with this5. Things to be done.1. Ensuring U-boot's MAC address can be set in hardware--------------------------------------------------------------------------On the Internet - MAC addresses are very important. Short for MediaAccess Control address, a hardware address that uniquely identifieseach node of a network. When things are not unique - bad thingscan happen.  This is why U-Boot makes it difficult to change MACaddresses.To find out who has a MAC address, or to purchase MAC addresses, gotothe IEEE, at:http://standards.ieee.org/regauth/oui/index.shtmlTo change your MAC address, there can not be a MAC address predefined inU-Boot. To ensure that this does not occur, check yourinclude/configs/<board_name>.h file, and check to see that the followingsettings are _not_ or commented out there.#define HARDCODE_MAC			1#define CONFIG_ETHADDR			02:80:ad:20:31:b8The purpose of HARDCODE_MAC is to hardcode the MAC address in software,(not what we want), or to preset it to 02:80:ad:20:31:b8 (not what wewant either).You can check this in a running U-Boot, by doing a power cycle, thenbefore U-Boot tries to do any networking, running the 'printenv' command  BOOT> printenv  ethaddr=02:80:ad:20:31:b8If you see the 'ethaddr' variable show up, like the above, you need torecompile U-Boot, with the above settings commented out of theinclude/configs/<board_name>.h file.2. Running the smc91111_eeprom program---------------------------------------------------------------------After Uboot is compiled, there should be three files of interest:-rwxr-xr-x    1		8806 2004-10-11 14:00 smc91111_eeprom	    <- ELF-rwxr-xr-x    1		3440 2004-10-11 14:00 smc91111_eeprom.bin   <- BIN-rwxr-xr-x    1		9524 2004-10-11 14:00 smc91111_eeprom.srec  <- SRECif there is not, check the examples/Makefile, and ensure there is somethinglike for your architecture:   ifeq ($(ARCH),blackfin)   SREC	  += smc91111_eeprom.srec   BIN	  += smc91111_eeprom.bin smc91111_eeprom   endifTo load the files: there are two methods: a) serial or b) network. Sinceit is not a good idea to start doing things on the network before theMAC address is set, this example will do things over serial.a) Loading the elf file via the serial port--------------------------------------------Loading the elf is very easy - just ensure that the locationyou specify things to load as is not the load address specifiedin the Makefile.BOOT> loadb 0x1000000## Ready for binary (kermit) download to 0x01000000 at 57600 bps...(type CNTL-\ then C)(Back at local machine)----------------------------------------------------Kermit>send ~/u-boot_1.1.1/examples/smc91111_eepromKermit>connectConnecting to /dev/ttyS0, speed 57600 Escape character: Ctrl-\ (ASCII 28, FS): enabledType the escape character followed by C to get back,or followed by ? to see other options.----------------------------------------------------## Total Size	   = 0x00002266 = 8806 Bytes## Start Addr	   = 0x01000000BOOT> bootelf 0x1000000Loading .text @ 0x00001000 (3440 bytes)## Starting application at 0x000010d8 ...SMC91111>b) Loading the binary file via the serial port-----------------------------------------------For many toolchains, the entry point is not the load point.The Load point is a hard coded address from theexamples/Makefile. The entry point can be found by doing somethinglike:  u-boot_1.1.1/examples> bfin-elf-objdump -d smc91111_eeprom |less  smc91111_eeprom:     file format elf32-bfin  Disassembly of section .text:  00001000 <smc91111_eeprom-0xd8>:      1000:  000010d8 <smc91111_eeprom>:You can see that the entry point (or the address that should bejumped to is 0x10d8). This is also the same as the entry pointof the elf file.Now we load it to the actual load location:BOOT> loadb 0x1000## Ready for binary (kermit) download to 0x00001000 at 57600 bps...(Back at pinky.dsl-only.net)----------------------------------------------------Kermit>send /tftpboot/eeprom.binKermit>connectConnecting to /dev/ttyS0, speed 57600 Escape character: Ctrl-\ (ASCII 28, FS): enabledType the escape character followed by C to get back,or followed by ? to see other options.----------------------------------------------------## Total Size	   = 0x00000d70 = 3440 Bytes## Start Addr	   = 0x00001000BOOT> go 0x10D8## Starting application at 0x000010D8 ...SMC91111>3. Setting MAC addresses--------------------------------------------------------------------------The MAC address can be stored in four locations:-Boot environmental variable in Flash <- can not change, without					  re-flashing U-boot.U-Boot environental variable	       <- can not change, without					  resetting board/U-BootLAN91C111 Registers		       <- volitleLAN91C111 EEPROM		       <- Non VolitleIf you have not activated the network, and do not have a hardcodedor pre-assigned MAC address in U-boot, the environmental variablesshould be blank, and allow you to set things one time.To set the EEPROM MAC address to 12:34:56:78:9A:BCSMC91111> W E 20 3412Writing EEPROM register 20 with 3412SMC91111> W E 21 7856Writing EEPROM register 21 with 7856SMC91111> W E 22 BC9AWriting EEPROM register 22 with bc9aEEPROM contents copied to MACSMC91111> PCurrent MAC Address in SMSC91111 12:34:56:78:9a:bcCurrent MAC Address in EEPROM	 12:34:56:78:9a:bc(CNTRL-C to exit)SMC91111> ## Application terminated, rc = 0x0BOOT> resetU-Boot 1.1.1 (gcc version: 3.3.3)Release Version Beta released on Oct 10 2004 - 00:34:35Blackfin support by LG Soft IndiaFor further information please check this link http://www.blackfin.uclinux.orgBOOT> ping 192.168.0.4Using MAC Address 12:34:56:78:9A:BChost 192.168.0.4 is alive4. Other things that you can do--------------------------------------------------------------------------After the stand alone application is running, there are a few options: - P : Print the MAC - D : Dump the LAN91C111 EEPROM contents - M : Dump the LAN91C111 MAC contents - C : Copies the MAC address from the EEPROM to the LAN91C111 - W : Write a register in the EEPROM or in the MACSMC91111> PCurrent MAC Address in SMSC91111 12:34:56:78:9a:bcCurrent MAC Address in EEPROM	 12:34:56:78:9a:bcSMC91111> DIOS2-0	  000	  001	  002	  003	  004	  005	  006	  007CONFIG 00:ffff 04:ffff 08:ffff 0c:ffff 10:ffff 14:ffff 18:ffff 1c:ffffBASE   01:ffff 05:ffff 09:ffff 0d:ffff 11:ffff 15:ffff 19:ffff 1d:ffff       02:ffff 06:ffff 0a:ffff 0e:0020 12:ffff 16:ffff 1a:ffff 1e:ffff       03:ffff 07:ffff 0b:ffff 0f:ffff 13:ffff 17:ffff 1b:ffff 1f:ffff20:3412 21:7856 22:bc9a 23:ffff 24:ffff 25:ffff 26:ffff 27:ffff28:ffff 29:ffff 2a:ffff 2b:ffff 2c:ffff 2d:ffff 2e:ffff 2f:ffff30:ffff 31:ffff 32:ffff 33:ffff 34:ffff 35:ffff 36:ffff 37:ffff38:ffff 39:ffff 3a:ffff 3b:ffff 3c:ffff 3d:ffff 3e:ffff 3f:ffffSMC91111> M    Bank0 Bank1 Bank2 Bank300  0000  a0b1	3332  000002  0000  1801	8000  000004  0000  3412	8080  000006  0000  7856	003f  000008  0404  bc9a	02df  33320a  0000  ffff	02df  33910c  0000  1214	0004  001f0e  3300  3301	3302  3303SMC91111> CEEPROM contents copied to MACSMC91111> W E 2A ABCDWriting EEPROM register 2a with abcdSMC91111> W M 14 FF00Writing MAC register bank 1, reg 04 with ff00

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -