Title.
I don't think it would be *too* difficult to get a very basic compatibility, but I think it's interesting to ponder nonetheless.
Are there any major obstacles that would render this impossible?
How hard would it be to make a Linux ABI-compatible OS?
Re: How hard would it be to make a Linux ABI-compatible OS?
Hi,
If you're not writing a "monothic Unix-like kernel" then it's impossible to say - it could be relatively easy, but it could be an extreme nightmare too.
Of course ABI compatibility isn't very useful on its own - almost all of the software is open source and easy to recompile; and to run Linux binaries without recompiling you'd have to provide more than just the ABI (e.g. same file system layout, same "/proc" file system, same environment variables, compatible graphics and sound libraries, ...).
Cheers,
Brendan
If you're writing a "monolithic Unix-like kernel", this might actually be easier than not providing Linux ABI compatibility because you won't need to make minor changes to things like C/POSIX libraries (e.g. you'd be able to use GNU's libraries "as is").hexcoder wrote:I don't think it would be *too* difficult to get a very basic compatibility, but I think it's interesting to ponder nonetheless.
Are there any major obstacles that would render this impossible?
If you're not writing a "monothic Unix-like kernel" then it's impossible to say - it could be relatively easy, but it could be an extreme nightmare too.
Of course ABI compatibility isn't very useful on its own - almost all of the software is open source and easy to recompile; and to run Linux binaries without recompiling you'd have to provide more than just the ABI (e.g. same file system layout, same "/proc" file system, same environment variables, compatible graphics and sound libraries, ...).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: How hard would it be to make a Linux ABI-compatible OS?
There will probably always be the need to rewrite some software and use only standard libraries across systems more and more.
The programming environment wasn't probably ready to be distributed across many OSes when there were only 1 or 2 of them for desktop PCs. So now the code needs to be cleaned so that a single developer can realistically manage to port software portably by relying on implementing everything based on standard libraries present in any system, and clean the rest to use wrapper functions to minimize the usage of non-portable libraries and language versions that aren't currently supported in your own OS or others that you might need to use as a devloper.
The programming environment wasn't probably ready to be distributed across many OSes when there were only 1 or 2 of them for desktop PCs. So now the code needs to be cleaned so that a single developer can realistically manage to port software portably by relying on implementing everything based on standard libraries present in any system, and clean the rest to use wrapper functions to minimize the usage of non-portable libraries and language versions that aren't currently supported in your own OS or others that you might need to use as a devloper.
YouTube:
http://youtube.com/@AltComp126
My x86 emulator/kernel project and software tools/documentation:
http://master.dl.sourceforge.net/projec ... 7z?viasf=1
http://youtube.com/@AltComp126
My x86 emulator/kernel project and software tools/documentation:
http://master.dl.sourceforge.net/projec ... 7z?viasf=1
Re: How hard would it be to make a Linux ABI-compatible OS?
I'm writing an microkernel-based OS that is source-compatible to Linux (but not binary compatible). That means implies implementing Linux-specific functions like epoll(), signalfd(), timerfd() just to name a few, Linux /proc and /sys file systems, netlink sockets, the Linux ioctl()s for devices in /dev. I definitely can be done, but if you're not writing a monolithic UNIX-like kernel, you'll have to spend a lot of time on designing IPC primitives that enable you to efficiently emulate the Linux stuff in user-space.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: How hard would it be to make a Linux ABI-compatible OS?
I get the distinct impression that this is just a small snippet from a larger conversation. Either than, or ~ forgot his meds again.~ wrote:There will probably always be the need to rewrite some software and use only standard libraries across systems more and more.
The programming environment wasn't probably ready to be distributed across many OSes when there were only 1 or 2 of them for desktop PCs. So now the code needs to be cleaned so that a single developer can realistically manage to port software portably by relying on implementing everything based on standard libraries present in any system, and clean the rest to use wrapper functions to minimize the usage of non-portable libraries and language versions that aren't currently supported in your own OS or others that you might need to use as a devloper.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.