Difference between revisions of "Reflash v1.0.0"

From iagent
Jump to: navigation, search
(Note)
m (Elias moved page Reflash to Reflash v1.0.0: New version)
 
(24 intermediate revisions by the same user not shown)
Line 6: Line 6:
  
 
<div class="alert alert-warning">
 
<div class="alert alert-warning">
===='''Note'''====
+
===='''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.  
 
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:
 
For older versions of Reflash:
Line 13: Line 13:
  
 
<div class="alert alert-warning">
 
<div class="alert alert-warning">
 +
 
===='''Entering FEL mode'''====
 
===='''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.   
 
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.   
Line 18: Line 19:
 
<tab name="Linux">
 
<tab name="Linux">
 
You should see the board show up as a USB device:  
 
You should see the board show up as a USB device:  
 +
<pre>
 +
lsusb
 +
</pre>
 
<div class="res-img">
 
<div class="res-img">
 
[[File:FEL-mode lsusb.png]]
 
[[File:FEL-mode lsusb.png]]
Line 23: Line 27:
 
Download the Recore git repository. On the command line write:  
 
Download the Recore git repository. On the command line write:  
 
<pre>
 
<pre>
git clone https://github.com/intelligent-agent/Recore.git
+
wget https://github.com/intelligent-agent/Recore/raw/master/binaries/Recore-fel.zip
cd Recore
+
unzip Recore-fel.zip
 
</pre>
 
</pre>
 
Install the sunxi-tools package on the host computer:  
 
Install the sunxi-tools package on the host computer:  
Line 30: Line 34:
 
sudo apt install sunxi-tools
 
sudo apt install sunxi-tools
 
</pre>
 
</pre>
Then run the "make fel" command from a host computer.
+
Now you can run the whole command on a shell.
 
<pre>
 
<pre>
make fel
+
sudo sunxi-fel -v -p spl fel/sunxi-spl.bin write 0x44000 fel/bl31.bin write 0x4a000000 fel/u-boot.bin reset64 0x44000
 
</pre>
 
</pre>
 
On the host computer, you should see the binary files being uploaded like the following:  
 
On the host computer, you should see the binary files being uploaded like the following:  
Line 39: Line 43:
 
</div>
 
</div>
 
</tab>
 
</tab>
<tab name="Windows">Todo</tab>
+
<tab name="Windows">
 +
# Open Device Manager and check that the device shows up. It might not have a known vendor and product description. <div class="res-img">[[File:Windows-Device-manager.png]]</div>
 +
# Download the [https://github.com/intelligent-agent/Recore/archive/refs/heads/master.zip Recore repository] and extract the contents.
 +
# Download [https://github.com/eperie/build-scripts/releases/download/v1.3/sunxi-tools-mingw64-530adfa.zip sunxi-fel binary for windows] and extract the contents so it is the the Recore-master folder.
 +
# Download and install Zadig https://linux-sunxi.org/FEL/USBBoot#Using_sunxi-fel_on_Windows
 +
# Open the CMD prompt and navigate to the extracted Recore folder.
 +
# Insert the USB drive with Reflash 1.0.0 (See instructions further down)
 +
# Run the following command from the Recore folder:
 +
<pre>
 +
(prefix) sunxi-fel.exe -v -p spl binaries\new\sunxi-spl.bin write 0x44000 binaries\new\bl31.bin write 0x4a000000 binaries\new\u-boot.bin reset64 0x44000
 +
</pre>
 +
 
 +
After running that command, you should see the SPL and u-boot being transferred and the board should start to boot from the USB drive.
 +
<div class="res-img">[[File:Sunxi-fel-windows.png]]</div>
 +
</tab>
 
</tabs>
 
</tabs>
 
</div>
 
</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/v1.0.0-RC0/reflash-v1.0.0-RC0.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 57: Line 76:
 
</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, with Mainsail or with Fluidd.
+
From the web interface, choose witch version of Refactor/Rebuild you want to download. There are two types of images, either with OctoPrint as the web interface, with Mainsail or with Fluidd. You can also choose to upload a custom image using the "Upload file" option.  
 
</li>
 
</li>
 
<li>
 
<li>
Line 65: Line 84:
 
</li>
 
</li>
 
</ol>
 
</ol>
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.
+
You can keep the Reflash USB drive in a safe place and reuse it the next time you want to upgrade the software. If you want to upgrade to a later version of Refactor, the same image can be used again.
  
 
<div class="alert alert-warning">
 
<div class="alert alert-warning">
Line 72: Line 91:
 
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>
 +
 +
==Reflash image==
 +
Reflash is an initRamFS Linux image. That is in order to completely remove the boot medium before a reboot occurs. Because of that, Reflash needs to be very small. The application is built in Go witch makes it stand alone with very little dependencies. The Network management is handled by systemd-networkd and systemd-resolved. Very few extra programs are installed, and any additional programs that gets installed will be lost after a reboot. SSH is enabled for user '''debian''' with password '''temppwd'''. The kernel is 5.15.127.
 +
 +
==Known issues==
 +
===Flash progress not showing any progress===
 +
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 19:06, 11 June 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:

lsusb

FEL-mode lsusb.png

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

wget https://github.com/intelligent-agent/Recore/raw/master/binaries/Recore-fel.zip
unzip Recore-fel.zip 

Install the sunxi-tools package on the host computer:

sudo apt install sunxi-tools

Now you can run the whole command on a shell.

sudo sunxi-fel -v -p spl fel/sunxi-spl.bin write 0x44000 fel/bl31.bin write 0x4a000000 fel/u-boot.bin reset64 0x44000

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

Make-fel.png

  1. Open Device Manager and check that the device shows up. It might not have a known vendor and product description.
    Windows-Device-manager.png
  2. Download the Recore repository and extract the contents.
  3. Download sunxi-fel binary for windows and extract the contents so it is the the Recore-master folder.
  4. Download and install Zadig https://linux-sunxi.org/FEL/USBBoot#Using_sunxi-fel_on_Windows
  5. Open the CMD prompt and navigate to the extracted Recore folder.
  6. Insert the USB drive with Reflash 1.0.0 (See instructions further down)
  7. Run the following command from the Recore folder:
(prefix) sunxi-fel.exe -v -p spl binaries\new\sunxi-spl.bin write 0x44000 binaries\new\bl31.bin write 0x4a000000 binaries\new\u-boot.bin reset64 0x44000

After running that command, you should see the SPL and u-boot being transferred and the board should start to boot from the USB drive.

Sunxi-fel-windows.png

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/Rebuild you want to download. There are two types of images, either with OctoPrint as the web interface, with Mainsail or with Fluidd. You can also choose to upload a custom image using the "Upload file" option.
  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 and reuse it the next time you want to upgrade the software. 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

Reflash image

Reflash is an initRamFS Linux image. That is in order to completely remove the boot medium before a reboot occurs. Because of that, Reflash needs to be very small. The application is built in Go witch makes it stand alone with very little dependencies. The Network management is handled by systemd-networkd and systemd-resolved. Very few extra programs are installed, and any additional programs that gets installed will be lost after a reboot. SSH is enabled for user debian with password temppwd. The kernel is 5.15.127.

Known issues

Flash progress not showing any progress

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.