Beware of EMC switches sold as Mellanox SX6XXX on eBay

Discussion in 'Networking' started by mpogr, Aug 2, 2016.

  1. JSLEnterprises

    JSLEnterprises New Member

    Joined:
    May 4, 2018
    Messages:
    15
    Likes Received:
    4
    You should be seeing some ECC errors and then finally prompt. If it's doing a kernel panic, re-write the binary (remember, its the extensionless file inside the zip, not the zip itself).

    tftp 400000 <tftpaddy>:mlnxbase
    nand erase clean 0 1FFFFFFF
    nand write ${fileaddr} 0 ${filesize}
     
    #161
    Last edited: Oct 7, 2018
  2. JTF195

    JTF195 New Member

    Joined:
    Nov 15, 2017
    Messages:
    7
    Likes Received:
    0
    That's exactly what I've been doing.

    I even tried 'nand erase clean' one of the times without specifying addresses so it wiped the entire nand (but I did NOT do a 'nand scrub' because I read that it can cause major problems)

    I think part of the the problem is that before I first started this whole thing, I ran an 'envreset' command, so it seems like some of the environment variables might be misconfigured. I don't even have a 'run mlxlinux' command available. I have to use 'run flash_jffs2'

    The first time I got an immediate kernel panic, I tried rebuilding the jffs2 image and tried again and I did get stuck in nonstop ECC errors that time, gradually bits of jffs2, but ended in a kernel panic again when it finished.

    At one point, it went into a loop of these errors:
    Code:
    can't open /dev/tty4: No such file or directory
    can't open /dev/tty3: No such file or directory
    can't open /dev/tty2: No such file or directory
    
    Memory is hazy, not sure what the conditions were...

    After you replied to the thread I tried starting completely over with another 'envreset', flashed the kernel again, and used your jffs2 image instead of mine, and got the kernel panic loop again the first time.

    I've tried just the jffs2 again a couple times just now and it went into the tty error loop again.

    Edit: Tried doing 'envreset' and 'run flash_jffs2' directly after without setting environment variables or reflashing anything, and it went into ECC errors, but it's gradually loading bits of the jffs2 again, so maybe I'll finally get somewhere this time..

    Edit2: Nope, it finished loading and went back into tty error loop again.
     
    #162
    Last edited: Oct 8, 2018
  3. JSLEnterprises

    JSLEnterprises New Member

    Joined:
    May 4, 2018
    Messages:
    15
    Likes Received:
    4
    type the following code:
    setenv mlxlinux "run jffs2_args boot_common_args;bootm ${kernel_addr} - ${fdt_addr}"
    then saveenv

    now try 'run mlxlinux'
     
    #163
  4. JTF195

    JTF195 New Member

    Joined:
    Nov 15, 2017
    Messages:
    7
    Likes Received:
    0
    The command I've been using, 'run flash_jffs2' is already identical to that, just with a different name:
    flash_jffs2=run jffs2_args boot_common_args;bootm ${kernel_addr} - ${fdt_addr}

    I tried the following:
    Code:
    envreset
    setenv mlxlinux 'run jffs2_args boot_common_args;bootm ${kernel_addr} - ${fdt_addr}'
    setenv image_kernel_args loglevel=2
    setenv jffs2_args 'setenv bootargs root=${rootdev} rootfstype=jffs2 rw reset_button=${reset_button} ${image_kernel_args} ${extra_args}'
    saveenv
    run mlxlinux
    
    And it just went into the same tty error loop again

    Incidentally, when entering the setenv <commands> with double quotes, it expands the env variables
    With single quotes it didn't expand the variables, but it made no difference either way

    Here is the full default environment
    Code:
    => printenv
    bootcmd=run flash_jffs2
    bootdelay=5
    baudrate=9600
    loads_echo=
    autoload=n
    hostname=mlnx460ex
    netdev=eth0
    nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}
    ramargs=setenv bootargs root=/dev/ram rw
    addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1
    addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}
    addmisc=setenv bootargs ${bootargs}
    initrd_high=30000000
    kernel_addr_r=400000
    fdt_addr_r=800000
    ramdisk_addr_r=C00000
    hostname=mlnx460ex
    bootfile=mlnx460ex/uImage
    ramdisk_file=mlnx460ex/uRamdisk
    rootpath=/opt/eldk/ppc_4xxFP
    flash_self=run ramargs addip addtty addmisc;bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}
    flash_nfs=run nfsargs addip addtty addmisc;bootm ${kernel_addr} - ${fdt_addr}
    net_nfs=tftp ${kernel_addr_r} ${bootfile}; tftp ${fdt_addr_r} ${fdt_file}; run nfsargs addip addtty addmisc;bootm ${kernel_addr_r} - ${fdt_addr_r}
    net_self_load=tftp ${kernel_addr_r} ${bootfile};tftp ${fdt_addr_r} ${fdt_file};tftp ${ramdisk_addr_r} ${ramdisk_file};
    net_self=run net_self_load;run ramargs addip addtty addmisc;bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
    fdt_file=mlnx460ex/mlnx460ex.dtb
    flash_self_old=run ramargs addip addtty addmisc;bootm ${kernel_addr} ${ramdisk_addr}
    flash_nfs_old=run nfsargs addip addtty addmisc;bootm ${kernel_addr}
    net_nfs_old=tftp ${kernel_addr_r} ${bootfile};run nfsargs addip addtty addmisc;bootm ${kernel_addr_r}
    load=tftp 200000 mlnx460ex/u-boot.bin
    update=protect off 0xFFFA0000 FFFFFFFF;era 0xFFFA0000 FFFFFFFF;cp.b ${fileaddr} 0xFFFA0000 ${filesize};setenv filesize;saveenv
    upd=run load update
    dhcp_vendor-class-identifier=bootmfg:hwname:mlnx460ex:
    reset_button=0
    clear_filesize=setenv filesize
    mfg_dir=mlnx460ex
    mfg_args=setenv bootargs root=/dev/ram rw ramdisk_size=${mfg_ramdisk_size} ${mfg_extra_args}
    mfg_common_args=run addtty addmisc
    mfg_load=tftp ${kernel_addr_r} ${mfg_root}${mfg_dir}/${mfg_kernel_file};tftp ${fdt_addr_r} ${mfg_root}${mfg_dir}/${mfg_fdt_file};tftp ${ramdisk_addr_r} ${mfg_root}${mfg_dir}/${mfg_ramdisk_file}
    mfg_nodhcp=echo "Manufacture will TFTP from directory ${mfg_root}${mfg_dir}, and boot";echo; run clear_filesize ; run mfg_load;if test 0${filesize} -gt 0; then echo Booting mfg ; run mfg_args mfg_common_args;bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} ; else ; echo Failed mfg load ; fi
    mfg=echo "Manufacture will DHCP, TFTP from directory ${mfg_root}${mfg_dir}, and boot";echo; dhcp; run clear_filesize ; run mfg_load;if test 0${filesize} -gt 0; then echo Booting mfg ; run mfg_args mfg_common_args;bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} ; else ; echo Failed mfg load ; fi
    menu_file=menu.img
    menu_load=tftp ${menu_addr_r} ${mfg_root}${mfg_dir}/${menu_file}; if test $? -ne 0; then run clear_filesize ; echo Download failed ;fi
    menu_usb_load_ext2=usb start; ext2load usb ${mfg_usb_dev}:${mfg_usb_part} ${menu_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${menu_file};
    menu_usb_load_fat=usb start; fatload usb ${mfg_usb_dev}:${mfg_usb_part} ${menu_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${menu_file};
    menu_usb_load=if test "x${mfg_usb_fstype}" = "xext2"; then run menu_usb_load_ext2 ; else ; run menu_usb_load_fat ; fi
    menu_usb=run clear_filesize ; run menu_usb_load ; if test 0${filesize} -gt 0; then autoscr ${menu_addr_r}; else ; echo Failed menu load ; fi
    menu_nodhcp=run clear_filesize ; run menu_load ; if test 0${filesize} -gt 0; then autoscr ${menu_addr_r}; else ; echo Failed menu load ; fi
    menu=dhcp ; run clear_filesize ; run menu_load ; if test 0${filesize} -gt 0; then autoscr ${menu_addr_r}; else ; echo Failed menu load ; fi
    fw_file=u-boot.bin
    fw_load=tftp ${fw_addr_r} ${mfg_root}${mfg_dir}/${fw_file}; if test $? -ne 0; then run clear_filesize ; echo Download failed ;fi
    fw_usb_load_ext2=usb start; ext2load usb ${mfg_usb_dev}:${mfg_usb_part} ${fw_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${fw_file};
    fw_usb_load_fat=usb start; fatload usb ${mfg_usb_dev}:${mfg_usb_part} ${fw_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${fw_file};
    fw_usb_load=if test "x${mfg_usb_fstype}" = "xext2"; then run fw_usb_load_ext2 ; else ; run fw_usb_load_fat ; fi
    fw_update_raw=protect off 0xFFFA0000 FFFFFFFF;erase 0xFFFA0000 FFFFFFFF;cp.b ${fw_addr_r} 0xFFFA0000 ${filesize};cmp.b ${fw_addr_r} 0xFFFA0000 ${filesize};setenv filesize; saveenv
    fw_usb_update=run clear_filesize ; run fw_usb_load ; if test 0${filesize} -gt 0; then run fw_update_raw ; else ; echo Failed update load ; fi
    fw_update_nodhcp=run clear_filesize ; run fw_load ; if test 0${filesize} -gt 0; then run fw_update_raw ; else ; echo Failed update load ; fi
    fw_update=dhcp ; run clear_filesize ; run fw_load ; if test 0${filesize} -gt 0; then run fw_update_raw ; else ; echo Failed update load ; fi
    boot_common_args=run addtty addmisc
    mfg_usb_dir=mlnx460ex
    mfg_usb_load_ext2=usb start; echo "Loading ${mfg_kernel_file}";ext2load usb ${mfg_usb_dev}:${mfg_usb_part} ${kernel_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_kernel_file};echo "Loading ${mfg_fdt_file}"; ext2load usb ${mfg_usb_dev}:${mfg_usb_part} ${fdt_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_fdt_file};echo "Loading ${mfg_ramdisk_file}"; ext2load usb ${mfg_usb_dev}:${mfg_usb_part} ${ramdisk_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_ramdisk_file}
    mfg_usb_load_fat=usb start; echo "Loading ${mfg_kernel_file}";fatload usb ${mfg_usb_dev}:${mfg_usb_part} ${kernel_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_kernel_file};echo "Loading ${mfg_fdt_file}"; fatload usb ${mfg_usb_dev}:${mfg_usb_part} ${fdt_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_fdt_file};echo "Loading ${mfg_ramdisk_file}"; fatload usb ${mfg_usb_dev}:${mfg_usb_part} ${ramdisk_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_ramdisk_file}
    mfg_usb_load=if test "x${mfg_usb_fstype}" = "xext2"; then run mfg_usb_load_ext2 ; else ; run mfg_usb_load_fat ; fi
    mfg_usb=echo "Manufacture will load from USB directory ${mfg_usb_root}${mfg_usb_dir}, and boot"; echo; run clear_filesize ; run mfg_usb_load; if test 0${filesize} -gt 0; then echo Booting mfg ; run mfg_args mfg_common_args;bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} ; else ; echo Failed mfg load ; fi
    kernel_addr=ff000000
    fdt_addr=ff1e0000
    ramdisk_addr=ff200000
    fw_addr_r=400000
    menu_addr_r=B00000
    pciconfighost=1
    pcie_mode=RP:RP
    autoload=no
    rootdev=/dev/mtdblock6
    boot_usb_ext2_loc_1=run usb_args_loc_1 boot_common_args;echo "Loading ${boot_kernel_file}";ext2load usb ${boot_usb_dev}:${boot_usb_part_loc_1} ${kernel_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_kernel_file};echo "Loading ${boot_fdt_file}";ext2load usb ${boot_usb_dev}:${boot_usb_part_loc_1} ${fdt_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_fdt_file};bootm ${kernel_addr_r} - ${fdt_addr_r}
    boot_usb_ext2_loc_2=run usb_args_loc_2 boot_common_args;echo "Loading ${boot_kernel_file}";ext2load usb ${boot_usb_dev}:${boot_usb_part_loc_2} ${kernel_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_kernel_file};echo "Loading ${boot_fdt_file}";ext2load usb ${boot_usb_dev}:${boot_usb_part_loc_2} ${fdt_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_fdt_file};bootm ${kernel_addr_r} - ${fdt_addr_r}
    boot_usb_fat_loc_1=run usb_args_loc_1 boot_common_args;echo "Loading ${boot_kernel_file}";fatload usb ${boot_usb_dev}:${boot_usb_part_loc_1} ${kernel_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_kernel_file};echo "Loading ${boot_fdt_file}";fatload usb ${boot_usb_dev}:${boot_usb_part_loc_1} ${fdt_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_fdt_file};bootm ${kernel_addr_r} - ${fdt_addr_r}
    boot_usb_fat_loc_2=run usb_args_loc_2 boot_common_args;echo "Loading ${boot_kernel_file}";fatload usb ${boot_usb_dev}:${boot_usb_part_loc_2} ${kernel_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_kernel_file};echo "Loading ${boot_fdt_file}";fatload usb ${boot_usb_dev}:${boot_usb_part_loc_2} ${fdt_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_fdt_file};bootm ${kernel_addr_r} - ${fdt_addr_r}
    mfg_kernel_file=vmlinuz
    mfg_ramdisk_file=rootfs
    mfg_ramdisk_size=180224
    mfg_fdt_file=fdt
    mfg_usb_dev=0
    mfg_usb_part=1
    mfg_usb_fstype=fat
    mfg_usb_root=/
    boot_kernel_file=vmlinuz
    boot_fdt_file=fdt
    boot_usb_dev=0
    boot_usb_part_loc_1=2
    boot_usb_part_loc_2=3
    boot_usb_root_loc_1=/dev/sda5
    boot_usb_root_loc_2=/dev/sda6
    usb_args_loc_1=setenv bootargs root=${boot_usb_root_loc_1} ro reset_button=${reset_button} rootdelay=8 ${image_kernel_args} ${extra_args}
    usb_args_loc_2=setenv bootargs root=${boot_usb_root_loc_2} ro reset_button=${reset_button} rootdelay=8 ${image_kernel_args} ${extra_args}
    jffs2_args=setenv bootargs root=${rootdev} rootfstype=jffs2 ro reset_button=${reset_button} ${image_kernel_args} ${extra_args}
    flash_jffs2=run jffs2_args boot_common_args;bootm ${kernel_addr} - ${fdt_addr}
    
    Environment size: 8702/16380 bytes
    
     
    #164
  5. x00r

    x00r New Member

    Joined:
    Oct 9, 2018
    Messages:
    3
    Likes Received:
    0
    Dear STH forum members... This may be a bit off topic question, if so, i am sorry about that.
    I am looking for a cheap 10 GbE switch in shops within EU and after reading this What are the options for "Cheap" 10G SFP+ Switches right now? : homelab i got intrigued by the possibility of having a QSFP switch. I have found one HP branded 670769-B21 for sale and could not find out (via the seller) if there is the Ethernet license activated.

    I do assume, that the HP branded Mellanox SX6036 are also somehow limited like those EMC ones, but i also assume they can be reflashed to stock Mellanox. Am i right on this one?

    And then there is the Ethernet license, @mpogr mentioned that it is not needed when using the conversion, would that apply also to the HP 670769-B21?

    My last question... Are there any annoying limitations compared with "normal" Ethernet switches, like for instance Arista DCS-7124S? I can buy both for about the same price. I do not use any L3 stuff, just L2 VLANs. I am sure i would do fine with the Arista, will the Mellanox also provide simple L2 mgmt?

    Thank you for your patience with all my question!
     
    #165
  6. i386

    i386 Well-Known Member

    Joined:
    Mar 18, 2016
    Messages:
    1,385
    Likes Received:
    318
    Nope, Vanilla mlnx-os with HP product #
     
    #166
  7. x00r

    x00r New Member

    Joined:
    Oct 9, 2018
    Messages:
    3
    Likes Received:
    0
    Thank you for the insightful info... But that means, the thing is unusable for Ethernet Networks without the 3k license?

    How it is possible that the EMC ones do have it? Were they used for ETH within the EMC use case? Or is is just a gimmick caused by the rebranding to vanilla? A see a few of them on eBay for ridiculous prices, but shipping costs and duty do actually double the cost of getting it from US for me.
     
    #167
  8. i386

    i386 Well-Known Member

    Joined:
    Mar 18, 2016
    Messages:
    1,385
    Likes Received:
    318
    Yeah you need a license for ethernet.
    As I understand it it's a part of the conversion.
     
    #168
  9. mpogr

    mpogr Active Member

    Joined:
    Jul 14, 2016
    Messages:
    105
    Likes Received:
    59
    I think point in case here is one shouldn't reset the env variables in UBoot, otherwise bad things happen. Can someone with a working switch send this fellow their output of printenv? I would do it myself, but travelling at the moment... Thanks!
     
    #169
  10. Rand__

    Rand__ Well-Known Member

    Joined:
    Mar 6, 2014
    Messages:
    2,487
    Likes Received:
    325
    U-Boot 2009.01 SX_PPC_M460EX SX_3.2.0330-82-EMC ppc (Feb 27 2013 - 12:13:42)

    CPU: AMCC PowerPC 460EX Rev. B at 1000 MHz (PLB=166, OPB=83, EBC=83 MHz)
    Security/Kasumi support
    Bootstrap Option H - Boot ROM Location I2C (Addr 0x52)
    Internal PCI arbiter disabled
    32 kB I-Cache 32 kB D-Cache
    Board: Mellanox PPC460EX Board
    FDEF: No
    I2C: ready
    DRAM: 2 GB (ECC enabled, 333 MHz, CL3)
    FLASH: 16 MB
    NAND: 1024 MiB
    PCI: Bus Dev VenId DevId Class Int
    PCIE0: link is not up.
    PCIE1: successfully set as root-complex
    01 00 15b3 c738 0c06 00
    Net: ppc_4xx_eth0, ppc_4xx_eth1
    Hit any key to stop autoboot: 0
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!
    => printenv
    bootcmd=run flash_jffs2
    bootdelay=5
    baudrate=9600
    loads_echo=
    autoload=n
    hostname=mlnx460ex
    netdev=eth0
    nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}
    ramargs=setenv bootargs root=/dev/ram rw
    addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:eek:ff panic=1
    addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}
    addmisc=setenv bootargs ${bootargs}
    initrd_high=30000000
    kernel_addr_r=400000
    fdt_addr_r=800000
    ramdisk_addr_r=C00000
    hostname=mlnx460ex
    bootfile=mlnx460ex/uImage
    ramdisk_file=mlnx460ex/uRamdisk
    rootpath=/opt/eldk/ppc_4xxFP
    flash_self=run ramargs addip addtty addmisc;bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}
    flash_nfs=run nfsargs addip addtty addmisc;bootm ${kernel_addr} - ${fdt_addr}
    net_nfs=tftp ${kernel_addr_r} ${bootfile}; tftp ${fdt_addr_r} ${fdt_file}; run nfsargs addip addtty addmisc;bootm ${kernel_addr_r} - ${fdt_addr_r}
    net_self_load=tftp ${kernel_addr_r} ${bootfile};tftp ${fdt_addr_r} ${fdt_file};tftp ${ramdisk_addr_r} ${ramdisk_file};
    net_self=run net_self_load;run ramargs addip addtty addmisc;bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
    fdt_file=mlnx460ex/mlnx460ex.dtb
    flash_self_old=run ramargs addip addtty addmisc;bootm ${kernel_addr} ${ramdisk_addr}
    flash_nfs_old=run nfsargs addip addtty addmisc;bootm ${kernel_addr}
    net_nfs_old=tftp ${kernel_addr_r} ${bootfile};run nfsargs addip addtty addmisc;bootm ${kernel_addr_r}
    load=tftp 200000 mlnx460ex/u-boot.bin
    update=protect off 0xFFFA0000 FFFFFFFF;era 0xFFFA0000 FFFFFFFF;cp.b ${fileaddr} 0xFFFA0000 ${filesize};setenv filesize;saveenv
    upd=run load update
    dhcp_vendor-class-identifier=bootmfg:hwname:mlnx460ex:
    clear_filesize=setenv filesize
    mfg_dir=mlnx460ex
    mfg_args=setenv bootargs root=/dev/ram rw ramdisk_size=${mfg_ramdisk_size} ${mfg_extra_args}
    mfg_common_args=run addtty addmisc
    mfg_load=tftp ${kernel_addr_r} ${mfg_root}${mfg_dir}/${mfg_kernel_file};tftp ${fdt_addr_r} ${mfg_root}${mfg_dir}/${mfg_fdt_file};tftp ${ramdisk_addr_r} ${mfg_root}${mfg_dir}/${mfg_ramdisk_file}
    mfg_nodhcp=echo "Manufacture will TFTP from directory ${mfg_root}${mfg_dir}, and boot";echo; run clear_filesize ; run mfg_load;if test 0${filesize} -gt 0; then echo Booting mfg ; run mfg_args mfg_common_args;bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} ; else ; echo Failed mfg load ; fi
    mfg=echo "Manufacture will DHCP, TFTP from directory ${mfg_root}${mfg_dir}, and boot";echo; dhcp; run clear_filesize ; run mfg_load;if test 0${filesize} -gt 0; then echo Booting mfg ; run mfg_args mfg_common_args;bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} ; else ; echo Failed mfg load ; fi
    menu_file=menu.img
    menu_load=tftp ${menu_addr_r} ${mfg_root}${mfg_dir}/${menu_file}; if test $? -ne 0; then run clear_filesize ; echo Download failed ;fi
    menu_usb_load_ext2=usb start; ext2load usb ${mfg_usb_dev}:${mfg_usb_part} ${menu_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${menu_file};
    menu_usb_load_fat=usb start; fatload usb ${mfg_usb_dev}:${mfg_usb_part} ${menu_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${menu_file};
    menu_usb_load=if test "x${mfg_usb_fstype}" = "xext2"; then run menu_usb_load_ext2 ; else ; run menu_usb_load_fat ; fi
    menu_usb=run clear_filesize ; run menu_usb_load ; if test 0${filesize} -gt 0; then autoscr ${menu_addr_r}; else ; echo Failed menu load ; fi
    menu_nodhcp=run clear_filesize ; run menu_load ; if test 0${filesize} -gt 0; then autoscr ${menu_addr_r}; else ; echo Failed menu load ; fi
    menu=dhcp ; run clear_filesize ; run menu_load ; if test 0${filesize} -gt 0; then autoscr ${menu_addr_r}; else ; echo Failed menu load ; fi
    fw_file=u-boot.bin
    fw_load=tftp ${fw_addr_r} ${mfg_root}${mfg_dir}/${fw_file}; if test $? -ne 0; then run clear_filesize ; echo Download failed ;fi
    fw_usb_load_ext2=usb start; ext2load usb ${mfg_usb_dev}:${mfg_usb_part} ${fw_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${fw_file};
    fw_usb_load_fat=usb start; fatload usb ${mfg_usb_dev}:${mfg_usb_part} ${fw_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${fw_file};
    fw_usb_load=if test "x${mfg_usb_fstype}" = "xext2"; then run fw_usb_load_ext2 ; else ; run fw_usb_load_fat ; fi
    fw_update_raw=protect off 0xFFFA0000 FFFFFFFF;erase 0xFFFA0000 FFFFFFFF;cp.b ${fw_addr_r} 0xFFFA0000 ${filesize};cmp.b ${fw_addr_r} 0xFFFA0000 ${filesize};setenv filesize; saveenv
    fw_usb_update=run clear_filesize ; run fw_usb_load ; if test 0${filesize} -gt 0; then run fw_update_raw ; else ; echo Failed update load ; fi
    fw_update_nodhcp=run clear_filesize ; run fw_load ; if test 0${filesize} -gt 0; then run fw_update_raw ; else ; echo Failed update load ; fi
    fw_update=dhcp ; run clear_filesize ; run fw_load ; if test 0${filesize} -gt 0; then run fw_update_raw ; else ; echo Failed update load ; fi
    boot_common_args=run addtty addmisc
    mfg_usb_dir=mlnx460ex
    mfg_usb_load_ext2=usb start; echo "Loading ${mfg_kernel_file}";ext2load usb ${mfg_usb_dev}:${mfg_usb_part} ${kernel_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_kernel_file};echo "Loading ${mfg_fdt_file}"; ext2load usb ${mfg_usb_dev}:${mfg_usb_part} ${fdt_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_fdt_file};echo "Loading ${mfg_ramdisk_file}"; ext2load usb ${mfg_usb_dev}:${mfg_usb_part} ${ramdisk_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_ramdisk_file}
    mfg_usb_load_fat=usb start; echo "Loading ${mfg_kernel_file}";fatload usb ${mfg_usb_dev}:${mfg_usb_part} ${kernel_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_kernel_file};echo "Loading ${mfg_fdt_file}"; fatload usb ${mfg_usb_dev}:${mfg_usb_part} ${fdt_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_fdt_file};echo "Loading ${mfg_ramdisk_file}"; fatload usb ${mfg_usb_dev}:${mfg_usb_part} ${ramdisk_addr_r} ${mfg_usb_root}${mfg_usb_dir}/${mfg_ramdisk_file}
    mfg_usb_load=if test "x${mfg_usb_fstype}" = "xext2"; then run mfg_usb_load_ext2 ; else ; run mfg_usb_load_fat ; fi
    mfg_usb=echo "Manufacture will load from USB directory ${mfg_usb_root}${mfg_usb_dir}, and boot"; echo; run clear_filesize ; run mfg_usb_load; if test 0${filesize} -gt 0; then echo Booting mfg ; run mfg_args mfg_common_args;bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} ; else ; echo Failed mfg load ; fi
    kernel_addr=ff000000
    fdt_addr=ff1e0000
    ramdisk_addr=ff200000
    fw_addr_r=400000
    menu_addr_r=B00000
    pciconfighost=1
    pcie_mode=RP:RP
    autoload=no
    rootdev=/dev/mtdblock6
    boot_usb_ext2_loc_1=run usb_args_loc_1 boot_common_args;echo "Loading ${boot_kernel_file}";ext2load usb ${boot_usb_dev}:${boot_usb_part_loc_1} ${kernel_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_kernel_file};echo "Loading ${boot_fdt_file}";ext2load usb ${boot_usb_dev}:${boot_usb_part_loc_1} ${fdt_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_fdt_file};bootm ${kernel_addr_r} - ${fdt_addr_r}
    boot_usb_ext2_loc_2=run usb_args_loc_2 boot_common_args;echo "Loading ${boot_kernel_file}";ext2load usb ${boot_usb_dev}:${boot_usb_part_loc_2} ${kernel_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_kernel_file};echo "Loading ${boot_fdt_file}";ext2load usb ${boot_usb_dev}:${boot_usb_part_loc_2} ${fdt_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_fdt_file};bootm ${kernel_addr_r} - ${fdt_addr_r}
    boot_usb_fat_loc_1=run usb_args_loc_1 boot_common_args;echo "Loading ${boot_kernel_file}";fatload usb ${boot_usb_dev}:${boot_usb_part_loc_1} ${kernel_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_kernel_file};echo "Loading ${boot_fdt_file}";fatload usb ${boot_usb_dev}:${boot_usb_part_loc_1} ${fdt_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_fdt_file};bootm ${kernel_addr_r} - ${fdt_addr_r}
    boot_usb_fat_loc_2=run usb_args_loc_2 boot_common_args;echo "Loading ${boot_kernel_file}";fatload usb ${boot_usb_dev}:${boot_usb_part_loc_2} ${kernel_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_kernel_file};echo "Loading ${boot_fdt_file}";fatload usb ${boot_usb_dev}:${boot_usb_part_loc_2} ${fdt_addr_r} ${boot_usb_root}${boot_usb_dir}/${boot_fdt_file};bootm ${kernel_addr_r} - ${fdt_addr_r}
    mfg_kernel_file=vmlinuz
    mfg_ramdisk_file=rootfs
    mfg_ramdisk_size=180224
    mfg_fdt_file=fdt
    mfg_usb_dev=0
    mfg_usb_part=1
    mfg_usb_fstype=fat
    mfg_usb_root=/
    boot_kernel_file=vmlinuz
    boot_fdt_file=fdt
    boot_usb_dev=0
    boot_usb_part_loc_1=2
    boot_usb_part_loc_2=3
    boot_usb_root_loc_1=/dev/sda5
    boot_usb_root_loc_2=/dev/sda6
    usb_args_loc_1=setenv bootargs root=${boot_usb_root_loc_1} ro reset_button=${reset_button} rootdelay=8 ${image_kernel_args} ${extra_args}
    usb_args_loc_2=setenv bootargs root=${boot_usb_root_loc_2} ro reset_button=${reset_button} rootdelay=8 ${image_kernel_args} ${extra_args}
    jffs2_args=setenv bootargs root=${rootdev} rootfstype=jffs2 ro reset_button=${reset_button} ${image_kernel_args} ${extra_args}
    flash_jffs2=run jffs2_args boot_common_args;bootm ${kernel_addr} - ${fdt_addr}
    ethaddr=00:02:C9:63:EB:5E
    eth1addr=00:02:C9:63:EB:5F
    stdin=serial
    stdout=serial
    stderr=serial
    reset_button=0
    ethact=ppc_4xx_eth0
    ver=U-Boot 2009.01 SX_PPC_M460EX SX_3.2.0330-82-EMC ppc (Feb 27 2013 - 12:13:42)
    bootargs=root=/dev/mtdblock6 rootfstype=jffs2 ro reset_button=0 console=ttyS0,9600

    Environment size: 8980/16380 bytes
    =>

    Just remembered I took one when i initially had issues with my second switch :)
     
    #170
    Last edited: Oct 9, 2018
    mpogr and MikeWebb like this.
  11. Terry Wallace

    Terry Wallace New Member

    Joined:
    Aug 13, 2018
    Messages:
    20
    Likes Received:
    3
    btw the tty loop does show up sometimes in busy box..
    a quick fix is to copy paste this to the console.. As the console is actually there and working

    ln -sf /dev/null /dev/tty2
    ln -sf /dev/null /dev/tty3
    ln -sf /dev/null /dev/tty4

    and then you should be left at a # prompt
     
    #171
  12. Terry Wallace

    Terry Wallace New Member

    Joined:
    Aug 13, 2018
    Messages:
    20
    Likes Received:
    3
    Okay I have a question for someone who has successfully got there switch converted using mpogr's guide.
    after Step 5 create the config DB. Step 6 is flashing the firmware
    1. Do you turn the switch off or reset it between those two points. or is it still sitting at the # prompt from mtdblock6 boot.
    2. I've used flint to flash mellanox nic's before, but how do you do that for a switch as I don't see how to find the <yourswitchlid> info.
    3. Last question step 7 point "rootfs to /dev/mtdblock 7" is this done by changing the "setenv rootdev /dev/mtdblock7".

    Thanks for your help, I feel like I should be close here as most of the guide I got through without a problem.
     
    #172
    Last edited: Oct 11, 2018
  13. JTF195

    JTF195 New Member

    Joined:
    Nov 15, 2017
    Messages:
    7
    Likes Received:
    0
    Thanks a bunch. It looks like the exact same environment as mine:
    Diff Checker

    The only difference seems to be that addtty has been run once
    addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}

    which just expands the bootargs variable and adds the console configuration to the end
    bootargs=root=/dev/mtdblock6 rootfstype=jffs2 ro reset_button=0 console=ttyS0,9600

    Everything else is identical.

    Were you able to get your switch working eventually?

    That did the trick.
    Is there any way to stop it from doing that?
     
    #173
    Last edited: Oct 13, 2018
  14. Terry Wallace

    Terry Wallace New Member

    Joined:
    Aug 13, 2018
    Messages:
    20
    Likes Received:
    3
    Haven’t got my switch working yet. Hoping someone will answer my questions above :)

    That trick with the linking tty I found googling busybox tty2 not available. They may have a more permanent solution.
     
    #174
  15. Rand__

    Rand__ Well-Known Member

    Joined:
    Mar 6, 2014
    Messages:
    2,487
    Likes Received:
    325
    Yes. Had a issue with the mgmt port and tried various things to get it going. In the end its a hardware issue but I managed to get it to work (intermittently which is fine after it has been configured)
     
    #175
  16. JTF195

    JTF195 New Member

    Joined:
    Nov 15, 2017
    Messages:
    7
    Likes Received:
    0
    Did you have to do anything special aside from following mpogr's guide?
     
    #176
  17. Rand__

    Rand__ Well-Known Member

    Joined:
    Mar 6, 2014
    Messages:
    2,487
    Likes Received:
    325
    I have no idea what his guide looks like nowadays, its been a while;)
    But the one I followed basically worked with a few hiccups (that should be rectified now).

    Which post contains your current state?
     
    #177
  18. Terry Wallace

    Terry Wallace New Member

    Joined:
    Aug 13, 2018
    Messages:
    20
    Likes Received:
    3
    I got to here ..
    "Now to burn the firmware into the switch use the following command:
    flint –-allow_psid_change –d lid-0x<yourswitchlid> -i ./<firmwarename>.bin b"


    only I can't seem to find anything called switchlid in the instructions so I don't know where it was pulled from..

    Okay finally realized the switchlid comes from the mlx ofed tools requiring the switch be plugged into the connectx-3 in IB mode. Mine was in ethernet mode. DOH !
    Maybe I'll get this switch done one day
     
    #178
    Last edited: Oct 15, 2018 at 11:33 AM
  19. Rand__

    Rand__ Well-Known Member

    Joined:
    Mar 6, 2014
    Messages:
    2,487
    Likes Received:
    325
    I actually flashed locally since I didnt have cables, there should be an addon chapter (step 8 in my Jan'17 version) depicting how to do that;)
     
    #179
  20. Terry Wallace

    Terry Wallace New Member

    Joined:
    Aug 13, 2018
    Messages:
    20
    Likes Received:
    3
    Sent this in a PM but realized I should have put it in a thread reply.

    I'm actually following a guide from @mpogr. He sent it to me and the files. The guide I'm following has no "Step 8" how to locally flash the firmware from the switch itself.
    The state I'm in is this. I have the basic mlx ftdi and busybox kernal that loads out of mtdblock6 working.
    I have a working copy of mlxos that boots and runs on mtdblock7.
    however none of the ports will work and they did before I flashed the firmware and rebooted.
    I believe my problem is flashed it with the HP firmware not the mellanox firmware. (My fault I was googling for mlx 3.6.1002 and found a copy on hp's support site but its for their rebrands I believe)

    SO now I have an actual version of the firmware I want to burn with flint locally to the switch, but I'm not sure how to go about it. The mtdblock6 busybox boot doesn't have the usual lspi, bash shell etc..

    The mtdblock7 boots straight into mlx0s unless you know some way to exit that down to a shell prompt ?
    Any help would be appreciated.
    Thanks

    Terry
     
    #180
Similar Threads: Beware switches
Forum Title Date
Networking Beware - Emulex 10GbE Virtual Fabric Adapter II x8 PCI-E slot Jun 22, 2014
Networking Suggestion of Quiet 10 GbE Switches Sep 7, 2018
Networking QNAP now selling Nbase-T 10gbe switches Jul 9, 2018
Networking Modding/upgrading Arista switches? May 18, 2018
Networking Who knows HP pro-curve switches? 1GB May 10, 2018

Share This Page