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

来源:互联网 发布:nginx socket 转发 编辑:程序博客网 时间:2024/06/05 20:00
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.41Booting from SPI flashGeneral initialization - Version: 1.0.0Serdes initialization - Version: 1.0.2mvCtrlPexPolaritySet: TWSI Write failed, leaving PEX polarity in EP modePEX: pexIdx 0, detected no linkmvCtrlPexPolaritySet: TWSI Write failed, leaving PEX polarity in EP modePEX: pexIdx 0, detected no linkmvCtrlPexPolaritySet: TWSI Write failed, leaving PEX polarity in EP modePEX: pexIdx 0, detected no linkDDR3 Training Sequence - Ver TIP-1.22.0mvHwsBoardIdGet: TWSI Read failedDDR3 Training Sequence - Switching XBAR Window to FastPath Window Updated Physical Mem size is from 0x20000000 to 10000000DDR3 Training Sequence - Ended SuccessfullyBootROM: Image checksum verification PASSED __   __                      _ _|  \/  | __ _ _ ____   _____| | || |\/| |/ _` | '__\ \ / / _ \ | || |  | | (_| | |   \ V /  __/ | ||_|  |_|\__,_|_|    \_/ \___|_|_|         _   _     ____              _        | | | |   | __ )  ___   ___ | |_         | | | |___|  _ \ / _ \ / _ \| __|         | |_| |___| |_) | (_) | (_) | |_          \___/    |____/ \___/ \___/ \__|  ** LOADER **U-Boot 2013.01-01788-g1ebef39 (Nov 10 2014 - 13:58:38) Marvell version: 2014_T3.0p2Board: RD-XC3-24G-4SFPRD-XC3-24G-4SFPSoC:   Alleycat3CPU:   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 DisabledDRAM:  512 MiBMap:   Code:            0x1fed3000:0x1ff96258       BSS:             0x1ffef43c       Stack:           0x1f9c2ef0       Heap:            0x1f9c3000:0x1fed3000NAND:  1024 MiBMMC:   MRVL_MMC: 0SF: Detected MX25L25735E with page size 64 KiB, total 32 MiBPCI-e 0: Detected No Link.FPU initialized to Run Fast Mode.USB2.0 0: Host ModeNet:   |  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 chipBad block table not found for chip 0Bad block table not found for chip 0Bad block table written to 0x00003ff80000, version 0x01Bad block table written to 0x00003ff00000, version 0x01Skipping 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                                          OKMarvell>> 
(3)识别USB,在串口输入“usb start”。
Marvell>> usb start
(Re)start USB...USB0:   Port (usbActive) : 0    Interface (usbType = 2) : USB EHCI 1.00scanning 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) foundMarvell>>
(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.00scanning bus 0 for devices... 2 USB Device(s) found       scanning usb for storage devices... 1 Storage Device(s) foundreading ubifs_arm10.imageTrying separation of kernel/vxWorks-image and root_fs. Work areas=0x06000000,0x07000000kernel separation ended ok. unc_len=2767504, total_in=2772111rootfs separation ended ok. unc_len=23068672, total_in=12952525Burning kernel on flash at 0x00000000, length=2702KErasing 0x0 - 0xa00000: (10MB)nand erase 0 a00000NAND erase: device 0 offset 0x0, size 0xa00000Erasing at 0x980000 -- 100% complete.OK                [Done]Copy to Flashnand write.trimffs 6000000 0 2a3a90NAND write: device 0 offset 0x0, size 0x2a3a90 2767504 bytes written: OKErasing 0xa00000 - 0x2a00000: (32MB)nand erase a00000 2000000NAND erase: device 0 offset 0xa00000, size 0x2000000Erasing at 0x2980000 -- 100% complete.OKBurning rootfs on flash at 0x00a00000, length=22528KCopy to Flashnand write.trimffs 7000000 a00000 1600000NAND 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 variablemtdparts = '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 MiBErasing SPI flash....Writing to SPI flash.....doneboot 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 ... OKOKStarting kernel ...Uncompressing Lin done, booting thBooting Linux on physical CPU 0Linux 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 2015CPU: Marvell PJ4Bv7 Processor [562f5842] revision 2 (ARMv7), cr=10c53c7dCPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cacheMachine: Marvell BC2 RDUsing UBoot passing parameters structureMemory policy: ECC disabled, Data cache writeallocBUG: mapping for 0xfc000000 at 0xff400000 out of vmalloc spaceSMP: init cpusPERCPU: Embedded 7 pages/cpu @c09cf000 s5952 r8192 d14528 u32768Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048Kernel 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=1500PID 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 totalMemory: 513784k/513784k available, 10504k reserved, 0K highmemVirtual 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:178Initializing MSYS SOC Timer 0sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 171798msCalibrating delay loop... 795.44 BogoMIPS (lpj=3977216)pid_max: default: 32768 minimum: 301Mount-cache hash table entries: 512CPU: Testing write buffer coherency: okCPU0: thread -1, cpu 0, socket 0, mpidr 80000000SMP: prepare CPUs (2 cores)Setting up static identity map for 0x3edd50 - 0x3edd70SMP: CPU 0 Waking up CPU 1CPU1: Booted secondary processorCPU1: thread -1, cpu 1, socket 0, mpidr 80000001Brought up 2 CPUsSMP: Total of 2 processors activated (1590.88 BogoMIPS).devtmpfs: initializedNET: Registered protocol family 16Aurora: Working in ARMv7 modeL0 cache EnabledSpeculative Prefetch DisabledAurora L2 Cache EnabledSupport IO coherency.CPU Interface-------------SDRAM_CS0 ....base 000000000, size 512MB SDRAM_CS1 ....disableSDRAM_CS2 ....disableSDRAM_CS3 ....disableDEVICE_CS0 ....base 0f2200000, size   1MB DEVICE_CS1 ....no suchDEVICE_CS2 ....no suchDEVICE_CS3 ....no suchPEX0_MEM ....base 090000000, size 128MB PEX0_IO ....no suchINTER_REGS ....base 0f1000000, size   1MB DFX_INTER_REGS ....base 0fc000000, size   1MB SWITCH_REGS ....base 0f8000000, size  64MB DMA_UART ....no suchSPI_CS0 ....base 0f6000000, size  32MB SPI_CS1 ....no suchSPI_CS2 ....no suchSPI_CS3 ....no suchSPI_CS4 ....no suchSPI_CS5 ....no suchSPI_CS6 ....no suchSPI_CS7 ....no suchBOOT_ROM_CS ....base 0fff00000, size   1MB DEV_BOOTCS ....base 0f4000000, size  32MB USB_REGS ....no suchDRAGONITE ....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.1p13Register platform device: mv_neta_port_0Register platform device: mv_neta_port_1registered dev#0 asa ehci_marvellMarvell USB EHCI Host controller #0: df8a3dc0bio: create slab <bio-0> at 0SCSI subsystem initializedusbcore: registered new interface driver usbfsusbcore: registered new interface driver hubusbcore: registered new device driver usbSwitching to clocksource msys_clocksourceNET: Registered protocol family 2IP 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 registeredUDP hash table entries: 256 (order: 1, 8192 bytes)UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)NET: Registered protocol family 1RPC: 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 LinkSoC: 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 enabledport #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 startedPhy-driver: register_device() is called.Phy-driver: registered character device with major number = 217 and minor numbers 0...255Warning CESA engine is powered Offdragonite_xcat dragonite_xcat.0: Initializing Co-processor...dragonite_xcat dragonite_xcat.0: Initializing Co-processor finishedgpiochip_add: registered GPIOs 0 to 67 on device: mv_gpiojffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.msgmni has been set to 1003io scheduler noop registeredio scheduler deadline registeredio scheduler cfq registered (default)mv_xor_shared mv_xor_shared.0: Marvell shared XOR drivermv_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 disabledserial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 41) is a 16550Aconsole [ttyS0] enabledloop: module loadedSPI Serial flash detected @ 0xf6000000, 32768KB (512sec x 64KB)4 cmdlinepart partitions found on MTD device spi_flashCreating 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 ECCNAND device: Manufacturer ID: 0x2c, Chip ID: 0x38 (Micron NAND 1GiB 3,3V 8-bit)Bad block table found at page 262016, version 0x01Bad block table found at page 261888, version 0x012 cmdlinepart partitions found on MTD device armada-nand2 cmdlinepart partitions found on MTD device armada-nandCreating 2 MTD partitions on "armada-nand":0x000000000000-0x000000a00000 : "nand_kernel"0x000000a00000-0x000040000000 : "nand_rootfs"UBI: attaching mtd5 to ubi0UBI: physical eraseblock size:   524288 bytes (512 KiB)UBI: logical eraseblock size:    516096 bytesUBI: smallest flash I/O unit:    4096UBI: VID header offset:          4096 (aligned 4096)UBI: data offset:                8192UBI: max. sequence number:       0UBI: volume 0 ("rootfs_nand") re-sized from 42 to 1996 LEBsUBI: attached mtd5 to ubi0UBI: MTD device name:            "nand_rootfs"UBI: MTD device size:            1014 MiBUBI: number of good PEBs:        2020UBI: number of bad PEBs:         8UBI: number of corrupted PEBs:   0UBI: max. allowed volumes:       128UBI: wear-leveling threshold:    4096UBI: number of internal volumes: 1UBI: number of user volumes:     1UBI: available PEBs:             0UBI: total number of reserved PEBs: 2020UBI: number of PEBs reserved for bad PEB handling: 20UBI: max/mean erase counter: 1/0UBI: image sequence number:  74909680UBI: background thread "ubi_bgt0d" started, PID 355tun: Universal TUN/TAP device driver, 1.6tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPIe100: Copyright(c) 1999-2006 Intel Corporatione1000e: Intel(R) PRO/1000 Network Driver - 1.9.5-ke1000e: Copyright(c) 1999 - 2012 Intel Corporation.sky2: driver version 1.30PPP generic driver version 2.4.2NET: Registered protocol family 24pegasus: v0.6.14 (2006/09/27), Pegasus/Pegasus II USB Ethernet driverusbcore: registered new interface driver pegasususbcore: registered new interface driver asixusbcore: registered new interface driver cdc_etherusbcore: registered new interface driver net1080usbcore: registered new interface driver cdc_subsetusbcore: registered new interface driver zaurususbcore: registered new interface driver cdc_ncmehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driverehci_marvell ehci_marvell.0: Marvell Orion EHCIehci_marvell ehci_marvell.0: new USB bus registered, assigned bus number 1ehci_marvell ehci_marvell.0: irq 45, io base 0xfb050100ehci_marvell ehci_marvell.0: USB 2.0 started, EHCI 1.00hub 1-0:1.0: USB hub foundhub 1-0:1.0: 1 port detectedusbcore: registered new interface driver usblpInitializing USB Mass Storage driver...usbcore: registered new interface driver usb-storageUSB Mass Storage support registered.mousedev: PS/2 mouse device common for all micei2c /dev entries drivermmc0: mvsdio driver initialized, lacking card detect (fall back to polling)usbcore: registered new interface driver usbhidusbhid: USB HID core driveroprofile: hardware counters not availableoprofile: using timer interrupt.TCP: cubic registeredNET: Registered protocol family 10IPv6 over IPv4 tunneling driverNET: Registered protocol family 178021q: 802.1Q VLAN Support v1.8VFP 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 detectedmvPP driver initializedprestera_device prestera_device.0: finish internal dev f400 probedrivers/rtc/hctosys.c: unable to open rtc device (rtc0)usb 1-1: new high-speed USB device number 2 using ehci_marvellUBIFS: mounted UBI device 0, volume 0, name "rootfs_nand"UBIFS: mounted read-onlyUBIFS: 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: lzoUBIFS: reserved for root:  23 bytes (0 KiB)VFS: Mounted root (ubifs filesystem) readonly on device 0:13.devtmpfs: mountedFreeing init memory: 192Kscsi0 : usb-storage 1-1:1.0mount: Mounting none on /dev/pts failed: No such file or directoryWed Oct 28 20:21:00 UTC 2015Linux MARVELL_LINUX 3.4.69 #1 SMP Wed Oct 28 20:22:26 IST 2015Welcome to Embedded Linux           _  _          | ||_|          | | _ ____  _   _  _  _           | || |  _ \| | | |\ \/ /          | || | | | | |_| |/    \          |_||_|_| |_|\____|\_/\_/          On Marvell's ARMADAXP boardFor further information on the Marvell products check:http://www.marvell.com/toolchain=mv7sft little endianEnjoy!scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6sd 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 offsd 0:0:0:0: [sda] No Caching mode page foundsd 0:0:0:0: [sda] Assuming drive cache: write throughsd 0:0:0:0: [sda] No Caching mode page foundsd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1sd 0:0:0:0: [sda] No Caching mode page foundsd 0:0:0:0: [sda] Assuming drive cache: write throughsd 0:0:0:0: [sda] Attached SCSI removable diskmvPP openedStarting System Root Taskcommander: threads are running: luaCLI cmdShellSupported 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_502SW_INFRA_HWSERVICES_4.1_106Cpss DxCh version: CPSS 4.1.12LSP 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 0x0bspPciGetIntVec (single) int vector 0x21, internal Int 0x0Device[0] ID 0xF40011AB revision A1Core clock = 167MhzAllocating 32784 bytes for DMAAllocating 32784 bytes for DMAAllocating 32000 bytes for DMAAllocating 3200 bytes for DMAAllocating 309601 bytes for DMAAllocating 45232 bytes for DMAAllocating 45232 bytes for DMAWarning: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 testsutfTestsTypeRun     - 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 nameutfLogClose         - to close loggerutfRandomRunModeSet - to set test's random run modeutfTestRunFirstSet  - 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 UTsutfTestsTypeList 1, 6, 0 - to log list of all Generic and Enhanced UTsutfTestsRun 0, 1, 1      - to run all suits once with no interrupts after first failureutfTestsRun "tgfBridge",1,1 - to run all tests from suit "tgfBridge" onceutfTestsRun "tgfBridge.tgfBasicDynamicLearning",1,1 - to run test "tgfBasicDynamicLearning" from suit "tgfBridge" onceutfTestsRun ".tgfBasicDynamicLearning",1,1 - to run test "tgfBasicDynamicLearning" onceutfTestsRun "tgfBridge-tgfIp",1,0 - to run all tests in a range between suitsutfTestsRun "suit1.test1-suit2.test2",1,0 - to run a range of tests starting from certain test to certain testutfTestsRun "suit1-suit2.test",1,0 - to run a range of tests starting from certain suit to certain testutfTestsTypeRun 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 serialutfLogOutputSelect 1     - to change output log to only final reportutfLogOutputSelect 2     - to change output log to fileutfLogOutputSelect 3     - to change output log to debugutfLogOpen "results.log" - to set logger into file "results.log"utfLogClose              - to close opened loggerutfRandomRunModeSet 1, 5 - to enable random run mode with seed 5 for random generatorutfTestRunFirstSet "tgfBasicDynamicLearning" - to run "tgfBasicDynamicLearning" test firstprvUtfSkipLongTestsFlagSet 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:0devices, 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: 0Console# 

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: snaking616@163.com  '-------------------------------------------------  crt.Screen.Synchronous = True' This automatically generated script may need to be' edited in order to work correctly.Sub Maincrt.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



原创粉丝点击