Introduction.
The U-Boot's Bridge Open command for Altera® (Intel®) SoC FPGAs opens (enables) the bridge between the HPS-FPGA after configuration of the FPGA.
There are different types of U-Boot Bridge Open commands, depending on the U-Boot version There are different types of U-Boot bridge open commands depending on the version of U-Boot.
This article describes the differences.
1. Transition of U-Boot's SoC FPGA Bridge Opening Commands
-
u-boot-socfpga_v2013.01.01 From the era, as a custom instruction defined by Altera®,
run bridge_enable_handoff command.
-
u-boot-socfpga_v2014.10_arria10_bringup from the version for the Arria® 10 SoC,
fpgabr 1 command has been added for Arria® 10 SoC.
-
u-boot-socfpga_v2017.09 version and later (currently the latest is u-boot-socfpga_v2019.04), the above two old commands are not implemented.
Instead, as a new command to make the bridge open, bridge enable is adopted as the new command to open the bridge.
Table 1. u-boot-socfpga Bridge open command by version
Reference: Where to obtain the U-Boot source code
- You can obtain the official (original) U-Boot source code from the DENX Software Engineering website or download a "snapshot" from GitHub at altera-opensource/u-boot-socfpga. You can download a "snapshot" from GitHub at altera-opensource/u-boot-socfpga.
Reference: Das U-Boot (DENX Software Engineering)
Reference: altera-opensource/u-boot-socfpga
2. Bridge release commands in the new u-boot-socfpga_v2019.04
2-1. bridge command
u-boot-socfpga_v2019.04 includes the following bridge commands as follows.
# bridge enable (open bridges)
# bridge disable (close bridges)
Figure 1. Displaying help for the bridge command
2-2. Check the initial status of the bridge on u-boot-socfpga_v2019.04
Prepare an SD card containing u-boot-socfpga_v2019.04 and Linux, and boot with the Cyclone® V SoC Development Kit.
Log in to Linux as root and run cat command to check the bridge name and bridge status.
# cat /sys/class/fpga_bridge/br*/name ← Check the bridge name
# cat /sys/class/fpga_bridge/br*/state ← Check the bridge status
Figure 2. Bridge default settings in u-boot-socfpga_v2019.04
2-3. Manually set the bridge to open (bridge enable)
From the U-Boot prompt, bridge enable command from the U-Boot prompt to manually set the bridge to open. After setting, boot Linux and enter the following command cat command to confirm that the bridge is open.
Figure 3. Manually setting the bridge to open in u-boot-socfpga_v2019.04
3. How to set the U-Boot environment variable (env) to open the bridge
3-1. Check the default U-Boot environment variables
Check the U-Boot's printenv -a Confirm the default U-Boot environment variables by using the printenv -a command of U-Boot.
Figure 4. Confirm the default U-Boot environment variables
3-2. Add the bridge enable setting to the U-Boot environment variables
Add the following to the U-Boot bootcmd environment variable, bridge enable command to the bootcmd environment variable of U-Boot.
Figure 5. Adding the bridge enable command to the U-Boot bootcmd environment variable
3-3. Confirm that the bridge open setting is saved in the environment variable.
Confirm that the settings made in Figure 5 above are enabled.
Figure 6. Confirm that the bridge open setting is saved in the environment variable. 4.
4. Comparing u-boot-socfpga commands and environment variables by version
4-1. Comparison of commands (displayed by help command)
As shown in Table 2, available commands differ depending on the version of u-boot-socfpga.
Table 2. Comparison of commands by u-boot-socfpga version
4-2. Comparison of environment variables
As shown in Table 3, the registered environment variables differ depending on the version of u-boot-socfpga.
Table 3. Comparison of environment variables by u-boot-socfpga version
4-3. Comparison of SD card contents
The following figure shows the difference in the bridge release method by u-boot-socfpga version.
In v2013.01.01 U-Boot, from within the u-boot-scr script file, run bridge_enable_handoff from within the u-boot-scr script file to open the bridge.
In v2014.10_arria10_bringup, as shown in [Table 3], the environment variable fpgabr 1 command in the environment variable to open the bridge, as shown in Table 3.
v2019.04is similarly set to open the bridge by setting the bridge enable command in the environment variable as shown in Figure 5 to open the bridge.
Figure 7. Difference in bridge open method by u-boot-socfpga version
Links to related articles
- Please refer to the following articles related to the boot loader and U-Boot: