From 5f07834167bfd583caaea1014c1001fb18cd8113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Go=C5=82a=C5=9B?= Date: Thu, 19 Sep 2024 15:20:31 +0200 Subject: [PATCH] unified/hardkernel/recovery.md: Add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filip Gołaś --- docs/unified/hardkernel/recovery.md | 70 ++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/docs/unified/hardkernel/recovery.md b/docs/unified/hardkernel/recovery.md index f2ff344080..3d64f87143 100644 --- a/docs/unified/hardkernel/recovery.md +++ b/docs/unified/hardkernel/recovery.md @@ -1 +1,69 @@ -recovery \ No newline at end of file +# Recovery + +## Intro + +The following documentation describes the process of recovering hardware from +the brick state using an [RTE](../../transparent-validation/rte/introduction.md) +and Dasharo open-source firmware. + +=== "V1000-series" + + ## Prerequisites + + * [Prepared RTE](../../transparent-validation/rte/v1.1.0/quick-start-guide.md) + * 6x female-female wire cables + + ## Connections + + To prepare the stand for flashing follow the steps described in + the [Generic test stand setup](../../unified-test-documentation/generic-testing-stand-setup.md#detailed-description-of-the-process) + + ## Firmware flashing + + To flash firmware follow the steps described below: + + 1. Login to RTE via `ssh` or `minicom`. + 2. Turn on the platform by connecting the power supply. + 3. Wait at least 5 seconds. + 4. Turn off the platform by using the power button. + 5. Wait at least 3 seconds. + 6. Set the proper state of the SPI by using the following commands on RTE: + + ```bash + # set SPI Vcc to 3.3V + echo 1 > /sys/class/gpio/gpio405/value + # SPI Vcc on + echo 1 > /sys/class/gpio/gpio406/value + # SPI lines ON + echo 1 > /sys/class/gpio/gpio404/value + ``` + + 7. Wait at least 2 seconds. + 8. Disconnect the power supply from the platform. + 9. Wait at least 2 seconds. + 10. Check if the flash chip is connected properly + + ```bash + flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=16000 + ``` + + 11. Flash the platform by using the following command: + + ```bash + flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=16000 -w [path_to_binary] + ``` + + > Flashing with flashrom takes about 1 minute. + + 12. Change back the state of the SPI by using the following commands: + + ```bash + echo 0 > /sys/class/gpio/gpio404/value + echo 0 > /sys/class/gpio/gpio405/value + echo 0 > /sys/class/gpio/gpio406/value + ``` + + 12. Turn on the platform by connecting the power supply. + + The first boot of the platform after proceeding with the above procedure can + take much longer than normal.