halmartin / meraki-builder

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

Mainline u-boot support #5

Open halmartin opened 4 years ago

halmartin commented 4 years ago

As mentioned in #4, it is possible to build and boot u-boot on the MS220-8P:

U-Boot 2019.10 (Apr 04 2020 - 09:26:23 +0000)

MSCC VCore-III MIPS 24Kec
Model: Luton26 PCB090 Reference Board
DRAM:  128 MiB
Loading Environment from SPI Flash... SF: Detected mx25l12805d with page size 256 Bytes, erase size 64 KiB, total 16 MiB

OK
In:    serial@10100000
Out:   serial@10100000
Err:   serial@10100000
Net:   Could not get PHY for miim-bus1: addr 0
Could not get PHY for miim-bus1: addr 1
Could not get PHY for miim-bus1: addr 2
Could not get PHY for miim-bus1: addr 3
Could not get PHY for miim-bus1: addr 4
Could not get PHY for miim-bus1: addr 5
Could not get PHY for miim-bus1: addr 6
Could not get PHY for miim-bus1: addr 7
Could not get PHY for miim-bus1: addr 8
Could not get PHY for miim-bus1: addr 9
Could not get PHY for miim-bus1: addr 10
Could not get PHY for miim-bus1: addr 11

Warning: switch@1010000 (eth0) using random MAC address - ee:6a:6f:da:b9:7a
eth0: switch@1010000
Hit any key to stop autoboot:  0 
luton # dhcp
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
DHCP client bound to address 192.168.0.51 (20779 ms)

There are however, some issues as the pcb090 reference implementation in u-boot does not match the hardware configuration of the MS220-8P:

u-boot brings some really nice benefits to the switch:

halmartin commented 2 years ago

While luton26 has some support in u-boot, the jaguar1 used in the MS42, MS220-48, and MS320 models is not supported.

RedBoot has support for the jaguar1

Machine detection: https://github.com/halmartin/MS42-GPL-sources-3-18-122/blob/master/linux-3.18/arch/mips/vcoreiii/loader/head.S#L71

jaguar1 specific platform setup: https://github.com/halmartin/MS42-GPL-sources-3-18-122/blob/master/linux-3.18/arch/mips/vcoreiii/loader/init_jaguar.c

Note that jaguar1 used in the MS220-48 and MS320 series is not the same as the jaguar2 which is supported by the Microchip BSP (mentioned here)