Changes between Initial Version and Version 1 of catalina/firmware


Ignore:
Timestamp:
04/28/2026 04:59:34 PM (42 hours ago)
Author:
Tim Harvey
Comment:

initial page

Legend:

Unmodified
Added
Removed
Modified
  • catalina/firmware

    v1 v1  
     1[[PageOutline]]
     2
     3= Updating Catalina Firmware / Software
     4
     5This page is all about updating / flashing firmware / software onto a Catalina SBC.
     6
     7The various components of the 'firmware' on a Catalina board which you may want to update from time to time are (lowest level components listed first):
     8- GSC firmware
     9- Boot Firmware (oei/sm/atf/uboot)
     10- Linux kernel
     11- root filesystem
     12
     13Some components above you can update individually in Linux using {{{dd}}} or in U-Boot using {{{mmc write}}} taking care to place them at the right offset.
     14
     15[=#images]
     16= Pre-Built Images
     17
     18Various Pre-built Catalina images can be found on https://dev.gateworks.com/catalina including:
     19 * '''Compressed Disk Images''': (*.img.gz files) OS Images (everything but boot firmware)
     20  - [https://dev.gateworks.com/catalina/images/ubuntu-catalina.img.gz ubuntu-catalina.img.gz] - Gateworks Ubuntu based OS details are available [wiki:catalina/ubuntu here]
     21  * '''[#disk-images Install compressed disk images via U-Boot or Linux using instructions here]'''
     22 * '''Gateworks System Controller Firmware''': (board specific gsc*.txt files)
     23  - [https://dev.gateworks.com/catalina/images/gsc_9200.txt gsc_9200.txt]
     24 * '''Boot Firmware''': Everything up to the OS (OEI, SM, SPL, ATF, U-Boot, U-Boot env)
     25  - For updating via U-Boot or Linux or booting via SDP (does not contain U-Boot env)
     26   * [https://dev.gateworks.com/catalina/boot_firmware/flash.bin flash.bin]
     27 * '''Catalina Kernel Tarball''' useful for installing on top of root filesystem manually
     28  * [https://dev.gateworks.com/catalina/kernel/linux-catalina.tar.xz linux-catalina.tar.xz] - Compressed TAR archive of pre-built Linux kernel
     29
     30Gateworks System Controller files are 'board specific' meaning the file used depends on the baseboard model. These images are flashed into the GSC itself.
     31
     32Boot firmware images are flashed to the eMMC boot0 partition.
     33
     34Compressed Disk Images are written to the eMMC user partition which contains a disk partition table and the various OS partitions.
     35
     36
     37
     38[=#firmware-update]
     39= Updating Firmware
     40This section provides instructions for updating both GSC firmware as well as boot device firmware.
     41
     42There are two methods for updating firmware:
     43 * On a live already-booting board using Serial Console and Ethernet via U-Boot or Linux booted from a ramdisk (recommended for flashing new operating systems, etc)
     44 * Using JTAG via a GW16099 JTAG dongle (recommended only for low level firmware in the .bin format) (*** Coming soon ***)
     45
     46[=#jtag]
     47== Updating Firmware via JTAG
     48The GSC firmware and eMMC boot firmware can be easily updated via JTAG. Technically you can also use JTAG to update any size or section of the eMMC in order to update an entire OS but you will find that for anything over about 32MiB using U-Boot and/or a Linux image with ramdisk will be much quicker.
     49
     50The Gateworks JTAG adapter (GW16099) is available in the Catalina Dev Kit as well as on the Gateworks web store [http://shop.gateworks.com/index.php?route=product/category&path=70_80 here]
     51
     52All Catalina boards have a 10-pin JTAG header which provides:
     53 * JTAG Programming for embedded emmc flash - see [wiki:jtag_instructions here] for instructions
     54 * Serial Console access via UART2 (/dev/ttymxc1)
     55
     56Please Note:
     57 * Only flash files intended for JTAG using the JTAG programmer and jtag_usbv4
     58 * Linux software is supported for programming Catalina (jtag_usbv4 required). Windows is not supported. (Serial console through Windows does work).
     59 * JTAG Programming of eMMC is supported by [https://dev.gateworks.com/jtag/jtag_usbv4 jtag_usbv4] - see [wiki:jtag_instructions here]. Due to this being a slow process for large eMMC devices it is recommended to program boot firmware via JTAG if you brick your board and use the bootloader to install firmware when possible for speed (see [#serial-ethernet] below).
     60 * JTAG Programming of the GSC firmware is supported by [https://dev.gateworks.com/jtag/jtag_usbv4 jtag_usbv4]
     61
     62=== Updating GSC Firmware via JTAG
     63To update the GSC firmware via JTAG download the {{{jtag_usbv4}}} application on a Linux x86 host from [https://dev.gateworks.com/jtag/jtag_usbv4 here] and execute as follows:
     64{{{#!bash
     65./jtag_usbv4 -m gsc_9200.txt
     66}}}
     67
     68For more details please see:
     69 * [wiki:jtag Gateworks JTAG wiki page]
     70
     71
     72=== Updating eMMC boot firmware via JTAG
     73*** Coming Soon ***
     74
     75
     76[=#serial-ethernet]
     77== Update Firmware via Serial Console and Ethernet
     78The quickest and easiest way to update your firmware is via Serial Console and Ethernet assuming you have a board booting to U-Boot. You can do this either in the U-Boot bootloader (recommended) or within a Linux OS.
     79
     80If updating via U-Boot you will need to setup either an HTTP or TFTP server to host the files for transfer or alternatively you could load firmware files from removable storage (microSD, or USB Mass Storage for example). For details on setting up a TFTP server see [wiki:tftpserver here]. Also note that there are many reasons why HTTP/TFTP may fail including:
     81 * Firewall issue keeping your server for being accessible (make sure you can ping it!)
     82 * Invalid network configuration (netmask, gatewayip, ipaddr, serverip) - make sure you can ping it!
     83
     84
     85[=#disk-images]
     86=== Update OS via Compressed Disk Images
     87A compressed disk image is relatively easy to create and is easy to install on a running board via U-Boot or Linux running from a ramdisk. Assuming boot firmware is booting from another device or hardware partition (ie eMMC boot0 hardware partition) the compressed disk image contains only the disk partition table and OS filesystem partitions.
     88
     89==== Compressed disk image via U-Boot
     90A Compressed disk image (Ubuntu, OpenWrt, etc) in the .img.gz file format can be installed from U-Boot as long as you can load it into memory:
     91 * using ethernet:
     92{{{#!bash
     93# setup your network addresses (ipaddr, serverip, gatewayip, netmask) manually, or via DHCP
     94dhcp
     95# set the protocol (http/tftp) (default env is http)
     96setenv proto http
     97# set the path on the server (default is 'catalina/')
     98setenv path catalina/
     99# choose the device to update (default env is sets this to 0 for eMMC)
     100setenv dev 0 # sets MMC device to be flashed - see mmc list
     101# choose the protocol (http/tftp) (default env is http)
     102# specify the file name
     103setenv image ubuntu-catalina.img.gz
     104# update
     105run update_os
     106}}}
     107 * using microSD:
     108{{{#!bash
     109# load image via microSD device and partition (use 'mmc list' and 'mmc part' to see a list)
     110load mmc 1:1 $loadaddr ubuntu-catalina.img.gz && gzwrite mmc $dev $loadaddr $filesize
     111}}}
     112 * using a USB Mass Storage device:
     113{{{#!bash
     114usb start && load usb 0:1 $loadaddr ubuntu-catalina.img.gz && gzwrite mmc $dev $loadaddr $filesize
     115}}}
     116
     117==== Compressed disk image via Linux
     118A Compressed disk image can be installed from Linux as long as you can load it into memory (ie via network or removable storage) and do not have the flash device mounted (ie booted from a kernel+ramdisk rescue image):
     119{{{#!bash
     120# fetch your file
     121cd /tmp
     122wget https://dev.gateworks.com/catalina/images/ubuntu-catalina.img.gz
     123# uncompress and write to the emmc device
     124zcat ubuntu-catalina.img.gz | dd of=/dev/mmcblk0 bs=4M
     125}}}
     126
     127
     128
     129[=#boot-firmware]
     130=== Updating just the boot firmware via U-Boot or Linux
     131The boot firmware containing everything up to the OS (OEI, SM, ATF, and U-Boot) can be updated at runtime via U-Boot or Linux. This method does not update the boot firmware U-boot environment. Assuming your boot firmware is installed on the eMMC boot0 partition (which is the default) this does not affect the disk partition table or filesystems on the eMMC user partition.
     132
     133The latest pre-built boot-firmware image for Catalina are available for download here:
     134[https://dev.gateworks.com/catalina/boot_firmware/flash.bin]
     135
     136
     137==== Boot firmware update via U-Boot
     138Updating the boot firmware via U-Boot is made easy by the 'update_firmware' U-Boot env script which takes care of determining the correct device, partition, and offset based on env variables set on boot:
     139{{{#!bash
     140# setup your network addresses (ipaddr, serverip, gatewayip, netmask) manually, or via DHCP
     141dhcp
     142# choose the protocol (http/tftp) (default env is http)
     143setenv proto http
     144# set the path on the server (default is 'catalina/')
     145setenv path catalina/
     146# specify the file name (default is 'flash.bin')
     147setenv firmware flash.bin
     148# update
     149run update_firmware
     150# update
     151run update_firmware
     152}}}
     153 * Alternatively you can load the image from removable storage
     154
     155
     156==== Boot firmware update via Linux
     157Updating the boot firmware via Linux requires you to manually specify the correct device, hardware partition and offset.
     158
     159To update boot firmware on the default eMMC boot0 hardware partition:
     160{{{#!bash
     161# allow writing to boot0
     162echo 0 > /sys/block/mmcblk2boot0/force_ro
     163# write to the emmc device to offset 0:
     164dd if=flash.bin of=/dev/mmcblk2boot0
     165}}}
     166
     167
     168[=#gsc-udpate]
     169=== Updating GSC firmware
     170The GSC firmware can be updated via the {{{gsc_update}}} application running under Linux as described at on the [wiki:gsc#firmware gsc wiki]. While it takes only a few seconds to update there is no recovery for a failed update. Gateworks has ensured that this update is robust but can not survive a power-cut or kernel crash in the middle of the update. Updates to the GSC firmware are expected to be rare.
     171
     172
     173
     174[=#firmware-version]
     175= Firmware Versioning
     176
     177You can determine the firmware version of various portions of the firmware by looking for banners on the serial console. For example:
     178{{{#!bash
     179imx-oei lf-6.18.2-1.0.0-5-gd969478f mx95catalina (Apr 27 2026 16:50:04)
     180...
     181imx-sm lf-6.18.2-1.0.0-5-g7da12332 (Apr 27 2026 16:50:04)
     182...
     183U-Boot SPL 2026.04-00012-gd586e3508c07-dirty (Apr 27 2026 - 16:50:08 -0700)
     184...
     185U-Boot 2026.04-00012-gd586e3508c07-dirty (Apr 27 2026 - 16:50:08 -0700)
     186...
     187[    0.000000] Linux version 6.18.20-g4b3767a0c7d8 (buildbot@74809c9e98bd) (aarch64-linux-gcc.br_real (Buildroot 2026.02
     188) 14.3.0, GNU ld (GNU Binutils) 2.44) #1 SMP Mon Apr 27 22:32:53 UTC 2026
     189...
     190Ubuntu 24.04.3 LTS catalina ttyLP0
     191
     192Gateworks Ubuntu (g8940973 Mon Apr 27 22:48:18 UTC 2026)
     193}}}
     194
     195
     196The above output shows you:
     197 * OEI GIT revision and build date
     198 * SM GIT revision and build date
     199 * U-Boot GIT revision and build date
     200 * Linux kernel version, GIT revision, build date and build source
     201 * Ubuntu root filesystem version and GIT revision of the BSP that built it
     202 * For an Ubuntu based rootfs you can use {{{dpkg -l | grep "^ii"}}} to see what packages and versions are installed