[[PageOutline]] [=#u-boot] = Venice U-Boot Bootloader Gateworks supports the U-Boot Bootloader for the Venice product family. The purpose of a bootloader is to load the Linux kernel and execute it passing it configuration parameters such as an optional kernel command-line, an optional initial ramdisk filesystem, and a device-tree. The following items are supported in the Gateworks U-Boot for Venice: - IMX8M FEC GbE - IMX8MP EQOS GbE - USB Host support (USB Mass Storage and USB Networking for ASIX USB 2.0 USB Network device) - eMMC / microSD The following items are not currently supported in the Gateworks U-Boot for Venice: - PCIe support (include PCIe based Gbe) Additional resources: * [http://dev.gateworks.com/venice/boot_firmware/ Pre-built boot firmware (updated from U-Boot/Linux)] * [http://dev.gateworks.com/venice/images/ firmware-venice* JTAG binaries] * [https://github.com/gateworks/uboot-venice source] see [wiki:uboot] for more info == Editing the environment If you would like to modify the default environment you can edit the [https://github.com/Gateworks/bsp-venice/blob/master/venice.env venice/venice.env] in the Venice BSP. [=#default] == Restoring environment defaults The Venice boot firmware has a copy of the original U-Boot env that was created during build time. To restore default bootloader environment variables: - At the "Hit any key to stop autoboot:" prompt press any key. - Execute the following command: {{{#!bash run restore_env && reset }}} [=#bootdevs] == Boot Devices The Venice U-Boot Bootloader supports the following devices and partition types: - eMMC - microSD - USB Mass Storage - NVMe The U-Boot 'Generic Distro Config' is used for Venice: - the default bootcmd will ultimately search for boot scripts on a set of bootable devices - the 'boot_targets' env variable dictates which devices are checked and in what order - the 'boot_prefixes' env variable dictates what file prefixes are searched for a boot script - the 'boot_scripts' env variable dictates what bootscript names are searched for - only partitions that have the 'boot' flag set are looked at for boot scripts Venice boards are configured via one-time-programable fuses to boot to an on-board eMMC device (it is possible to have Gateworks configure a board to boot to microSD instead for a special or custom build). If you wish to select a different boot device priority you can adjust boot_targets. For example: * Boot from NVMe (nvme dev 0) {{{#!bash # flash your disk image to the NVMe device u-boot=> pci enum PCIE-0: Link up (Gen1-x1, Bus0) u-boot=> nvme scan u-boot=> nvme info Device 0: Vendor: 0x10ec Rev: 0426-D00 Prod: 60272-0005 Type: Hard Disk Capacity: 57241.8 MB = 55.9 GB (117231408 x 512) u-boot=> tftpboot $loadaddr venice/jammy-venice.img.gz && gzwrite nvme 0 $loadaddr $filesize ... # set boot targets to boot only from nvme setenv boot_targets nvme0 saveenv #now reset the board and let it boot to NVMe reset }}} * Troubleshooting: * There must be a bootable partition and a boot script. In the example here you see we have an NVME device, it has a partition that is flagged as bootable (Type=83 Boot), and has a boot.scr in its /boot directory {{{ u-boot=> nvme devices # show NVMe devices; should show your device IDE device 0: Vendor: 0x10ec Rev: 0426-D00 Prod: 60272-0005 Type: Hard Disk Capacity: 57241.8 MB = 55.9 GB (117231408 x 512) u-boot=> part list nvme 0 # show the partition table on nvme device 0 Partition Map for NVMe device 0 -- Partition Type: DOS Part Start Sector Num Sectors UUID Type 1 32768 117198640 a7d49245-01 83 Boot u-boot=> ls nvme 0:1 /boot # list files on nvme device 0 partition 1