Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dist-kernel to compile the Linux kernel #13

Open
frno7 opened this issue May 4, 2022 · 5 comments
Open

Use dist-kernel to compile the Linux kernel #13

frno7 opened this issue May 4, 2022 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@frno7
Copy link
Owner

frno7 commented May 4, 2022

For details, see #5 (comment).

@frno7 frno7 added enhancement New feature or request help wanted Extra attention is needed labels May 4, 2022
@immolo
Copy link

immolo commented Aug 28, 2023

In Gentoo it seems widely agreed that Genkernel should be retired . I'm currently testing Catalyst support for building livecds using the dist-kernel instead which should be the last hurdle to last rites of the package (my views not Gentoo's.)

We should plan for this and use the dist-kernel as a template for the ps2 kernel as it will be easier plus have the bonus of the work being shared upstream and used in other Gentoo projects.

Happy to give starting pointers to anyone that wants to help as it will take some work off me :)

@frno7 frno7 changed the title Use genkernel to compile the Linux kernel Use dist-kernel to compile the Linux kernel Aug 29, 2023
@frno7
Copy link
Owner Author

frno7 commented Aug 29, 2023

My config disables IPv6 with # CONFIG_IPV6 is not set. I’d (really) like to have it (and some other things), but the kernel file grew too large and failed to boot. I haven’t put much effort into optimising for kernel size, though. Do you think a templated dist-kernel would fit to boot?

@immolo
Copy link

immolo commented Aug 29, 2023

Good question, we can pull in any config we want as shown here.

The simple part is changing the source URI to here and using the config you created, the difficult part is creating the initramfs however it might be possible to do this with dracut which would make automating it in Gentoo very easy afterwards.

Doing it this way should both make it easier to get working and use less memory at the same time, so if someone wants to help out then it will be a much better use of their time :)

@frno7
Copy link
Owner Author

frno7 commented Aug 30, 2023

Good question, we can pull in any config we want as shown here.

There seems to be a 4 MiB kernel size limit, but I don’t know where this limit comes from. The hardware has 32 MiB, so a much larger kernel should work. I suspect a configuration and/or programming issue. Maybe wLaunchELF needs to boot load the kernel into a lower address to fit it. Allowing an 8 MiB kernel, at least, would be nice and should easily permit IPv6 and other kernel features.

The simple part is changing the source URI to here and using the config you created, the difficult part is creating the initramfs however it might be possible to do this with dracut which would make automating it in Gentoo very easy afterwards.

Doing it this way should both make it easier to get working and use less memory at the same time, so if someone wants to help out then it will be a much better use of their time :)

Oh, I’ve never used Dracut. And then of course somehow reclaim the memory used by initramfs as mentioned in
#17 (reply in thread). Maybe using kexec as in #17 (reply in thread) would be best, whereby the (generic and capable) boot kernel is replaced entirely by a nimbler Gentoo kernel. :-)

@immolo
Copy link

immolo commented Aug 30, 2023

There seems to be a 4 MiB kernel size limit, but I don’t know where this limit comes from. 

From memory I believe this limit also existed with the old ps2 Linux bootloader.

Maybe using kexec as in https://github.com/frno7/gentoo-mipsr5900el/discussions/17#discussioncomment-4561230 would be best, whereby the (generic and capable) boot kernel is replaced entirely by a nimbler Gentoo kernel. :-)

I've never used kexec before but this does sound like a way to get around issues if needed.

Once I've completed work on reducing the x86 kernel in Gentoo I should have some more ideas on ways this can be achieved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants