Building an Operating System for the Raspberry Pi
jsandler18.github.io
jsandler18.github.io
It does all the low level stuff that C does but it has some safety features as well as generics.
The standard library is usable in freestanding mode, even the data structures that allocate memory, because everything takes an allocator as a parameter.
Here are some examples:
* i386 OS: https://github.com/AndreaOrru/zen
* ARM (raspberry pi) OS: https://github.com/andrewrk/clashos
[1]: http://ziglang.org/
http://conal.net/papers/compiling-to-categories/
https://icfp17.sigplan.org/event/icfp-2017-papers-kami-a-pla...
I think you are right, recently I saw an Arduino-like projects book, but using VHDL instead, which somehow pointed into this direction.
That all being said, Zig looks pretty okay. It would be a good candidate to write an OS if you had to because the standard library looks trivially portable so you could test the userland on a known working kernel before getting it working on your new kernel.
* Rust
* D
* Zig
* C2
* Nim
* LISP
* Ante
* Clay
Please note: I think all of the above languages (with the exception of C2) are awesome and should be looked at.
* Terra
- Ada
- SPARK
- Modula-2
- Modula-2+
- Modula-3
- Oberon
- Oberon-2
- Oberon-07
- Component Pascal
- Active Oberon
- Dylan
- Object Pascal
- Sing#
- System C#
- Swift
- C++ (assuming C++17)
Then the older than C, or about the same age.
- ESPOL
- NEWP
- PL/I
- PL/M
- PL/S
- PL/8
- Mesa
- Mesa/Cedar
- Algol68-W
These are the most well known ones.
Plenty of material to learn for anyone that anyone with interest in systems programming and how it evolved since 1960.
However, there are quite a few lessons on the manuals, papers and sample code from those languages, to learn about other approaches of doing systems programing.
Lessons that one can bring back to life.
For example, are you aware that ESPOL, the systems programming language for the Burroughs B5500 in 1961, about 10 years before C was created, already had the concept of UNSAFE code blocks?
Burroughs B5500 is still sold nowadays as Unisys ClearPath mainframe.
Or that IBM implemented their research OS and compiler toolchain for their very first RISC processor in PL/8, a safe systems programming language, using a compiler architecture similar to how LLVM looks like?
IBM mainframes still use PL/I variants, although new systems code is a mix of C and C++.
So plenty of ideas there to learn, even if no one is going to start writing new code in those languages.
> Ada and perhaps C++17 is the only language people are actually recommending to replace C.
I would still add Swift to that list, even if that turns out to be just like Objective-C, mainly specific to Apple platforms. Given Apple's roadmap for it.
Swift 4.0 got all the Unsafe* APIs stabilized, maybe they would be using it a bit more.
In any case, Apple also suffers an Objective-C vs Swift, just like Microsoft used to have C# (Longhorn, Singularity, Midori) vs C++.
Which means, even if it possible to use a certain language from technology point of view, many political wars have to be won as well.
However, to the extent that swift (and obj-c!) are used for systems programming, those programs are useable outside of apple platforms.
"Swift is a successor to both the C and Objective-C languages."
https://developer.apple.com/swift/
As mentioned in another comment, most of the time the issue is political, not technical.
or, if you want,
LISP: Loses In Systems Programming
Part 1: "tar -xf tar -xf gcc-arm-none-eabi-X-XXXX-XX-update-linux.tar.bz2" should probably lose one of the "tar -xf"s.
Part 6: "unfmilaiar"
Part 8: "Proccess"
i even considered doing my own os, but ultimately my goal is to build an appliance so that would be a major distraction. dietpi seems good, i will probably pursue that, but thanks for writing the article.
my device connects to any hdmi enabled tv and provides a digital scoreboard for sports, basically i'm running a chromium browser (via electron) and autostarting that when the device starts. the device is then controlled by an ios app. i ended up using ubuntu-mate, but i don't think i even need gnome, maybe something along the lines of windowmaker, flux, or lightdm would do. i need to save microsd space so that i can have users upload media like images and video, and ubuntu mate really hogs up 4G and above which forces me to have to supply a larger microsd card which ups the total cost.
The most recent image I built ended up being around 700MB, but I included some stuff you may not need, so you might be able to get that smaller.
This has a list of DietPi's pre-installed applications and the packages that it has available for installation: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5#p5
To build a tiny fine-tuned Raspbian for "embedded" Python 3 (a project I dub PiratePython). It uses multistrap/qemu and worked well for me. YMMV.
I'm aiming to distribute SD cards that make some of our Pi Zero kits - Radio, Mood Light, etc - near frictionless to get up and running.
I found the use of Qemu + multistrap in this tooling easy to get my head around and I additionally wanted a stateless RAM disk so customers couldn't fubar it.
I didn't have much luck with Buildroot.
I evaluated TinyCore/PiCors too and I love the concept, but it's just a little contrived to ship to beginners. The way it mounts whole packages of overlays/dependencies is clever though- I am doing something similar (inspired by Open Pandora's pnd format) to add a custom build of VLC to PiratePython for our radio kit. Package the whole app + dependencies into a container image, drop it onto the SD card, mount and simlink everything into place.
That being said, last time I tried to run FreeBSD on a Radpberry Pi was not a pleasant experience. That was several years ago though so things may have improved.
[0]: https://github.com/buildroot/buildroot/tree/master/board/ras...
https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-...
I can't confirm this, but it feels like Arch linux has surged in popularity over the last ~3-4 years. I ditched Debian for Arch in 2016 and haven't looked back.
The AUR provides additional software you can compile yourself but most of what makes the system run already built.
i explored using some scripts to autostart firefox and open up a certain page, but the fact that i needed kiosk plugins from third-parties just ended that for me, i don't want the browser frame to show up. electron is a bit overkill, but thus far it gets exactly what i want done. that piece will be optimized once i find the time.
i will share the code (make it public via github) and write up my experiences developing for this device.
> A tweakers wet dream!
Yikes
Sorry, wasn't DSL debian based too... Have the basic things needed grown that much?
Do you have plans to implement paging eventually?