frno7 / linux

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

CI: initial commit #69

Closed AKuHAK closed 2 years ago

AKuHAK commented 2 years ago

Added precompiled binary generation based on a special Docker image.

@frno7 this step needs some preparations for it to work:

bignaux commented 2 years ago

I think it's more valuable for kernel devel to have non-compressed vmlinux and the modules in an archive as reference than a compressed initramfs here as artifacts. But you can still propose the two.

AKuHAK commented 2 years ago

@bignaux devs can use Docker container, actions are more meant for the final result, not for every single customization step. This action will produce the final ELF with default settings.

frno7 commented 2 years ago
  • [ ] You need to create https://github.com/frno7/mipsr5900el-toolchain so I can provide a PR for a working Gentoo-based Docker image. Currently, it has inside R5900 cross-compiler, busybox, qemu, minimal initramfs, iopmod precompiled and placed inside initramfs.

@AKuHAK, I’m considering naming that repo mipsr5900el-linux-gnu because mipsr5900el-linux-musl is a useful alternative, as described in https://github.com/frno7/linux/issues/33#issuecomment-750902872. As mentioned, Musl has least two very significant advantages compared with the GNU C library.

AKuHAK commented 2 years ago

I’m considering naming that repo mipsr5900el-linux-gnu

Yes, the naming scheme is up to you.

frno7 commented 2 years ago

@AKuHAK, we’ve now got https://github.com/frno7/mipsr5900el-linux-gnu so I suppose items 2 and 3 on your list are done?

frno7 commented 2 years ago

@AKuHAK, an alternate name could be mipsr5900el-gentoo-linux-gnu, which would accommodate for mipsr5900el-yocto-linux-gnu- and whatever later on...

AKuHAK commented 2 years ago

Great! Now it is time to change visibility in https://github.com/frno7?tab=packages

frno7 commented 2 years ago

@AKuHAK, Git Hub indicates that the mipsr5900el-gentoo-linux-gnu package is on a MIT licence. While true for the Docker file itself, the package content is mostly (but not exclusively) GPLv2. I think we should make a directory with all licences, similar to frno7/linux/tree/ps2-main/LICENSES/.

To clarify, I propose we add the SPDX line # SPDX-License-Identifier: MIT to the top of the Docker file.

AKuHAK commented 2 years ago

Oh, licensing was always difficult for me. I just take the same license that @tobix used.

frno7 commented 2 years ago

Oh, licensing was always difficult for me. I just take the same license that @TobiX used.

No worries. :-) It occurred to me that the licence for the package scripts, and the content of the produced package, are not the same. Git Hub doesn’t seem to make much of a difference between the two, but it seems to be easy to clarify.

frno7 commented 2 years ago

Licences are now clarified in commits https://github.com/frno7/mipsr5900el-gentoo-linux-gnu/commit/032b8bff44d7757608e98a2addf13e73581a0d2c and https://github.com/frno7/mipsr5900el-gentoo-linux-gnu/commit/f56a98581c541ac33554c6a5d4f62549f12dd39a.

AKuHAK commented 2 years ago

This PR is ready for merging. git history is not clean, so use Squash and Merge option. If you care about future contribution to the Linux team, this file is GitHub only, so this commit should not be proposed there.

frno7 commented 2 years ago

I could reproduce the problems observed in https://github.com/frno7/linux/issues/28#issuecomment-1102881342, and got it working perfectly, including USB devices, with commit https://github.com/frno7/mipsr5900el-gentoo-linux-gnu/commit/9e01f44b0d5e04a496c8ac27e13494bf208eb63a. I was using my own kernel and IOP modules at the time.

frno7 commented 2 years ago

@AKuHAK, in https://github.com/frno7/linux/issues/28#issuecomment-1102881342 it looks like you essentially triggered the same problems as @nickb834 did and reported in issue #66, including the error recovery NULL pointer exception in ohci-ps2.c. I suspect that depmod and modprobe in Busybox might be incompatible with their counterparts in kmod, that's used at compile time, because the unknown symbol problem vanished with

https://github.com/frno7/mipsr5900el-gentoo-linux-gnu/blob/9e01f44b0d5e04a496c8ac27e13494bf208eb63a/initramfs/ps2/sbin/init#L14

when Busybox itself regenerates the kernel module dependencies, rather than using the ones that came with the INITRAMFS, originating from make modules_install. Several modprobe commands in /sbin/init should be possible to omit, if kernel module dependencies are working properly.

https://github.com/frno7/linux/issues/66#issuecomment-1033715210 lists some improvement items.

AKuHAK commented 2 years ago

@frno7 what about merging this? All mentioned issues are related to the docker package (except of initramfs). If initramfs is a problem we can just build initramfsless kernel, and manage initramfs in the separate repo.

frno7 commented 2 years ago

Merged, with some additional adjustments to file names and tags. Thank you for your contribution, @AKuHAK!

Let’s see if my changes work too. :-)

frno7 commented 2 years ago

https://github.com/frno7/linux/actions/runs/2252652285 boots perfectly, with USB support, on PlayStation 2 hardware. Thanks, again. :-)