TS-7250-V3 Uboot Distro Boot: Difference between revisions

From embeddedTS Manuals
(Created page with "U-boot by default uses u-boots [https://github.com/embeddedarm/u-boot-imx/blob/ts-v2020.01/doc/README.distro distro bootcmd] to determine how to boot. As shipped the board wi...")
 
No edit summary
Line 10: Line 10:
| usb0
| usb0
| First detected USB mass storage device
| First detected USB mass storage device
|-
| 2
| mmc1
| MicroSD card
|-
|-
| 3
| 3
Line 27: Line 31:
The default boot order can be left for most users, but boot can be optimized for one boot device by stopping at u-boot and running:
The default boot order can be left for most users, but boot can be optimized for one boot device by stopping at u-boot and running:
<source lang=bash>
<source lang=bash>
# Boot straight to mmc:
# Boot straight to eMMC:
env set boot_targets 'mmc0';
env set boot_targets 'mmc0';
env save
env save
Line 36: Line 40:


# Set back to default boot order
# Set back to default boot order
env set boot_targets 'usb0 mmc0 dhcp pxe'
env set boot_targets 'usb0 mmc1 mmc0 dhcp pxe'
env save
env save
</source>
</source>

Revision as of 14:38, 10 December 2020

U-boot by default uses u-boots distro bootcmd to determine how to boot. As shipped the board will boot to the preprogrammed eMMC with our #Debian image.

By default this will look at:

Order U-boot device name Description
1 usb0 First detected USB mass storage device
2 mmc1 MicroSD card
3 mmc0 Onboard eMMC storage
4 dhcp DHCP Option [1]
5 pxe PXE File [2]
  1. DHCP can advertise a TFTP server (next-path, root-path, and filename) to point to a u-boot script.
  2. DHCP can advertise a TFTP server (next-path, root-path, and filename) with a PXE file to control boot.

The default boot order can be left for most users, but boot can be optimized for one boot device by stopping at u-boot and running:

# Boot straight to eMMC:
env set boot_targets 'mmc0';
env save

# Boot to usb, then mmc only
env set boot_targets 'usb0 mmc0';
env save

# Set back to default boot order
env set boot_targets 'usb0 mmc1 mmc0 dhcp pxe'
env save

U-boot will search the boot media on either the 1st partition, or if the disk is partitioned with GPT instead of MBR it will search the "bootable" partition. It will then search for these files:

Order Search for Paths Description
1 extlinux /extlinux/extlinux.conf, /boot/extlinux/extlinux.conf Menu conf file of kernels
2 U-boot script /boot.scr.uimg, /boot.scr, /boot/boot.scr.uimg, /boot/boot.scr u-boot script with instructions to load the OS
3 EFI Binary efi/boot/bootarm.efi EFI binary (such as grub)

Our Debian images use a u-boot script in /boot/boot.scr.uimg.