<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi All,</p>
    <p>These instructions will flash a full image onto the Birch
      devices. They will wipe out anything already contained on the
      eMMC.</p>
    <p>First you need to get the latest version of the uuu scripts. So
      clone the librem5-devkit tools repo<br>
    </p>
    <pre><font color="#ff0000">angus@midas:/tmp$ git clone <a class="moz-txt-link-freetext" href="https://source.puri.sm/Librem5/librem5-devkit-tools">https://source.puri.sm/Librem5/librem5-devkit-tools</a></font>
Cloning into 'librem5-devkit-tools'...
warning: redirecting to <a class="moz-txt-link-freetext" href="https://source.puri.sm/Librem5/librem5-devkit-tools.git/">https://source.puri.sm/Librem5/librem5-devkit-tools.git/</a>
remote: Enumerating objects: 998, done.
remote: Counting objects: 100% (998/998), done.
remote: Compressing objects: 100% (415/415), done.
remote: Total 998 (delta 569), reused 957 (delta 531)0 KiB/s   
Receiving objects: 100% (998/998), 3.26 MiB | 2.35 MiB/s, done.
Resolving deltas: 100% (569/569), done.</pre>
    <p>Then grab the latest image and u-boot. They will end up here
      <a class="moz-txt-link-freetext" href="https://arm01.puri.sm/job/Images/job/Image%20Build/">https://arm01.puri.sm/job/Images/job/Image%20Build/</a> as "next
      librem5 amber-phone" <br>
    </p>
    <pre><font color="#ff0000">angus@midas:/tmp$ cd librem5-devkit-tools/
angus@midas:/tmp/librem5-devkit-tools$ mkdir files 
angus@midas:/tmp/librem5-devkit-tools$ cd files/
angus@midas:/tmp/librem5-devkit-tools/files$ wget <a class="moz-txt-link-freetext" href="https://arm01.puri.sm/job/Images/job/Image%20Build/2793/artifact/librem5.img.xz">https://arm01.puri.sm/job/Images/job/Image%20Build/2793/artifact/librem5.img.xz</a>
</font>--2019-11-27 11:11:22--  <a class="moz-txt-link-freetext" href="https://arm01.puri.sm/job/Images/job/Image%20Build/2793/artifact/librem5.img.xz">https://arm01.puri.sm/job/Images/job/Image%20Build/2793/artifact/librem5.img.xz</a>
Resolving arm01.puri.sm (arm01.puri.sm)... 51.15.91.187
Connecting to arm01.puri.sm (arm01.puri.sm)|51.15.91.187|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 549679508 (524M) [application/x-xz]
Saving to: ‘librem5.img.xz’

librem5.img.xz                     100%[=============================================================>] 524.21M  8.18MB/s    in 75s     

2019-11-27 11:12:37 (6.99 MB/s) - ‘librem5.img.xz’ saved [549679508/549679508]
<font color="#ff0000">angus@midas:/tmp/librem5-devkit-tools/files$ xz -d librem5.img.xz
angus@midas:/tmp/librem5-devkit-tools/files$ wget <a class="moz-txt-link-freetext" href="https://arm01.puri.sm/job/u-boot_builds/job/uboot_librem5_build/lastSuccessfulBuild/artifact/output/uboot-librem5/u-boot-librem5.imx">https://arm01.puri.sm/job/u-boot_builds/job/uboot_librem5_build/lastSuccessfulBuild/artifact/output/uboot-librem5/u-boot-librem5.imx</a>
</font>--2019-11-27 11:39:13--  <a class="moz-txt-link-freetext" href="https://arm01.puri.sm/job/u-boot_builds/job/uboot_librem5_build/lastSuccessfulBuild/artifact/output/uboot-librem5/u-boot-librem5.imx">https://arm01.puri.sm/job/u-boot_builds/job/uboot_librem5_build/lastSuccessfulBuild/artifact/output/uboot-librem5/u-boot-librem5.imx</a>
Resolving arm01.puri.sm (arm01.puri.sm)... 51.15.91.187
Connecting to arm01.puri.sm (arm01.puri.sm)|51.15.91.187|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1072240 (1.0M) [application/octet-stream]
Saving to: ‘u-boot-librem5.imx’

