Felix Palmen 📯 · @zirias
66 followers · 263 posts · Server techhub.social

@thindil Haha, that was just a gentle hint 😉. But I think it's really important to understand the difference between and , although you're certainly right, *both* were further improved/extended in 14.

BTW, I'm pretty sure there is *no* GPL-licensed code in the kernel. There is some GPL-licensed code in base, yes, but you can build base without it; the goal is always to provide a full BSD-licensed OS.

In fact, if I'm not mistaken, remains of GPL-licensed files in LinuxKPI are the main reason we still have drm-kmod drivers as a port (and not integrated with the base kernel), where this port includes these small parts of LinuxKPI. The drm drivers themselves are not GPL-licensed.

#linuxkpi #freebsd #linuxulator

Last updated 1 year ago

Felix Palmen 📯 · @zirias
66 followers · 263 posts · Server techhub.social

@thindil @emaste Please understand that a is something completely different than some other, in-kernel, call. A syscall is the special way userspace can call something in the kernel, which needs a context switch. Some architectures have special CPU instructions for syscalls available, on other architectures, software-interrupts (that the kernel can handle) are used, etc.

Nothing of that is done for in-kernel calls, they're "just" function calls.

provides a set of -compatible syscalls. The project on the other hand aims to provide in-kernel Linux compatibility for use by certain drivers. They're completely unrelated.

BTW, you're missing a syllable, it's spelled LinuxULator 😉

#syscall #freebsd #linuxulator #linux #linuxkpi

Last updated 1 year ago

Felix Palmen 📯 · @zirias
66 followers · 263 posts · Server techhub.social

Did all these tests, did some fixes, " userland from source" branch builds fine on 14-CURRENT/13.2-RELEASE, aarch64/amd64/i386 🥳

Now doing test builds with 15-CURRENT, which already has a fix for the issue. Unfortunately, it's still incomplete. Neverending story 😞

JFTR, not blaming dchagin at all. It seems Linux has some very weird design decisions, and semantics of the xattr syscall return codes -- EPERM is considered fatal by GNU/Linux tools, because Linux returns ENOATTR or ENOTSUP when access to e.g. the system namespace is restricted 🤯

#linuxulator #freebsd #linux #xattr

Last updated 1 year ago

Felix Palmen 📯 · @zirias
60 followers · 237 posts · Server techhub.social

