Snapdragon X Elite Fedora 42 System Bring-Up (and looking for collaborators or SIGs)!

Hey folks!

Background and Motivation
Emboldened by the recent progress that the Ubuntu folks have made in bringing up Qualcomm Snapdragon X Elite-based systems, I picked up a Lenovo Yoga Slim 7x to begin the process of bringing up Fedora on Snapdragon X (ARM) systems!

This is my first time contributing at this level to the project, so I’m fairly “green” but I have a lot of support from friends and colleagues!

First Roadblock: Missing Device Trees in Release ISOs
I’ve hit my first road block - the F42 and Rawhide latest aarch64 ISOs are missing the Device Trees (dtb-s) for the Snapdragon X Elite laptops, but they are present in the Kernel!

Planned Workaround
I’m planning on working around this problem by grabbing the kernel-core aarch64.rpm at the same version as is present in the 42 GA ISO and extracting the dtbs via rpm2cpio <rpm> | cpio -idv (advice from a friend for whom this is not his first system bring-up).

From there I’m planning on using lorax mkksiso — Lorax 41.3 documentation to build a modified ISO to see if I can get past this missing dtb / generating empty dtb error.

Request for Help
If these dtbs are present in the kernel-core RPM, could we update the release package / ISO build process to include them in at least Rawhide to better enable iteration on the Snapdragon X bring-up? I’m told that @adamwill / @ngompa (Hi Neal, we met at devconf US!) might have suggestions or guidance!

Looking for Others
Is there an existing group that is trying to bring up Snapdragon X laptops on Fedora? If so - where?? If not - wanna make one??

Thanks folks!
Gurney B.

4 Likes

Hey, Gurney.

It is a good thing you’ve started. I guess you would have success.

I have Asus Vivobook S15, and when I was buying this laptop, I thought that the Fedora AArch64 Edition would work on Asus Vivobook, but I didn’t know that in ARM Architecture (may be, because of SoC) there are some pitfalls :smiley: .

If I can, I would help, but I’m fully “green”))

But, I can help to test images at Asus Vivobook S15 (x1e78100)

@psarapkin Thanks! I was hoping you were still active - your thread was helpful when I was first looking into Fedora on the Snapdragon Laptops!

I have some updates but not much yet!

Hope
If you want to see Linux running on your laptop (which was VERY encouraging to me) - I would encourage everyone to give the Live USB for Ubuntu 25.04 (at time of writing) a shot - via the article link in my initial post! Your laptop (the Vivobook S15) is supported with a current note about the S15 specifically pulling in one incorrect package!

Progress
For context: I’m a Red Hatter and I’ve discovered a small group of coworkers and friends who are also interested, so I’ve gotten some help outside of this thread, but I intend to keep this thread full up to date as I make progress!

First - we verified that the dtbs that we needed were not present in F42 Workstation or Everything ISOs or Rawhide Workstation or Everything ISOs. I can confirm, they aren’t there!

Next, we found that the dtbs are in the kernel-core RPM for F42 (and friends) by grabbing the F42 kernel-core NVR (Name, Version, Rebuild Number) from the official source, pulling the RPM file, and cracking it open with:

rpm2cpio <rpm> | cpio -idv

into an empty directory!

I was able to confirm (via that command) that the included kernel RPM does include the dtb files, but they are not included in the ISO! That leaves us with our first target contribution to Fedora (once we make sure the dtbs are useful): we need to update the CI configuration for the Fedora Rawhide and future ISO builds to ensure that these dtbs are included!

