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:
Once the boot switch has been set appropriately, press the power button S2 on the phyCORE-AM57x carrier board to power on the board. |
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 |
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 |
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.
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 |
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:
You can check the target's default environment settings by running the following:
The ethaddr variable is the MAC id of the target. This is a pre-programmed value which is read from the E-fuse and matches the sticker on the SOM. Set U-boot's network environment variables to match your required network settings:
|
setenv bootcmd 'run boot_net' saveenv |
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 |
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:
Boot the Linux Kernel via TFTP with Root Filesystem on SD:
|