Marvell 98DX3236系列交换机Uboot及内核文件烧写

1. 开发环境
开发板硬件相关
(1)交换机开发板型号:RD-XC3-24G4XG-B
(2)交换机CPU型号:98DX3236
(3)交换机PHY芯片型号:88E1680

开发板软件相关
(1)CPLD(LC4032V)程序:ac3_24p.jed
(2)I2C存储芯片(AT24C128B)程序:EEPROM-Demo.bin
(3)SPIflash芯片(MX25L25735EMI-12G)Uboot文件:SPI-DEMO.bin
(4)内核文件:ubifs_arm10.image

烧录工具及软件
(1)周立功烧录器SmartPRO T9000,配套软件SmartPRO 2008(用于向MX25L25735烧写Uboot文件);
(2)烧录器superpro-SP580U,配套软件SUPERPRO USB series(用于向AT24C128B烧写I2C存储芯片程序);

(3)LatticeUSB下载线,配套软件ispVM System(用于向LC4032V烧写CPLD程序)。


2. Uboot烧写
Uboot的烧写比较简单,采用烧录器将Uboot程序下载到SPIflash中即可。
在烧写时请注意以下几点:
(1)要确保烧录器选择的芯片型号与实际被烧写的芯片型号保持一致;
(2)已焊接过的SPIflash芯片需要使用洗板水清晰管脚上的松香,防止管脚与芯片座接触不良;
(3)为了确保二进制程序正确烧入芯片内,可以使用烧程软件读出被烧写的程序并与原始程序对比,如果内容一致则烧录成功;

在交换机使用Uboot进行硬件资源引导时,必须先确保I2C和CPLD已烧写正确程序,否则CPU无法正常工作,串口无如何信息输出。


3. 内核烧写
(1)将“ubifs_arm10.image”文件复制到FAT或FAT32格式的U盘,把该U盘插入板上的USB接口。
给开发板上电,当出现“Hit any key to stop autoboot”提示时,敲击键盘任意键并出现“Marvell>> ”,串口显示如下:

BootROM 1.41
Booting from SPI flash


General initialization - Version: 1.0.0
Serdes initialization - Version: 1.0.2
mvCtrlPexPolaritySet: TWSI Write failed, leaving PEX polarity in EP mode
PEX: pexIdx 0, detected no link
mvCtrlPexPolaritySet: TWSI Write failed, leaving PEX polarity in EP mode
PEX: pexIdx 0, detected no link
mvCtrlPexPolaritySet: TWSI Write failed, leaving PEX polarity in EP mode
PEX: pexIdx 0, detected no link
DDR3 Training Sequence - Ver TIP-1.22.0
mvHwsBoardIdGet: TWSI Read failed
DDR3 Training Sequence - Switching XBAR Window to FastPath Window 
Updated Physical Mem size is from 0x20000000 to 10000000
DDR3 Training Sequence - Ended Successfully
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2013.01-01788-g1ebef39 (Nov 10 2014 - 13:58:38) Marvell version: 2014_T3.0p2

Board: RD-XC3-24G-4SFPRD-XC3-24G-4SFP
SoC:   Alleycat3
CPU:   Marvell PJ4B (584) v7 (Rev 2) LE
       CPU    @ 800 [MHz]
       L2     @ 200 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 400 [MHz]
       DDR 16Bit Width, FastPath Memory Access, DLB Enabled
       DDR ECC Disabled
DRAM:  512 MiB

Map:   Code:            0x1fed3000:0x1ff96258
       BSS:             0x1ffef43c
       Stack:           0x1f9c2ef0
       Heap:            0x1f9c3000:0x1fed3000

NAND:  1024 MiB
MMC:   MRVL_MMC: 0
SF: Detected MX25L25735E with page size 64 KiB, total 32 MiB
PCI-e 0: Detected No Link.
FPU initialized to Run Fast Mode.
USB2.0 0: Host Mode
Net:   
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
No ethernet found.
Hit any key to stop autoboot:  0 
Marvell>> 

