[bootlin/training-materials updates] master: labs/sysdev-u-boot-stm32: erase first 16 MiB of the SD card (b9233b52)

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Sep 22 13:17:14 CEST 2022


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/b9233b520782b035d652574075dc65a6b3b259de

>---------------------------------------------------------------

commit b9233b520782b035d652574075dc65a6b3b259de
Author: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Date:   Thu Sep 22 13:17:14 2022 +0200

    labs/sysdev-u-boot-stm32: erase first 16 MiB of the SD card
    
    Instead of the random 200 blocks of 4 KiB.
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>


>---------------------------------------------------------------

b9233b520782b035d652574075dc65a6b3b259de
 labs/sysdev-u-boot-stm32/sysdev-u-boot-stm32.tex | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/labs/sysdev-u-boot-stm32/sysdev-u-boot-stm32.tex b/labs/sysdev-u-boot-stm32/sysdev-u-boot-stm32.tex
index 8ee24f7d..9f0c1781 100644
--- a/labs/sysdev-u-boot-stm32/sysdev-u-boot-stm32.tex
+++ b/labs/sysdev-u-boot-stm32/sysdev-u-boot-stm32.tex
@@ -253,10 +253,10 @@ partitions. If SD partitions are mounted, unmount them:
 
 \bashcmd{$ sudo umount /dev/mmcblk0p*}
 
-Then, clear possible SD card contents remaining from previous
-training sessions (only the first megabytes matter):
+We will erase the existing partition table by simply zero-ing the
+first 16 MiB of the SD card:
 
-\bashcmd{$ sudo dd if=/dev/zero of=/dev/mmcblk0 bs=4k count=200}
+\bashcmd{$ sudo dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=16}
 
 Now, let's use the \code{parted} command to create the partitions that
 we are going to use:




More information about the training-materials-updates mailing list