-
Notifications
You must be signed in to change notification settings - Fork 65
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
Dedicated image for the Lenovo Thinkpad X13s #330
Conversation
First working make of this build script. Key needs to be replaced by the local user key. Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
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. |
mk/iso.mk
Outdated
@@ -14,18 +14,23 @@ $(BUILD)/iso_casper.tag: $(BUILD)/live $(BUILD)/chroot.tag $(BUILD)/live.tag $(B | |||
# Create new casper directory | |||
mkdir -p "$(BUILD)/iso/$(CASPER_PATH)" | |||
|
|||
ifeq ($(DISTRO_MACHINE),x13s) | |||
# copy over dtb to casper | |||
cp -v "$(BUILD)/live/usr/lib/linux-image-6.9.1+/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb" "$(BUILD)/iso/$(CASPER_PATH)/$(DISTRO_MACHINE_DTB)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not copy all DTBs? That way, more ARM platforms that boot using DT over ACPI. I know that NixOS and Rocky Linux currently boot like this: U-Boot -> GRUB -> Linux. While you really only need the FDT in U-Boot and can boot without the in-kernel DTB, it's not recommended.
Jeremy and Aron: Sorry for hijacking this :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm how do you select the right one when its available, you need to do so before loading linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh look @TravMurav seems to be on it https://github.com/TravMurav/dtbloader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You just place all DTBs in /boot/dtb
and the bootloader picks it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You just place all DTBs in
/boot/dtb
and the bootloader picks it up.
... which one? OTOH, as described, initramfs is a bit special (won't boot, or only from nvme, if the modules and firmware hooks aren't there). For me this sounds a lot like you still need a device specific layer of code, even if we manage to get something like dtbloader figures out the right dtb. But this would be doable for one image, at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting the DTBs in the necessary paths is already handled by the .deb package of the kernel. This shouldn't be done manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... if it works. It depends on flash-kernel, and my impression was that it doesn't, haven't found the cause yet. Therefore the direct command as a workaround / hack, as the whole thing currently is.
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. |
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. |
flash-kernel works with dtb installation on the 24.04 install, btw. Haven't tried to boot anew with systemd-boot yet. |
scripts and firmware for X13s reside now in the submodule data/syshacks change installed kernel to 6.9.3-76060903-generic Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
this is to ensure its not loaded from rootfs Loading the adsp firmware leads to a short interruption on the USB type-c VBUS line. A not self-powered device on that bus needs to be re-detected then. If you've booted from type-c and you have the rootfs already mounted, it is game over since the rootfs is now inoperable. Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Now that the noble branch is merged, this will have to be reopened on the master branch. |
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. |
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.
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.