Skip to content
Snippets Groups Projects
Flashing_an_Image_by_Hand.rst 2.71 KiB
Newer Older
.. _imx8_devkit_howto_flash_with_uuu:

Flashing an Image by Hand
=========================

We recommend :ref:`using a script <imx8_devkit_flash_test_image>` to download and flash the latest image onto the development board. However, if you want to perform the steps by hand, the following information should be helpful.

You should have already :ref:`installed uuu <imx8_devkit_install_uuu>` before proceeding.

Download uuu Scripts
--------------------

Clone the `librem5-devkit-tools`_ repository and enter the working directory:

.. code:: bash

   git clone https://source.puri.sm/Librem5/librem5-devkit-tools.git
   cd librem5-devkit-tools

You will only need some of the files in this repository.

Download the Recovery Image
---------------------------

Open the `Recovery U-Boot Build <recovery_image_>`_ page in a web browser and find the latest job with a successful build. Open the page for the build -- it should have a ``u-boot-devkit-recovery.imx`` download link in the list of Build Artifacts. Download this file into the ``files`` directory.

.. _recovery_image: https://arm01.puri.sm/job/u-boot_builds/job/devkit-recovery_uboot_build/

Download the Latest Image
-------------------------

Open the `Image Build <image_build_>`_ page in a web browser and find the latest "current devkit buster+ci image" job with a successful build. Open the page for the build -- it should have a ``devkit.img.xz`` download link in the list of Build Artifacts. Download this file into the ``files`` directory and check that the SHA256 sum matches the value contained in the ``meta.yml`` download to ensure that it was downloaded successfully.

.. _image_build: https://arm01.puri.sm/job/Images/job/Image%20Build/

Unpack the Image
----------------

Using the ``xz`` tool, unpack the image:

.. code:: bash

   xz -d files/devkit.img.xz

Change the Boot Mode
--------------------

Put the "Boot Mode" switch on the development board in the USB position. Attach the development board to a USB C or USB 3 port on the host that is capable of providing 900mA of current. The HID device should appear in the output of the ``lsusb`` command, like this::

   Bus 001 Device 005: ID 1fc9:012b NXP Semiconductors

Now you can proceed with flashing.

Run uuu with a Flashing Script
------------------------------

Ensure that the ``uuu`` tool is on the ``PATH``. Enter the ``uuu_scripts`` directory and run ``uuu`` on the ``flash_librem5-devkit.lst`` file.

**This will erase everything on the board's eMMC:**

.. code:: bash

   cd uuu_scripts
   uuu flash_librem5-devkit.lst

This should cause the U-Boot and disk images to be written to the board's eMMC storage.

Booting
-------

Return to the :ref:`imx8_devkit_booting` section for further instructions.

.. include:: /links.txt