(2)在串口中输入“nand erase.chip”,对NANDflash进行擦除操作!

Marvell>> nand erase.chip
NAND erase.chip: device 0 whole chip
Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x00003ff80000, version 0x01
Bad block table written to 0x00003ff00000, version 0x01
Skipping bad block at  0x3fc00000                                          
Skipping bad block at  0x3fc80000                                          
Skipping bad block at  0x3fd00000                                          
Skipping bad block at  0x3fd80000                                          
Skipping bad block at  0x3fe00000                                          
Skipping bad block at  0x3fe80000                                          
Skipping bad block at  0x3ff00000                                          
Skipping bad block at  0x3ff80000                                          

OK
Marvell>> 
(3)识别USB,在串口输入“usb start”。
Marvell>> usb start
(Re)start USB...
USB0:   Port (usbActive) : 0    Interface (usbType = 2) : USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
Marvell>>
(4)向NANDflash烧写内核文件,在串口输入“mtdburn usb 0 FAT ubifs_arm10.image NAND”,在烧写的过程中会出现两次选择提示,全部输入“y”并回车。
Marvell>> mtdburn usb 0 FAT ubifs_arm10.image NAND

Marvell>> mtdburn usb 0 FAT ubifs_arm10.image NAND
 - Load from device     : usb, Interface :0
 - File System          : FAT
 - Filename             : ubifs_arm10.image 
 - Flash destination    : NAND

Do you want to continue ? [Y/n] y

(Re)start USB...
USB0:   Port (usbActive) : 0    Interface (usbType = 2) : USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
reading ubifs_arm10.image

Trying separation of kernel/vxWorks-image and root_fs. Work areas=0x06000000,0x07000000

kernel separation ended ok. unc_len=2767504, total_in=2772111

rootfs separation ended ok. unc_len=23068672, total_in=12952525

Burning kernel on flash at 0x00000000, length=2702K
Erasing 0x0 - 0xa00000: (10MB)
nand erase 0 a00000

NAND erase: device 0 offset 0x0, size 0xa00000
Erasing at 0x980000 -- 100% complete.
OK
                [Done]

Copy to Flash
nand write.trimffs 6000000 0 2a3a90

NAND write: device 0 offset 0x0, size 0x2a3a90
 2767504 bytes written: OK

Erasing 0xa00000 - 0x2a00000: (32MB)
nand erase a00000 2000000

NAND erase: device 0 offset 0xa00000, size 0x2000000
Erasing at 0x2980000 -- 100% complete.
OK

Burning rootfs on flash at 0x00a00000, length=22528K

Copy to Flash
nand write.trimffs 7000000 a00000 1600000

NAND write: device 0 offset 0xa00000, size 0x1600000
 23068672 bytes written: OK
Do you want to prepare CPSS environment variables (mtdparts & bootcmd) ? [y/N]
Do you want to continue ? [Y/n] y

Saving cpss environment variable
mtdparts = 'spi_flash:2m(spi_uboot)ro,4m(spi_kernel),16m(spi_rootfs),-(remainder);armada-nand:10m(nand_kernel),-(nand_rootfs)'
standalone_mtd_spi = sf probe; sf read ${loadaddr} 0x200000 0x400000; setenv bootargs ${console} root=/dev/mtdblock2 rw init=/linuxrc rootfstype=jffs2 rootwait mtdparts=${mtdparts} ${mvNetConfig}; bootm ${loadaddr} 
standalone_mtd = nand read ${loadaddr} 0x0 0xa00000; setenv bootargs ${console} mtdparts=${mtdparts} ubi.mtd=5 root=ubi0:rootfs_nand ro rootfstype=ubifs ${mvNetConfig}; bootm 0x2000000;
Saving Environment to SPI Flash...
SF: Detected MX25L25735E with page size 64 KiB, total 32 MiB
Erasing SPI flash....Writing to SPI flash.....done

