Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wishbone-tool: Support the lxterm serial load protocol #22

Open
mithro opened this issue Jan 22, 2020 · 9 comments
Open

wishbone-tool: Support the lxterm serial load protocol #22

mithro opened this issue Jan 22, 2020 · 9 comments
Labels
wishbone-tool Issues related to @xobs' wishbone-tool.

Comments

@mithro
Copy link
Contributor

mithro commented Jan 22, 2020

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?).

@mithro mithro added the wishbone-tool Issues related to @xobs' wishbone-tool. label Jan 22, 2020
@xobs
Copy link
Member

xobs commented Jan 23, 2020

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?

@mithro
Copy link
Contributor Author

mithro commented Jan 23, 2020

@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

@xobs
Copy link
Member

xobs commented Jan 23, 2020

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?

@xobs
Copy link
Member

xobs commented Jan 23, 2020

Actually, anything above 0x03 is also different.

@mithro
Copy link
Contributor Author

mithro commented Jan 23, 2020

@mithro
Copy link
Contributor Author

mithro commented Jan 23, 2020

Looks like enjoy-digital/litex@ffebd20#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).

@mithro
Copy link
Contributor Author

mithro commented Jan 23, 2020

I think we need to fix flterm at https://github.com/timvideos/flterm to match what litex_term and the current bios do.

@mithro
Copy link
Contributor Author

mithro commented Jan 23, 2020

Logged timvideos/flterm#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wishbone-tool Issues related to @xobs' wishbone-tool.
Projects
None yet
Development

No branches or pull requests

2 participants