A38X U-Boot
Download Binaries
We are automatically building binaries whenever code is pushed to our U-Boot repository on github. Please find the results at https://images.solid-run.com/A38X/U-Boot.
Installing automatically (SPI, eMMC, M.2 SSD)
This section assumes that you already have a version of U-Boot >= 2018.01 running on your device! If not, there are two options:
Install U-Boot to removable media first, such as microSD or SATA
Boot from UART (booting from uart)
First prepare an sdcard or usb-drive with the u-boot binary that you want to install: – Filesystem should be one of ext2,3,4 and fat, on partition 1 – copy the u-boot binary to the top level directory of your sdcard or usb drive – Eject the drive and plug it into your clearfog board
Now drop to the U-Boot console and run one of these update commands (you might have to substitute the file names *.kwb by the actual names on your drive):
# To install u-boot-clearfog-pro-spi.kwb from sdcard to spi:
bubt u-boot-clearfog-pro-spi.kwb spi mmc
# To install u-boot-clearfog-pro-spi.kwb from usb to spi
bubt u-boot-clearfog-pro-spi.kwb spi usb
# To install u-boot-clearfog-pro-mmc.kwb from usb to emmc
bubt u-boot-clearfog-pro-mmc.kwb mmc usb
# To install u-boot-clearfog-pro-sata.kwb from usb to m.2 ssd
bubt u-boot-clearfog-pro-sata.kwb sata usb
# To install u-boot-clearfog-pro-sata.kwb from emmc/sdcard to m.2 ssd
bubt u-boot-clearfog-pro-sata.kwb sata mmcWarning: bubt does not take care of GPT yet. When installing u-boot to sdcard, sata or emmc data partition, an existing GPT will be broken!
Warning: bubt support for eMMC boot0/boot1 is limited, new version will be written to same partition as running version!
Note: You can configure where u-boot will be installed to on eMMC, the choices are the data partition, boot0 and boot1. Please refer to this section for instructions.
Installing over network (TFTP)
This section assumes that you already have a version of U-Boot >= 2018.01 running on your device! If not, there are two options:
Install U-Boot to removable media first, such as microSD or SATA
Boot from UART (booting from uart)
For the purpose of these instructions we make the following assumptions:
192.168.1.1
TFTP server
192.168.1.20
IP to be used with the clearfog board
255.255.255.0
netmask of the network
/u-boot-clearfog-pro-sata.kwb
name and path of the U-Boot binary on the tftp server
First power on the device, then “Hit any key to stop autoboot” on the UART console. Finally use below commands to install U-Boot from TFTP to M.2 SSD. Pick the right section for your network setup. Also note that below sata can be replaced by mmc(for sdcard/eMMC) or spi for installing to those.
With DHCP and BOOTP
With DHCP only
Manually
Installing manually
microSD
This section assumes that you have a device running linux, and the target sdcard attached to it. This can be any device! Optionally create an MBR partition table, and any partitions you may want.
The BootROM searches for U-Boot after the first 512 bytes, so use the dd command to write u-boot to this location on your microSD card. Substitute sdX by the device node of your sdcard.
Note: Take your time while identifying where your designated SD-Card is mapped on your linux system. Failure to do so can result in overwriting an arbitrary disk on your system!
M.2 SSD
This section assumes that you have a device running linux, and the target sdcard attached to it. This can be any device! Optionally create an MBR partition table, and any partitions you may want.
The BootROM searches for U-Boot after the first 512 bytes, so use the dd command to write u-boot to this location on your SSD. Substitute sdX by the device node of your target SSD.
Note: Take your time while identifying where your designated SSD is mapped on your linux system. Failure to do so can result in overwriting an arbitrary disk on your system!
SPI
This section assumes that you already have a version of U-Boot >= 2018.01 running on your device! If not, there are two options:
Install U-Boot to removable media first, such as microSD or SATA
Boot from UART (booting from uart)
The BootROM loads U-boot from the start of SPI flash, offset=0. U-Boot expects to have the first 1M for itself, the environment lives at 0x0fe000-0x100000.
Drop to the U-Boot console, and execute these command for loading the u-boot binary to memory, and then writing it to the spi flash. This sample only covers eMMC/sdcard partition 1 as source, but network or usb are also usable.
eMMC (data partition)
This section assumes that you already have a version of U-Boot >= 2018.01 running on your device! If not, there are two options:
Install U-Boot to SATA (m.2) ssd first
Boot from UART (booting from uart)
The BootROM loads U-Boot from either sector 0 or 4096. Sector 0 conflicts with MBR (i.e. standard partitions can not be created) - therefore 4096 is used. Environment lives at sectors 1920-2048. Note there may be conflicts with standard partitions if they start before sector 8192.
Place the appropriate U-Boot binary built for eMMC data partition on a USB drive formatted with fat32 or ext4. Then execute the following commands for loading u-boot to memory, and then writing it to the eMMC. Note that alternatively the u-boot binary can also be loaded from the network, sata drive or eMMC.
Finally configure the eMMC Boot partition accordinglya as outlined in the next section.
eMMC (boot0 partition)
This section assumes that you already have a version of U-Boot >= 2018.01 running on your device! If not, there are two options:
Install U-Boot to SATA (m.2) ssd first
Boot from UART (booting from uart)
Place the appropriate U-Boot binary built for eMMC boot0 partition on a USB drive formatted with fat32 or ext4. Then execute the following commands for loading u-boot to memory, and then writing it to the eMMC. Note that alternatively the u-boot binary can also be loaded from the network, sata drive or eMMC.
Finally configure the eMMC Boot partition accordingly as outlined in the next section.
eMMC (boot1 partition)
This section assumes that you already have a version of U-Boot >= 2018.01 running on your device! If not, there are two options:
Install U-Boot to SATA (m.2) ssd first
Boot from UART (booting from uart)
Place the appropriate U-Boot binary built for eMMC boot1 partition on a USB drive formatted with fat32 or ext4. Then execute the following commands for loading u-boot to memory, and then writing it to the eMMC. Note that alternatively the u-boot binary can also be loaded from the network, sata drive or eMMC.
Finally configure the eMMC Boot partition accordingly as outlined in the next section.
Configure eMMC Boot Partition
The previous sections described how U-Boot can be installed to various eMMC partitions. However the eMMC itself must also be configured for selecting the correct boot partition.
Responsible for changing this setting is the mmc partconf command. It takes either 1, or 4 paramaters:
The most relevant piece here is the BOOT_PARTITION_ACCESS field. It takes one of the following values:
0: do not boot from eMMC
1: boot from boot0
2: boot from boot1
7: boot from data partition
PARTITION_ACCESS is supposed to control access to the boot partitions where 0 means no access, 1 means read-write for boot0 and 2 read-write for boot1. However this currently does not appear to have any effect. It is suggested to set this to 1 when booting from boot0, 2 when booting from boot1 and 0 when booting from the data partition.
So finally this is how a new configuration is applied:
Booting from UART
This section assumes that you have downloaded and compiled the U-Boot sources so that the binary tools/kwboot exists!
First configure the board to boot from UART. There are two options to do so:
Set the Boot DIP switches to boot from UART (Bootdevice).
Set the Boot DIP switches to something that is not connected, e.g. SD/eMMC, or SATA. The BootROM will fall back to UART after a few seconds.
After connecting the serial uart to your PC using a micro-USB-cable, run this command to send U-Boot to the board for execution:
Now turn on, or reset the board. You should see output similar to the following after less than 10 seconds:
Note: To leave the mini terminal of the kwboot command, press Control and backspace (Ctrl + \), then c.
Compiling from source
This section assumes that you have git, make and a cross-compiler targeting 32-bit arm available on your system!
These are the instructions to fetch the code, and build a binary:
This will generate u-boot-with-spl.kwb to be used on the Clearfog Pro when booting from an sdcard. To target the Clearfog Base and/or other boot media, substitute the configuration steps below:
Clearfog Pro (default)
Clearfog Base
SD-Card (default)
eMMC (data partition)
eMMC (boot0 partition)
eMMC (boot1 partition)
M.2 SSD
SPI
UART
Note: The resulting binaries share the same filename regardless of configuration.
Reconfigure PCIe as SATA, and SFP speed
These settings are exposed via the u-boot cofniguration system, and can be set in configs/clearfog_defconfig before running make clearfog_defconfig, with ./scripts/config, or afterwards using make menuconfig.
Defaults: both ports PCIe, SFP at 1Gbps
both ports SATA:
SFP at 2.5Gbps
Any combinations are valid depending on your particular needs.
Verified Boot
Verified Boot is a way to ensure that only authenticated code will be executed on a machine. This page provides instructions on setting this up for the startup phase from u-boot to Linux.
Read more here: Verified Boot
Setup Mac-Address
The A388 SOMs do not have any fixed or prefused Mac-Addresses. On each power-on a random Mac Address is generated:
The easiest way to avoid this is by saving the U-Boot environment once from the U-Boot console:
If you instead want to use specific MAC addresses, they can be set per interface using these U-Boot commands:
The next bootlog should show up like this:
Note: By removing the RTC-Battery the U-Boot environment, and with it the mac addresses are reset!
Modifications
Hardware Mod for Clearfog-A1 Rev-2.0 M.2 SSD
remove RN5 (resistor array number 5) from the board. RN5 can be found near the M.2 connector on the bottom side of the board.

bottom view of clearfog board showing location of RN5 RN5 is there first place in order to force pull-up B2B_MPP57 (SPI Clock) on a pin on Mikrobus since one of it’s pins is also used as boot select reset strap. If Mikrobus is not used then this can be removed without worry. If Mikrobus is used then make sure that B2B_MPP57 is not pulled up or down.
Modifying a 32bit DDR bus A388 SOM to utilize only 16bit DDR
A developer that wants to evaluate the performance when using 16bit DDR bus width (like in the base SOM) then the following patch on u-boot can accomplish that.
With this patch only one DDR device is being used as x16 instead of two DDR devices being used as x32 –
Supporting 2GByte memory configuration
It is possible to order from SolidRun 2GByte memory configuration where the support is using twin die memory configuration. Twin die is a configuration of DDR components where there are two DDR dies in the same package and each gets it’s own chip-select control.
If the SoM EEPROM has not been programmed with the extended TLV data, support can instead be added by applying this patch:
Last updated