The bootloader, one of the key software components included in the BSP, completes the required hardware initializations to download and run operating system images. The boot mode, selected from the S5 dipswitch on the Carrier Board, determines where the hardware looks for the primary bootloader. Set the S5 dipswitch according to which interface you would like to boot from:
Locate the Boot Switch on your phyCORE-AM57x Carrier Board
SD Card
eMMC
NAND
Once the boot switch has been set appropriately, press the power button S2 on the phyCORE-AM57x carrier board to power on the board.
Basic Bootloader Settings
After application of power, approximately three seconds are allotted for the user to hit any key which will halt autoboot and enter U-Boot:
help is a useful tool in U-Boot to show available commands and usage.
Use the following command to verify that all of the environment variables are set as intended:
printenv
Saving Configurations
After confirming the environment variables are correct, save them and continue on to the next section to set the correct kernel and root filesystem boot location:
saveenv
Boot Options
The target can be booted from on-board media or from a development host via network. In our standard configuration, the kernel and root filesystem are loaded from SD/MMC.
For booting via network, the development host is connected to the phyCORE-AM57x development kit with a serial cable and via Ethernet; the embedded board boots into the bootloader, then issues a TFTP request on the network and boots the kernel from the TFTP server on the host. Then, after decompressing the kernel into RAM and starting it, the kernel mounts its root filesystem via the NFS server on the host. This method is especially useful for development purposes as it provides a quick turnaround while testing the kernel and root filesystem.
Stand-Alone eMMC Boot
To configure U-boot to boot the kernel from eMMC, modify the boot_mmc environment variable and set the bootcmd environment variable to make it the default setting:
setenv boot_mmc 'run findfdt; setenv mmcdev 1;setenv bootpart 1:2;setenv finduuid 'part uuid mmc 1:2 uuid';run envboot;run mmcboot;setenv mmcdev 0;setenv bootpart 0:2; setenv finduuid 'part uuid mmc 0:2 uuid'; run mmcboot;' setenv bootcmd 'run boot_mmc' saveenv
Remote Boot
To configure U-Boot to boot the kernel from TFTP and mount the root filesystem from NFS, configure the network as described in the Network Configuration section below and set the bootcmd environment variable to make it the default setting:
setenv bootcmd 'run boot_net' saveenv
Stand-Alone SD/MMC Card Boot
By default, the phyCORE-AM57x kit is set up to boot the Linux kernel and root filesystem from SD. If switching from another boot configuration back to SD, modify the boot_mmc environment variable and set the bootcmd environment variable to make it the default setting:
setenv boot_mmc 'run findfdt; setenv mmcdev 0;setenv bootpart 0:2;setenv finduuid 'part uuid mmc 0:2 uuid';run envboot;run mmcboot;setenv mmcdev 1;setenv bootpart 1:2; setenv finduuid 'part uuid mmc 1:2 uuid'; run mmcboot;' setenv bootcmd 'run boot_mmc' saveenv
Custom Boot
Unique boot configurations can be created by defining the desired environment variable settings and setting bootcmd to run its contents. The following is an example:
Example
Boot the Linux Kernel via TFTP with Root Filesystem on SD:
setenv customboot 'tftp ${loadaddr} ${tftploc}${bootfile}; tftp ${fdtaddr} ${tftploc}${fdtfile}; run mmcargs; bootz ${loadaddr} - ${fdtaddr}' setenv bootcmd 'run customboot' saveenv