{"id":1212,"date":"2020-10-13T19:10:12","date_gmt":"2020-10-13T18:10:12","guid":{"rendered":"http:\/\/blog.janprunk.com\/?p=1212"},"modified":"2020-10-13T19:12:03","modified_gmt":"2020-10-13T18:12:03","slug":"debian-buster-u-boot-network-installation-to-pc-utilite-pro","status":"publish","type":"post","link":"https:\/\/blog.janprunk.com\/?p=1212","title":{"rendered":"Debian buster U-Boot network installation to PC Utilite Pro"},"content":{"rendered":"\n<p>This manual explains how to install Debian buster on the internal SSD drive of the &#8220;Utilite Pro&#8221; device, made by&nbsp;<a href=\"http:\/\/www.compulab.com\/\">CompuLab<\/a>. Archived version of the official Utilite website is visible on&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20170712062424\/http:\/\/www.compulab.co.il\/utilite-computer\/web\/home\">Archive.org<\/a>. Wheezy installation for Utilite is described&nbsp;<a href=\"https:\/\/wiki.debian.org\/InstallingDebianOn\/CompuLab\/PC-Utilite\/wheezy\">here<\/a>.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>Serial console connection<br>First get serial connection working to be able to connect to Utilite\/U-boot console.<\/p>\n\n\n\n<p>screen \/dev\/ttyUSB0 115200<br>Device name can also be \/dev\/ttyS0<\/p>\n\n\n\n<p>Download Debian armhf ISO image<br>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.<\/p>\n\n\n\n<p>Starting<br>Install required Debian packages. Git clone the U-boot depository and compile cm-fx6 firmware image. Place it on micro-SD card.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">apt install -y build-essential gcc-arm-linux-gnueabihf bison flex bc git<\/h1>\n\n\n\n<p>$ git clone https:\/\/gitlab.denx.de\/u-boot\/u-boot.git<br>$ cd u-boot<br>$ git checkout v2020.01<br>$ export ARCH=arm<br>$ export CROSS_COMPILE=arm-linux-gnueabihf-<br>$ make cm_fx6_defconfig<br>$ make<br>$ tools\/mkimage -n spl\/u-boot-spl.cfgout -T imximage -e 0x908000 -d spl\/u-boot-spl.bin spl.img<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">dd if=\/dev\/zero of=cm-fx6-firmware bs=64K count=1<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">dd if=spl.img of=cm-fx6-firmware bs=1K seek=1 conv=notrunc<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">dd if=u-boot.img of=cm-fx6-firmware bs=1K seek=64 conv=notrunc<\/h1>\n\n\n\n<p>Placing U-Boot firmware file on the micro-SD card<\/p>\n\n\n\n<p>dd if=cm-fx6-firmware of=\/dev\/sdb bs=1K seek=1 skip=1<br>Create partitions on the micro-SD card<br>Create a fresh filesystem on first partition. U-Boot will reside between the first partition and the MBR<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">sfdisk -X dos \/dev\/sdb &lt;&lt; &#8216;EOF&#8217;<\/h1>\n\n\n\n<p>2048 &#8211; &#8211; &#8211;<br>EOF<br>Create partition on micro-SD card<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">fdisk \/dev\/sdb<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">p<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">n<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">1<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">2048<\/h1>\n\n\n\n<p>Choose default until the end of sectors. Choose Linux as partition type.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">w<\/h1>\n\n\n\n<p>Create an ext2 filesystem on the first partition.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">mkfs.ext2 \/dev\/sdb1<\/h1>\n\n\n\n<p>Copy the content of armhf CD ISO to the micro-SD card partition 1<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">mkdir \/mnt\/armhfcdiso<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">mkdir \/mnt\/sdcard1<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">mount -o loop \/path_to_debian-10.3.0-armhf-netinst.iso \/mnt\/armhfcdiso<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">mount \/dev\/sdb1 \/mnt\/sdcard1<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">cp -rv \/mnt\/armhfcdiso\/* \/mnt\/sdcard1\/<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">sync<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">umount \/mnt\/sdcard1<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">umount \/mnt\/armhfcdiso<\/h1>\n\n\n\n<p>Debian U-Boot, kernel netboot<br>Netboot initrd kernel image. Plug in the ethernet cable into one of the Utilite ethernet&#8217;s ports, to continue with the installation.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">load mmc 2:1 0x12000000 install.ahf\/vmlinuz<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">load mmc 2:1 0x13000000 install.ahf\/netboot\/initrd.gz<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">load mmc 2:1 0x18000000 install.ahf\/device-tree\/imx6q-utilite-pro.dtb<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">setenv bootargs console=ttymxc3,115200 ${video}<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">bootz 0x12000000 0x13000000:0x164707d 0x18000000<\/h1>\n\n\n\n<p>Continue with the Debian installer, after successfull boot. These steps aren&#8217;t described. When the installer finishes, reboot and test boot SSD drive.<\/p>\n\n\n\n<p>Testing SSD drive boot<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">sata init<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">load sata 0:1 0x12000000 vmlinuz<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">load sata 0:1 0x13000000 initrd.img<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">load sata 0:2 0x18000000 usr\/lib\/linux-image-4.19.0-8-armmp\/imx6q-utilite-pro.dtb<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">setenv bootargs console=ttymxc3,115200 root=\/dev\/sda2 ro rootwait ${video}<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">bootz 0x12000000 0x13000000:0x139535e 0x18000000<\/h1>\n\n\n\n<p>Writing new U-boot version on the internal SPI flash<br>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<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">load mmc 2:1 0x12000000 cm-fx6-firmware<\/h1>\n\n\n\n<p>613110 bytes read in 67 ms (8.7 MiB\/s)<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">sf probe 0<\/h1>\n\n\n\n<p>SF: Detected sst25vf016b with page size 256 Bytes, erase size 4 KiB, total 2 MiB<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">sf erase 0x0 0xc0000<\/h1>\n\n\n\n<p>SF: 786432 bytes @ 0x0 Erased: OK<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">sf write 0x12000000 0x0 0x95af6<\/h1>\n\n\n\n<p>evice 0 offset 0x0, size 0x95af6 SF: 613110 bytes @ 0x0 Written: OK<\/p>\n\n\n\n<p>Power off \/ Power on the Utilite<br>Resetting the U-boot parameters<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">env default -a<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">setenv bootdelay 60<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">saveenv<\/h1>\n\n\n\n<p>Final SSD drive boot<br>Connect serial console, when you want to boot the operating system, and type in the commands below.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">sata init<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">load sata 0:1 0x12000000 vmlinuz<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">load sata 0:1 0x13000000 initrd.img<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">load sata 0:2 0x18000000 usr\/lib\/linux-image-4.19.0-8-armmp\/imx6q-utilite-pro.dtb<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">setenv bootargs console=ttymxc3,115200 root=\/dev\/sda2 ro rootwait ${video}<\/h1>\n\n\n\n<h1 class=\"wp-block-heading\">bootz 0x12000000 0x13000000:0x139535e 0x18000000<\/h1>\n\n\n\n<p>Possible Errors<br>There is a repeated dmesg USB error message, repeated every 2 seconds. I don&#8217;t know how to fix or ignore that. It&#8217;s not affecting the functionality of the device.<\/p>\n\n\n\n<p>[ 701.247913] usb 1-1: reset high-speed USB device number 2 using ci_hdrc<br>[ 703.255691] usb 1-1: reset high-speed USB device number 2 using ci_hdrc<br>[ 705.263478] usb 1-1: reset high-speed USB device number 2 using ci_hdrc<br>[ 707.271264] usb 1-1: reset high-speed USB device number 2 using ci_hdrc<br>[ 709.279065] usb 1-1: reset high-speed USB device number 2 using ci_hdrc<br>[ 711.286845] usb 1-1: reset high-speed USB device number 2 using ci_hdrc<br>[ 713.294632] usb 1-1: reset high-speed USB device number 2 using ci_hdrc<br>[ 715.302429] usb 1-1: reset high-speed USB device number 2 using ci_hdrc<br>[ 717.310218] usb 1-1: reset high-speed USB device number 2 using ci_hdrc<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This manual explains how to install Debian buster on the internal SSD drive of the &#8220;Utilite Pro&#8221; device, made by&nbsp;CompuLab. Archived version of the official Utilite website is visible on&nbsp;Archive.org. Wheezy installation for Utilite is described&nbsp;here. First step is to download Debian armhf CD image, then partition the micro-SD card, upgrade U-boot to newer release, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,22,12,3],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts\/1212"}],"collection":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1212"}],"version-history":[{"count":1,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts\/1212\/revisions"}],"predecessor-version":[{"id":1213,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts\/1212\/revisions\/1213"}],"wp:attachment":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}