Difference between revisions of "Reflash"

From iagent
Jump to: navigation, search
(Created page with "<div class="res-img"> Reflash header.png </div> Reflash is a Linux image for downloading and installing Rebuild and Refactor images on R...")
 
(Entering FEL mode)
 
(20 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
Reflash is a Linux image for downloading and installing [[Rebuild]] and [[Refactor]] images on [[Recore]]. You can also create an image from the contents of the eMMC.  
 
Reflash is a Linux image for downloading and installing [[Rebuild]] and [[Refactor]] images on [[Recore]]. You can also create an image from the contents of the eMMC.  
 +
 +
<div class="alert alert-warning">
 +
===='''Note on v1.0.0'''====
 +
Reflash v1.0.0 marks a big change from software switching of boot medium to always booting to Reflash/USB drive if the USB drive is present.
 +
For older versions of Reflash:
 +
[[Reflash_v0.1.2]]
 +
</div>
 +
 +
<div class="alert alert-warning">
 +
 +
===='''Entering FEL mode'''====
 +
The first time you use Reflash 1.0.0 and above, you need to boot to Reflash using FEL-mode. Hold the FEL button on the board down and press the RST (reset) button. You need to have a USB C cable connected between the USB C connector on Recore and a host computer. 
 +
<tabs>
 +
<tab name="Linux">
 +
You should see the board show up as a USB device:
 +
<div class="res-img">
 +
[[File:FEL-mode lsusb.png]]
 +
</div>
 +
Download the Recore git repository. On the command line write:
 +
<pre>
 +
git clone https://github.com/intelligent-agent/Recore.git
 +
cd Recore
 +
</pre>
 +
Install the sunxi-tools package on the host computer:
 +
<pre>
 +
sudo apt install sunxi-tools
 +
</pre>
 +
Then run the "make fel" command from a host computer.
 +
<pre>
 +
make fel
 +
</pre>
 +
On the host computer, you should see the binary files being uploaded like the following:
 +
<div class="res-img">
 +
[[File:Make-fel.png]]
 +
</div>
 +
</tab>
 +
<tab name="Windows">
 +
Work in progress...
 +
 +
# Open Device Manager and check that the device shows up.
 +
# Download the Recore repository
 +
# Download sunxi-fel binary for windows
 +
# Download and install Zadig https://linux-sunxi.org/FEL/USBBoot#Using_sunxi-fel_on_Windows
 +
# Run the following command from the Recore folder:
 +
<pre>
 +
sunxi-fel.exe -v -p spl binaries\sunxi-spl.bin write 0x44000 binaries\bl31.bin write 0x4a000000 binaries\u-boot.bin reset64 0x44000
 +
</pre>
 +
</tab>
 +
</tabs>
 +
</div>
 +
 +
==Instructions==
 
This page has step-by-step instructions for using the image. Here is what you should do:
 
This page has step-by-step instructions for using the image. Here is what you should do:
 
<ol>
 
<ol>
 
<li>  
 
<li>  
Use [https://www.balena.io/etcher/ Balena Etcher] to download and flash the Reflash image. Here is the URL to the image: <pre>https://github.com/intelligent-agent/Reflash/releases/download/v0.1.2/Reflash-v0.1.2.img.xz</pre><div class="res-img">[[File:BalenaEthcer.png|center]]</div>
+
Use [https://www.balena.io/etcher/ Balena Etcher] to download and flash the Reflash image. Here is the URL to the image: <pre>https://github.com/intelligent-agent/Reflash/releases/download/v1.0.0/reflash-v1.0.0.img.xz</pre><div class="res-img">[[File:BalenaEthcer.png|center]]</div>
 
</li>
 
</li>
 
<li>  
 
<li>  
Line 13: Line 65:
 
</li>
 
</li>
 
<li>
 
<li>
Now you need to change boot medium from eMMC to USB on the Recore board. This can be done through SSH by logging in to the board and writing from the command line:<pre>sudo set-boot-media usb</pre> And then<pre>sudo reboot</pre> Alternatively, if the the previous version of Refactor was with OctoPrint, you can change boot media from the Refactor-tab in the OctoPrint user interface and then rebooting the board. From version v.3.1.0-RC1 there is also a button to set the boot media to USB in Mainsail. <div class="res-img">[[File:Set-boot-media-both.png]]</div>
+
If you want to get back to Reflash from Rebuild or Refactor, you can do so by having the USB drive inserted during boot. A reboot can be done from Mainsail, Fluidd or OctoPrint.
</li>
 
 
 
<div class="alert alert-warning">
 
===='''Note'''====
 
Depending on the size and speed of the USB drive, it can take a while to boot the first time. The file system is automatically expanded and this can be time consuming. </div>
 
 
 
 
<li>
 
<li>
 
Once the board has booted from USB, you should be able to access the web interface using the address http://recore.local<div class="res-img">[[File:Reflash.png|center]]</div>
 
Once the board has booted from USB, you should be able to access the web interface using the address http://recore.local<div class="res-img">[[File:Reflash.png|center]]</div>
 
</li>
 
</li>
 
<li>
 
<li>
From the web interface, choose witch version of Refactor you want to download. There are two types of images, either with OctoPrint as the web interface or with Mainsail as the web interface. You should always choose the latest version of Refactor.  
+
From the web interface, choose witch version of Refactor you want to download. There are two types of images, either with OctoPrint as the web interface, with Mainsail or with Fluidd.
 
</li>
 
</li>
 
<li>
 
<li>
Once the image has been downloaded (to the USB drive) you can install/flash the image to the eMMC. This will take 5-10 minutes.  
+
Once the image has been downloaded (to the USB drive) you can install/flash the image to the eMMC. This will take 3-4 minutes.
 
</li>
 
</li>
 
<li>Once the image has been flashed on the eMMC drive, you can reboot the board, and it will boot using the Refactor image that you chose.
 
<li>Once the image has been flashed on the eMMC drive, you can reboot the board, and it will boot using the Refactor image that you chose.
Line 35: Line 81:
  
 
<div class="alert alert-warning">
 
<div class="alert alert-warning">
 +
 
===='''Note'''====
 
===='''Note'''====
 
It is possible to log in to the Reflash image for manual operations. The SSH access is available using username '''root''' and password '''temppwd'''
 
It is possible to log in to the Reflash image for manual operations. The SSH access is available using username '''root''' and password '''temppwd'''
 
</div>
 
</div>
 +
 +
==Known issues==
 +
Sometimes the flashing process does not work as expected. There is no progress on the progress indicator and the flashing never completes. A workaround is to go back to step 1 and install Reflash again.

Latest revision as of 00:40, 15 May 2024

Reflash header.png

Reflash is a Linux image for downloading and installing Rebuild and Refactor images on Recore. You can also create an image from the contents of the eMMC.

Note on v1.0.0

Reflash v1.0.0 marks a big change from software switching of boot medium to always booting to Reflash/USB drive if the USB drive is present. For older versions of Reflash: Reflash_v0.1.2

Entering FEL mode

The first time you use Reflash 1.0.0 and above, you need to boot to Reflash using FEL-mode. Hold the FEL button on the board down and press the RST (reset) button. You need to have a USB C cable connected between the USB C connector on Recore and a host computer.

You should see the board show up as a USB device:

FEL-mode lsusb.png

Download the Recore git repository. On the command line write:

git clone https://github.com/intelligent-agent/Recore.git
cd Recore

Install the sunxi-tools package on the host computer:

sudo apt install sunxi-tools

Then run the "make fel" command from a host computer.

make fel

On the host computer, you should see the binary files being uploaded like the following:

Make-fel.png

Work in progress...

  1. Open Device Manager and check that the device shows up.
  2. Download the Recore repository
  3. Download sunxi-fel binary for windows
  4. Download and install Zadig https://linux-sunxi.org/FEL/USBBoot#Using_sunxi-fel_on_Windows
  5. Run the following command from the Recore folder:
sunxi-fel.exe -v -p spl binaries\sunxi-spl.bin write 0x44000 binaries\bl31.bin write 0x4a000000 binaries\u-boot.bin reset64 0x44000

Instructions

This page has step-by-step instructions for using the image. Here is what you should do:

  1. Use Balena Etcher to download and flash the Reflash image. Here is the URL to the image:
    https://github.com/intelligent-agent/Reflash/releases/download/v1.0.0/reflash-v1.0.0.img.xz
    BalenaEthcer.png
  2. After flashing the image to a USB drive with at least 4 GB of storage, eject the USB drive properly and insert it in a USB port on the Recore board.
  3. If you want to get back to Reflash from Rebuild or Refactor, you can do so by having the USB drive inserted during boot. A reboot can be done from Mainsail, Fluidd or OctoPrint.
  4. Once the board has booted from USB, you should be able to access the web interface using the address http://recore.local
    Reflash.png
  5. From the web interface, choose witch version of Refactor you want to download. There are two types of images, either with OctoPrint as the web interface, with Mainsail or with Fluidd.
  6. Once the image has been downloaded (to the USB drive) you can install/flash the image to the eMMC. This will take 3-4 minutes.
  7. Once the image has been flashed on the eMMC drive, you can reboot the board, and it will boot using the Refactor image that you chose.

You can keep the Reflash USB drive in a safe place, or even keep it mounted in the printer. If you want to upgrade to a later version of Refactor, the same image can be used again.

Note

It is possible to log in to the Reflash image for manual operations. The SSH access is available using username root and password temppwd

Known issues

Sometimes the flashing process does not work as expected. There is no progress on the progress indicator and the flashing never completes. A workaround is to go back to step 1 and install Reflash again.