help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cannot boot from microSD card on aarch64 machine


From: Ricardo Wurmus
Subject: Re: cannot boot from microSD card on aarch64 machine
Date: Sun, 03 Apr 2022 07:08:16 +0200
User-agent: mu4e 1.6.10; emacs 28.0.50

Hi Vagrant,

> On 2022-04-02, Ricardo Wurmus wrote:
>> Vagrant Cascadian <vagrant@debian.org> writes:
>>> I was able to get it to work! With your updated patch to disable openssl
>>> (and rebasing against newer u-boot), and the phase modifying the config
>>> and the the rockchip include file to add support for SCSI devices.
>>>
>>> The netbsd patches weren't needed with 2022.04-rc5.
>>
>> Oh, that’s great!
>
> It really is, thanks for getting it as far as you did!
>
> Although very mildly disappointed that this might deprioritize making
> split /boot in guix a reality. :)
>
>
>> Do you have patches for the u-boot upgrade that I could test?
>
> https://www.aikidev.net/~vagrant/guix/u-boot-2022.04-rc5-with-rockpro64-scsi.patch

Thank you!

>> Are you using a PCIe card with your rockpro64?
>
> Yup. Pretty sure it's whatever PCIe dual-port sata card I bought right
> along with the rockpro64.

I’ve got that one, too.

> U-boot is still on microSD, but it loads the kernel+initrd+dtb from
> SCSI. The scsi target ends up pretty low in the boot order, so you have
> to either manually set the boot_targets or make sure your mmc/nvme
> devices aren't bootable (e.g. change partition type, rename boot
> extlinux.conf, etc.):
>
>   Hit any key to stop autoboot:  0
>   => printenv boot_targets
>   boot_targets=mmc1 mmc0 nvme0 scsi0 usb0 pxe dhcp sf0
>   => setenv boot_targets scsi0
>   => boot
>   scanning bus for devices...
>   SATA link 0 timeout.
>   Target spinup took 0 ms.
>   AHCI 0001.0200 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
>   flags: 64bit ncq stag led clo pmp pio slum part ccc sxs
>     Device 0: (1:0) Vendor: ATA Prod.: Faspeed F510-120 Rev: O080
>               Type: Hard Disk
>               Capacity: 114473.4 MB = 111.7 GB (234441648 x 512)
>   
>   Device 0: (1:0) Vendor: ATA Prod.: Faspeed F510-120 Rev: O080
>               Type: Hard Disk
>               Capacity: 114473.4 MB = 111.7 GB (234441648 x 512)
>   ... is now current device
>   Scanning scsi 0:2...
>   Found /boot/extlinux/extlinux.conf
>   Retrieving file: /boot/extlinux/extlinux.conf
>   Ignoring unknown command: UI
>   1:      GNU with Linux-Libre 5.17
>   Retrieving file: 
> /gnu/store/fxrc92smbx16k29fw8yz1s0mi7nslnan-raw-initrd/initrd.cpio.gz
>   Retrieving file: 
> /gnu/store/z5kqlcqf4r0hpyj6cdkcylh3gmcp4x9x-linux-libre-5.17/Image
>   append: root=/dev/sda2 
> gnu.system=/gnu/store/fz4g427hcdjp70wh7rjh88vrvwi8r5yp-system 
> gnu.load=/gnu/store/fz4g427hcdjp70wh7rjh88vrvwi8r5yp-system/boot 
> modprobe.blacklist=usbmouse,usbkbd quiet
>   Retrieving file: 
> /gnu/store/z5kqlcqf4r0hpyj6cdkcylh3gmcp4x9x-linux-libre-5.17/lib/dtbs/rockchip/rk3399-rockpro64.dtb

Hmm, unfortunately, this is not working for me :(

I applied the patch, built u-boot-rockpro64-rk3399 with

    ./pre-inst-env guix build u-boot-rockpro64-rk3399

and got

    
/gnu/store/xw7nyd0fvg9rlsyhxbbk0hg5k18q5pd9-u-boot-rockpro64-rk3399-2022.04-rc5

I then wiped the old partitions on the microsd card with

    sudo wipefs -f -a /dev/sdb

and copied the two files with dd:

    export 
where=/gnu/store/xw7nyd0fvg9rlsyhxbbk0hg5k18q5pd9-u-boot-rockpro64-rk3399-2022.04-rc5
    sudo dd seek=64 obs=512 conv=notrunc if=$where/libexec/idbloader.img 
of=/dev/sdb
    sudo dd seek=16384 obs=512 conv=notrunc if=$where/libexec/u-boot.itb 
of=/dev/sdb
    sudo sync

Moved the microsd to the rockpro64 slot and powered it on.  u-boot comes
up in the expected version, and since it successfully fails to boot from
the microsd card it falls through to scanning for SCSI devices.
Immediately after listing connected devices (even when none are
connected to the PCIe card) a long error message appears, the display
goes blank, and the CPU seemingly gets stuck.

I can reliably reproduce this by typing on the u-boot console:

    pci enum
    scsi scan

I don’t think the PCIe card is broken, because I can use it just fine
after booting from USB.

Maybe I made a mistake that would seem really obvious to others?

-- 
Ricardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]