331 points · by gregorymichael · 8y ago · 79 comments
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/
* 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
or, if you want,
LISP: Loses In Systems Programming
- 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.
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.
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.
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.
[0]: https://github.com/buildroot/buildroot/tree/master/board/ras...
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.
i will share the code (make it public via github) and write up my experiences developing for this device.
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.
https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-...
The AUR provides additional software you can compile yourself but most of what makes the system run already built.
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.
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.
Sorry, wasn't DSL debian based too... Have the basic things needed grown that much?
> A tweakers wet dream!
Yikes
Do you have plans to implement paging eventually?