TS-4300 U-Boot Sections

From embeddedTS Manuals

U-Boot is a bootloader and comes preinstalled on this board. The U-Boot bootloader is loaded in the eMMC hardware boot partitions in /dev/mmcblk0boot0. U-Boot sets up the hardware and then loads the OS from the available storage devices. U-Boot allows booting images from the microSD, eMMC, NFS, or USB. Most users will not need to customize u-boot further, and can proceed to the #Debian, #Ubuntu, #Yocto, or #Buildroot sections for information on application development.

U-Boot Standard Boot

This platform uses u-boot's "Standard Boot" as the method to search available storage media for a bootable operating system.

By default the board will attempt booting to these devices:

boot_target Description
usb U-boot will probe for any available USB Storage media
mmc1 microSD
mmc0 Onboard eMMC flash
pxe Network boot

The order, and the enabled boot targets can be customized by changing the variable:

# Boot to eMMC only:
setenv boot_targets mmc0

# Boot to USB, then eMMC:
setenv boot_targets usb mmc0

# Default targets
setenv boot_targets usb mmc1 mmc0 pxe

While searching each media, u-boot searches for valid boot methods on each device.

bootmeths Description
script Legacy distro-boot scripts. Looks for /boot/boot.scr, /boot/boot.scr.uimg, and executes those
extlinux Looks for extlinux/extlinux.conf. See the syslinux project for more details.
efi Looks for an EFI boot partition, and executes the EFI payload such as grub, or the Linux kernel.
pxe For PXE boot only, checks for valid DHCP describing boot.

The order, and the enabled boot methods can be customized by changing the variable:

# Only boot extlinux:
setenv bootmeths extlinux

# Try script, then EFI
setenv bootmeths script efi

# Default bootmeths
setenv bootmeths script extlinux efi pxe

On our factory preprogrammed images the typical boot skips USB, mmc1, and boots to a script on eMMC.

U-Boot Baseboard/Extension Support

In the selected boot method u-boot loads a device tree which describes the hardware the kernel runs on. The imx93-ts4300.dtb is always loaded to describe the TS-4300 hardware. Every baseboard is supported using a device tree overlay.

This extends the TS-4300 device tree with the features needed to support the carrier board. In u-boot, this is loaded using u-boot's extension support.

All of our off the shelf baseboards contain a hard-wired 8-input multiplexer to indicate the baseboard model. This is not required to implement in custom baseboards, but it can be useful to identify the board model in software. The u-boot extension will scan the baseboard id, eg, the TS-8551 which is hard wired as 0x16.

TS-8551 baseboard ID resulting in ID 0x16
  • S0 is connected to CN2_006
  • S1 is connected to CN2_008
  • S2 is connected to CN1_098
  • BD_ID_DATA is connected to CN1_083

The 6 least significant input pins (Y0 - Y5) are used to define the baseboard model. The upper two inputs (Y6 and Y7) define board revision.

The baseboard id is specified in hex, so the TS-8551 searches for:

imx93-ts4300-16.dtbo

If it exists, it is applied automatically with "extension apply all" in our standard boot scripts. Custom carrier boards should use the ID "0x2a", which will never be used by our off the shelf boards.

U-Boot Environment

TS-4300 u-boot environment

Booting From NFS

TS-4300 U-Boot NFS boot

U-Boot Development

TS-4300 U-boot development