Build FreeBSD on Linux for Alternative architecture.

Hello. There is a computer with a non-standard processor architecture with the linux operating system and the gcc compiler. I want to try porting FreeBSD to this computer. Is it possible to build FreeBSD source code on Linux?
 
It's not impossible, but you're pretty much on your own. Elbrus is a Debian based distro, but it contains tools from MCST.
The main problem is the lack of documentation and proprietary nature of its ISA. But Elbrus was around for a many years and it has its own user base in Russia.
For start you should get in contact with developers familiär with Elbrus distro and MCST based products, e.g. Elbrus-8S, and probably SPARC architecture, willing to work on FreeBSD.
 
vigole, i have both the documentation and elbrus 8c itself. I need to understand, can I build FreeBSD on Linux or not? The native OS is a Debian-like system with its own compiler, which masquerades as GCC 7.5.
 
FreeBSD build depends on running FreeBSD. But, FreeBSD build can produce cross-compiles.

So, the first decision here is which approach would be more feasible: A) create a proper build environment in the linux installation to produce a FreeBSD OS in native code, or B) use a native FreeBSD on some other machine and teach it how to cross-compile for the Elbrus.
Besides that, there is a bunch of machine dependent code in the kernel, which certainly has to be refactored.
 
PMc, e2k compiler exists in 2 versions. 1) The compiler runs on Elbrus OS (Debian like). 2) Cross compiler for Linux x86. Is it possible to work in this situation? theoretically, i can start a cross-compiler in freebsd under linux emulation. How to compile the kernel and the world of freebsd i know very well, i have been working with freebsd for many years.
 
MCST makes processors of the original VLIW architecture and makes processors of the SPARC architecture. In the 90s, MCST designed processors for SUN.
 
  • Thanks
Reactions: a6h
The Elbrus-8S and -SV processors support binary compatibility with Intel x86 and x86-64 processors via runtime binary translation.[2]
Sounds like there's really no need to "port" anything since it can run x86 and x86-64 code.
 
The x86 translator uses 2 cores and the system is left with 6 cores. This mode works but the performance is much lower than the native mode of operation.
 
The x86 translator uses 2 cores and the system is left with 6 cores. This mode works but the performance is much lower than the native mode of operation.
Sure, but it's a start. Getting it to run on its native ISA is going to be a lot more work and it would probably be beneficial to have at least something running on it.

Performance is the last thing on your list of things to do. Your first priority is getting a kernel compiled to its native ISA and getting that kernel working enough to boot (single user mode).

Edit: I'm sure you've found this already but this looks like it has a lot of useful information: http://0x1.tv/Free_software_porting_on_the_Elbrus_architecture_(Андрей_Савченко,_LVEE-2019)
 
I like to know beside Elbrus, is there any working Linux distro for Elbrus 8C? or people stuck with Elbrus! I'm just evaluating possibilities.
 
SirDice, i myself am engaged in simple porting of software. There are people who can help with the adoption of the code. how can i start building the freebsd kernel in a linux environment?
 
vigole
Elbrus OS
Alt Linux
Astra linux
Rosa Linux
Lotos
ЗОСРВ «Нейтрино-Э»
Циркон ОС
QP OS
Red OS (porting process)
 
  • Thanks
Reactions: a6h
Back
Top