Next, we wanted to include these dtbs in a home-grown aka locally modified Fedora Rawhide or 42 ISO. I’ve been stuck on this step for a while. I’ve been trying to use mkksiso (a wrapper for a few underlying tools to rebuild the ISO with the dtb files and potentially a symlink to the correct dtb within the /boot directory, but I haven’t had any luck in successfully building the ISO.

I’ve been using the following command:

sudo mkksiso --add dtb/qcom/x1e80100-lenovo-yoga-slim7x.dtb Fedora-Workstation-Live-42-1.1.aarch64.iso test.iso

in Windows Subsystem for Linux Fedora 42 (mkksiso requires that you be on the same arch as the target to build an ISO) but I also tried it on my X86 Fedora 42 System.

I’m getting the following error every time:

INFO:program:Using internal CP850 conversion table
INFO:program:mkfs.fat 4.2 (2021-01-31)
DEBUG:program:Return code: 0
DEBUG:pylorax.imgutils:make tmp mountdir /tmp/lorax.imgutils.e2jdr40o
INFO:program:Running... mount -o shortname=winnt,umask=0077 /dev/loop0 /tmp/lorax.imgutils.e2jdr40o
DEBUG:program:Return code: 0
DEBUG:pylorax.imgutils:copytree /tmp/mkksiso-ivcwgpen/EFI/BOOT /tmp/lorax.imgutils.e2jdr40o/EFI/BOOT
INFO:program:Running... cp -R -L --preserve=timestamps /tmp/mkksiso-ivcwgpen/EFI/BOOT/. /tmp/lorax.imgutils.e2jdr40o/EFI/BOOT
INFO:program:cp: cannot create regular file '/tmp/lorax.imgutils.e2jdr40o/EFI/BOOT/bootaa64.efi': File exists
DEBUG:program:Return code: 1
INFO:program:Running... umount /tmp/lorax.imgutils.e2jdr40o
DEBUG:program:Return code: 0
DEBUG:pylorax.imgutils:remove tmp mountdir /tmp/lorax.imgutils.e2jdr40o
INFO:program:Running... losetup --detach /dev/loop0
DEBUG:program:Return code: 0
Traceback (most recent call last):

I have some colleagues working on / advising me on next steps - and I’m open to ideas! My current plan is to try to disable the arch check in mkksiso (and hope it wasn’t important) and try building on my x86 system again.

New Prior Art
Kudos to @jostone for finding Thinkpad t14s - Fedora Project Wiki which outlines some prior art, we are also going to try and replicate what they’ve done to get things up and running (but can’t get very far without these dtbs).

Next Steps

  1. I am going to try to build the modified ISO on my x86 system and bypass the arch check. If unsuccessful, I will try to build the ISO under Ubuntu on my aarch64 Snapdragon Laptop or ask a friend who has an aarch Fedora system to build it there (or grab and RPI and do it myself)!
  2. I need to locate the CI configuration that determines which dtbs are extracted from kernel-core and included in the Fedora ISOs for Rawhide and contribute a change that adds the Snapdragon X Elite / Plus laptop dtbs to the built ISOs as we work to bring up Fedora on those laptops.
  3. I need to learn how to make the grub configuration changes outlined in @ausil’s Fedora Wiki post - I have a colleague helping me out with that (but I’m also open to advice or links)!

How can people get involved?
I don’t know yet! I need to reach out via other comms channels to the Fedora project folks and see if this is worth of a SIG or if we should just have a focused presence on another channel! For now - we’ll keep discussion in this discussion thread!

Status Update

I have successfully built a Rawhide image non-ISO image and written it to USB. Unfortunately, the boot is failing on an error that may be related to issues with the actual build. I’m checking in with the folks over in #arm:fedoraproject.org. Which…

First Update: Finding Community
There are a few folks (at least) over in #arm:fedoraproject.org that have given Fedora a try (successfully) on the Snapdragon X Elite laptops. There is also a community that I haven’t engaged with yet over in IRC, visible via the bridge at #oftc#aarch64-laptops:matrix.org.

Second Update: How to Construct an Image / USB that contains the DTB and Grub Config
I was able to build an image that actually had the correct reference to the Device Tree!

First - the latest rawhide build contains all of the dtbs! Now we just have to make it reference the correct one!

Here’s how:

  1. You need to start with a raw image for Fedora. You can find them on Index of /compose/rawhide. I started with the latest Rawhide build. here is a direct link to the image I used at time of writing: https://kojipkgs.fedoraproject.org/compose/rawhide/latest-Fedora-Rawhide/compose/Workstation/aarch64/images/Fedora-Workstation-Disk-Rawhide-20250518.n.0.aarch64.raw.xz. The datetime will likely be different in the future and you’ll want to get the latest from Index of /compose/rawhide/latest-Fedora-Rawhide/compose/Workstation/aarch64/images
  2. Run xz <image.raw.xz filename>
  3. sudo kpartx -av <image.raw> (the output image from the previous command)
  4.      sudo mount /dev/mapper/loop0p3 /mnt/
         sudo mount /dev/mapper/loop0p2 /mnt/root/boot
         sudo mount /dev/mapper/loop0p1 /mnt/root/boot/efi
    
  5. Edit /mnt/root/boot/loader/entries/*conf to have: devicetree /boot/dtb/qcom/x1e80100-lenovo-yoga-slim7x.dtb (or you can reference the dtb for whatever laptop you have provided its in the directory - if you want to see what’s available, list them in /mnt/root/boot/dtb/
  6.     sudo umount /mnt/root/boot/efi
     sudo umount /mnt/root/boot
     sudo umount /mnt/
     sudo kpartx -d <image.raw>
    
  7. xz <image.raw>
    
  8.  sudo arm-image-installer --image <image-name.raw.xz> --media <path-to-your-usb-device-or-disk-like-/dev/sdd> --resizefs --showboot --args 'clk_ignore_unused pd_ignore_unused'
    

Note: at the time of writing, if you are booting from a USB like me, you need to add modprobe.blacklist=qcom_q6v5_pas rd.driver.blacklist=qcom_q6v5_pas to args in the arm-image-installer command (which adds them as arguments to the kernel in the grub config).

Now, you should have a disk that you can boot on the laptop with secureboot disabled.

I have a system up now!

Next Steps

My next goal is to determine which CI changes need to be made to Rawhide to enable every ISO to boot OOTB! Live images would be a major QOL improvement!

Special Thanks

Without @nirik and @dennis gilmore in the Fedora-ARM matrix channel, this would not have been possible! KUDOS and thank you for being the best of us!

3 Likes

There is also arm - Fedora mailing-lists and Architectures/ARM - Fedora Project Wiki (possibly not up to date?)

1 Like

It’s definitely not up to date. For example, here - Architectures/ARM - Fedora Project Wiki - there is no info about X Elite under Snapdragon, but there is info about single board computers and the next ones laptops:

  • Lenovo c630
  • Lenovo Miix 630
  • ASUS Novago TP370QL

And as I said above - there is no X Elite (Plus)

1 Like

Hi Gurney.

Thanks.

I’m trying to be active - such as time allows me to be ))

As you said earlier - if you want to feel linux on your laptop - try Ubuntu. So I did it. And you see, it looks great. Ubuntu has a good tool - qcom-firmware-extract - which can extract firmware from Microsoft partition with windows, or… You can to download firmware from Asus website, extract it to specific folder

sudo qcom-firmware-extract -d $(pwd)/firmware/Windows/System32/DriverStore/FileRepository/

“firmware” is your folder, $(pwd) because full path from the root is required, and next folders after “firmware” - is required folder structure, because of Microsoft stores drivers like this.

If you run qcom-firmware-extract without parameter “-d” it would search drivers in Microsoft partition.

So, after installing Ubuntu concept, power adapter’s percent of charge is not working (always shows “0%”), and the graphics is “Software Renderer” instead of “Adreno”.

After qcom-firmware-extract everything okey except:

  • Audio
  • Camera

Also, external monitor working with type-c on a hot plug, and HDMI working on a cold plug - you have to switch off laptop, connect HDMI and start.

So, here is a status of Linux aka Ubuntu on Snapdragon X Elite. Don’t take it as the Ubuntu ad, just status ))

As for creating an iso with working dtbs - it’s quite a perfect idea. I already tried it. I don’t remember all details. But my result is failure ))

What did I do? (Right away I wanna say - I don’t remember a tools that I used)
But the common Idea was

  1. Unpack ISO from Fedora website
  2. Inside iso we need to find bootable live CD image - unpack it too.
  3. Copy dtbs to /boot/casper (or something like that folder) - inside unpacked LiveCD image
  4. Pack LiveCD back
  5. Pack full iso back ))

Well, I think I had to build kernel or something like that.

As " alexvinarskis" said to me at - Ubuntu 24.10 Concept ♥️ Snapdragon X Elite - #917 by alexvinarskis - Ubuntu Architectures - Ubuntu Community Hub - the are some license issues which not allows to include firmware into an image with system.

It seems, if Fedora would make official image for Snapdragon - first you will get the system with software renderer as a graphics and not working battery charge percent. Next, you would need to run something like qcom-firmware-extract - to get drivers installed.

By the way.

It’s like now is going voting for FESCo - FESCo Elections: Interview with Neal Gompa (ngompa) – Fedora Community Blog

I’ve read about some guys. There are some guys that contributes for architectures, also for aarch64… May be we should vote for them and they take priority to make an image for X1E?