1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 09:38:06 +11:00
collapseos/tools
Virgil Dupras c2b507eaff tools: improve usability on OpenBSD
So far, I hadn't managed to run those tools properly on OpenBSD. I
was too confused by its stty peculiarities. I'm still confused, but
at least I managed to make them work... most of the time...
2020-07-02 11:36:53 -04:00
..
.gitignore tools: add blkup 2020-05-03 08:53:17 -04:00
blkpack.c Replace deprecated bzero with memset (#119) 2020-06-16 18:58:23 -05:00
blkunpack.c blkunpack: don't include trailing empty lines 2020-06-23 06:52:34 -04:00
blkup.c tools: improve usability on OpenBSD 2020-07-02 11:36:53 -04:00
common.c tools: improve usability on OpenBSD 2020-07-02 11:36:53 -04:00
common.h tools: improve usability on OpenBSD 2020-07-02 11:36:53 -04:00
exec.c tools: improve usability on OpenBSD 2020-07-02 11:36:53 -04:00
Makefile emul: don't embed forth.bin in emul binaries 2020-05-23 09:54:26 -04:00
memdump.c tools: improve usability on OpenBSD 2020-07-02 11:36:53 -04:00
pingpong.c recipes/trs80: new recipe (WIP) 2020-01-11 23:01:28 -05:00
README.md tools: improve usability on OpenBSD 2020-07-02 11:36:53 -04:00
ttysafe.c Reverse ttysafe escaping order 2020-02-22 14:11:43 -05:00
upload.c tools: improve usability on OpenBSD 2020-07-02 11:36:53 -04:00

Tools

This folder contains tools to communicate to Collapse OS machines from a modern environment or to manipulate a blkfs.

Communication tools all take a device path as a first argument. That device is the serial device that connects you to your machine. It's often a USB-to-TTL dongle. When - is specified, stdin is used as the device.

Note that for these tools to work well, you need the serial device to be properly set up, TTY-wise. You'll probably want to do that with stty. The tool itself takes care of setting the regular stuff (cs8, -parenb, etc), but you need to set the speed. Here's an example working on OpenBSD:

$ ( stty 115200 ; ./upload - a000 os.bin ) <>/dev/cuaU0

To be honest, I'm having a bit of troubles making these tools work as well on OpenBSD as they do in Linux. But it does work. Here are some advices:

  • Use cuaXX instead of ttyXX.
  • Run cu -l /dev/cuaXX before running your tool and run a dummy command to make sure that the output buffer is flushed.

On Linux, it's generally easier:

  • Run screen on the device (often /dev/ttyUSBX)
  • Quit with CTRL+A :quit
  • Run the tool on the same device