Gordon wrote: 22 Jun 2020, 10:09
The flash routine for installing the "3TB patch" is however also running in some kind of stripped down OS started by the existing u-boot. Either way, it seemed buggy and I decided not to chance it unless it became really necessary.
The flashing procedure does not use is no stripped down OS, it's done directly in u-boot. Here is the command run on the B3 when the rear button is pushed on startup:
Code: Select all
bootalt2=run usbinstall || run usbflash || run sataboot || reset
Here are the usb subcommands used:
Code: Select all
usbinstall=usb start; setenv diskdev $usbinstallroot; run setdiskargs; fatload $usbinstalldev $loadaddr /install/$installfile; bootm
usbflash=fatload $usbflashdev $loadaddr /install/$flashfile && sf probe 0:0 && sf erase 0 80000; sf write $loadaddr 0 $filesize
When the read button is pushed on startup, u-boot will first try to load the rescue/install image located on /install/install.itb. If this fails, it will then try to read /install/u-boot.kwb and flash its content to NVRAM. It that fails too it tries to load the OS from the disk. If that fails too, the board resets.
So in order to flash, you must place the u-boot.kwb file (and only this file) in the install directory of a fat-formatted usb key. u-boot does it directly.
EDIT: that being said, USB support in u-boot is buggy, so sometimes it fails while loading the u-boot image from the key into memory (that's done before the actual flashing so no harm done yet). You may need to repeat the procedure until the flash is successful.