Debian buster U-Boot network installation to PC Utilite Pro

This manual explains how to install Debian buster on the internal SSD drive of the “Utilite Pro” device, made by CompuLab. Archived version of the official Utilite website is visible on Archive.org. Wheezy installation for Utilite is described here.

First step is to download Debian armhf CD image, then partition the micro-SD card, upgrade U-boot to newer release, boot with new U-Boot and netinstall Debian buster. Followed by writing/burning the updated U-Boot to internal SPI flash of the Utilite device (carefull with this step), and eventually U-Booting Debian over console from internal SSD drive.

Shell environment to use # for root shell, and $ for user shell. Drive used here is mentioned as /dev/sdb, but can be anything else on your setup /dev/sdX.

Serial console connection
First get serial connection working to be able to connect to Utilite/U-boot console.

screen /dev/ttyUSB0 115200
Device name can also be /dev/ttyS0

Download Debian armhf ISO image
You can download Debian armhf ISO image from Debian cdimage depository. The downloadaded filename used in this installation was debian-10.3.0-armhf-netinst.iso.

Starting
Install required Debian packages. Git clone the U-boot depository and compile cm-fx6 firmware image. Place it on micro-SD card.

apt install -y build-essential gcc-arm-linux-gnueabihf bison flex bc git

$ git clone https://gitlab.denx.de/u-boot/u-boot.git
$ cd u-boot
$ git checkout v2020.01
$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabihf-
$ make cm_fx6_defconfig
$ make
$ tools/mkimage -n spl/u-boot-spl.cfgout -T imximage -e 0x908000 -d spl/u-boot-spl.bin spl.img

dd if=/dev/zero of=cm-fx6-firmware bs=64K count=1

dd if=spl.img of=cm-fx6-firmware bs=1K seek=1 conv=notrunc

dd if=u-boot.img of=cm-fx6-firmware bs=1K seek=64 conv=notrunc

Placing U-Boot firmware file on the micro-SD card

dd if=cm-fx6-firmware of=/dev/sdb bs=1K seek=1 skip=1
Create partitions on the micro-SD card
Create a fresh filesystem on first partition. U-Boot will reside between the first partition and the MBR

sfdisk -X dos /dev/sdb << ‘EOF’

2048 – – –
EOF
Create partition on micro-SD card

fdisk /dev/sdb

p

n

1

2048

Choose default until the end of sectors. Choose Linux as partition type.

w

Create an ext2 filesystem on the first partition.

mkfs.ext2 /dev/sdb1

Copy the content of armhf CD ISO to the micro-SD card partition 1

mkdir /mnt/armhfcdiso

mkdir /mnt/sdcard1

mount -o loop /path_to_debian-10.3.0-armhf-netinst.iso /mnt/armhfcdiso

mount /dev/sdb1 /mnt/sdcard1

cp -rv /mnt/armhfcdiso/* /mnt/sdcard1/

sync

umount /mnt/sdcard1

umount /mnt/armhfcdiso

Debian U-Boot, kernel netboot
Netboot initrd kernel image. Plug in the ethernet cable into one of the Utilite ethernet’s ports, to continue with the installation.

load mmc 2:1 0x12000000 install.ahf/vmlinuz

load mmc 2:1 0x13000000 install.ahf/netboot/initrd.gz

load mmc 2:1 0x18000000 install.ahf/device-tree/imx6q-utilite-pro.dtb

setenv bootargs console=ttymxc3,115200 ${video}

bootz 0x12000000 0x13000000:0x164707d 0x18000000

Continue with the Debian installer, after successfull boot. These steps aren’t described. When the installer finishes, reboot and test boot SSD drive.

Testing SSD drive boot

sata init

load sata 0:1 0x12000000 vmlinuz

load sata 0:1 0x13000000 initrd.img

load sata 0:2 0x18000000 usr/lib/linux-image-4.19.0-8-armmp/imx6q-utilite-pro.dtb

setenv bootargs console=ttymxc3,115200 root=/dev/sda2 ro rootwait ${video}

bootz 0x12000000 0x13000000:0x139535e 0x18000000

Writing new U-boot version on the internal SPI flash
Be carefull here, this can result into a bricked SPI flash (bricked Utilite) !!! This step is not obligatory, because you can always U-boot with micro-SD card

load mmc 2:1 0x12000000 cm-fx6-firmware

613110 bytes read in 67 ms (8.7 MiB/s)

sf probe 0

SF: Detected sst25vf016b with page size 256 Bytes, erase size 4 KiB, total 2 MiB

sf erase 0x0 0xc0000

SF: 786432 bytes @ 0x0 Erased: OK

sf write 0x12000000 0x0 0x95af6

evice 0 offset 0x0, size 0x95af6 SF: 613110 bytes @ 0x0 Written: OK

Power off / Power on the Utilite
Resetting the U-boot parameters

env default -a

setenv bootdelay 60

saveenv

Final SSD drive boot
Connect serial console, when you want to boot the operating system, and type in the commands below.

sata init

load sata 0:1 0x12000000 vmlinuz

load sata 0:1 0x13000000 initrd.img

load sata 0:2 0x18000000 usr/lib/linux-image-4.19.0-8-armmp/imx6q-utilite-pro.dtb

setenv bootargs console=ttymxc3,115200 root=/dev/sda2 ro rootwait ${video}

bootz 0x12000000 0x13000000:0x139535e 0x18000000

Possible Errors
There is a repeated dmesg USB error message, repeated every 2 seconds. I don’t know how to fix or ignore that. It’s not affecting the functionality of the device.

[ 701.247913] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 703.255691] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 705.263478] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 707.271264] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 709.279065] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 711.286845] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 713.294632] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 715.302429] usb 1-1: reset high-speed USB device number 2 using ci_hdrc
[ 717.310218] usb 1-1: reset high-speed USB device number 2 using ci_hdrc

Author: Jan Prunk

Jan Prunk, Free software / GNU Linux enthusiast from Slovenia.

Leave a Reply

Your email address will not be published. Required fields are marked *