boot command prepared: run 'boot' to load kernel and file system from flash.
Marvell>> 
(5)启动交换机系统,向串口输入“boot”。
Marvell>> boot

NAND read: device 0 offset 0x0, size 0xa00000
 10485760 bytes read: OK
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-3.4.69
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2767440 Bytes = 2.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Lin done, booting thBooting Linux on physical CPU 0
Linux version 3.4.69 (yedidiaf@vvenus173) (gcc version 4.6.4 20120731 (prerelease) (Marvell GCC 201502-1645.aee66e26 CVE-2015-0235) ) #1 SMP Wed Oct 28 20:22:26 IST 2015
CPU: Marvell PJ4Bv7 Processor [562f5842] revision 2 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
Machine: Marvell BC2 RD
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writealloc
BUG: mapping for 0xfc000000 at 0xff400000 out of vmalloc space
SMP: init cpus
PERCPU: Embedded 7 pages/cpu @c09cf000 s5952 r8192 d14528 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttyS0,115200 mtdparts=spi_flash:2m(spi_uboot)ro,4m(spi_kernel),16m(spi_rootfs),-(remainder);armada-nand:10m(nand_kernel),-(nand_rootfs) ubi.mtd=5 root=ubi0:rootfs_nand ro rootfstype=ubifs mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 512MB = 512MB total
Memory: 513784k/513784k available, 10504k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0519000   (5188 kB)
      .init : 0xc0519000 - 0xc0549740   ( 194 kB)
      .data : 0xc054a000 - 0xc05806c0   ( 218 kB)
       .bss : 0xc05806e4 - 0xc05cafd8   ( 299 kB)
Hierarchical RCU implementation.
NR_IRQS:178
Initializing MSYS SOC Timer 0
sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 171798ms
Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
SMP: prepare CPUs (2 cores)
Setting up static identity map for 0x3edd50 - 0x3edd70
SMP: CPU 0 Waking up CPU 1
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (1590.88 BogoMIPS).
devtmpfs: initialized
NET: Registered protocol family 16
Aurora: Working in ARMv7 mode
L0 cache Enabled
Speculative Prefetch Disabled
Aurora L2 Cache Enabled
Support IO coherency.

CPU Interface
-------------
SDRAM_CS0 ....base 000000000, size 512MB 
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
DEVICE_CS0 ....base 0f2200000, size   1MB 
DEVICE_CS1 ....no such
DEVICE_CS2 ....no such
DEVICE_CS3 ....no such
PEX0_MEM ....base 090000000, size 128MB 
PEX0_IO ....no such
INTER_REGS ....base 0f1000000, size   1MB 
DFX_INTER_REGS ....base 0fc000000, size   1MB 
SWITCH_REGS ....base 0f8000000, size  64MB 
DMA_UART ....no such
SPI_CS0 ....base 0f6000000, size  32MB 
SPI_CS1 ....no such
SPI_CS2 ....no such
SPI_CS3 ....no such
SPI_CS4 ....no such
SPI_CS5 ....no such
SPI_CS6 ....no such
SPI_CS7 ....no such
BOOT_ROM_CS ....base 0fff00000, size   1MB 
DEV_BOOTCS ....base 0f4000000, size  32MB 
USB_REGS ....no such
DRAGONITE ....base 080000000, size 128MB 

  Marvell MSYS
 RD-XC3-24G-4SFP Board - 
 Soc: BobK Rev A1
 LE
  Detected Tclk 200000000, SysClk 167000000, FabricClk 200000000, PClk 800000000
  LSP version: linux-3.4.69-2014_T2.1p13