u-boot-librem5.imx                 100%[=============================================================>]   1.02M  1.01MB/s    in 1.0s    

2019-11-27 11:39:15 (1.01 MB/s) - ‘u-boot-librem5.imx’ saved [1072240/1072240]

</pre>
    <p>Then install uuu from mfgtools using 1 of the methods below</p>
    <p>1) on PureOS<br>
    </p>
    <pre><font color="#ff0000">apt-get install mfgtools</font></pre>
    <p></p>
    <p>2) on other debian based distros<br>
    </p>
    <pre><font color="#ff0000">angus@midas:/tmp/librem5-devkit-tools$ wget <a class="moz-txt-link-freetext" href="https://repo.pureos.net/pureos/pool/main/m/mfgtools/uuu_1.2.31-0%2Bpureoslibrem5.2_amd64.deb">https://repo.pureos.net/pureos/pool/main/m/mfgtools/uuu_1.2.31-0%2Bpureoslibrem5.2_amd64.deb</a>
</font>--2019-11-27 11:27:04--  <a class="moz-txt-link-freetext" href="https://repo.pureos.net/pureos/pool/main/m/mfgtools/uuu_1.2.31-0%2Bpureoslibrem5.2_amd64.deb">https://repo.pureos.net/pureos/pool/main/m/mfgtools/uuu_1.2.31-0%2Bpureoslibrem5.2_amd64.deb</a>
Resolving repo.pureos.net (repo.pureos.net)... 138.201.228.45
Connecting to repo.pureos.net (repo.pureos.net)|138.201.228.45|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 324956 (317K) [application/octet-stream]
Saving to: ‘uuu_1.2.31-0+pureoslibrem5.2_amd64.deb’

uuu_1.2.31-0+pureoslibrem5.2_amd64 100%[=============================================================>] 317.34K   395KB/s    in 0.8s    
<pre>2019-11-27 11:27:05 (395 KB/s) - ‘uuu_1.2.31-0+pureoslibrem5.2_amd64.deb’ saved [324956/324956]
<font color="#ff0000">angus@midas:/tmp/librem5-devkit-tools$ sudo dpkg -i uuu_1.2.31-0+pureoslibrem5.2_amd64.deb(Reading database ... 365408 files and directories currently installed.)
</font>Preparing to unpack uuu_1.2.31-0+pureoslibrem5.2_amd64.deb ...
Unpacking uuu (1.2.31-0+pureoslibrem5.2) over (1.2.91+0git6b465-0pureos+librem5.2~372.gbpe9f666) ...
Setting up uuu (1.2.31-0+pureoslibrem5.2) ...</pre></pre>
    <p>3) On other Linux distros<br>
    </p>
    <pre><font color="#ff0000">angus@midas:/tmp/librem5-devkit-tools$ sudo ./scripts/build_uuu.sh -i</font></pre>
    <p>Ok now we're ready to flash the phone. Not doing these steps in
      this order could cause the flashing to fail.</p>
    <p>1) Take out the battery AND disconnect the USB C cable.</p>
    <p>2) Hold VOL+ then insert the battery. <br>
    </p>
    <p>3) Plug the USB C cable in. The phone should now show up with
      "lsusb"</p>
    <pre><font color="#ff0000">angus@midas:/tmp/librem5-devkit-tools$ lsusb | grep NXP</font>
Bus 003 Device 024: ID 1fc9:012b NXP Semiconductors
</pre>
    <p>4) Now do the actual flashing</p>
    <pre><font color="#ff0000">angus@midas:/tmp/librem5-devkit-tools$ uuu uuu_scripts/flash_librem5.lst</font>
uuu (Universal Update Utility) for nxp imx chips -- libpureos/1.2.91+0git6b465-62-g9c56e46

Success 1    Failure 0
</pre>
    <p>5) Now power cycle the phone by removing the USB C and battery.
      Then install the battery first before plugging in the USB C.</p>
    <p>Your phone should now be running the latest image</p>
    <p>Cheers<br>
    </p>
    <p>Angus<br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
  </body>
</html>