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

eos_bootloader should not remove the only installed kernel (arm) #55

Open
anonymix007 opened this issue Sep 5, 2024 · 11 comments
Open

Comments

@anonymix007
Copy link

anonymix007 commented Sep 5, 2024

Is your feature request related to a problem? Please describe.
eos_bootloader module removes the custom kernel needed to boot on Snapdragon X which leads to an unbootable system

Describe the solution you'd like
If package is explicitly listed in netinstall.yaml, eos_bootloader shouldn't even try to remove it

Describe alternatives you've considered
Maybe create a separate ARM config in this repo?

Additional context
I was trying to build a more or less generic EndeavourOS ARM image for Snapdragon X laptops. As of now, they require custom kernel and firmware, so here is my repo will all the required packages: x1e-alarm
Calamares config (basically, just removed packages missing in aarch64 repos): config.tar.gz
Installation logs: endeavouros.log.tar.gz

What could I do to make it work as expected?

@dalto8
Copy link

dalto8 commented Sep 5, 2024

We never used that module on ARM. Are you allowing people to choose a bootloader?

@anonymix007
Copy link
Author

anonymix007 commented Sep 5, 2024

Well, I don't see why not, however, I only tried systemd-boot since its' configs are a bit easier to write and they're generally not autogenerated (unlike grub).

All Snapdragon X laptops have UEFI, so it's basically the same setup as what x86-64 device would have.

@dalto8
Copy link

dalto8 commented Sep 5, 2024

If your kernel is getting removed, it is possible it is incorrectly packaged. kernels should depend on initramfs on Arch. Sometimes, they are set to depend on mkinitcpio. That is a problem for us since we use dracut.

You may need to repackage to fix the dependencies if that is the case.

@killajoe
Copy link
Member

killajoe commented Sep 5, 2024

If there is interest in getting this working and available .. we could start a new repo for it. Mixing x86 and arm is confusing to me.

@anonymix007
Copy link
Author

My kernel package depends on coreutils, kmod, mkinitcpio>=0.7, systemd-ukify and x1e-firmware, so I removed dracut from dependencies. Maybe I should switch to it instead though.

@dalto8
Copy link

dalto8 commented Sep 5, 2024

Right, the eos_bootloader removes mkinitcpio. That is what is causing the kernel to be removed. If it depended on initramfs, it would support both dracut and mkinitcpio

@dalto8
Copy link

dalto8 commented Sep 5, 2024

If there is interest in getting this working and available .. we could start a new repo for it. Mixing x86 and arm is confusing to me.

From a Calamares perspective, it sounds like these snapdragon machines are more similar to x86 where they are using UEFI.

@anonymix007
Copy link
Author

Thanks, I'll try. Does dracut use the same preset and config format? Some modules and firmware blobs are required to be in initramfs, so currently I just have a list of them in mkinitcpio config file.

@dalto8
Copy link

dalto8 commented Sep 5, 2024

Does dracut use the same preset and config format?

Nope. It is totally different. That being said, dracut is quite a bit better at detecting what it needs to add to the initramfs.

@anonymix007
Copy link
Author

Arch wiki suggests to use force_drivers option to add drivers, but I can't find anything about the firmware. Actual firmware paths are described in device trees (because some blobs are per-device), so I doubt dracut will be able to find everything.

@anonymix007
Copy link
Author

anonymix007 commented Sep 6, 2024

Okay, there is install_items. BTW, is it just me or dracut is considerable slower than mkinitcpio and produces much (3.5x) bigger ramdisk?

If it depended on initramfs, it would support both dracut and mkinitcpio

Nope, it wasn't enough. Apparently, it now tries to execute mkinitcpio hook (and obviously fails since mkinitcpio isn't installed), but never tries to execute dracut and therefore does not create initramfs.

Which packages I would need to install for dracut to actually work? I do have kernel-install-for-dracut, but it probably doesn't have enough triggers (since kernel is installed as /boot/vmlinux) or something else. It should also probably override linux-x1e (which is my custom kernel) mkinitcpio hooks, just like it does that for i.e. linux-eos-arm ones.

Here is what I used to build the image: https://github.com/anonymix007/arch-image-builder/tree/x1e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants