Tow-Boot / Tow-Boot

An opinionated distribution of U-Boot. — https://matrix.to/#/#Tow-Boot:matrix.org?via=matrix.org
https://tow-boot.org
MIT License
537 stars 150 forks source link

Manual installation of tow-boot via OTG port on Radxa Rock Pi 4 #285

Open resdigita opened 1 year ago

resdigita commented 1 year ago

I'm looking for a way to install tow-boot via OTG port (without booting via mSD card into thegraphical installer)

On a Radxa Rock Pi 4plus the graphical installer does not react on keyboard input. So an installation is not possible. Furthermore, with a NVMe board installed, the connection cable blocks access to the mSD connector., So you can't boot from nSD anymore.

So the only way to install or to update is using the OTG USB port. And the question is, how or where to get the spi software to transfer and which Offset to use.

Any info appreciated.

wdthompson commented 1 year ago

I had to do a manual install, the uboot version on emmc "lost" the emmc after kernel, dtb load so would ONLY boot SD (using emmc uboot and then unable to erase it) lsblk showed no emmc.. install mtd-utils, nandtest is a good but slow way to erase spi,,, -k to keep data Some advice is to write to /dev/mtd0, this likely is wrong, if lsblk shows mtdblock0 this is correct something like ... dd if=Tow-Boot.spi.bin of=/dev/mtdblock0 status=progress ; sync You can use balena-etcher, in 2nd screen check show system drives, it writes (for me) to mtdblock0 Tow-Boot.spi.bin is in the binary subdirectory, about 1.5MB If you have serial spi can be flashed from uboot serial terminal, the commands have strange syntax which I barely know

wdthompson commented 1 year ago

--more-- If you want to be sure,, do a nanddump of the spi of the EXACT length of Tow-Boot.spi.bin to a tmp file, compare the md5sum of the 2 files This is how I knew that something was wrong, as well as it not working of course (when writing to mtd0). I did not have to short spi clock to get a boot BTW, nanddump and mtd_debug wants hex numbers

resdigita commented 1 year ago

Many thanks for the infos! I found the file an managed to flash the SPI directly. With mtd was it really easy.