Commodore 64 Supercharged by Omega2 (Pictures)
-
Figured out a good solution after a bit of digging. Shell script:
#!/bin/ash stty -F /dev/ttyS1 2400 while : do echo "" >/dev/ttyS1 echo "Onion Omega 2+ on Commodore 64!" >/dev/ttyS1 ash -l </dev/ttyS1 >/dev/ttyS1 2>&1 done
Right now I'm launching it manually, but could do it from inittab or some other approach at startup.
Still two outstanding questions:
- How could i get it to actually give a login prompt?
- Related...Is there any documentation anywhere on what command line parameters this version of busybox ash takes?
-
@Leif-Bloomquist said in Commodore 64 Supercharged by Omega2 (Pictures):
- How could i get it to actually give a login prompt?
- Related...Is there any documentation anywhere on what command line parameters this version of busybox ash takes?
Try
ash -l -c /bin/login
I think that's the effect you were looking for.No documentation that I know of, found the
-c
option by runningash --help
-
Thanks, that does the trick.
No documentation that I know of,
How do you not have documentation for the code that ships on your own product? That fascinates/baffles me.
found the -c option by running ash --help
Fair enough, but the output is pretty cryptic:
root:~#ash --help BusyBox v1.26.2 () multi-call binary. Usage: ash [-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS]] Unix shell interpreter
I don't see how you can glean much from that.
-
@Leif-Bloomquist said in Commodore 64 Supercharged by Omega2 (Pictures):
How do you not have documentation for the code that ships on your own product? That fascinates/baffles me.
We didn't create, develop, or modify BusyBox, it's a (GPL) utility that's commonly used with Embedded Linux. We don't have any special access to documentation, just what's available online.
-
Is there a unix shell on this planet that does not have the -c option?
But yes, there's no clear path leading to busybox shell docs, until one starts digging a bit harder, which I did a while ago:
The busybox shell originates from the almquist shell (ash). ash became dash when is was ported to debian, and later became the default /bin/sh on ubuntu. And ash was also included into busybox.
So when you want to know something about the busybox shell, the closest match is a dash man page.
-
@Lazar-Demin said in Commodore 64 Supercharged by Omega2 (Pictures):
We didn't create, develop, or modify BusyBox, it's a (GPL) utility that's commonly used with Embedded Linux.
Excuse me but this is simply not true.
BusyBox is modular and extremely configurable. On Omega you take advantage of these opportunities all the time when including or excluding applets / commands / features at compile time.
Due to the lack of information we don't have other possibilities than the trial and error method or digging the source code (if there is any).
A short Readme would be very useful (to show us what you've enabled / disabled).In addition sometimes there is a pinch of false info (especially for newbies). For example:
Onion Omega2 Documentation 2017-08-10
The Command Line Interface
Some Basic Commands
Information
If you are not used to work with the terminal, you might be happy to get some additional information what you can do within this “Black-Box”.
To get more info about what commands you can use, just type:
busybox --help
and you will get a overview of what busy-box is and all commands available over it.busybox --list
if you prefer a list of all this commands.Omega2+ v0.1.10-b160 BusyBox v1.26.2
root@Omega-5BE1:~# busybox busybox: applet not found root@Omega-5BE1:~# busybox --help -help: applet not found root@Omega-5BE1:~# busybox --info -info: applet not found
-
@György-Farkas What I meant was that we didn't modify the source code. I would argue that choosing which packages/modules to compile in is not modification
In any case, our firmware build root is now open source: https://github.com/OnionIoT/source
You can clone the repo, follow our instructions on setting up the build system, and then usingmake menuconfig
to see which busybox packages were selected.
Alternatively, you can try to decipher the.config
file directly: https://github.com/OnionIoT/source/blob/lede-17.01/.configRegarding the documentation, I'll make a note to fix that. It worked at previously!
-
for this project and initial stub work.
I began a similar project but without the max232 level shifter. It would explain why my terminal was receiving Garbage.
I encountered a odd sitiation with the script. If I use SSH to anther server , the password prompt returns on the omega putty shell and not the serial.
I also wasnt able to CTRL+C anfter a ping command.
-
@Leif-Bloomquist
I have the same setup in a way and I get a " -ash can't access tty; job control turned of "
When it shows on the serial portI have this script work on rc.local and it works on boot.
Trying a ping command or top won't let me CTRL+C out of it.
-
I Have Come up with an inittab solution :
I use a USB (until i setup a MAX232)
ttyUSB0::respawn:/bin/ash -l -c /bin/login
This will provide a basic login shell to the serial term and allow ssh to other systems.
It accepts CTRL+C too so pings work !!