Hi,
thanks for providing braiins os! We have successfully tested it on our S9's. Now we have tried to
flash it into the NAND memory of some bricked devices.
I put the questions above:
Q1: Is there a way to flash braiins os into NAND memory, when booted braiins os from SD?
Q2: is the step flas_eraseall required to flash?
What we have tried is to boot the bricked device from SD with braiins os. That works perfectly.
But when trying to flash braiins OS into NAND, that's not prepared by the install scripts, we tried several ways.
A) Remote via ssh and 'upgrade2bos.py' . That does not work, ends with "braiins os is allready installed".
B) copy everything required for running stage1.sh (of folder 'factory_transition') into /tmp/firmware of the
bricked device, which is booted from SD, and run installation locally.
There are some pitfalls:
- We found that some binaries are missing on braiins os, that it uses when running stage1.sh, utilzing the
binaries still in place from the S9:like flash_erase_all, ... we copied them from another miner.
- Also we found that the mtd layout of the running braiins OS from SD does not hold the installer stage2:
(mtdparts=pl35x-nand:512k(boot),2560k(uboot),2m(fpga1),2m(fpga2),512k(uboot_env),512k(miner_cfg),22m(recovery),95m(firmware1),95m(firmware2))
root@m55:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "boot"
mtd1: 00280000 00020000 "uboot"
mtd2: 00200000 00020000 "fpga1"
mtd3: 00200000 00020000 "fpga2"
mtd4: 00080000 00020000 "uboot_env"
mtd5: 00080000 00020000 "miner_cfg"
mtd6: 01600000 00020000 "recovery"
mtd7: 05f00000 00020000 "firmware1"
mtd8: 05f00000 00020000 "firmware2"
- So we patched the SD so it reflects the mtdparams required:
mtdparts=pl35x-nand:32m(BOOT.bin-env-dts-kernel),144m(angstram-rootfs),60m(upgrade-rootfs),20m(upgrade-tmp)
Then run stage1.sh locally. This seems to work, except - the binary flash_erase_all returns a warning that it's deprecated:
'flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it'
Though the script runs through, flashes braiins-os into the nand and completes. But after reboot and jumpering to boot from NAND, the system remains inaccessible.
Do you have any advice how to flash braiins-os into a bricked device?
Thanks and regards, mario!
This has been resolved by the fantastic support, providing an updated bos2bos.py. Thank you!