Register platform device: mv_neta_port_0
Register platform device: mv_neta_port_1
registered dev#0 asa ehci_marvell
Marvell USB EHCI Host controller #0: df8a3dc0
bio: create slab  at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource msys_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI-E: Checking physical bus #0 (controller #0): 
Enabled - No Link
SoC: model = 0xf400, revision = 0x4
  o 2 Giga ports supported
  o SKB recycle supported (Enabled)
  o NETA acceleration mode 1
  o RX Queue support: 8 Queues * 128 Descriptors
  o TX Queue support: 8 Queues * 532 Descriptors
  o GSO supported
  o GRO supported
  o Receive checksum offload supported
  o Transmit checksum offload supported
  o Driver ERROR statistics enabled
  o Driver INFO statistics enabled

port #0: is_sgmii=1, is_rgmii=0, phy_addr=-1
  o Loading network interface(s) for port #0: cpu_mask=0x3, tx_csum_limit=9800

  o Port 0 is connected to Linux netdevice
    o eth0, ifindex = 2, GbE port = 0
        giga p=0: mtu=1500, mac=00:0e:c6:00:2d:72 (platform)

port #1: is_sgmii=1, is_rgmii=0, phy_addr=-1
  o Loading network interface(s) for port #1: cpu_mask=0x3, tx_csum_limit=9800

  o Port 1 is connected to Linux netdevice
    o eth1, ifindex = 3, GbE port = 1
        giga p=1: mtu=1500, mac=00:50:43:7b:7b:7b (platform)

Phy-driver: Initialization started
Phy-driver: register_device() is called.
Phy-driver: registered character device with major number = 217 and minor numbers 0...255
Warning CESA engine is powered Off
dragonite_xcat dragonite_xcat.0: Initializing Co-processor...
dragonite_xcat dragonite_xcat.0: Initializing Co-processor finished
gpiochip_add: registered GPIOs 0 to 67 on device: mv_gpio
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 1003
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 41) is a 16550A
console [ttyS0] enabled
loop: module loaded
SPI Serial flash detected @ 0xf6000000, 32768KB (512sec x 64KB)
4 cmdlinepart partitions found on MTD device spi_flash
Creating 4 MTD partitions on "spi_flash":
0x000000000000-0x000000200000 : "spi_uboot"
0x000000200000-0x000000600000 : "spi_kernel"
0x000000600000-0x000001600000 : "spi_rootfs"
0x000001600000-0x000002000000 : "remainder"
armada-nand armada-nand.0: Initialize HAL based NFC in 8bit mode with DMA Disabled using BCH 4bit ECC
NAND device: Manufacturer ID: 0x2c, Chip ID: 0x38 (Micron NAND 1GiB 3,3V 8-bit)
Bad block table found at page 262016, version 0x01
Bad block table found at page 261888, version 0x01
2 cmdlinepart partitions found on MTD device armada-nand
2 cmdlinepart partitions found on MTD device armada-nand
Creating 2 MTD partitions on "armada-nand":
0x000000000000-0x000000a00000 : "nand_kernel"
0x000000a00000-0x000040000000 : "nand_rootfs"
UBI: attaching mtd5 to ubi0
UBI: physical eraseblock size:   524288 bytes (512 KiB)
UBI: logical eraseblock size:    516096 bytes
UBI: smallest flash I/O unit:    4096
UBI: VID header offset:          4096 (aligned 4096)
UBI: data offset:                8192
UBI: max. sequence number:       0
UBI: volume 0 ("rootfs_nand") re-sized from 42 to 1996 LEBs
UBI: attached mtd5 to ubi0
UBI: MTD device name:            "nand_rootfs"
UBI: MTD device size:            1014 MiB
UBI: number of good PEBs:        2020
UBI: number of bad PEBs:         8
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 2020
UBI: number of PEBs reserved for bad PEB handling: 20
UBI: max/mean erase counter: 1/0
UBI: image sequence number:  74909680
UBI: background thread "ubi_bgt0d" started, PID 355
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky 
e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
e1000e: Intel(R) PRO/1000 Network Driver - 1.9.5-k
e1000e: Copyright(c) 1999 - 2012 Intel Corporation.
sky2: driver version 1.30
PPP generic driver version 2.4.2
NET: Registered protocol family 24
pegasus: v0.6.14 (2006/09/27), Pegasus/Pegasus II USB Ethernet driver
usbcore: registered new interface driver pegasus
usbcore: registered new interface driver asix
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver zaurus
usbcore: registered new interface driver cdc_ncm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_marvell ehci_marvell.0: Marvell Orion EHCI
ehci_marvell ehci_marvell.0: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.0: irq 45, io base 0xfb050100
ehci_marvell ehci_marvell.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new interface driver usblp
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: hardware counters not available
oprofile: using timer interrupt.
TCP: cubic registered
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
8021q: 802.1Q VLAN Support v1.8
VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6

