Differences between revisions 9 and 34 (spanning 25 versions)
Revision 9 as of 2020-04-15 09:31:29
Size: 2267
Editor: JanPrunk
Comment:
Revision 34 as of 2022-01-15 01:40:38
Size: 6406
Comment: A few minor cleanup and spelling fixes
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= This page is work in progress, please do not edit, until I remove this notice. = # Describe InstallingDebianOn/CompuLab/PC-Utilite/buster here. #
= 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 [[http://www.compulab.com|CompuLab]]. Archived version of the official Utilite website is visible on [[https://web.archive.org/web/20170712062424/http://www.compulab.co.il/utilite-computer/web/home|Archive.org]]. Wheezy installation for Utilite is described [[https://wiki.debian.org/InstallingDebianOn/CompuLab/PC-Utilite/wheezy|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 (careful 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.
Line 5: Line 12:
Describe InstallingDebianOn/CompuLab/PC-Utilite/buster here. = 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
Line 7: Line 19:
= PC Utilite Pro support in Debian buster =

This manual explains h
ow to upgrade U-boot and install Debian buster to Utilite Pro device.
This page exists to collate information about the status of support in Debian for the PC Utilite by [[http://www.compulab.com|CompuLab]].
Shell environment to use # for root shell, and $ for user shell.

= Download
armhf ISO image =
You can download armhf ISO image from [[https://cdimage.debian.org/debian-cd/current/armhf/iso-cd/|Debian cdimage depository]].
The file to download tested in this installation was [[https://cdimage.debian.org/debian-cd/current/armhf/iso-cd/debian-10.3.0-armhf-netinst.iso|debian-10.3.0-armhf-netinst.iso]].
= Download Debian armhf ISO image =
You can download Debian armhf ISO image from [[https://cdimage.debian.org/debian-cd/current/armhf/iso-cd/|Debian cdimage repository]]. The downloaded filename used in this installation was [[https://cdimage.debian.org/debian-cd/current/armhf/iso-cd/debian-10.3.0-armhf-netinst.iso|debian-10.3.0-armhf-netinst.iso]].
Line 19: Line 23:
Install required Debian packages. Install required Debian packages. Git clone the U-boot depository and compile cm-fx6 firmware image. Place it on micro-SD card.
Line 36: Line 40:
== U-boot Debian netboot commands ==
Here we select netboot initrd image to be booted. Plug in the ethernet cable into one of the Utilite ethernet's ports.
== 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's Ethernet ports, to continue with the installation.
Line 47: Line 92:
Continue with the Debian installer, after successful 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 careful 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
}}}
Line 48: Line 134:
Connect serial console, when you want to boot the operating system, and type in the commands below.
Line 57: Line 144:

== Possible Errors ==
Repeated dmesg USB error message respawns on the serial console every 2 seconds. It's not affecting the functionality of the device. It stops the flooding messages when you plug in the USB key.

{{{
[ 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
}}}

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 (careful 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 repository. The downloaded 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's Ethernet 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 successful 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 careful 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

Repeated dmesg USB error message respawns on the serial console every 2 seconds. It's not affecting the functionality of the device. It stops the flooding messages when you plug in the USB key.

[  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