Difference between revisions of "How to update U-Boot on an SD card"

[quality revision] [quality revision]
m
 
m



This page explains how to manually update the U-Boot binaries on an SD Card.

1 Copying a binary to an SD card with the Linux dd command[edit]

When you have access to the device (with the card reader of a PC, or the UMS command on a target), the 3 first partitions on the SDCard are:

  1. FSBL1
  2. FSBL2
  3. SSBL

See Boot_chains_overview, for the bootloader definitions.

You can use the Linux dd command to copy the FSBL and SSBL directly to the correct partition:

 
PC $>  dd if=<file> of=/dev/<dev> conv=fdatasync

<dev> is:

  • mmcblk<X>p<n> : PC-embedded card reader case
  • sd<X><N> : USB-connected SD card reader case

where <X> is the ID of the device, and <n> the ID of the partition.

Note: the dd option conv=fdatasync is used to force synchronous copying.

2 Trusted boot chain update example[edit]

The internal card reader is /dev/mmcblk0, partition <n> is /dev/mmcblk0p<n>:

 
PC $>  dd if=tf-a.stm32 of=/dev/mmcblk0p1 conv=fdatasync
 PC $>  dd if=tf-a.stm32 of=/dev/mmcblk0p2 conv=fdatasync
 PC $>  dd if=u-boot.stm32 of=/dev/mmcblk0p3 conv=fdatasync

3 Basic boot chain udpate example[edit]

The USB card reader is /dev/sdb, partition <n> is /dev/sdb<n>

 
PC $>  dd if=u-boot-spl.stm32 of=/dev/sdb1 conv=fdatasync
 PC $>  dd if=u-boot-spl.stm32 of=/dev/sdb2 conv=fdatasync
 PC $>  dd if=u-boot.img of=/dev/sdb3 conv=fdatasync
<noinclude>

{{ArticleMainWriter | PatrickD}}
{{ArticleApprovedVersion | PatrickD | PatriceC | No previous approved version | PhilipS - 05Nov'18  | 5Nov'18}}
[[Category:How_ to_run_use_cases populate boards]]</noinclude>


This page explains how to manually update the [[U-Boot_overview|U-Boot]] binaries on an SD Card.

== Copying a binary to an SD card with the Linux dd command ==

When you have access to the device (with the card reader of a PC, or the [[How to use USB mass storage in U-Boot|UMS command]] on a target), [[STM32MP15_Flash_mapping#SD_card_memory_mapping|the 3 first partitions on the SDCard]] are:
# FSBL1
# FSBL2
# SSBL

See [[Boot_chains_overview]], for the bootloader definitions.

You can use the Linux dd command to copy the FSBL and SSBL directly to the correct partition:

  {{PC$}}  dd if=<file> of=/dev/<dev> conv=fdatasync
<dev> is:
* mmcblk<X>p<n> : PC-embedded card reader case
* sd<X><N> : USB-connected SD card reader case
where <X> is the ID of the device, and <n> the ID of the partition.

Note: the dd option conv=fdatasync is used to force synchronous copying.

== Trusted boot chain update example ==
The internal card reader is /dev/mmcblk0, partition <n> is /dev/mmcblk0p<n>:

  {{PC$}}  dd if=tf-a.stm32 of=/dev/mmcblk0p1 conv=fdatasync
  {{PC$}}  dd if=tf-a.stm32 of=/dev/mmcblk0p2 conv=fdatasync
  {{PC$}}  dd if=u-boot.stm32 of=/dev/mmcblk0p3 conv=fdatasync

== Basic boot chain udpate example ==
The USB card reader is /dev/sdb, partition <n> is /dev/sdb<n>


  {{PC$}}  dd if=u-boot-spl.stm32 of=/dev/sdb1 conv=fdatasync
  {{PC$}}  dd if=u-boot-spl.stm32 of=/dev/sdb2 conv=fdatasync
  {{PC$}}  dd if=u-boot.img of=/dev/sdb3 conv=fdatasync
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
{{ArticleMainWriter | PatrickD}}
 
 
{{ArticleApprovedVersion | PatrickD | PatriceC | No previous approved version | PhilipS - 05Nov'18  | 5Nov'18}}
 
{{ArticleApprovedVersion | PatrickD | PatriceC | No previous approved version | PhilipS - 05Nov'18  | 5Nov'18}}
 
+
[[Category:How to populate boards]]
[[Category:How_to_run_use_cases]]
 
 
</noinclude>
 
</noinclude>
   

Attachments

Discussions