-
Notifications
You must be signed in to change notification settings - Fork 9
SD Card Support
U-Boot provides functionality for reading from and writing to SD cards. Depending on your device, configuring SD card support may require setting specific GPIO pins, which typically vary by device.
To configure the GPIOs for SD card support, use the gpio
command within U-Boot's command line interface.
Some devices require specific GPIO pins to be set for enabling the SD card. To configure these GPIOs, set the gpio_mmc_power
variable in U-Boot. The format for setting this variable follows the standard GPIO configuration format outlined in the GPIO Configuration section of our wiki.
For example, to set a GPIO pin to enable the SD card, you might use:
setenv gpio_mmc_power 48o
This command sets GPIO pin 48 as an output, which is used to control the power for SD card operations.
If your device does not feature an SD card slot, or if you wish to speed up the boot process, you may find it beneficial to disable SD card operations during boot. This includes automatic updates and automatic SD kernel loading, which U-Boot attempts by default.
To disable SD card operations, execute the following command in U-Boot:
setenv disable_sd true
Upon disabling, you will see a message "SD card disabled" indicating that SD card operations will be skipped during boot.
Conversely, to re-enable SD card operations, use:
setenv disable_sd false
After making changes to the environment variables, such as disable_sd
or gpio_mmc_power
, remember to save your changes. For instructions on how to save U-Boot environment variables, refer to Saving Environment Variables.