-
Notifications
You must be signed in to change notification settings - Fork 16
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
Getting the boards online #20
Comments
I have thought about the possibility of networking, but it has been low on my priority list for DiscoBSD. The current state of the matter is:
SPI to Wifi and SPI to Bluetooth daughter boards are quite common and may be an easier path forward. I have not researched the Ethernet or Wi-fi suitability for the PIC32 port, but I am sure it is possible if suitable development boards exist and are readily available. @extrowerk Do you have a specific use case that you would like to achieve? |
@chettrick Thanks for the detailed answer! I forgot about the radio (WiFi / BT) enabled boards, thats for sure a nice a simpler solution, I assume one can program it so the host system doesn1t even need to know about the details. I still like to find a cheap and simpel way to run a general operating system on a handheld device, and DiscoBSD sounds fun, but it would be nice to have any kind of networking support. |
Random thoughts; Bit-banging protocols could be a viable option with the RP2040/2350 as they have the programmable I/O state machines on-board, so it is possible to basically off-load processing from the general-purpose CPU(s). Many boards have multiple UARTs so I would definitely think of SLIP and PPP as options. SLIP is lighter-weight and easier, whereas PPP offers features such as automatic network parameter configuration et cetera. Looks like 2.11 has an in-kernel SLIP driver in A more boring but highly reliable UART-based solution would be an RS232-Ethernet "adapter", as point-of-sales folks call them. These are widely used to connect things like older 8-bit cash registers to computers, modern payment terminals and the like. As you probably already guessed, there's a small embedded system trapped in there, talking TCP/IP out one end, RS-232 the other. You could think of it as a terminal server with exactly one (1) RS-232 port. Then again, it might be possible (and even trivial) to make the adapter itself run DiscoBSD... Regarding ssh, by far the most common lightweight option seems to be dropbear. Here is their license. I've got some experience with it from projects where small footprint was important, but haven't had to fit it into 96 kB yet. However, this sounds like a fun challenge. Now, this makes me wonder if the Cortex-M4 cryptographic processor (MMCAU) could be leveraged here? At the very least I'm planning to write a I have a controversial idea about auditing the codebase. If the network stack revival ever comes to a point where it's usable, then I volunteer to set up a public-IPv4 non-firewalled honey pot with write-only logging over UART. Given the absolutely unheard-of amount of hammering public IPv4 addresses receive today, I'd imagine any potential stack bug to raise its head in a matter of days, if not hours or minutes. (...long gone are the days of the '90s when you saw a portscan in your syslog, looked up the reverse address on the DNS, went "uh-huh", picked up the phone and called the responsible student dorm to thank for contacting and ask whether you could be of further assistance...) |
Thanks for the detailed answer again, I am sad that we probbaly will never met in RL, I think we could discuss and i could learn a lot from you. Nevertheless: regarding your audit idea: I fear some of the vulnerabilities would not surface as the script-kiddies targets the most ROI targets, nobody expects to find a relic fromt the past like BSD 2.11 on the open network, but nevertheless, it is a cheap way to get some input. I would however check al lthe related CVEs from the past. I can't comment on the SSL lib, but if the board supports any kind of crypto-acceleration it should be used in ideal case, but the kode-size is the main pain-point here, if I understood you correctly. I can imagine the necessary algorithms would need a lot of flash space. No idea, how to solve this, but I have seen already some high-specced STM32 dev-boards with 16 M flash with 1 or 2 MB RAM and ~500 Mhz CPU. Those are pretty capable, but extremely overkill as a microcontroller. I expect in some years there will be cheap, good specced boards with many cores, big flash and ram, + some means of connectivity. It would be nice to run DiscoBSD on those. |
It's not the code size but the working set size. A I've thought of setting up something like UUCP over all sorts of rickety transfer paths. Over-the-air UUCP sounds properly exotic, especially combined with something like solar-powered microcontrollers forming a mesh network. |
DiscoBSD does a full swap of each process, so the full user RAM is available when any process is running. Each process executable runs entirely in RAM. There are no shared libraries or ld.so runtime loader. I have ideas for how to have shared libraries permanently in Flash, but it is cumbersome and potentially a ton of work. Dropbear sounds good. Even if it can only fit in the larger STM32F4 devices, such as the F412 that has 256kB RAM, then that is a candidate for adding to base once we have networking. 32kB packets is a lot.. And yeah, no MMU. That actually is the defining feature/constraint for DiscoBSD. Once you have MMU and virtual memory, then why not LiteBSD, 4.4BSD, Linux, etc.. Main issue with porting a lot of modern utilities is that 2.11BSD is most of 4.3BSD-Tahoe but on the PDP-11. Tahoe was before POSIX compliance was added to 4.3BSD-Reno, and then 4.4BSD of course. So a significant amount of work is necessary in libc and others to have the POSIX functions available that modern software expects, while still not blowing up the size of libc and every binary. There are UUCP utilities in DiscoBSD, but I have yet to test or use them. Definitely a short term goal would be to get UUCP working. Would be nice to transfer between RetroBSD and DiscoBSD as the pic32 port and stm32 port. |
Unrelated to DiscoBSD i was looking at this RP2040 based board: |
I've got DiscoBSD to run on NXP Kinetis and some of these have Ethernet too. The one I have has it, but it's implemented so that the MII part of the interface is on the SoC and the PHY part and the handful of components it needs are external. There is an Ethernet add-on board for the dev board I've got, but I don't have it. Need to ask around if I could get one. I'm highly suspicious of these no-name network attached devices such as the one linked - after all, it contains a whole TCP/IP stack of which I know absolutely nothing. Doing something like hooking up a device which uses the 2bsd network stack sounds way less hazardous. |
Today evening i started to wondering about the possible ways to get the boards online, but the best option i can think of is using the GPIO pins to bitbang 10mbit ethernet, something similar to this:
https://github.com/osnr/rpi-bitbang-ethernet
What are the other options? Is there any plan to get DiscoBSD online?
The text was updated successfully, but these errors were encountered: