Lede by example#
Tue, 20 Mar 2018 21:51:52 +0000
My GL-MT300A arrived just as I was about to go on holiday. This is how far I've got -
Serial console
These things are, if not actually made for DIY purposes, at least very tolerant to such uses. Take it out of its case and you find three standard 0.1" header pins on the PCB labelled "TX", "RX", "GND" - connect each of them to something that speaks TTL serial (I used a Raspberry Pi) and set the baud rate to 115200. Worked first time.
"The U is for Uninitialized"-Boot
I commented previously about the differences one may encounter
between two devices both of which run the allegedly "Universal" U-Boot
boot loader. This time I couldn't work out why my tftp downloads were
loading into memory at offset 0 instead of, say, 0x811f8000
. Until I
realised that (i) it no longer sufficed to say
setenv rootaddr 11f8000 setenv rootaddr_useg 0x$rootaddr setenv rootaddr_ks0 0x8$rootaddr
and I must now surround environment variable references with curly braces.
setenv rootaddr 11f8000 setenv rootaddr_useg 0x${rootaddr} setenv rootaddr_ks0 0x8${rootaddr}
and (ii) on this device, double quotes around the value of a setenv
are no longer special, so
setenv bootn "foo;bar"will set the value of
bootn
to "foo
and then attempt to run the command bar"
. Which typically doesn't work all that well.Hello darkness my old friend
Having made the relevant changes I was able to get the following output:
## Booting image at 81000000 ... Image Name: Linux-4.9.76 Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 1705466 Bytes = 1.6 MB Load Address: 80001000 Entry Point: 803fa9c0 Verifying Checksum ... OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 803fa9c0) ... ## Giving linux memsize in MB, 128
Starting kernel ...
followed by indefinite but emphatic silence, and various bouts of
fiddling with CONFIG_EARLY_PRINTK
and stuff have not yet persuaded
it to loosen up. Currently I am running LEDE in a Docker container to
see what it does, and diffing its .config
with mine. This has
shown up a couple of things that I've now added to my configuration, but I am
only going to get one shot at running it before I go home, because at
70 miles distant from the hardware I can't reach across and power
cycle it.