Open mithro opened 4 years ago
Seems like there's a lot in there, including a gdb server and xmodem transfer. Is the xmodem stuff ever actually used?
I think the meat of what you want is answer_magic()
, which is used to upload a Linux kernel, initrd, and command line. Is that correct?
@xobs - Yes just the loading of stuff like kernel / initrd / etc.
The Python version might be a better starting point? https://github.com/enjoy-digital/litex/blob/5845df76cc61dc7563dc22bb7382e9696e830b6f/litex/tools/litex_term.py#L198-L231
The Python version seems to have a slightly different protocol. In particular, opcode 0x03
is SFL_CMD_CMDLINE
in the C version, but sfl_cmd_load_no_crc
in the Python version. Which is correct?
Actually, anything above 0x03
is also different.
I assume the one from https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/bios/sfl.h ?
Looks like https://github.com/enjoy-digital/litex/commit/ffebd2076c6de67000fa90168a24e1bca6ba5ff8#diff-119cfa8e74253ebf2bef5e349863c3c8 was the commit which added 0x03
support to the bios + litex-term
python version (ignoring the fact that 0x03
was already in usage).
I think we need to fix flterm
at https://github.com/timvideos/flterm to match what litex_term and the current bios do.
No idea what the protocol actually is however... I think it's the "OpenMoko Serial Flash Loader" (I think it was a predecessor to dfu-util actually?).