By: Alastair Tse @liquidx
Updated: 2021-12-05
This is a guide for installing Linux on a Technexion NXP IMX7 board. This is a board that was part of the Android Things Starter Kit (now discontinued).
There are some dead ends in this guide where I got to a point where I failed. I'm documenting this so that it can help anyone else who is trying the same thing.
Before starting, there are a few useful sources of information:
- Technexion's YouTube channel has a videos on UUU. The instructions seem to be different from these ones below:
- This medium post helped resolve some mysteries, though was inaccurate in some details.
- DigiKey Forum have a lot of related posts:
- https://forum.digikey.com/t/debian-getting-started-with-the-pico-pi-imx7/12429
- They use a different tool than what is described below, but the process is similar.
- https://www.technexion.com/products/system-on-modules/pico/pico-imx7/
- https://www.nxp.com/docs/en/user-guide/PICO-IMX7UL-USG.pdf
- https://developer.technexion.com/docs/pico-imx7
There are two USB ports on this device. I found that the USB-C port is the one that exposes the serial port which you can use to flash the device. There is no SD Card slot on this board, so the storage is using eMMC.
See https://developer.technexion.com/docs/pico-evaluation-kit-boot-mode-settings for information on how to set the jumps.
You need to set the jumpers to the to Serial reset.
-** **-
-** **-
To reset back to booting off eMMC the jumpers should be
**- -**
**- **-
Most of the tutorials online seem to mention an FTP server, but you can get the same files from their HTTP server: https://download.technexion.com/development_resources/development_tools/installer/
The flashing software is called UUU. It is open source, so you can compile it from source here: https://github.com/NXPmicro/mfgtools
In order to flash the IMX7 using these tools, you need a Secondary Program Loader and a UBoot image. These can be found by downloading imx-mfg-uuu-tool.zip
from the following site:
https://download.technexion.com/development_resources/development_tools/installer/
Summary: I was not able to get this to work flashing from a MacBook Pro. I got all the tools working, but UUU would not be able to issue FastBoot commands to over the serial interface.
Follow the instructions on the mfgtools repo.
In short:
# Install libusb, libbz2, zlib.
$ brew install openssl libusb zlib libbz2 libzip
# Install HEAD checkout of libusb (>1.0.4) because there is an issue with
# other Kernel extensions not releasing the USB device.
# See: https://github.com/NXPmicro/mfgtools/issues/246
$ brew install --head libusb
# Clone mfgtools
git clone https://github.com/NXPmicro/mfgtools.git
cmake -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl . && make
# Run the binary (test by trying to list the USB devices)
$ mfgtools/uuu/uuu -lsusb
Alternatively, you can also avoid building the binary by using the prebuilt Mac binary at: https://github.com/NXPmicro/mfgtools/releases/tag/uuu_1.4.165
This mac binary is compiled against a vanilla homebrew setup (libraries in /usr/local/opt).
If you get a "Failure Claim Interface" when running UUU, it means it was unable to access the USB device. You'll have to use the libusb HEAD which includes a workaround for Mac.
Afterwards, if you can get it to work, you'll find that it infinitely loops at the SPL stage. I was not able to get it to manually run the FastBoot commands:
$ uuu -s
> FB: getvar
...
Follow the instructions on the mfgtools repo to build for Linux. If you are running Linux on a 64-bit processor, you can use the prebuilt binaries from .
Three things are needed to flash the IMX7, the Secondary Program Loader (SPL), the UBoot image (UBOOT) and the image itself.
The model of the board in the Android Things starter kit is PICO-PI-IMX7. Since this board doesn't have an SD card slot, I think the right image will be the eMMC images:
https://download.technexion.com/demo_software/PICO/IMX7/pico-imx7-emmc/
There are two images that should work:
pico-imx7_pico-pi_yocto-3.0-qt5_qca9377_lcd-800..> 29-Apr-2021 09:01 332467921
pico-imx7d_pi_ubuntu-20.04-xfce_QCA9377_5-lcd-8..> 03-Feb-2021 09:01 739894001
The first one pico-imx7_pico-pi_yocto-3.0-qt5
is a Yocto (custom Debian) build. It does not have any of the propietery firmwares that allow it to work with the onboard Broadcom wireless chip. It unpacks to a 2GB image on the eMMC. However, that is a little weird because the eMMC is actually 4GB.
The second one pico-imx7d_pi_ubuntu-20.04-xfce_QCA9377_5
is the Ubuntu build. I've not been able to get this working because of the size of this image.
The instructions on the Technexion site refer to this command:
sudo uuu/linux64/uuu -b emmc_imx7_img imx7/imx7-SPL imx7/imx7-u-boot.img fsl-image-qt5-validation-imx-pico-imx7.sdcard
emmc_imx7_img
is a prebuilt command that is available if you use the prebuilt uuu from Technexion. If you built UUU from source, you may not have it. You will need to use the autoscript (which seems to be the exact same commands.) The Technexion repository refers to this as the "multiboard" commands.
For the multiboard commands, it recommends that you move the appropriate SPL and UBOOT and image into the directory you will execute the script named as follows:
_SPL
_UBOOT
_rootfs.sdcard
So then the command would be:
cd ${dir_with_spl_uboot_image_files}
sudo mfgtools/uuu/uuu -b imx-mfg-uuu-tool/multiboard/emmc_imx7_img.auto
You can also execute this by adding the file locations as paramters to avoid having to rename them:
sudo mfgtools/uuu/uuu \
-b imx-mfg-uuu-tool/multiboard/emmc_imx7_img.auto \
imx-mfg-uuu-tool/imx7/pico-imx7/imx7-SPL \
imx-mfg-uuu-tool/imx7/pico-imx7/imx7-u-boot.img \
../fsl-image-qt5-validation-imx-pico-imx7-20210429040519.rootfs.wic
Note that UUU will be able to decompress the bz2, so there's no need to decompress it. If the host (flasher) machine doesn't have enough memory, it may fail to flash the image. I've found that if I unpack it rather than relying on uuu to unpack it, it will have a higher success rate.
If you are running this from a 32-bit machine, and the image file is larger than 2GB, it will likely fail with an error fail open file
because UUU
tries to load the size into an int. This happens with the ubuntu
image that is available.
Note that .wic
and .sdcard
are the same file type (and presumably .img
).
I tried to flash this from a VirtualBox Linux guest running on a Mac host. That doesn't work, even though the USB device is exposed, the USB emulation/passthrough seem to introduce enough errors that the flashing process doesn't work.
Once flashing is completed, switch the jumpers back to the eMMC boot mode so it boots off of the image that was just flashed.
The USB-C port will now only be used to supply power. You will not see the device when using lsusb
from the USB-C port.
The micro-USB port will show up as a serial device, plugging into a Linux machine, it should show up as /dev/ttyUSB0 which you can connect to using screen /dev/ttyUSB0 115200
. When you plug this in, the LEDs next to the micro-USB port will flash a little. This is the activity light for the micro-USB. If you start typing in the console, the light should start flashing.
- If the lights next to the USB-C power keep on flashing, then there's something wrong with the power supply to the power. This seems to happen for me when I plug into a port that supplies too little power or too much power (PD). I was able to power this off a well supplied Raspberry PI 2, but when plugging straight into other device.
- When not enough power is supplied, it looks like the board is dead.
- The partition flashed in the yocto image is smaller than the available eMMC size. To expand to the whole eMMC size, you can do a live partition resize.
https://github.com/TechNexion/u-boot-tn-imx/wiki/Use-mfgtool-%22uuu%22-to-flash-eMMC https://github.com/NXPmicro/mfgtools/wiki nxp-imx/mfgtools#246
thanks, I was able to flash from linux Ubuntu 22
pico-imx7_pico-pi_ubuntu-22.04_qca9377_lcd-800x480_20221221.zip
however I cannot get wifi working, looks like drivers are not in there