==Start PCI Devices scan and configure==

==Start Internal Devices scan and configure==
prestera_device prestera_device.0: Internal device 0xf400 detected
mvPP driver initialized
prestera_device prestera_device.0: finish internal dev f400 probe
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
usb 1-1: new high-speed USB device number 2 using ehci_marvell
UBIFS: mounted UBI device 0, volume 0, name "rootfs_nand"
UBIFS: mounted read-only
UBIFS: file system size:   1024966656 bytes (1000944 KiB, 977 MiB, 1986 LEBs)
UBIFS: journal size:       10452992 bytes (10208 KiB, 9 MiB, 21 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  23 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) readonly on device 0:13.
devtmpfs: mounted
Freeing init memory: 192K
scsi0 : usb-storage 1-1:1.0
mount: Mounting none on /dev/pts failed: No such file or directory
Wed Oct 28 20:21:00 UTC 2015




Linux MARVELL_LINUX 3.4.69 #1 SMP Wed Oct 28 20:22:26 IST 2015


Welcome to Embedded Linux
           _  _
          | ||_|
          | | _ ____  _   _  _  _ 
          | || |  _ \| | | |\ \/ /
          | || | | | | |_| |/    \
          |_||_|_| |_|\____|\_/\_/

          On Marvell's ARMADAXP board

For further information on the Marvell products check:
http://www.marvell.com/

toolchain=mv7sft little endian

Enjoy!

scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
sd 0:0:0:0: [sda] 30497664 512-byte logical blocks: (15.6 GB/14.5 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk

mvPP opened
Starting System Root Taskcommander: threads are running: luaCLI cmdShell


Supported boards:
+---------------------------------+-------------------------+
| Board name                      | Revisions               |
+---------------------------------+-------------------------+
| 01 - DB-DX241-24G               |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 02 - RD-DX246-24G               |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 03 - RD-88E6183                 |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 04 - DB-88E6093                 |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 05 - RD-88E6093-24F4G           |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 06 - DB-DX160-16G               |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 07 - DB-DX270-24G-3XG           |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 08 - RD-DX270-48G-2XG           |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 09 - RD-DX241-48G               |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 10 - RD-88E6093-484F4G          |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 11 - DB-DX246-24G-3XG           |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 12 - 24F4G                      |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 13 - DB-DX107-88E6095-48F2G     |                         |
|                                 | 01 - Rev 0.1            |
|                                 | 02 - Rev 0.2            |
+---------------------------------+-------------------------+
| 14 - DB-DX285-24G-4XG           |                         |
|                                 | 01 - Rev 0.1            |
|                                 | 02 - Rev 0.2 - Vr Support|
|                                 | 03 - Rev 0.3 - FC OFF   |
|                                 | 04 - Rev 0.4 - Ch2 as multiplexer|
+---------------------------------+-------------------------+
| 15 - DB-DX106-10G               |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 16 - DB-DX106-88E6095-48F2G     |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 17 - DB-DX285-48G-4XG           |                         |
|                                 | 01 - Rev 0.1            |
|                                 | 02 - Rev 0.2 - RD-DX285 |
|                                 | 03 - Rev 0.3 - FC OFF   |
+---------------------------------+-------------------------+
| 18 - DB-DX3-GP                  |                         |
|                                 | 01 - Rev 0.1            |
|                                 | 02 - Rev 0.2 - RDE tests|
|                                 | 03 - Rev 0.3 - FC OFF   |
+---------------------------------+-------------------------+
| 19 - xCat, xCat2, xCat3         |                         |
|                                 | 01 - Rev 0.1            |
|                                 | 02 - Rev 0.2 - SDMA     |
|                                 | 03 - Rev 0.3 - FC OFF   |
|                                 | 04 - Rev 0.4 - PBR      |
|                                 | 05 - Rev 0.5 - P24/25 SGMII mode, p26/27 QX mode|
|                                 | 06 - Rev 0.6 - PBR SDMA |
|                                 | 07 - Rev 0.7 - SMI only board|
|                                 | 08 - Rev 0.8 - Native MII|
|                                 | 09 - Rev 0.9 - PHYMAC   |
|                                 | 10 - Rev 0.10 - Legacy VPLS Enabled|
|                                 | 11 - Rev 0.11 - +Linux BM kernel driver|
+---------------------------------+-------------------------+
| 20 - Lion                       |                         |
|                                 | 01 - Rev 0.1            |
|                                 | 02 - Rev 0.2 - performance test configuration|
|                                 | 03 - Rev 0.3            |
|                                 | 04 - Rev 0.4            |
|                                 | 05 - Rev 0.5 - RD-48    |
|                                 | 06 - Rev 0.6 - 98DX5198 all ports 1000BaseX|
|                                 | 07 - Rev 0.7 - 98DX5198 all ports SGMII 1G|
|                                 | 08 - Rev 0.8 - 98CX8203 2 core {0,1}|
|                                 | 09 - Rev 0.9 - RD-48 PQ3 (lion_mpc8544)|
|                                 | 10 - Rev 0.10- MII interface|
|                                 | 12 - Rev 0.12- RD-48 with solarflare PHY|
|                                 | 22 - multi port group FDB lookup|
|                                 | 24 - multi port group FDB lookup : 128K mode - auto init|
|                                 | 25 - multi port group FDB lookup :  64K mode - auto init|
|                                 | 26 -                    |
+---------------------------------+-------------------------+
| 27 - Lion2                      |                         |
|                                 | 01 - Rev 0.1 - 96X10G_SR_LR|
|                                 | 02 - Rev 0.2 - 32X40G_SR_LR|
|                                 | 03 - Rev 0.3 - 96X10G_KR|
|                                 | 04 - Rev 0.4 - 32X40G_KR4|
|                                 | 05 - Rev 0.5 - CT 10G 40G loopback Port|
|                                 | 06 - Rev 0.6 - 56X10G 210MHz|
|                                 | 07 - HooperRD:0..7-10G_KR;8...-40G_KR|
|                                 | 08 - HooperRD:0..7-10G_KR;8...-40G_KR: kernel driver|
|                                 | 10 - Rev 0.10- MII interface|
|                                 | 11 - 96X10G_SR_LR, PFC enable TC5_6 all ports|
|                                 | 12 - 96X10G_SR_LR, Lion2-4 cores |
|                                 | 22 - multi port group FDB lookup|
|                                 | 24 - multi port group FDB lookup : 256K mode - auto init|
|                                 | 25 - multi port group FDB lookup : 128K mode - auto init|
|                                 | 26 - 360MHz 0,1,2,3x10G 4,8,9x40G|
|                                 | 27 -                    |
+---------------------------------+-------------------------+
| 28 - Lion3                      |                         |
|                                 | 01 - Rev 0.1            |
|                                 | 02 - Rev 0.2 - implement FDB Cuckoo algorithm|
+---------------------------------+-------------------------+
| 29 - BobCat2                    |                         |
|                                 | 01 - Rev 0.1            |
|                                 | 02 - Rev 0.2 - TM enabled|
|                                 | 03 - Rev 0.3 -MTL RD board 48GE +4X10G|
|                                 | 04 - Rev 0.4 -MTL RD board 4*10G +2X40G->10G TM Enable|
|                                 | 05 - Simplified Init DB board|
|                                 | 06 - Simplified Init DB board - TM Enabled|
|                                 | 11 - Rev 0.11 RD Board  |
|                                 | 12 - Rev 0.12 RD Board TM Enabled|
+---------------------------------+-------------------------+
| 30 - Six BobCat2                |                         |
|                                 | 01 - Rev 0.1            |
+---------------------------------+-------------------------+
| 31 - Two Lion2 + Bobcat2        |                         |
|                                 | 01 - Rev 0.1 - only Two Lion2|
|                                 | 02 - Rev 0.2            |
|                                 | 03 - Rev 0.3 - Two Hoopers + Bobcat2|
|                                 | 04 - Rev 0.4 - One Hooper  + Bobcat2|
+---------------------------------+-------------------------+

Call cpssInitSystem(index,boardRevId,reloadEeprom), where:
        index        - The index of the system to be initialized.
        boardRevId   - The index of the board revision.
        reloadEeprom - Whether the device's eeprom should be reloaded 
                         after start-init.

CPSS Version Stream: CPSS_4.1_502
SW_INFRA_HWSERVICES_4.1_106
Cpss DxCh version: CPSS 4.1.12
LSP version:  LSP version: linux-3.4.69-2014_T2.1p13

***************************************
 Prestera commander shell server ready 
***************************************

 Memory used by Lua 5515460  nChunks=63117

 LUA CLI based on LUA 5.1 from www.lua.org
 LUA CLI uses Mini-XML engine from www.minixml.org
***************************************************
               LUA CLI shell ready
***************************************************

Console# 

(6)交换机系统测试

通过向串口写入命令“cpssInitSystem 19,2,0”配置交换机进行端口功能测试,如果测试结束后串口输出“Init system returned:0”,说明系统已被正确的初始化!

Console# cpssInitSystem 19,2,0

Console# cpssinitsystem 19,2,0 
bspPciGetIntVec (single) int vector 0x21, internal Int 0x0
bspPciGetIntVec (single) int vector 0x21, internal Int 0x0
Device[0] ID 0xF40011AB revision A1
Core clock = 167Mhz

Allocating 32784 bytes for DMA
Allocating 32784 bytes for DMA
Allocating 32000 bytes for DMA
Allocating 3200 bytes for DMA
Allocating 309601 bytes for DMA
Allocating 45232 bytes for DMA
Allocating 45232 bytes for DMA
Warning:Tried to allocate 8388608 which is bigger than the memory chunk size. 

[UTF]: utfInit: ************************
[UTF]: prvUtfExtrasInit: PP dev [0], phy ports [28], virt ports [64] ports bmp[0x0fffffff]
UTF: used port type [PRV_TGF_28_PORT_DEVICE_TYPE_E] , with ports up to[28]
[UTF]: utfInit: OK, number of tests [3562]
Run utfHelp 0 for help about UTF usage
[UTF]: utfInit: ************************


[UTF]: utfHelp: ****************************
*****UTF functions:*****
utfHelp             - to log a help about the function.
utfTestsList        - to log list of all configured (available) suits and tests.
utfTestsTypeList    - to log list of all configured suits by given UT type list (generic, enhanced, etc.)
utfTestsRun         - to run suits and tests
utfTestsTypeRun     - to run all UT by given UT type list (generic, enhanced, etc.)
utfLogOutputSelect  - to change output log mode (all, final, file, debug)
utfLogOpen          - to open logger with defined file name
utfLogClose         - to close logger
utfRandomRunModeSet - to set test's random run mode
utfTestRunFirstSet  - to put specific test to be run first

*****Examples:*****
utfHelp 0                - to printout this help info.
utfHelp "utfTestsList"   - to get detailed info about command "utfTestsList"
utfTestsList 0           - to log list of all configured (available) suits.
utfTestsList "tgfBridge" - to log list of test cases inside suit "tgfBridge".
utfTestsTypeList 6, 0    - to log list of all Enhanced UTs
utfTestsTypeList 1, 6, 0 - to log list of all Generic and Enhanced UTs
utfTestsRun 0, 1, 1      - to run all suits once with no interrupts after first failure
utfTestsRun "tgfBridge",1,1 - to run all tests from suit "tgfBridge" once
utfTestsRun "tgfBridge.tgfBasicDynamicLearning",1,1 - to run test "tgfBasicDynamicLearning" from suit "tgfBridge" once
utfTestsRun ".tgfBasicDynamicLearning",1,1 - to run test "tgfBasicDynamicLearning" once
utfTestsRun "tgfBridge-tgfIp",1,0 - to run all tests in a range between suits
utfTestsRun "suit1.test1-suit2.test2",1,0 - to run a range of tests starting from certain test to certain test
utfTestsRun "suit1-suit2.test",1,0 - to run a range of tests starting from certain suit to certain test
utfTestsTypeRun 1, 1, 6, 0 - to run all Enhanced UT  
utfTestsTypeRun 1, 1, 1, 6, 0 - to run all Generic and Enhanced UT  
utfLogOutputSelect 0     - to change output log to serial
utfLogOutputSelect 1     - to change output log to only final report
utfLogOutputSelect 2     - to change output log to file
utfLogOutputSelect 3     - to change output log to debug
utfLogOpen "results.log" - to set logger into file "results.log"
utfLogClose              - to close opened logger
utfRandomRunModeSet 1, 5 - to enable random run mode with seed 5 for random generator
utfTestRunFirstSet "tgfBasicDynamicLearning" - to run "tgfBasicDynamicLearning" test first
prvUtfSkipLongTestsFlagSet 1 - to state that when running tests skip those with 'long execution time' 

Run utfHelp "utfTestsList" for example to get detailed info about command
[UTF]: utfHelp: ****************************

[UTF]: utfInit: enh-UT : tested ports are : 0 8 18 23 
cpssInitSystem time: 0 sec., 325479939 nanosec.
Time processing the cpssInitSystem (from 'phase1 init') is [0] seconds + [322038232] nanoseconds 
Init system returned:0
devices, ports to be used by LUA tests , and configuration files ==> {
  {
    dev=0,
    port={ 0, 8, 18, 24, 20, 2 },
    portCPU=63
  }
}
Default PCL CFG Table Access mode configured on dev: 0
Console# 

4.内核烧写VB脚本程序

说明:

(1)程序类型:Visual Basic脚本语言

(2)配套软件:SecureCRT 5.2.2

(3)交换机CPU型号:98DX3236


#$language = "VBScript"
#$interface = "1.0"

'-------------------------------------------------  
'name: burn_image.vbs  
'date: 20170928  
'Email: [email protected]  
'-------------------------------------------------  

crt.Screen.Synchronous = True

' This automatically generated script may need to be
' edited in order to work correctly.

Sub Main
	crt.Screen.Send "nand erase.chip" & chr(13)
	crt.Screen.WaitForString "Marvell>>"

	crt.Screen.Send "usb start" & chr(13)
	crt.Screen.WaitForString "Marvell>>"	


'	crt.Screen.Send "mtdburn usb 0 FAT jffs2_arm.image NAND" & chr(13)
	crt.Screen.Send "mtdburn usb 0 FAT ubifs_arm10.image NAND" & chr(13)

	crt.Screen.WaitForString "Do you want to continue ? [Y/n]"	
	crt.Screen.Send "y" & chr(13)
	crt.Screen.WaitForString "Do you want to continue ? [Y/n]"
	crt.Screen.Send "y" & chr(13)

	crt.Screen.WaitForString "Marvell>>"	
	crt.Screen.Send "boot" & chr(13)

End Sub



你可能感兴趣的:(Marvell)