livellosegreto.it is one of the many independent Mastodon servers you can use to participate in the fediverse.
Livello Segreto è il social etico che ha rispetto di te e del tuo tempo.

Administered by:

Server stats:

1.2K
active users

#linuxulator

1 post1 participant0 posts today
Continued thread

Ok, so check this out. I raved about how magical #FreeBSD #linuxulator is, but it gets even better! In my Ubuntu linux jail, I downloaded the source for the #mobian kernel, installed cross-compiling tools, compiled the kernel and modules, copied to an sdcard, and booted up the kernel on my #pinephonepro 🤯 So, on my amd64 FreeBSD, I used a translation layer to load up Ubuntu Linux, used it to cross-compile a Linux kernel for arm64, and booted that up on a device! How unbelievable is that?!?

Oh wow, the #FreeBSD #Linuxulator is just magic! I setup an Ubuntu #LinuxJail as described in the linked wiki and was able to compile and flash #Arduino code to my Uno using #PlatformIO, which is absolutely mind blowing because the tools for compiling are not available for "freebsd_amd64", yet in this Linux environment (not emulated, not a VM, just a translation layer), the Linux binaries were able to compile and then flash to the USB device (using the FreeBSD kernel… tobykurien.com/post-1744211915

tobykurien.compost-1744211915 | Toby Kurien
Replied in thread

Userland built from source for #FreeBSD's #Linuxulator 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 #Linux 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 #ports, 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/

GitHubzfbsd-ports/Mk/Uses/linuxsrc.mk at linux · Zirias/zfbsd-portsZirias' FreeBSD ports tree. Contribute to Zirias/zfbsd-ports development by creating an account on GitHub.
Replied in thread

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

I'm working on adding a new USES for this #Linuxulator 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!

Replied in thread

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

But there's a catch 😞 It doesn't build with #poudriere 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

lists.freebsd.orgHEADS-UP: poudriere needs patching (was: Building a Linuxulator userland from source)
Continued thread

Time for cleanup after identifying two "interesting" issues:

1.) #FreeBSD ports come with a Templates/config.site file which is normally used by #GNU #autoconf, containing quite a lot of "cache variables" so autoconf can avoid running the actual tests. Nice, but completely wrong when targeting #Linux. 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 #Linuxulator --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 #bash builds without any patches! 🥳

Now, waiting for builds.

Replied in thread

@jhx For now, I have two references opened trying to actually do this:

1.) some old state of my multimedia/makemkv port that actually DID need some minimal cross toolchain because back then, something was broken in linux-c7: cgit.freebsd.org/ports/tree/mu

2.) The #LFS (#Linux from scratch) book

I didn't give up hopes yet 😅

cgit.freebsd.orgMakefile « makemkv « multimedia - ports - FreeBSD ports tree