This is the Neotron OS. It will run on any system which has an implementation of the Neotron BIOS.
This OS is a work in progress. We intend to support:
- Calling BIOS APIs
- Text mode VGA console
- Serial console
- Running built-in commands from a shell
- Executing applications from RAM
- Applications can print to stdout
- Applications can read from stdin
- Applications can open/close/read files
- Applications can write to files
- MBR/FAT32 formatted block devices
- Read blocks
- Directory listing of /
- Write to files
- Delete files
- Change directory
- Load ELF binaries from disk
- Load ELF binaries from ROM
- Changing text modes
- Basic networking
- Music playback
- Various keyboard layouts
- Ethernet / WiFi networking
- Built-in scripting language
Your board will need an appropriate Neotron BIOS installed, and you need to have OpenOCD or some other programming tool running for your particular board. See your BIOS instructions for more details.
Building Neotron OS is handled by the nbuild
tool, in this repository. Run cargo nbuild help
for more information.
To make an image for a board like the Neotron Pico, you want to run cargo nbuild binary
. By default this will produce a thumbv6m-none-eabi
image linked to run at address 0x1002_0000
, with a ROMFS containing various utilities, which is what you need on a Neotron Pico. Your BIOS should tell you if you need to change these options, and how to load the resulting image onto your system.
$ cargo nbuild binary
...
$ ls ./target/thumbv6m-none-eabi/release
build/ examples/ flames.d libflames.d libneotron_os.d neotron-os neotron-os.d
deps/ flames incremental/ libflames.rlib libneotron_os.rlib neotron-os.bin romfs.bin
Here:
romfs.bin
is the raw ROMFS imageneotron-os
is an ELF file containing the OS and the ROMFS imageneotron-os.bin
is an raw binary copy of the contents of the ELF file
When the OS is running, programs in the ROMFS can be loaded with:
> rom
flames (14212 bytes)
> rom flames
Loading 4256 bytes to 0x20001000
Loading 532 bytes to 0x200020a0
Loading 4908 bytes to 0x200022b4
> run
*Program starts running**
A better UI for loading files from ROM is being planned (maybe we should have drive letters, and the ROM can be R:
).
You can also build a shared object to load into a Windows/Linux/macOS application, like Neotron Desktop BIOS:
$ cargo nbuild library
...
$ ls ./target/debug/*.so
./target/debug/libneotron_os.so
See CHANGELOG.md
Copyright (c) 2019-2024 Jonathan 'theJPster' Pallant and The Neotron Developers
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
See the full text in LICENSE.txt. Broadly, we (the developers) interpret this to mean (and note that we are not lawyers and this is not legal advice) that if you give someone a Neotron computer, you must also give them one of:
- Complete and corresponding source code (e.g. on disk, or as a link to your own on-line Git repo) for any GPL components (e.g. the BIOS and the OS), as supplied on the Neotron computer.
- A written offer to provide complete and corresponding source code on request.
If you are not offering a Neotron computer commercially (i.e. you are not selling a board for commercial gain), and you are using an unmodified upstream version of the source code, then the third option is to give them:
- A link to the tag/commit-hash on the relevant official Neotron Github repository - https://github.com/Neotron-Compute/Neotron-OS.
This is to ensure everyone always has the freedom to access the source code in their Neotron based computer.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.