Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ROCKPro64 onboard boot flash instructions
Tobias -- this is great stuff, thanks!
Would you be interested in adding installboot(8) support for writing the SPI loader to the SPI flash?
> On Aug 13, 2019, at 2:35 PM, Tobias Nygren <tnn%NetBSD.org@localhost> wrote:
>
> Hi,
>
> I added the bits to allow us to install U-Boot to the onboard boot
> flash. Here are instructions to migrate away from SD boot if you'd like
> to give it a try.
>
> 1) Update to latest GENERIC64 kernel and rockpro64 dtb. It will give
> you /dev/spiflash0.
>
> rkspi0 at simplebus0: SPI
> rkspi0: interrupting on GICv3 irq 85
> spi0 at rkspi0: SPI bus
> m25p0 at spi0 slave 0
> m25p0: JEDEC ID mfgid:0xC8, devid:0x4018
> spiflash0 at m25p0: GigaDevice 25Q127CSIG SPI flash
> spiflash0: 16384 KB, 256 sectors of 64 KB each
>
> 2) Write U-boot to flash. Get rkspi_loader.img from
> pkgsrc/sysutils/u-boot-rockpro64. (not rksd_loader!)
>
> dd if=/dev/zero of=flash.bin bs=1m count=16 # pad to 128Mbit
> dd if=rkspi_loader.img of=flash.bin conv=notrunc
> dd if=flash.bin of=/dev/spiflash0 bs=64k
>
> 3) Verify flash is correct:
> openssl sha1 flash.bin /dev/spiflash0
>
> 4) Migrate MSDOS partition and root filesystem from SD card onto an
> USB disk (or maybe SATA/NVMe? I didn't try yet. It should work if the
> device has U-Boot support.)
>
> 5) Power cycle and remove SD card, it should say:
> U-Boot SPL board init
> U-Boot SPL 2017.09 (Aug 13 2019 - 23:11:14)
> booted from SPI flash
>
> Recovery note:
>
> If you mess up the flash, place a jumper between PI-2 bus pin #23 and
> pin #25 to force boot from SD card again.
>
> Have fun,
> -Tobias
-- thorpej
Home |
Main Index |
Thread Index |
Old Index