pop-os / iso

Pop!_OS ISO production
Other
499 stars 65 forks source link

Dedicated image for the Lenovo Thinkpad X13s #330

Closed jglathe closed 2 months ago

jglathe commented 6 months ago

This is sort of experimental, me trying to get a handle on how this works. The changes are v1.0, still with local dependencies, I will put up all of it into github repos, after creating some order. There are a few things noteworthy, though.

  1. Lenovo Thinkpad X13s is an aarch64 target, you need a device tree to successfully boot it. There seems to be no real mechanism to detect / select / provide this from the ISO yet. There is a (beta) mechanism in the UEFI BIOS to load the dtb from the ESP and provide it to the kernel, and this works (with Ubuntu at least). But this is outside of the ISO, and these boxes aren't shipped with the dtb. Future Snapdragon X Elite based boxes may be, but there is still the issue that there is no standard way on how this may work (yet).
  2. You also need boot-critical drivers to load first from the initramfs, and certain firmwares (for the coprocessors, adsp and cdsp, gpu) need to be in the initramfs, too.
  3. I (hopefully) understood the boot part so far that it is using parts of grub-efi-aarch64 to bring it up from the iso. My experience with trying to use systemd-boot with these uefi BIOSes (even though we have efivars now on x13s) is rather poor. The installed system on an external SSD, when connected to the laptop, will cause it not to boot. I can boot when I remove the ESP, and boot via an already existing grub. I do so on a Windows Dev Kit 2023, same SoC. Maybe going grub for aarch64 until this works is worth a consideration.
  4. You need specific kernel options to make it boot due to the incompleteness of some hardware definitions. AFAIU this is not really an exception.
  5. I used my own deb packages for the kernel, but you can do this with the pop-os_linux tree too, but you need different kernel options for it to work.

In conclusion this means that you maybe can build an ISO to boot for these targets, but its not generic at all. At least yet. So branches / configurations for specific targets may be the way to get something for the time being.

jackpot51 commented 6 months ago

This touches too many things and is not clean enough to accept. I am also very skeptical of having device-specific images. In my mind, the future of aarch64 is to have UEFI support and upstream Linux kernel support. We won't want to hold many device-specific ISOs and they would all require device-specific testing.

jackpot51 commented 5 months ago

I am re-opening this because I think there are some things we can do to improve the situation for ARM devices, while still hoping for complete upstream kernel support.

In particular, our ISOs are missing the devicetree files from the included kernel. We should not just include the files from one device (the X13s), but instead should include all of the files, and ensure that the bootloader correctly loads them.

jglathe commented 5 months ago

Which opens the topic discussed above. I guess you need a few things:

It will probably be an incremental work going from device(class) to device. I have two pretty similar boxes, the X13s, and the Windows Dev Kit 2023. They boot with the same kernel, modules list and config, have separate dtbs. And a part of the firmware is signed device-specific.

jglathe commented 5 months ago

flash-kernel works with dtb installation on the 24.04 install, btw. Haven't tried to boot anew with systemd-boot yet.

jackpot51 commented 2 months ago

Now that the noble branch is merged, this will have to be reopened on the master branch.

jglathe commented 2 months ago

With an updated version. For boot-only (and install) purposes you can forego all firmwares except for the gpu firmware, and one needs a modules list. Then it boots on sc8280xp and x1e80100. With dtbloader it might be feasible to actually boot by arm64 machine.