frno7 / linux

Linux 2.2, 2.6, 3.x, 4.x and 5.x kernels for the PlayStation 2.
Other
84 stars 5 forks source link

How to use this / build a suitable cross-compiler #33

Closed kernle32dll closed 2 years ago

kernle32dll commented 4 years ago

Hi,

I'm currently tinkering around with my PS2, and PS2 development in general. I am able to compile (and to some extend write) code that runs on the console (simple ELF files, loaded via uLaunchELF). Looking for something more interesting, I ended up with this most interesting repository.

However, its not entirely clear what this repository provides, and how to use it. For starters, I was unable to procure any cross-compiler that would be able to compile any branch I tested (mainly 5.2), encountering different errors each time. For reference, I tested cross-compilers build by https://github.com/ps2dev/ps2toolchain, https://github.com/ps2homebrew/ps2toolchain (branch uyjworking) and https://github.com/uyjulian/ps2toolchain (branch uyjworking), using GCC 3.2.3, 7.3.0 and 9.1.0 respectively.

Additionally, I am intrigued by the README stating that no additional kernelloader is required. As such, I would be interested how this repo fares against e.g. https://github.com/rickgaiser/linux-dev (disclaimer: I was unable to compile anything runnable from that Repo - yet).

Any info shedding some light on the matters would be heartily welcome :)

frno7 commented 3 years ago

The wiki now has a page on using an R5900 cross compiler with Docker.

Arch91 commented 2 years ago

When everything is done and we passed through the step of the kernel compilation, there might be a case that we would like to make a changes to the initramfs only. Suppose I made that change, so is it possible to rebuild the kernel right without it's cleaning and it's total re-compiling?

frno7 commented 2 years ago

@Arch91, exactly. Simply rerun make ARCH=mips CROSS_COMPILE=mipsr5900el-unknown-linux-gnu- vmlinuz. It should finish within seconds, or maybe a minute on a slow computer, since all code has been compiled already. No need for cleaning. It could be worth a note on the wiki since making changes to the INITRAMFS is quite common.

frno7 commented 2 years ago

Precompiled kernels are now available for download from the actions menu. The wiki remains to be updated, and greatly simplified. For details, see .github/workflows/compilation.yml and the gentoo-mipsr5900el repo. Many thanks, @AKuHAK!