We can automate this thing a little by creating u-boot config file, but it will still boot the kernel from the SD card, only root fs will be from the new system:
1) Write a file myscript.txt in /boot on SD card
2) Make an image. mkubootimage is located in /usr/src/tools. If not, get and unpack src.tar.gz set.
2.1) Remove everything in /boot on SD card, except for "efi" directory.
3) reboot with SD card installed, root fs should be on ld0 now, not on ld1.
I still struggle to install the netbsd provided u-boot from pkgsrc to either SPI or eMMC.
/dev/spiflash0 is "Device not configured" on all kernels I've tried.
Tried flashrom on Linux, says that rkspi_loader.img is too small.
dd'ing img to /dev/ld0d gives no result.
1) Write a file myscript.txt in /boot on SD card
Code:
setenv kernel_addr 0x200000
setenv bootargs "root=ld0a console=fb"
2) Make an image. mkubootimage is located in /usr/src/tools. If not, get and unpack src.tar.gz set.
2.1) Remove everything in /boot on SD card, except for "efi" directory.
Code:
mkubootimage -A arm64 -C none -O netbsd -T script -n PBP myscript.txt boot.scr
3) reboot with SD card installed, root fs should be on ld0 now, not on ld1.
I still struggle to install the netbsd provided u-boot from pkgsrc to either SPI or eMMC.
/dev/spiflash0 is "Device not configured" on all kernels I've tried.
Tried flashrom on Linux, says that rkspi_loader.img is too small.
dd'ing img to /dev/ld0d gives no result.