halmartin / meraki-builder

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

Couldn't determine board model, THINGS WILL BE BROKEN on postmerkOS-20220204 #24

Closed rohanki closed 2 years ago

rohanki commented 2 years ago

First up, a massive thanks for working on this project :) I successfully flashed an earlier .bin to a MS220-8P last year, but thought I'd revisit with your 2022-02-04 build. Flashed just fine with a raspberry pi on spi bus. I don't get any network connectivity and boot log looks like something has gone wrong. I'll have a go at compiling but not overly sure what I'm doing there..

LinuxLoader built Nov 12 2002 18:01:50
init_pll ok
init_spi ok
init_memctl ok
wait_memctl ok
Training DRAM ok
init_irq ok
init_dram_uncached ok
init_icache ok
init_dcache ok
enable_caches ok
init_board ok
Low level initialization complete, exiting boot mode
[    0.000000] Linux version 3.18.123-meraki-elemental (hmartin@alp) (gcc version 5.4.0 (GCC) ) #10 Sat Jul 18 17:06:37 UTC 2020
[    0.000000] CPU0 revision is: 02019654 (MIPS 24KEc)
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 00477000 @ 00100000 (usable)
[    0.000000]  memory: 00049000 @ 00577000 (usable after init)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 07ff0000 @ 00000000 (usable)
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x07feffff]
[    0.000000] Reserving 0MB of memory at 0MB for crashkernel
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=m25p80:0x40000(redboot),0x2c0000(kernel),0x800000(squashfs),0x500000(overlay) root=/dev/mtdblock3 ubi.mtd=gen_nand.0 mem=134152192
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=80005024
[    0.000000] Readback ErrCtl register=80005024
[    0.000000] Cache parity protection enabled
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:66
[    0.000000] sched_clock: 32 bits at 1kHz, resolution 1000000ns, wraps every 2147483648000000ns
[    0.001000] Calibrating delay loop... 275.45 BogoMIPS (lpj=137728)
[    0.010000] pid_max: default: 32768 minimum: 301
[    0.010000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.010000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.012000] ftrace: allocating 11994 entries in 24 pages
[    0.039000] Performance counters: mips/24K PMU enabled, 2 32-bit counters available to each CPU, irq -1 (share with timer interrupt)
[    0.045000] devtmpfs: initialized
[    0.051000] NET: Registered protocol family 16
[    0.112000] Switched to clocksource MIPS
[    0.139000] NET: Registered protocol family 2
[    0.141000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.141000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.141000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.142000] TCP: reno registered
[    0.142000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.142000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.142000] NET: Registered protocol family 1
[    0.147000] VCORE-III Watchdog Timer enabled (30 seconds).  Prev boot was not caused by WDT reset.
[    0.149000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.178000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.178000] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.180000] msgmni has been set to 241
[    0.208000] io scheduler noop registered
[    0.208000] io scheduler deadline registered (default)
[    0.210000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.211000] console [ttyS0] disabled
[    0.212000] serial8250.0: ttyS0 at MMIO 0x70100000 (irq = 14, base_baud = 13020833) is a 16550A
[    0.512000] console [ttyS0] enabled
[    0.521000] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xf1
[    0.527000] nand: Micron MT29F1G08ABADAWP
[    0.531000] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    0.543000] Scanning device for bad blocks
[    0.658000] m25p80 spi0.1: found mx25l12805d, expected m25p80
[    0.664000] m25p80 spi0.1: mx25l12805d (16384 Kbytes)
[    0.669000] 4 cmdlinepart partitions found on MTD device m25p80
[    0.675000] Creating 4 MTD partitions on "m25p80":
[    0.680000] 0x000000000000-0x000000040000 : "redboot"
[    0.695000] 0x000000040000-0x000000300000 : "kernel"
[    0.704000] 0x000000300000-0x000000b00000 : "squashfs"
[    0.716000] 0x000000b00000-0x000001000000 : "overlay"
[    0.728000] tun: Universal TUN/TAP device driver, 1.6
[    0.733000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    0.740000] i2c /dev entries driver
[    0.746000] TCP: cubic registered
[    0.750000] Initializing XFRM netlink socket
[    0.757000] NET: Registered protocol family 10
[    0.772000] NET: Registered protocol family 17
[    0.777000] NET: Registered protocol family 15
[    0.782000] 8021q: 802.1Q VLAN Support v1.8
[    0.786000] Meraki MS220-8 board detected
[    0.797000] i2c-gpio i2c-gpio.1: using pins 6 (SDA) and 5 (SCL)
[    0.814000] UBI: attaching mtd0 to ubi0
[    1.604000] UBI: scanning is finished
[    1.642000] UBI: attached mtd0 (name "gen_nand.0", size 128 MiB) to ubi0
[    1.649000] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.656000] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.663000] UBI: VID header offset: 512 (aligned 512), data offset: 2048
[    1.670000] UBI: good PEBs: 1024, bad PEBs: 0, corrupted PEBs: 0
[    1.676000] UBI: user volume: 12, internal volumes: 1, max. volumes count: 128
[    1.683000] UBI: max/mean erase counter: 658/365, WL threshold: 4096, image sequence number: 1363641321
[    1.693000] UBI: available PEBs: 462, total reserved PEBs: 562, PEBs reserved for bad PEB handling: 20
[    1.703000] UBI: background thread "ubi_bgt0d" started, PID 247
[    1.785000] devtmpfs: mounted
[    1.818000] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.849000] devtmpfs: mounted
[    1.857000] Freeing unused kernel memory: 292K
[    5.729000] devpts: called with bogus options
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
!!! IMPORTANT !!!
Couldn't determine board model, THINGS WILL BE BROKEN. model=, product= please open an issue on github.com/halmartin/meraki-builder
!!! IMPORTANT !!!
insmod: ERROR: could not load module /lib/modules//vtss_core.ko: No such file or directory
Loaded 'proclikefs.ko'
[   39.384000] random: nonblocking pool is initialized
Loaded 'merakiclick.ko'
[   43.212000] click: starting router thread pid 372 (87a81700)
[   53.919000] elts_meraki: module license 'unspecified' taints kernel.
[   53.925000] Disabling lock debugging due to kernel taint
Loaded 'elts_meraki.ko'
insmod: ERROR: could not load module /lib/modules//vc_click.ko: No such file or directory
[   55.893000] unsatisfied requirement 'vc_click'
[   55.898000] click-config/switch/io-real/vitesse.click:26: unknown element class 'ToVitesse'
[   55.907000] click-config/switch/io-real/vitesse.click:31: unknown element class 'FromVitesse'
[   55.917000] click-config/switch/io-real/vitesse.click:59: unknown element class 'VitesseController'
[   56.210000] click-config/switch.template:74: While configuring 'switch_intf_table :: SwitchIntfTable':
[   56.220000]   SWITCH_HARDWARE: element type mismatch, expected SwitchHardwareIntf
[   56.230000] click-config/switch.template:1045: While configuring 'switch_port_table :: SwitchPortTable':
[   56.240000]   SWITCH_HARDWARE_INTERFACE: element type mismatch, expected SwitchHardwareIntf
[   56.263000] click-config/switch.template:58: While configuring 'l3_update_hardware :: UpdateHardwareTable':
[   56.273000]   SWITCH_HARDWARE_INTERFACE: element type mismatch, expected SwitchHardwareIntf
[   56.289000] click-config/switch.template:383: While configuring 'switch_rpc_server :: SwitchRPCServer':
[   56.299000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.308000] click-config/switch.template:566: While configuring 'CheckStackMaster@187 :: CheckStackMaster':
[   56.318000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.326000] click-config/switch.template:602: While configuring 'CheckStackMaster@235 :: CheckStackMaster':
[   56.336000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.344000] click-config/switch.template:633: While configuring 'switch_mrt :: MulticastRoutingTable':
[   56.354000]   SWITCH_HARDWARE_INTERFACE: element type mismatch, expected SwitchHardwareIntf
[   56.365000] click-config/switch.template:655: While configuring 'ospf_hello_inspector :: OspfHelloInspector':
[   56.375000]   SWITCH_HARDWARE_INTERFACE: element type mismatch, expected SwitchHardwareIntf
[   56.403000] click-config/switch.template:875: While configuring 'msstp_encap_inst :: MSSTPEncap':
[   56.412000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.423000] click-config/switch.template:930: While configuring 'IntraStackResolver@527 :: IntraStackResolver':
[   56.433000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.444000] click-config/switch.template:1072: While configuring 'igmp_table :: IGMPSnoopTable':
[   56.453000]   SWITCH_HARDWARE_INTERFACE: element type mismatch, expected SwitchHardwareIntf
[   56.462000] click-config/switch.template:1093: While configuring 'mld_table :: MLDSnoopTable':
[   56.471000]   SWITCH_HARDWARE_INTERFACE: element type mismatch, expected SwitchHardwareIntf
[   56.482000] click-config/switch.template:1125: While configuring 'msstp_decap :: MSSTPDecap':
[   56.490000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.502000] click-config/switch.template:1187: While configuring 'CheckStackMaster@664 :: CheckStackMaster':
[   56.512000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.519000] click-config/switch.template:1189: While configuring 'CheckStackMaster@669 :: CheckStackMaster':
[   56.530000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.537000] click-config/switch.template:1199: While configuring 'CheckStackMaster@680 :: CheckStackMaster':
[   56.547000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.554000] click-config/switch.template:1212: While configuring 'CheckStackMaster@693 :: CheckStackMaster':
[   56.564000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.573000] click-config/switch.template:1238: While configuring 'CheckStackMaster@726 :: CheckStackMaster':
[   56.583000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.594000] click-config/switch.template:1307: While configuring 'stp_check_master :: CheckStackMaster':
[   56.604000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.611000] click-config/switch.template:1320: While configuring 'lacp_check_master :: CheckStackMaster':
[   56.621000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.629000] click-config/switch.template:1409: While configuring 'udld :: UDLD':
[   56.637000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.646000] click-config/switch.template:1459: While configuring 'CheckStackMaster@861 :: CheckStackMaster':
[   56.656000]   HW_INTF: element type mismatch, expected SwitchHardwareIntf
[   56.731000] Router could not be initialized!
Default port count: 10
net.ipv4.ip_local_reserved_ports = 50000-50127
vc_click isn't loaded; aborting!
/etc/init.d/S11leds: line 8: can't create /click/sw0_ctrl/power_led_orange: nonexistent directory
/etc/init.d/S11leds: line 9: can't create /click/sw0_ctrl/power_led_green: nonexistent directory
Saving random seed: SKIP (read-only file system detected)
Starting network: OK
Starting chrony: Could not open /etc/chrony.conf : No such file or directory
FAIL
Starting dropbear sshd: OK
rohanki commented 2 years ago

