s-macke / jor1k

Online OR1K Emulator running Linux
http://jor1k.com
BSD 2-Clause "Simplified" License
1.73k stars 196 forks source link

How to port a Linux distro to jor1k ? #126

Open olberger opened 7 years ago

olberger commented 7 years ago

Hi.

I'm not sure exactly how to ask, or if that really can make sense, but how would one be able to "port" a Linux distro to jor1k ?

Typically, would it be possible to port Debian to it ?

Thanks in advance.

andrakis commented 7 years ago

I'm not sure if it's possible, but it could be. Part of the problem there is that I doubt Debian has ports of any of their software to OR1000. This is why I'd like to create a packaging system for Jor1k that allows one to install software within Jor1k. However, it's not a trivial thing to get going.

One would either need to setup a cross compilation system and start building as many packages as possible in OR1000 format. I haven't managed to do this yet, so my hope is just to compile things within Jor1k and save those as packages (.tgz/bz2 and an installation script.)

benjamincburns commented 7 years ago

Some work has been done on porting debian to the or1k platform already. You might wish to have a look at bluecmd/or1k-debian.

That said, the process of porting a distro to or1k would be the same as the process of porting a distro to any new platform. First you'll need gcc support, then a boot loader, then kernel support, then a root fs and packages. Thankfully Sebastian and many others have done the hard work for you on GCC, the bootloader, and the kernel. Most every distro has some way of automating cross-compiled builds of rootfs and supported packages (e.g. debootstrap.sh). It's "just" a matter of setting that up, and suffering through the tedium of fixing build failures and patching code until it all works.

benjamincburns commented 7 years ago

Ah, bad news. It looks like openrisc.debian.net was shut down due to copyright assignment issues.

https://wiki.debian.org/OpenRISC