Double-checking still in progress. So far, fixed an issues on 13.2/aarch64, another one on 14-CURRENT/amd64 (yep, didn't upgrade my test builders to 15-CURRENT yet 🙈) and yet another one on 14-CURRENT/i386.

Now, test builds for 13.2/i386 are running. We will see. Once I'm sure the version of builds fine everywhere, I'll finally check 😎

#freebsd #linuxulator #ffmpeg #makemkv

Last updated 1 year ago

Felix Palmen 📯 · @zirias
59 followers · 232 posts · Server techhub.social

And now, the *real* dependency monster in my userland: 🙈

That's port #151 I added, it has *almost* everything enabled that's in the default options of the FreeBSD port. I left out a few things that seemed (too) complex like vulkan ... 🙈

I guess now it's time to double-check the branch on other architectures and other FreeBSD versions first. And then, finally, check whether will work fine with this!

#freebsd #linuxulator #ffmpeg #linux #makemkv

Last updated 1 year ago

Felix Palmen 📯 · @zirias
59 followers · 232 posts · Server techhub.social

@meka Well, if you can build them, you can (probably) port them to work natively on . This is "just" about building the userland for to support closed-source (or, otherwise "unportable") apps.

I'm still unsure whether it's a good idea. I was thinking about using as a PoC, which requires . Only half way (or less) through with the dependencies for a somewhat "full-featured" ffmpeg and I'm already at 135 commits to my branch 🤯 I certainly won't be able to maintain all the ports needed for this userland all by myself 😉

#freebsd #linuxulator #linux #makemkv #ffmpeg

Last updated 1 year ago

Felix Palmen 📯 · @zirias
58 followers · 230 posts · Server techhub.social

Minor news from my userland project: I now succeeded to build a first "dependency monster" (in order to have all features consumers might expect): . Among other things, required porting all the libs first 😉

#freebsd #linuxulator #cairo #xorg

Last updated 1 year ago

Felix Palmen 📯 · @zirias
56 followers · 229 posts · Server techhub.social

I'm about to force-push my userland branch now, removing all hacks to disable xattr usage.

TL;DR is: If you want to test it on 14 and newer right now, you'll have to apply this patch: people.freebsd.org/~dchagin/xa -- I hope it will be committed to main and stable/14 soon 😎

The (weird) background is: Support for xattr syscalls was added quite recently, and it correctly maps the Linux syscalls to the FreeBSD ones. So far, so good. BUT: Access to the "system" namespace for extended attributes is typically restricted to root (and, on FreeBSD, also restricted in ). Now, FreeBSD returns EPERM on attempts, which IMHO makes perfect sense. But, Linux returns ENOTSUP in these cases instead. And: GNU tools and other Linux software using extended attributes considers EPERM a *fatal* error as a consequence. This means things like "install" from GNU coreutils are now broken in jails and as non-root. 🤯

The patch above fixes this.

#linuxulator #freebsd #linux #jails

Last updated 1 year ago

Felix Palmen 📯 · @zirias
56 followers · 229 posts · Server techhub.social

@alexr Sorry, but it really doesn't make sense to me to compare anything just regarding vs . The kernel(!) as a source of indeterminism is very unlikely, everything else (like where the allocator is implemented) is the same. I don't see what I would gain from that huge amount of work here.

#linux #linuxulator #glibc

Last updated 1 year ago

Felix Palmen 📯 · @zirias
56 followers · 229 posts · Server techhub.social

@alexr Are you suggesting that the same GCC (native , not cross-target) would produce different code when the Kernel isn't "real" , but 's ?

I still see no sane way to check this, maybe short of installing this very same version on a Linux system and comparing assembler output... 🤔 but it doesn't seem like a likely thing to me 🤷‍♂️

#linux #freebsd #linuxulator

Last updated 1 year ago

Felix Palmen 📯 · @zirias
57 followers · 224 posts · Server techhub.social

Did some minor fixes and overall improvements in the new USES=linuxsrc today ... it already grew quite large 🤔
github.com/Zirias/zfbsd-ports/

BTW, a while ago, I couldn't resist to add some to the toolchain, currently in line 119.

I mean, the field in these target triplets is there for a reason, right? To be used by vendors? 😏

#branding #freebsd #linuxulator #Vendor

Last updated 1 year ago

Felix Palmen 📯 · @zirias
54 followers · 221 posts · Server techhub.social

Python issue solved the "redneck repair" way, installing *everything* to /usr/lib64 (on a 64bit system) instead of *just* the architecture-dependent stuff. Now, python works and finds all its modules... 🙄

After porting lots of extra python tools (cause won't do it for proper packaging with staging), it seems I finally have a working in my userland 🥳

Nevermind all these extra modules install to /usr/lib. Well, it works, I don't care 😂

Doing a full rebuild of all the ports now just to be sure (cause I also changed stuff in my USES). If all is fine, branch will be updated 🙏

#pip #meson #freebsd #linuxulator #linux

Last updated 1 year ago

Felix Palmen 📯 · @zirias
52 followers · 214 posts · Server techhub.social

Hitting the next roadblock in my "userland from source" project: is causing trouble. I got it to build and package, but runtime parts are wrong, *somehow* the "/compat/linux" prefix "sneaks in" 😞 (still didn't understand how exactly...).

You might ask why port python at all, and indeed, I didn't plan to do so initially.

The issue is build systems. With the goal to port shared libraries that might be needed by (closed-source) Linux binaries, not all of them use plain (or ) for building.

is popular, so I'll need it. To build it using shared libraries itself, one of its prerequisites needs , which, in turn, requires python. 🤯

Ahh, welcome to dependency hell 😜

#freebsd #linuxulator #linux #python #make #gnu #autotools #cmake #meson

Last updated 1 year ago

Felix Palmen 📯 · @zirias
51 followers · 209 posts · Server techhub.social

Userland built from source for 's is making progress again (and yes, my branch builds and works again!)

☑️ Metaports "linuxsrc_base" for a minimal base userland and "linuxsrc-devtools" for minimal basic tools needed to build software (just C and C++ and some common tools)
☑️ Automatic selection of the Linux kernel version based on target FreeBSD version, overridable in DEFAULT_VERSIONS (but checked for compatibility of course)
☑️ A new "USES=linuxsrc" to do all the ugly "plumbing" needed for building Linux software using FreeBSD , offering different configurations.

Guess now I could start adding some optional packages and try to get some *real* Linux application working 😎

github.com/Zirias/zfbsd-ports/

#freebsd #linuxulator #linux #ports

Last updated 1 year ago

Felix Palmen 📯 · @zirias
51 followers · 209 posts · Server techhub.social

In case anyone tried and wondered why the branch is currently broken 🙈

I'm working on adding a new USES for this userland. It should hide all the "crap" needed to build it, and also help with creating new ports, either *for* it (e.g. shared libs), or just using it.

So I have to rework each and every port now, including test builds...

Right now, I'm test-building "native" gcc ... for the third time 😂 so, native toolchain almost complete again.

I hope to get the branch into sane shape tomorrow!

#linuxulator #linux #freebsd

Last updated 1 year ago

Felix Palmen 📯 · @zirias
47 followers · 203 posts · Server techhub.social

Today's achievement: We now have (and coreutils built using it), plus grep, sed, awk, make, groff *and* man-db in 's userland.

But there's a catch 😞 It doesn't build with any more. Can be patched, and I guess I should soon look into getting this fixed...

For details, see here:
lists.freebsd.org/archives/fre

#openssl #gnu #freebsd #linuxulator #poudriere

Last updated 1 year ago

Felix Palmen 📯 · @zirias
45 followers · 199 posts · Server techhub.social

Today's progress: and glibc's localedata seem to work fine in 's , in addition to bash.

Still, coreutils is not complete yet, it *should* used hash functions from , so, time to port that for (tomorrow).

#gnu #coreutils #freebsd #linuxulator #openssl #linux

Last updated 1 year ago

Felix Palmen 📯 · @zirias
44 followers · 196 posts · Server techhub.social

Time for cleanup after identifying two "interesting" issues:

1.) ports come with a Templates/config.site file which is normally used by , containing quite a lot of "cache variables" so autoconf can avoid running the actual tests. Nice, but completely wrong when targeting . So, add an empty "CONFIG_SITE=" variable to every linux port, and suddenly I can also remove some explicit cache variables again 🙈

2.) I'm building the "native" toolchain for --with-sysroot=/compat/linux, which makes sure the linker reliably finds startup files and system libs, without stuff from FreeBSD base interfering. BUT: This completely breaks when some explicit lib path to /usr/lib or /usr/lib64 is added (and many build systems will do that), because sysroot doesn't apply here. Therefore, add wrapper scripts around gcc and g++ filtering out any "-L/usr/lib" or "-L/usr/lib64" argument 🙈 with that, Linux builds without any patches! 🥳

Now, waiting for builds.

#freebsd #gnu #autoconf #linux #linuxulator #bash

Last updated 1 year ago

Felix Palmen 📯 · @zirias
44 followers · 196 posts · Server techhub.social

And now, we have a working running in 's

Which also finally makes the "ldd" script installed by work 😎

Ok, enough for today 😉

github.com/Zirias/zfbsd-ports/

#linux #bash #freebsd #linuxulator #glibc

Last updated 1 year ago

Felix Palmen 📯 · @zirias
42 followers · 194 posts · Server techhub.social

Finally, my -native toolchain for 's works for C and C++ on , and 🥳

I guess that's a good time to actually announce the ongoing project!
lists.freebsd.org/archives/fre

#linux #gnu #freebsd #linuxulator #aarch64 #amd64 #i386

Last updated 1 year ago