Posts
4507
Following
316
Followers
476
Linux kernel hacker and maintainer etc.

OpenPGP: 3AB05486C7752FE1
@adingbatponder search for "iu-boot documentation visionfive 2" if there is problem with the link :-) it is just official u-boot dociumentation.
0
0
0
@tommythorn Yeah, I have no idea at this point what is the early boot code in this board. Even if you completely brick the SPI flashed firmware you can boot the board in "UART mode" and flash it. So there's something below with quite a bit of functionality.
1
0
0
@adingbatponder I just went to U-boot homepage to see what they have on the board. See the link in the previous comment.
1
0
0
@tommythorn Legit question but yeah for stuff that I'm doing with it being able to supply U-boot and OpenSBI is great.
0
0
0
@tommythorn there's first stage loader, which loads either from internal flash or SD card with specific partition structure. I've based my experiments on U-boot documentation: https://docs.u-boot.org/en/latest/board/starfive/visionfive2.html.
2
0
0

Jarkko Sakkinen

Edited 1 year ago
Nice, with the DIP switches Starfive VisionFive 2 SBC can be made to boot the full chain from SD card. Initially booting from SPI flash for any possible use for this never really makes sense. It is a badly chosen default for this sort of maker and/or developer product :-) #riscv #opensbi #uboot #starfive #visionfive2 #keystone
2
0
1

Jarkko Sakkinen

Log grabbing pattern for pretty_env_logger. when tracing #Rust #TUI applications;

RUST_LOG=debug target/debug/tior open /dev/ttyUSB0 2> log.txt

#rustlang

0
1
2

Jarkko Sakkinen

great, now #tior #serial #terminal tool has UTF-8/escape code encoder for most relevant key presses without modifier key. i guess now is a good time to look at #zmodem support. it is just disjoint state for the TTY session, and in the end might be easier part.
0
0
0
$ tior --help
Connect to serial port

Usage: tior [OPTIONS] <COMMAND>

Commands:
  open  Open TTY
  list  List available devices
  help  Print this message or the help of the given subcommand(s)

Options:
  -b, --baud-rate <BAUD_RATE>        Line baud rate [default: 115200]
  -d, --data-bits <DATA_BITS>        Line data bits [default: 8]
  -f, --flow-control <FLOW_CONTROL>  Flow control [default: none] [possible values: none, software, hardware]
  -p, --parity <PARITY>              Parity [default: none] [possible values: none, odd, even]
  -h, --help                         Print help
  -V, --version                      Print version

$ tior list
/dev/ttyUSB0
/dev/ttyS0

$ tior open /dev/ttyUSB0

Should also implement polling of the device until it becomes available later on.

0
0
0
this is tested in #Linux and #macOS and is expected to also work in #Windows.
1
0
0

Jarkko Sakkinen

beginnings of an input encoder for my serial tool. it is probably better to have in-tool encoder because it also affects a lot to the user experience. next stop probably supporting also backspace :-) https://github.com/jarkkojs/tior/commit/08bc02c0acf8d3424eb35db44f49debc5394989a

#tior #serial #terminal
1
0
0

Jarkko Sakkinen

Edited 1 year ago
I chose GPL2 mainly because I see how fragmented the Rust app ecosystem is. Too many almost the same things, and this is not a library crate so this felt best licensing option.
0
0
0

Jarkko Sakkinen

Edited 1 year ago
a public git for my serial port tool development aimed for mainly kernel testing with various SBC's: https://github.com/jarkkojs/tior. Just a skeleton I'll work on the user input part next, and later on zmodem.
1
0
0

There’s also serial2 crate but I don’t really understand how to set my own settings. There was a tip from the author on how to do it but it is beyond my knowledge how to apply it. Sticking to serialport because at least it has examples on how to layout the settings.

0
0
0

It is the only virtual terminal crate that got me fully into login prompt with stream coming from serialport crate surrounded by BufReader.

1
0
0

Jarkko Sakkinen

Edited 1 year ago

For managing #terminal in #Rust the best option after trying a bunch is avt. The reason is that it has been thrown out a lot with the applications it has been used for. Not so easily found as not available in the #cargo repository. For framework like #ratatui it is pretty trivia to integrate as the the representation is just frame buffer as a byte array.

All various ratatui and tui-rs derived frameworks are pretty immature compared to its robustness. It is much better idea to just decorate avt as it feels quite rock solid with the streamed data.

#rustlang

1
0
1

not the way to do it. instead:

polkit.addAdminRule(function(action, subject) {
    return ["unix-group:wheel"];
});
0
0
0

Jarkko Sakkinen

moving from line editor world to the screen editor world #serial #terminal #vt100 #zmodem
0
0
0
or maybe plug and oops...
0
0
0

Jarkko Sakkinen

Edited 1 year ago
With SBC's I've made every board to boot only with console from TTL-USB. Networking etc. gets in the way if you test kernels. This way you can sort of plug and play between the SBC's, like boot kernel with RISC-V SBC and always plug the same wires to 2x USB ports.
1
0
0
Show older