PinePhone - GNOME-43 VM Image test fails
This issue is resolved with the following MR. Closing and opening PP-Pro equivalent issues
The PinePhone VM Image test fails to work inside CI. Below is the summary of my investigation in chronological order.
Problem
The problem is that the CI tests for the PinePhone and PinePhone Pro do not run. This affects both GNOME-43 and master.
The exact error is the following:
Test failed as timeout of 3600 seconds was reached. BdsDxe: loading Boot0002 "UEFI Misc Device 2" from PciRoot(0x0)/Pci(0x2,0x0) BdsDxe: starting Boot0002 "UEFI Misc Device 2" from PciRoot(0x0)/Pci(0x2,0x0) EFI stub: Booting Linux Kernel... EFI stub: Generating empty DTB EFI stub: Loaded initrd from command line option EFI stub: Exiting boot services...
At first I thought it was the kernel version. (We are running 5.17 megous kernel)
Different versions yeild the same problem.
I then thought we must be missing configs of some sort. Researched and saw example problems with QEMU and running ARM64 images.
- https://communities.vmware.com/t5/Fusion-22H2-Tech-Preview/Linux-5-17-EFI-stub-does-not-boot-hangs-at-loading-kernel/m-p/2900884
- https://github.com/utmapp/UTM/issues/2682
I went back to the kernel and my forked repo and realised minus a set of configs being enabled, the make command was different. We initially used make defconfig when the tests proved to work. Later we updated to use the make pinephone_defconfig
Both achieve the same thing but the pinephone_defconfig sets things up for the PinePhone e.g. the
"make defconfig" generates a default configuration file for the Linux kernel. It creates a .config file in the kernel source tree with all the symbols set to their default values.
"make pinephone_defconfig" is a specific configuration file for the PinePhone, a smartphone developed by PINE64 that runs on a Linux-based operating system. It creates a .config file that is customized for the PinePhone hardware and sets all the kernel symbols to their default values for that particular device.
I have spent time looking at the possibility of missing configs which include the following:
scripts/config -e ARM64_ERRATUM_832075
scripts/config -e ARM64_ERRATUM_1024718
scripts/config -e ARM64_ERRATUM_1418040
scripts/config -e ARM64_ERRATUM_1165522
scripts/config -e ARM64_ERRATUM_1319367
scripts/config -e ARM64_ERRATUM_1530923
scripts/config -e ARM64_ERRATUM_1286807
scripts/config -e ARM64_ERRATUM_1463225
scripts/config -e ARM64_ERRATUM_1542419
scripts/config -e ARM64_ERRATUM_2051678
scripts/config -e ARM64_HW_AFDBM
scripts/config -e ARM64_PAN
scripts/config -e ARM64_USE_LSE_ATOMICS
scripts/config -e ARM64_RAS_EXTN
scripts/config -e ARM64_CNP
scripts/config -e ARM64_PTR_AUTH
scripts/config -e ARM64_AMU_EXTN
scripts/config -e ARM64_TLB_RANGE
scripts/config -e ARM64_BTI
scripts/config -e ARM64_E0PD
scripts/config -e ARCH_RANDOM
scripts/config -e ARM64_SVE
scripts/config -e ARM_CPUIDLE
scripts/config -e ARM_PSCI_CPUIDLE
scripts/config -m CRYPTO_SHA1_ARM64_CE
scripts/config -m CRYPTO_SHA2_ARM64_CE
scripts/config -m CRYPTO_SHA512_ARM64_CE
scripts/config -m CRYPTO_SHA3_ARM64
scripts/config -m CRYPTO_SM3_ARM64_CE
scripts/config -m CRYPTO_SM4_ARM64_CE
scripts/config -m CRYPTO_GHASH_ARM64_CE
scripts/config -m CRYPTO_CRCT10DIF_ARM64_CE
scripts/config -m CRYPTO_AES_ARM64
scripts/config -m CRYPTO_AES_ARM64_CE_CCM
scripts/config -m CRYPTO_AES_ARM64_CE_BLK
scripts/config -m CRYPTO_AES_ARM64_BS
scripts/config -e ARM_SCPI_PROTOCOL
scripts/config -e ARM_SMCCC_SOC_ID
scripts/config -e ARM64_ERRATUM_858921
scripts/config -e ARM_SUN8I_A33_MBUS_DEVFREQ
scripts/config -e ARM_CCI_PMU
scripts/config -e ARM_CCI5xx_PMU
scripts/config -e ARCH_SUNXI
scripts/config -e ARCH_VIRT
scripts/config -e ARM_VIRT_EXT
scripts/config -e VIRTIO_CONSOLE
scripts/config -e VIRTIO_NET
scripts/config -e VIRTIO_BLK
scripts/config -e VIRTIO_PCI
scripts/config -e VIRTIO_BALLOON
scripts/config -e VIRTIO_MMIO
scripts/config -e VIRTUALIZATION
scripts/config -e NET_9P_VIRTIO
scripts/config -e FB_EFI
scripts/config -e KVM
scripts/config -e VIRTIO_MENU
scripts/config -e VIRT_DRIVERS
scripts/config -e CMDLINE_BOOL
None of the above help. I am led to the conclusion that it is not something we are missing, rather it is something we are adding.
Trying to get the kernel configs inside the PinePhone when running is a major headache I am trying to solve.
I did try a different set of configs at one point which made QEMU give me the following: https://pastebin.com/iPpK961Q
In the link above you can see that the kernel is registered as unsupported.
But yes at this stage in the game, i have to consider the current configs and disable them. Current issue is grabbing them because standard commands e.g. zcat /proc/config.gz is not working but it does work inside the VM
Commands I have tried
zcat /proc/config.gz gzip: /proc/config.gz: No such file or directory
Led me to this site: https://unix.stackexchange.com/questions/83319/where-are-the-current-kernel-build-options-stored Stating https://cateee.net/lkddb/web-lkddb/IKCONFIG_PROC.html is needed so I will try again.
I was also advised to try the FDSK kernel whcich I did. QEMU works with it and I was able to boot the phone. Phone is unusable i.e. gnome initial setup crashes and touchscreen doesnt work. Since the fdsdk kernel works, this means we can rule out that it is just a newer linux version as the fdsdk kernel is 5.19
I was also advised to use the FDSK Kernel but change the source file to our megous kernel which is something I will now try and document here once I get the chance
Using IKCONFIG_PROC does not enable me to access /proc/config.gz
I need to build and checkout the kernel locally as I have been told that apparently the config file will lie within there
I have now established that the kernel configs are available by updating the install instructions for the kernel i.e. the kernel has been missing the command install -Dm644 .config '%{install-root}%{bootdir}/config'
Now I am able to see the configs created for the make pinephone_defconfig
and make defconfig
commands. make pinephone_defconfig
works on the phone but not QEMU and likewise make defconfig
works on QEMU and not the phone.
I am trialling different configs but can see I am near to using the make pinephone_defconfig
that works on both the phone and QEMU by contrasting, checking and swapping kernel configurations.
This is linked to !1915 (merged)