Chimera is a Linux distribution with the following goals:
– Built entirely with LLVM
– FreeBSD-based userland
– Binary packaging and a well designed source build system
– Bootstrappable
– Portable
This project is still very early in its development, but it’s an interesting premise. It’s developed by Daniel Kolesa, who also contributes a lot to Void Linux, most notably the excellent POWER/PowerPC port of that excellent distribution. Over on Twitter, Kolesa regularly posts updates on the status of Chimera, and even though some of the stuff definitely is above my pay grade, it’s quite interesting to follow along.
This is not the UNIX way. Let me say the final point first, before going into details.
While the project is really ambitious and interesting, it seems to set itself for failure. The reason is simple, it is trying to do too much at the same time. Yes, being able to compile everything with LLVM is nice, yes having FreeBSD userland in Linux kernel is nice, yes compiling your own linux from source is nice. But doing all at the same time is very difficult.
Gentoo has people trying to get LLVM/clang/libc++ flavored stage 4 for years: https://www.reddit.com/r/Gentoo/search/?q=llvm&restrict_sr=1&sr_nsfw= . But even after a semi-successful Google Summer of Code project, there seems to be nothing beyond experimental.
Linux + FreeBSD’s answer seems to be: “for god..no! and big no!”
https://forums.freebsd.org/threads/freebsd-with-linux-kernel.76555/
And, while writing your own “Linux from scratch” is possible, reinventing the wheel as a single person, compared to Arch, Gentoo and LFS teams is an enormous burden.
If parts were ready (i.e.: somebody already did FreeBSD userland in Linux, or compiled stable Gentoo with LLVM), then integrating those and adding final pieces would be more realistic.
sukru,
Having done this myself, it’s not too bad, but I concur it does take a toll on your time and it may be hard to justify. But if someone’s inspired to do it then it is achievable even for just one person.
I'd say it depends where you are in life, haha. I also question some of the choices, but who are we to tell anyone what they should be doing I actually think there's a lot of personal value in trying things to test one’s limits when one is around college age. It doesn't necessarily have to be achievable to be a good learning experience, probably better than classwork.
Alfman,
I agree, this sounds like a real fun project, and can make a semester really worthwhile. However I usually think like an engineer now, with all kinds of tradeoffs and boring stuff.
That being said, even if this project is ultimately not 100% successful, it will leave some impact. The things learned will help the next explorer to reach a safer shore.
well guess what, the userland porting is already done, and the system boots, *and* is compiled entirely with LLVM, so…
First sentence from the Chimera webpage:
well, I would know what it can do, since I created it
the website is just not updated yet
Dang!! You really let him have it! Started with BSD not Linux when xorg config had to be configured from scratch. Only reason to switch was because there were no ati binary compatible drivers for bsd, but ati released them for Linux. I was heavily into Enemy territory wolfstein, so I no longer had to good to windows after that. But I find BSD is a more fluid and consistent way of doing things. Can’t wait to try it, there is no reason for it not to work since compat seemed to work almost flawless, with the exception of sound streamer and some little things.
That “single person” (well perhaps not alone, but still, the same group) managed to build Void Linux on musl instead of GCC so he has a lot of experience. And at least on my system the musl version runs faster than the gcc version. However i have not tried running steam on the musl version.. some claims it works better on the GCC version.
I don’t think it is all that bad. On FreeBSD the ABI is defined more or less by libc.so, so really the majority of the actual work is porting the libc.so to Linux. Or, if you went the glibc route, porting BSD utilities to glibc which has already been done at various points in time. Secondly, FreeBSD has a well developed build system for the base system and already uses LLVM. The FreeBSD ports tree is full of patches and tooling to patch package builds for FreeBSD userland specifics and LLVM. Linux itself already builds with LLVM if you use the right patches.
So sure there will be a lot of work to do, and there are going to be gaps. But I don’t think this is nearly as bad as it sounds. Tring to create a distro from scratch where you fetch coreutils, bash and glibc and linux etc. tar file releases is already way more involved than building the entire FreeBSD base system.
I think going the other way (GNU/kFreeBSD) is likely to be substantially more difficult.
> Gentoo has people trying to get LLVM/clang/libc++ flavored stage 4 for years: https://www.reddit.com/r/Gentoo/search/?q=llvm&restrict_sr=1&sr_nsfw= . But even after a semi-successful Google Summer of Code project, there seems to be nothing beyond experimental.
There are many projects successfully using LLVM/Musl userspaces including but not limited to Iglunix and Chimera .
This is the very definition of the UNIX way.
Strange it works for them and others.
Sounds like the Gentoo guys don’t know what they’re doing.
The other way, that GNU does.
They have had created
– Debian GNU/Linux
– Debian GNU/HURD
– Debian GNU/FreeBSD.
Ok, currently only the Debian GNU Linux is active.
Btw. have the formerly called GameOS, which is a linux Distribution with integrated Steam, is since some time called ChimeraOS
https://chimeraos.org/
So now existing the second Linux with Chimera in its name.
well aware of it, but mine was already in public development by the time they renamed, so the fault is not on my side
q66,
Hi, it’s always cool to hear from the author. You’re from Czech Republic according to your profile. I’ve been to Prague and it was an awesome trip. Cool place, great food & beer too I was only there just to visit but apparently it’s a big tech hub with international conferences.
Do you mind if I contact you via email?
What's the point of the FreeBSD-based userland? I don't think it's so different Functionality wise, Is it about the license?
to break the monoculture, and to gain access to higher quality code
licensing doesn’t really matter, in either case it’s free software, and there are no particular issues with including GPL software in the distribution
Any thing you can point to as an indication of higher quality code?
systemd is userland. Just saying.
not having the abomination that is gnulib is one massively good thing, but also GNU tools have a tendency to become kitchen sinks, and then the codebase bloats up and becomes hard to follow, and sometimes leads to unfortunate consequences (did you know that GNU Readline headers are broken in C++, because they appear to insist on supporting ancient K&R style toolchains that don’t ship stdarg.h?)
Soem of the nicest features of using FreeBSD compared to Linux:
1. CLI options tend to be the same across most binaries. And you don’t have to remember –horrible –long –options –that –make — it –annoying –to –type=anything.
2. CTRL+T support in just about every binary installed on the system. You won’t believe how useful that is until you try to use it on a Linux system and stare blankly as nothing happens.
3. ifconfig lets you configure everything relating to network interface configuration.
4. You don’t have to relearn a new way of doing everything with each minor kernel upgrade (ipfwcmd –> ipchains –> iptables –> netfilter for example; or ifconfig –> ip; or service –> upstart –> systemctl).
There’s a lot to like about Linux systems (and it’s what I use on my work desktop and laptop), but there’s also a lot more to like about FreeBSD. Especially on servers!
phoenix,
This is probably a matter of personal preference. If I went from linux to BSD I might grumble about BSD having changed everything I was familiar with, haha.
I wasn’t familiar with this feature in BSD. I can see how it would be useful.
Personally I really appreciate having the new ip tool replace what used to require so many other tools, many of which had to be installed separately. So IMHO ip has brought a net benefit (pun intended) and I’ve standardized around it.
I wish iptables would undergo the same type of clearup & modernization, but obviously that would create yet another transition that many would dislike. It’s hard to achieve a balance, I get why it’s frustrating. The problem is things have changed since the old tools were developed and some of them are kind of hacky,
I always had a lot of respect for the BSDs, but for me the choice to run linux (long ago) was a pragmatic one, it was simply better supported. Now that I’m invested into linux I don’t know if it would really be worth adopting BSD given that I’ve already tamed linux for me. Everything that I’ve learned and built around, like Qemu, would be different. Despite some trouble areas, I know what I’m dealing with and I get by
Today there are things I still don’t know I’d be able to solve with FreeBSD, such as cuda…
https://forums.freebsd.org/threads/cuda.49653/
https://groups.google.com/g/muc.lists.freebsd.questions/c/249m1RdZwho
I’m well aware that none of the support issues are FreeBSD’s fault, but nevertheless it is a real barrier to adoption.
Interesting. If I understand the goal is to provide a turn key linux gaming system.
It seems that the linux gaming world is build around APT (ubuntu). So the question is: why go the FreeBSD route? What have been the major challenges?
i think you are mistaken, this one is definitely not a gaming system…
@janiercero1
You must be thinking of ChimeraOS which was GamerOS, this is Chimera Linux.
I randomly like to try to dip my toes into FreeBSD, this sounds like a cool project. There are many subtle differences in the userland between the GNU ones and BSD for sure.
@leech
You’re right. Apparently googling Chimera + Linux brings you to that other project. Not the one in the article. I thought I had clicked on the article’s link, but perhaps my morning coffee hadn’t kicked in yet.
That is so bizarre, I had google Chimera linux and that;’s wee it led me. D’oh.
Sorry.
I guess my question still stands; why go the FreeBSD route, what was about the FreeBSD userland that made it attractive (especially since FreeBSD used GNU userland forever). And what were the major challenges?
Is it just a matter of plugging the Linux kernel on a FreeBSD system?
FreeBSD never used GNU userland.
You are right. I was thinking of the previous releases of FreeBSD that used gcc, so I assumed they had been using more gnu tools as well.
A quote saved from Usenet so many, MANY years ago (before Linux was even a gleam) seems appropriate …
|
| This is Unix, we shouldn’t be saying “why would you want to do that”,
| we should be saying “sure, you can do that if you want.”
| — Steve Hayman { sahayman {at} iuvax.cs.indiana.edu }
|
Yeah, but I learn more asking why people want to do what they want to do then just ignoring them or even blindly helping them do that. Sometimes people get so occupied by the process they think they need to follow they forget the actual end result they want. There is also always more than one way to accomplish a task, but I only know a few of them. I remain unconvinced that I know the best ways of accomplishing them, so willing to learn from others as well as pass on what I myself have learned.
Makes exactly zero sense but what do I know?
What kernel does this use? Since it can boot now?
an external one for now (take vmlinux+modules from another system and generate a chimera initramfs for it)
but I’m halfway there with getting the kernel packaged, in a chroot I now have a vmlinux+modules, just need to put it together for packaging and get it tested, and then it should be fully self contained