halmartin / meraki-builder

Scripts and tools to assemble firmware images for various Meraki MS switches and MX routers
GNU General Public License v3.0
76 stars 16 forks source link

Switch detection for MS220-24/48 broken #15

Closed halmartin closed 3 years ago

halmartin commented 3 years ago

Meraki left the switch model of both the MS220-24 and MS220-48 as meraki_elemental in the board-config MTD.

Therefore, the board detection in S08kmods is wrong.

The check should be changed to something like this:

    elif [ $(echo $model | grep -c MS220-24) -eq 1 ]; || ( [ $(echo $model | grep -c meraki_elemental) -eq 1 ] && [ $(cat /proc/cpuinfo | grep -c VSC7427) -eq 1] ) then
        mod_dir=luton26
        switch_board=MERAKI_BOARD_MS220_24
        echo 24 > /tmp/NUM_PORTS
    elif [ $(echo $model | grep -c MS220-48) -eq 1 ] || ( [ $(echo $model | grep -c meraki_elemental) -eq 1 ] && [ $(cat /proc/cpuinfo | grep -c VSC7434) -eq 1] ); then
        mod_dir=jaguar_dual
        switch_board=MERAKI_BOARD_MS220_48
        echo 52 > /tmp/NUM_PORTS

Alternatively, just handle the case of meraki_elemental here.