Created attachment 1744850 [details] Serial console log of Fedora rawhide Workstation boot attempt from SD card Description of problem: I'm getting errors while trying to boot Aarch64 Fedora Workstation image (rawhide) on a Pinebook Pro (RockChip 3399). Version-Release number of selected component (if applicable): shim-aa64-15-8.aarch64 How reproducible: Always. Steps to Reproduce: 1. Download latest rawhide aarch64 Fedora Workstation image, e.g. https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Workstation/aarch64/images/Fedora-Workstation-Rawhide-20210103.n.0.aarch64.raw.xz 2. Write the image to an SD card: sudo arm-image-installer --image=./Fedora-Workstation-Rawhide-20210103.n.0.aarch64.raw.xz --target=pinebook-pro-rk3399 --media=/dev/sdg 3. Attach serial console and boot Pinebook Pro from the above SD card Actual results: ... do_boot_rockchip: Could not find boot part Checking for mmc dev 1... RKPARM: Invalid parameter part table switch to partitions #0, OK mmc1 is current device Scanning mmc 1 for bootable partitions... Scanning mmc 1:1 for extlinux or boot scripts... Found EFI removable media binary efi/boot/bootaa64.efi reading efi/boot/bootaa64.efi 858216 bytes read in 49 ms (16.7 MiB/s) libfdt fdt_check_header(): FDT_ERR_BADMAGIC ## Starting EFI application at 00280000 ... Adding bank: 0x00200000 - 0xf8000000 (size: 0xf7e00000) Card did not respond to voltage select! mmc_init: -95, time 50 Scanning disk dwmmc... Scanning disk sdhci... Scanning disk dwmmc... Found 3 disks Could not verify MokList: Device Error Could not verify MokListX: Device Error Could not verify MokSBState: Device Error Could not verify MokDBState: Device Error Something has gone seriously wrong: import_mok_state() failed : Device Error Expected results: Successful boot. Additional info: Full log attached.
Looks similar to what is reported here: https://github.com/ayufan-rock64/linux-build/issues/222 .
Created attachment 1745466 [details] u-boot log with eMMC disabled and binaries flashed to correct SD card offset I did some reading and it looks like this is due to too-old u-boot pre-installed on the eMMC. After disabling the eMMC it still didn't boot from the SD card until I put both idbloader.img and u-boot.itb from rawhide uboot-tools at the correct offset (https://wiki.pine64.org/wiki/RK3399_boot_sequence#General_maintenance ): 1. make backup of the contents of the first SD card partition (here: sdg1) 2. delete sdg1 in fdisk 3. create a new sdg1 partition at offset 18432 instead of 2048 sectors (and mark it bootable) 4. sudo mkfs.fat -n 607B-AB6B -v -h 2048 /dev/sdg1 5. copy the contents of original partition to sdg1 6. sudo dd if=idbloader.img conv=notrunc seek=64 of=/dev/sdg 7. sudo dd if=u-boot.itb conv=notrunc seek=16384 of=/dev/sdg I'm now able to boot to u-boot console. Even the display and keyboard seem to work. :) kernel is still not booting, though. New log attached. I guess I should reassign to arm-image installer since it produces an unbootable image.
It's because the rockchip firmware is too large and writes through the partition table and the beginning of the VFAT partition, it's a known issue and should be solved one way or another for f34. It's not really a bug with arm-image-installer, but what ever.
I was able to boot grub manually using: load mmc 1:2 0x01f00000 /dtb/rockchip/rk3399-pinebook-pro.dtb load mmc 1:1 0x02080000 /efi/fedora/grubaa64.efi bootefi 0x02080000 0x01f00000 ... which is what seems to be the default. I don't know why it's failing, but @pbrobinson said he's dealing with it, so hopefully he'll be able to fix it soon. Having said that, I removed "rhgb quiet" from grub command line, added console=ttyS2,1500000 and booted the kernel. It printed the following on both the LCD and the serial console: EFI stub: Booting Linux Kernel... EFI stub: Using DTB from configuration table EFI stub: Exiting boot services and installing virtual address map... and then nothing.
Sorry about the needinfo, my mistake.
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
Is this bug still present? I'm able to boot successfully on two rk3399 devices. I believe we could just close it.
This might be Pinebook Pro specific, but we can close this. If I understand correctly, the supported way of installing and booting Fedora is to flash u-boot to the SPI anyway.
So I think this was basically the dd overwriting the early bits of the ESP partition.