(2024-01-08) Minimalism strikes again: Kindle, Alpine and TUI-first mindset --------------------------------------------------------------------------- So much happened throughout the week that I really had to reimagine what to write today. I wanted to just talk about the Amazon Kindle Basic 11th Gen the company I work for gave to me as a Christmas gift and some internal activity related award, but this just wouldn't cut it. Yes, this is among the first MediaTek-based Kindles: while all previous generations were on Freescales or something like that, this one runs on MT8110 (so-called "Bellatrix" board). Yes, I rooted it with LanguageBreak ([1]), freezing the firmware version at 5.15, installed KUAL, KOreader, Kterm ([2]) and kual-linuxdeploy-armhf, but then the question "what next?" bothered me for quite a while. I experimented with Xephyr-based XFCE installation and tried to get something else in there, but then I just settled on an Alpine-based chroot running in the same Kterm. Overall, the main firmware being just a custom Linux (with X server and everything) and not Android, I see the potential of turning this e-reader into a full-fledged hacker tablet, but now even this chroot environment will do. Alpine Linux, by the way, has been my distro of choice everywhere except the main nettop where I still run Arch/Garuda. I had been running it on an old 2010 Macbook Air (A1370) as well, and even prepared a nice set of scripts and CWM configuration specifically for it. However I foolishly believed that I'd manage to find something even more minimal. Haiku and OpenBSD have troubles with the Macbook's Broadcom B43 series WLAN chip. Void Linux is just plain glitchy on that hardware for no apparent reason. This is how I came to installing CRUX 3.7 on that very laptop. A grave mistake. For the first couple of days, I honestly thought I would get a usable and rock-solid system if I would endure this long process of compiling everything starting from the kernel and then whatever prt-get sysup command was pulling in. On a 2-core 2GB laptop from 2010, uh-huh. On the third day, while waiting for Rust (!) to compile, I managed to break what seemed impossible to break and I believe couldn't be broken on any other system: GCC. Namely, header files that I must have overwritten with a parallel scc installation. Or cproc, or chibicc, I don't remember exactly. As a matter of fact, some headers were gone. And guess what: restoring from the initial GCC package DIDN'T FIX THEM. I surely must have missed something, but at this point I had enough and went back to Alpine. By the way, I spent more time copying the 3.19-extended ISO contents to the flash drive than actually clean-installing it with its wonderful setup-alpine script. By the way, Alpine is not so obvious to install from a USB flash drive, at least on this Macbook A1370, unless you know a simple trick, because just dd-ing the ISO image won't work. And, by the way, no one is preventing you from using the same trick on all other x86-64 machines. First, format your flash drive with a GPT partition table (that's a requirement) and a single FAT32/vfat partition. Then, just extract the Alpine ISO contents into the root of that partition. That's it. You now have a flash drive that's both usable as a "normal" flash drive and bootable into an Alpine live/installation system image on any (U)EFI-enabled machine, including such Macbooks (which should detect it when booting with the Option/Alt key pressed down). Once you created this flash drive though, everything else is a breeze. For x86 and x86_64, I recommend using the "extended" Alpine images because they already contain all the firmware you might need to get connected. And again, with this method, you totally may continue using the flash drive normally for other storage purposes, just don't touch the boot, efi and apks directories, and also probably the .alpine-release file in its root. This is as human-oriented as it can possibly get for such a minimalist distribution. As for the brief moment of using CRUX, I have to give it one credit though: it really forced me to review my perception of minimalism even more. Having to waste time to compile a lot of things that we take for granted in other distros made me wonder whether or not we could get away without using those things. Unfortunately, this includes the compilers themselves. Again, I'm all for deploying cproc/chibicc/scc in any environment I can, but a lot of software nowadays really depends on monstrous GCC/Clang-based toolchains (and yes, zig cc belongs to the same category as a Clang derivative). And yes, Nim doesn't help the situation as it uses the same monstrous toolchains as the middleware. This is why, for my personal projects, I'm also thinking about exploring some simpler options like (again, qbe-based) Myrddin ([3]) but I'm not really sure yet how independent it really is. Another important topic that CRUX has directed my thoughts to and that I really am looking forward to recreate in Alpine (instead of the cozy Xorg+CWM) is purely TUI experience. Maybe even with framebuffer enabled, because why not? E.g. fbterm looks fantastic when pointed to the Fira Code Retina font. But I also have learned to generate pure-console keyboard layouts, learned about some more TUI and framebuffer-aware software and so on. Probably some of my next posts will be about the details of what I have done on my newly-reinstalled Alpine and how exactly I have configured everything there. Moral of the story: 1) Amazon sucks as always, 2) true minimalism is not what it seems, 3) the more you use CRUX, the more you appreciate Alpine. --- Luxferre --- [1]: https://github.com/notmarek/LanguageBreak [2]: https://www.fabiszewski.net/kindle-terminal/ [3]: https://myrlang.org/