6 ms·
this is excellent, i've been thinking about this as well recently. my goal has been to create a small device/appliance using raspberry pi. i tried out lots of
by epynonymous 9y ago
this is excellent, i've been thinking about this as well recently. my goal has been to create a small device/appliance using raspberry pi. i tried out lots of operating systems: raspbian, ubuntu-mate, ubuntu core, windows iot, fedora, etc. i needed a lightweight x windows environment, a decent package manager, and modern linux kernel, overall none of these really seemed to match my needs. basically raspbian was too heavyweight, it was a desktop environment with way too many applications like libre office, etc that i just didn't need. ubuntu core required the use of snaps which are based on docker, i'm hosting an electron app so that's just overkill, i'm thinking in terms of preserving memory, too since there's only 1g on the rpi 3 model b so everything has to be optimized. windows iot requires a windows license, a definite non-starter for me. i even looked at chromium and android, but those didn't seem to be a good match because i want to host a golang service and i don't have a touchscreen. i even looked at fuchsia, but that seems too experimental.
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.
- tbrock 9y agoWhy not use Arch Linux? The arm version is called ALarm (for obvious reasons). https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3 https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-...
- epynonymous 9y agoi was once a fan of arch linux, loved having the control of compiling everything. how well is this supported for raspberry pi? it's always nice to know that vendors have tested the exact hardware that i'm using extensively, even if it's just another arm device that looks and smells like the others. also, what package manager is used by arch? it's been like 10 years since i last used it.
- caro_douglos 9y agopacman iirc
- nerflad 9y agoIt still uses pacman. 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.
- tbrock 9y agoMaybe you are thinking of Gentoo? Arch’s core and community software are distributed as binaries that have been compiled for you. The AUR provides additional software you can compile yourself but most of what makes the system run already built.
- WoodenChair 9y agoWhy can't you start with Raspbian and uninstall most of the apps?
- epynonymous 9y agothat's something i considered, but i also wanted to take the opportunity to learn more about creating a tight knit distribution. i could see a lot of appliances coming out of these rpi like devices, there definitely needs to be a tight distribution purpose built for people who want to build appliances similar to mine. i've also always had this task burning in my list of things to do to do an lfs type project. 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.
- kelnos 9y agoAn in-between option might be to use https://github.com/drtyhlpr/rpi23-gen-image https://github.com/drtyhlpr/rpi23-gen-image -- it generates a Debian distribution for you with (more or less) only the packages you specify. 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.
- untog 9y agoThere's Raspian Lite, which is pretty much exactly that. You can just add a window manager onto it.
- epynonymous 9y agowill give it a try, i think raspbian is sort of targeted at the education market for students that need a full blown desktop computer for various things. the fact that it's running debian as a base is great. how does this differ from dietpi?
- jlewallen 9y agoYou might want to check into Tiny Core Linux.
- epynonymous 9y agowhat is the package manager used by tiny core? i think this is what's used by boot2docker
- jlewallen 9y agoIf I remember correctly, TCL uses a very simple overlay system based on squashfs. Most (all?) of the tooling and package management stuff is also written in bash.
- gadgetoid 9y agoI used this tooling: https://github.com/ali1234/rpi-ramdisk https://github.com/ali1234/rpi-ramdisk 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.
- epynonymous 9y agoi suppose this is a one-off project for you or are you creating a device for distribution? if you are creating the latter, how did you clone this to other devices, i'm assuming dd?
- gadgetoid 9y agoI'll probably prep the "gold master" SD card and then leave it to our SD duplicator. 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.
- katastic 9y ago> i tried out lots of operating systems: raspbian, ubuntu-mate, ubuntu core, windows iot, fedora, etc. i needed a lightweight x windows environment, a decent package manager, and modern linux kernel, There are plenty of distros that are that. There are plenty of ARM, and embedded distros that are focused on being modular (you only pay for what you use) and maximize RAM. Your use case does not sound niche or unique. >there's only 1g That's a huge amount for small linux distros.
- jeztek 9y agoI've had good luck with Alpine Linux: https://wiki.alpinelinux.org/wiki/Raspberry_Pi https://wiki.alpinelinux.org/wiki/Raspberry_Pi
- ciupicri 9y agoWhat about FreeBSD?
- epynonymous 9y agogood support for raspberry pi or general arm support?
- epynonymous 9y agoi found this, seems it's been supported for a long time. i'm not ecstatic about the wrappers in ruby/python for gpio, but then again i don't need it at this point in time. https://wiki.freebsd.org/FreeBSD/arm/Raspberry%20Pi https://wiki.freebsd.org/FreeBSD/arm/Raspberry%20Pi
- bringtheaction 9y agoI am a great fan of FreeBSD and I run it as my main OS on one of my two laptops that I use daily. 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.
- floatboth 9y agoFreeBSD/arm64 now has official binary packages for 12-CURRENT. RPi3 runs in 64-bit mode with all 4 cores. For the most part, everything is good. But the vc4 KMS driver is not ported yet, so no GPU accelerated desktop for now.
- eltoozero 9y agoI did a bare-bones buildroot[0] for Raspberry Pi to run tcpser[1], was a bit of hassle but not too unmanageable! [0]: https://github.com/buildroot/buildroot/tree/master/board/raspberrypi https://github.com/buildroot/buildroot/tree/master/board/ras... [1]: https://github.com/FozzTexx/tcpser https://github.com/FozzTexx/tcpser
- epynonymous 9y agowow, cool stuff, will check it out!
- thezilch 9y agoWait... you're worried your OS will be so overkill you would create your own, but you're perfectly fine using Electron?
- epynonymous 9y agomy requirement is to start up a browser, preferably chrome, and open up a certain page, this page is essentially like a digital scoreboard that is shown on a tv. electron embeds chromium and can start up an application super quickly, of course it requires nodejs and a bunch of nodejs libraries, but seems around 79M for the binary, my electron app requires a few nodejs libraries, but this is all text so nominal. 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.
- lovelearning 9y agoI don't know if you have already tried this, but if not, try 'google-chrome --kiosk <page>'.
- epynonymous 9y agoi also found that there are high level services that are needed to control the device, simple things like restart, changing ip's, upgrading, backing up, etc. i started to create a higher level library for these things using golang, basically a restful service, in this way it could be controlled via an application instead of having to use ssh, this is good for consumer like devices, but obviously opens up a can of security issues. i will share the code (make it public via github) and write up my experiences developing for this device.
- deleted 9y ago[deleted]
- nicky0 9y agoDid you look at Raspbian Lite? You could then install your choice of windowing system on top.
- epynonymous 9y agoany suggestions for windowing system?
- GophersGoneWild 9y agoLooks like the Electron shills are out in full force tonight.
- deleted 9y ago[deleted]
- UncleSlacky 9y agoVoid Linux might suit you: https://wiki.voidlinux.eu/Raspberry_Pi https://wiki.voidlinux.eu/Raspberry_Pi
- snvzz 9y agoI can't help but notice you've not tried standard Debian (raspbian isn't it), archlinuxarm nor, god forbid, any BSD.