]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
doc: riscv: flashing SiFive boards
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 28 Jul 2021 08:52:53 +0000 (10:52 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 1 Aug 2021 13:45:11 +0000 (15:45 +0200)
We should not use /dev/sda and /dev/sdb in our examples. Users might
inadvertently mess up their workstation. Use /dev/sdX instead.

Remove console output like '# ' and '> ' which makes copying hard.

Set example language to bash for correct syntax-highlighting.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
iewed-by: Bin Meng <bmeng.cn@gmail.com>

doc/board/sifive/unleashed.rst
doc/board/sifive/unmatched.rst

index 4e4c852ff37b8660f7cdade66ad339546091ba1b..c8a62068a77757d716fc2ac19e1b2355be096a02 100644 (file)
@@ -456,21 +456,21 @@ device tree blob (hifive-unleashed-a00.dtb)
 
 Format the SD card (make sure the disk has GPT, otherwise use gdisk to switch)
 
-.. code-block:: none
+.. code-block:: bash
 
-       sudo sgdisk --clear \
-       > --set-alignment=2 \
-       > --new=1:34:2081 --change-name=1:loader1 --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \
-       > --new=2:2082:10273 --change-name=2:loader2 --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \
-       > --new=3:10274: --change-name=3:rootfs --typecode=3:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \
-       > /dev/sda
+       sudo sgdisk --clear \
+         --set-alignment=2 \
+         --new=1:34:2081 --change-name=1:loader1 --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \
+         --new=2:2082:10273 --change-name=2:loader2 --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \
+         --new=3:10274: --change-name=3:rootfs --typecode=3:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \
+         /dev/sdX
 
 Program the SD card
 
-.. code-block:: none
+.. code-block:: bash
 
-       sudo dd if=spl/u-boot-spl.bin of=/dev/sda seek=34
-       sudo dd if=u-boot.itb of=/dev/sda seek=2082
+       sudo dd if=spl/u-boot-spl.bin of=/dev/sdX seek=34
+       sudo dd if=u-boot.itb of=/dev/sdX seek=2082
 
 Booting
 ~~~~~~~
index e65b0d320633e08989004a14da8b6f1fb04a85fd..6b024f07f6db3dbbf070a1ead02f8d37dd30076c 100644 (file)
@@ -61,31 +61,31 @@ device tree blob (hifive-unmatched-a00.dtb)
 
 Format the SD card (make sure the disk has GPT, otherwise use gdisk to switch)
 
-.. code-block:: none
+.. code-block:: bash
 
-       sudo sgdisk -g --clear -a 1 \
-       > --new=1:34:2081         --change-name=1:spl --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \
-       > --new=2:2082:10273      --change-name=2:uboot  --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \
-       > --new=3:16384:282623    --change-name=3:boot --typecode=3:0x0700 \
-       > --new=4:286720:13918207 --change-name=4:root --typecode=4:0x8300 \
-       > /dev/sdb
+       sudo sgdisk -g --clear -a 1 \
+         --new=1:34:2081         --change-name=1:spl --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \
+         --new=2:2082:10273      --change-name=2:uboot  --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \
+         --new=3:16384:282623    --change-name=3:boot --typecode=3:0x0700 \
+         --new=4:286720:13918207 --change-name=4:root --typecode=4:0x8300 \
+         /dev/sdX
 
 Copy linux Image.gz and hifive-unmatched-a00.dtb to boot partition
 
-.. code-block:: none
+.. code-block:: bash
 
-       sudo mkfs.vfat /dev/sdb3
-       sudo mkfs.ext4 /dev/sdb4
+       sudo mkfs.vfat /dev/sdX3
+       sudo mkfs.ext4 /dev/sdX4
 
-       sudo mount /dev/sdb3 /media/sdb3
-       sudo cp Image.gz hifive-unmatched-a00.dtb /media/sdb3/
+       sudo mount /dev/sdX3 /media/sdX3
+       sudo cp Image.gz hifive-unmatched-a00.dtb /media/sdX3/
 
 Program the SD card
 
-.. code-block:: none
+.. code-block:: bash
 
-       sudo dd if=spl/u-boot-spl.bin of=/dev/sda seek=34
-       sudo dd if=u-boot.itb of=/dev/sda seek=2082
+       sudo dd if=spl/u-boot-spl.bin of=/dev/sdX seek=34
+       sudo dd if=u-boot.itb of=/dev/sdX seek=2082
 
 Booting
 -------