just to follow up - re flashed the 2021 release, and updated squashfs from the 2022-02-04 release and the board is detected and all works fine.

christianmscott commented 2 years ago

I'm having the same issue flashing the 2022-02-04 release for the first time. Where can I find previous releases?

Haxim commented 2 years ago

I'm having the same issue flashing the 2022-02-04 release for the first time. Where can I find previous releases?

In the same boat here. Going to try with the 2020 release from https://watchmysys.com/files/meraki/ms220/postmerkos_20200922.bin and see if that works at all. If it does, then I'll try updating squashfs using the steps in https://github.com/halmartin/meraki-builder/issues/21

halmartin commented 2 years ago

Hi everyone, thank you for bringing this issue to my attention.

@Haxim there is no need to rebuild the squashfs. To resolve the issue after first boot, simply do the following:

echo MODEL=MS220-8P > /etc/boardinfo

Or whatever model of switch you have (e.g. MS220-24P, MS220-48LP). Then reboot.

I will look into why S08kmods is no longer correctly detecting the switch model.

Haxim commented 2 years ago

Thanks @halmartin ! Out of curiosity, if I performed the steps I posted above (flashed the 2020 bin and then used your update steps from issue #21) is that fine? Or are there different things in newer images?

halmartin commented 2 years ago

There are some other minor improvements in the newer images, such as the link lights working, however nothing major.

The release before 20220204 is postmerkOS-20220118

While I do have copies of the older releases, I would prefer people to use the latest one (assuming it isn't buggy, as 20220204 evidently is) since there are known issues with older releases and it wastes everyone's time to open an issue against an old release if it's already been fixed.

I'll revert the installation instructions back to 20220118 and delete 20220204 since it's causing so much grief.

Lesson learned though, when testing a new release I should also format JFFS2 so there's no /etc/boardinfo around to bias the test results.

halmartin commented 2 years ago

Okay, so I tested this on my MS220-8P after a full flash and it booted without issue. Could someone else confirm it works for them? postmerkOS-20220406

adgenet commented 2 years ago

Could someone else confirm it works for them? postmerkOS-20220406

Just tested on my MS220-8P. Confirmed working.

mihailtudoran commented 2 years ago

I can confirm it work on MS220-8P. Thanks!