Open geerlingguy opened 1 month ago
Ok...
I went the other route - I've looked at YOCTO project and how they did and fetched the firmwares from the WOA repo with simple script:
#!/bin/bash
DEVICE="8380_RUN"
VER="200.0.4.0"
DESTINATION="/lib/firmware/qcom/x1e80100/Thundercomm/DEVKIT/"
mkdir -p "${DESTINATION}"
for f in qcdx8380.cab qcsubsys_ext_adsp8380.cab qcsubsys_ext_cdsp8380.cab qcwlanmsl8380.cab; do
wget "https://github.com/WOA-Project/Qualcomm-Reference-Drivers/raw/refs/heads/master/${DEVICE}/${VER}/${f}"
cabextract "${f}"
done
cp -a *.mbn "${DESTINATION}"
cp -a *.elf "${DESTINATION}"
cp -a *.jsn "${DESTINATION}"
# https://github.com/jglathe/wdk2023_fw_fetch/blob/jg/x1e001dev/bin/fetch_x1e001de-devkit_fw.sh#L78
mv "${DESTINATION}"/qcadsp8380.mbn{,.disabled}
Could also be that you might need a modules file for proper booting. The one I have on the devkit is this one:
pwm_bl
tcsrcc_x1e80100
phy_qcom_qmp_pcie
pcie_qcom
phy_qcom
qmp_pcie
phy_qcom_qmp_combo
qrtr
drm-dp-aux-bus
phy_qcom_edp
gpio_sbu_mux
i2c_hid_of
i2c_qcom_geni
evdev
pmic_glink_altmode
leds_qcom_lpg
qcom_q6v5_pas
panel-edp
gpucc_sc8280xp
dispcc_sc8280xp
msm
nvme
usb_storage
uas
This one is from the multiboot image, unchanged. It loads some for sc8280xp, too, could be improved but works for now. The Ubuntu 24.10 X1E concept has no modules :man_shrugging: so there may be other ways.
In the end: Whatever works. Nice one.
The image for booting the Dev Kit blindly into Linux is ready enough. It is available for download here. Write it to an USB type-c stick or SSD. The type-A connectors don't work yet.
Precautions you should take:
To get it to boot from the stick:
shutdown -s -t 0 /fw
in an elevated CMD does.The box should boot to grub, and boot up - without a display. The working network connector is Ethernet, Wifi not yet. It should register with host name angrybox, please monitor your dhcp server to find out which ip address. When you can ping it, ssh into it:
Access credentials:
user: devkit
pass: Canceled!
The image comes without the device-specific firmware, it needs to be fetched from the Windows partition. To do this, you can execute:
sudo chmod -x /etc/initramfs-tools/hooks/x1e-firmwares
sudo chmod +x /etc/initramfs-tools/hooks/x1e001de-firmware
sudo fetch_x1e001de-devkit_fw.sh
This changes the hook for initramfs, and fetches the firmware files from Windows. Afterwards it updates the initramfs. After rebooting it should show a lot of firmware loaded. The effect for now is - none, but its good to know the gpu firmware is operational (and remoteprocs, too) for further experiments.
Happy hacking!
Back up your internal SSD. We need it for UEFI access, so removing it is not an option (yet).
I've actually booted from the local SSD successfully.
I've backed up original partitions (I did that a while ago and actually store the original SSD on a shelf, just in case), then removed 13th, 14th and 15th ones (all after EFI Boot).
On boot partition, I've replaced MS bootloader with grub (removed everything, and put bootaa64.efi
and grub.cfg
in Boot folder)
Btw, uuid in it was wrong, it should've been 9289de4f-484c-4477-8f5f-a9264ab69033
as in main grub file.
And after a while (it takes A LOT of time) I have a working system.
I've used my method to fetch fimware from github, just putted it into folder where your scripts are expecting to see it.
@jglathe - haha love the default password :D
Update on getting display to run: Not yet. A bit frustrating, but there are parts missing, need to drill into the i2c buses to get retimers and repeaters. I'm afraid some of these are required for the dp altmode switchery. What a mess. I will try to get the dedicated ssh-enabled image up before doing that, hopefully this afternoon.
That is actually for sure required. If you look closely near usb-c ports you can see Parade 8830 retimers, which needs to be configured via i2c and devkit devicetree completely missing all retimers configuration and relevant i2c configuration blocks.
As far as I understand: https://github.com/jglathe/linux_ms_dev_kit/blob/jg/ubuntu-x1e80100-v6.12.rc/arch/arm64/boot/dts/qcom/x1e80100-crd.dts#L1062-L1171
At least that is missing and probably should be copied from crd...
@Civil yeah I know :grin: too bad it doesn't come up with it, though.
Ok, I haven't seen that you've already added a bunch of those :)
Actually, didn‘t push since it doesn’t work yet. Need to activate in parts.
Also I'm not sure how its for you, but for me devkit doesn't always boot (not sure why though, can't get any logs, but symptoms are same - LAN goes down, then goes up and then goes down, LEDs are as usual).
And second problem - if I connect an external monitor over usb-c, it back-feeds power over usb-c to board and it is enough to keep it running once its booted (or if its stuck)... so I kinda forced in those cases to unplug monitor and plug it back after I turn on power.
There is some oddity, yes. Haven't had it from the USB stick, but yet "hard" to debug. The Dev Kit has a usb2 serial debug connector, though - so maybe that's the way to go to find out. Regarding type-c power draw from display, yes. No capacitors, but getting power over the type-c connectors. "Odd", but makes some sense for a dev kit.
Btw, I haven't tried that, but in the very first patch series there was a DP Alt Mode support added here: https://lore.kernel.org/all/20241025123551.3528206-4-quic_sibis@quicinc.com/
AFAIR it was somehow lost in V3.
I probably forgot to copy some of the thing over, but I have a slight improvement - now usb-c can power my portable screen (it was constantly losing power before)
patch v1 again... odd that later versions have reduced functionality. Anyway, I did a cursory check, and at least the PS8830 retimers are on the same i2c buses. Newer versions have other enablement wiring (gpio). The patches hint at other patches needed, haven't had the time to investigate. Will do another debug/test round at the weekend probably. A good source for further research may be this: https://git.codelinaro.org/abel.vesa/linux/-/commits/x1e-next-20240930
Yeah, I've tried applying the patches from the link but without any results.
P.S. I've also needed to increase rootwait to 40 seconds to make boot process more predictable.
Also, reading the V1 patchset, it mentions that dispalys were tested if kernel built from the x1e-next branch... Maybe it actually had more changes than what I've applied...
Try looking at the branch I pointed to, there is stuff for enabling DP in aux-dp. But from what I've read you need more to get it stable.
On 11/7/24 09:09, Cytochrome P450 2D6 wrote:
Thanks for the image you provided. I have successfully booted Linux and loaded the firmware. But when I execute some commands, it freezes, even
|iperf3 -c x.x.x.x| or |cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq| will cause the machine to shut down. Does your machine have such random halt?
Not observed, but read about these on #arch64-laptops. Should be resolved with newer 6.12rc5 or 6.12rc6 kernel. I have seen odd things with inxi when GPU firmware was not loaded.
Message ID: @.***
On 11/7/24 09:09, Cytochrome P450 2D6 wrote: Thanks for the image you provided. I have successfully booted Linux and loaded the firmware. But when I execute some commands, it freezes, even |iperf3 -c x.x.x.x| or |cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq| will cause the machine to shut down. Does your machine have such random halt? Not observed, but read about these on #arch64-laptops. Should be resolved with newer 6.12rc5 or 6.12rc6 kernel. I have seen odd things with inxi when GPU firmware was not loaded. … Message ID: @.***
Thanks, I will try to compile a new kernel to see if this solves the problem.
My DevKit is actually stable when it boots :)
But I've installed Linux on PCIe SSD (swapped stock SSD for a brand new one and copied most of the partitions there, then removed all windows related stuff and moved grub's efi file to the place where UEFI expects to find Windows bootloader) and I've immediately imported firmwares into the initrd, so I don't know if your instability caused by their absence or not.
On 11/7/24 09:09, Cytochrome P450 2D6 wrote: Thanks for the image you provided. I have successfully booted Linux and loaded the firmware. But when I execute some commands, it freezes, even |iperf3 -c x.x.x.x| or |cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq| will cause the machine to shut down. Does your machine have such random halt? Not observed, but read about these on #arch64-laptops. Should be resolved with newer 6.12rc5 or 6.12rc6 kernel. I have seen odd things with inxi when GPU firmware was not loaded. … Message ID: @.***
I observed again that the machine did not shut down, but reported an error [72387.229430] energy_model: Accessing cpu4 policy failed
and the speed was abnormally slow when compiling a new kernel. I was using another machine (Kunpeng 920) to compile the kernel and install it into the system, but it crashed again when unpacking tar.
You could try the 6.12-rc5-x1e package I built. Just don't use the dtb that is in there for the dev kit, this at least doesn't work here yet - use the current one. Also, what about the SSD you're using. Some stability issues may come from sub-par USB sticks. What I've seen was some odd behaviour with the rtl8125 ethernet port (with 2.5G switch on it). Changed to 1GB connection (by using a 1GB switch) and this mostly vanished. It's early days for us, still.
You could try the 6.12-rc5-x1e package I built. Just don't use the dtb that is in there for the dev kit, this at least doesn't work here yet - use the current one. Also, what about the SSD you're using. Some stability issues may come from sub-par USB sticks. What I've seen was some odd behaviour with the rtl8125 ethernet port (with 2.5G switch on it). Changed to 1GB connection (by using a 1GB switch) and this mostly vanished. It's early days for us, still.
I used the 6.12.0rc6 kernel. There were no errors during installation, but it failed to boot and then rebooted. In addition, my system was loaded on the newly installed internal Nvme SSD. I mounted the original hard drive to /mnt using a hard drive box and successfully extracted the firmware in Windows.
Thank you for building the image, I will try it. In addition, when using the old kernel, running the command cat /sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_cur_freq
can stably reproduce the energy_model: Accessing cpu4 policy failed
error code. Could this be a hardware stability issue?
Not too likely. I recall seeing some talk about cpufreq and reboots when trying that command. Would assume it is fixed in newer rcs.
I won't be able to try it until this evening at least or even until tomorrow, but overall I would not be counting on stable cpufreq/powersaving yet and one of first things I did was to disable sleep and other powersaving features.
can you check if devkit is stable under load in windows? If it is, then it is for sure Linux issue, question is what exactly causes problems
So it seems to be a problem under old linux kernel. At least I did not encounter any problem when running Cinebench and CPUz under Windows.
the crashing when accessing cpufreq is talked about here, I believe it is some patch that causes it, it was later talked about in the aarch64-laptops irc that reverting a certain patch stopped the crashing https://lore.kernel.org/all/ZypOY-NCDN9fdMAR@hovoldconsulting.com/
From what I remember it is a firmware issue
There were some news with more patches around cpufreq on sdx: https://www.phoronix.com/news/Snapdragon-X1-Elite-CPUFreq-V7
Or direct link to patch series: https://lore.kernel.org/lkml/20241030130840.2890904-1-quic_sibis@quicinc.com/
But I haven't tried it myself. I want to get video out working first :)
P.S. I also will try to replace onboard NIC with Intel 225 because I had enough problems with realtek under linux in my life :)
https://git.codelinaro.org/abel.vesa/linux/-/commits/x1e-next-20241101 - they have a devicetree there for the devkit. I've tried to compile it and boot, however with no luck (with defconfig I don't get network and I don't get display output, so I don't know whats wrong with it). I'll try to have a better look at it tomorrow.
defconfig for devkit there is probably missing something like NIC support, if I use config from the kernel - kernel boots, but still no display output.
Microsoft just released the Windows ARM ISO for download https://www.microsoft.com/en-us/software-download/windows11arm64
@talynone - Indeed! Now who wants to be the daring person to nuke their Dev Kit and see if they can get the ISO installed? :D
Basic information
Linux/system information
Benchmark results
CPU
Power
stress-ng --matrix 0
): TODO Wtop500
HPL benchmark: TODO WDisk
MANUFACTURER_AND_MODEL_OF_DISK_HERE
Run benchmark on any attached storage device (e.g. eMMC, microSD, NVMe, SATA) and add results under an additional heading.
Also consider running PiBenchmarks.com script.
Network
iperf3
results:iperf3 -c $SERVER_IP
: TODO Mbpsiperf3 -c $SERVER_IP --reverse
: TODO Mbpsiperf3 -c $SERVER_IP --bidir
: TODO Mbps up, TODO Mbps down(Be sure to test all interfaces, noting any that are non-functional.)
GPU
glmark2-es2
/glmark2-es2-wayland
results:Note: This benchmark requires an active display on the device. Not all devices may be able to run
glmark2-es2
, so in that case, make a note and move on!TODO: See this issue for discussion about a full suite of standardized GPU benchmarks.
Memory
tinymembench
results:Click to expand memory benchmark result
``` # Run the two commands below, then replace this code block with the full result. git clone https://github.com/rojaster/tinymembench.git && cd tinymembench && make ./tinymembench ```sbc-bench
resultsRun sbc-bench and paste a link to the results here:
Phoronix Test Suite
Results from pi-general-benchmark.sh:
Provisional Tests under Windows