4 ms·
Are there prior projects that have the Linux kernel with a "FreeBSD userland"? This is the first time I'm hearing of such an idea. What would that entail? This
by kaladin-jasnah 3y ago
Are there prior projects that have the Linux kernel with a "FreeBSD userland"? This is the first time I'm hearing of such an idea. What would that entail? This report isn't particularly clear on such technical details.
- craftkiller 3y agohttps://chimera-linux.org/ https://chimera-linux.org/
- braiamp 3y agoDepending on the specifics on what do you mean: Truenas.
- kstrauser 3y agoI'd forgotten that some Debian folks tried the exactly opposite for a while, a FreeBSD kernel with a GNU userland: https://wiki.debian.org/Debian_GNU/kFreeBSD https://wiki.debian.org/Debian_GNU/kFreeBSD
- emidln 3y agoThere was also a Gentoo effort to run atop FreeBSD[0]. The challenge of course is that afaik none of the BSD kernel ABIs are considered stable. The stable interface is the BSD libc. That said, with binfmt_misc, I don't see a reason you couldn't just run (at least some) FreeBSD binaries on Linux with a thin syscall translation layer (rather something like qemu-system) and then your layer hooked via binfmt_misc. I'm not aware of anyone who has done this for FreeBSD, but prior efforts existed as alternate binfmts for SysVr4/5 ELF binaries[2]. Either way would take some elbow grease, but you *might* even be able just reuse binfmt_elf and just have a new interpreter for FreeBSD elf. [0] https://wiki.gentoo.org/wiki/Gentoo_FreeBSD https://wiki.gentoo.org/wiki/Gentoo_FreeBSD [1] https://docs.kernel.org/admin-guide/binfmt-misc.html https://docs.kernel.org/admin-guide/binfmt-misc.html [2] https://github.com/torvalds/linux/blob/master/fs/binfmt_elf.c https://github.com/torvalds/linux/blob/master/fs/binfmt_elf....
- kstrauser 3y agoFreeBSD has the same kind of abstraction layer that allows it to run Linux binaries, basically selecting which ABI to use per-executable. I wonder how hard it’d be to make a Linux equivalent?