提交 b5b0237d 编写于 作者: T Tom Rini

Merge tag 'doc-2021-04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for documentation tag doc-2021-04-rc1

* document man-page base command
* move README.fdt-overlays to HTML documentation
* add synopsis for pstore command
...@@ -134,7 +134,7 @@ B4860QDS Default Settings ...@@ -134,7 +134,7 @@ B4860QDS Default Settings
------------------------- -------------------------
Switch Settings Switch Settings
--------------- ^^^^^^^^^^^^^^^
.. code-block:: none .. code-block:: none
...@@ -167,7 +167,7 @@ B4420QDS Default Settings ...@@ -167,7 +167,7 @@ B4420QDS Default Settings
------------------------- -------------------------
Switch Settings Switch Settings
--------------- ^^^^^^^^^^^^^^^
.. code-block:: none .. code-block:: none
......
...@@ -12,6 +12,7 @@ of running Linux. ...@@ -12,6 +12,7 @@ of running Linux.
Mainline support Mainline support
---------------- ----------------
The support for following drivers are already enabled: The support for following drivers are already enabled:
1. SiFive UART Driver. 1. SiFive UART Driver.
...@@ -24,7 +25,7 @@ Booting from MMC using FSBL ...@@ -24,7 +25,7 @@ Booting from MMC using FSBL
--------------------------- ---------------------------
Building Building
-------- ~~~~~~~~
1. Add the RISC-V toolchain to your PATH. 1. Add the RISC-V toolchain to your PATH.
2. Setup ARCH & cross compilation environment variable: 2. Setup ARCH & cross compilation environment variable:
...@@ -37,7 +38,7 @@ Building ...@@ -37,7 +38,7 @@ Building
4. make 4. make
Flashing Flashing
-------- ~~~~~~~~
The current U-Boot port is supported in S-mode only and loaded from DRAM. The current U-Boot port is supported in S-mode only and loaded from DRAM.
...@@ -63,11 +64,12 @@ copied to the first partition of the sdcard. ...@@ -63,11 +64,12 @@ copied to the first partition of the sdcard.
sudo dd if=<prior_stage_firmware_binary> of=/dev/disk2s1 bs=1024 sudo dd if=<prior_stage_firmware_binary> of=/dev/disk2s1 bs=1024
Booting Booting
------- ~~~~~~~
Once you plugin the sdcard and power up, you should see the U-Boot prompt. Once you plugin the sdcard and power up, you should see the U-Boot prompt.
Sample boot log from HiFive Unleashed board Sample boot log from HiFive Unleashed board
------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: none .. code-block:: none
...@@ -417,7 +419,7 @@ Booting from MMC using U-Boot SPL ...@@ -417,7 +419,7 @@ Booting from MMC using U-Boot SPL
--------------------------------- ---------------------------------
Building Building
-------- ~~~~~~~~
Before building U-Boot SPL, OpenSBI must be built first. OpenSBI can be Before building U-Boot SPL, OpenSBI must be built first. OpenSBI can be
cloned and built for FU540 as below: cloned and built for FU540 as below:
...@@ -441,7 +443,7 @@ This will generate spl/u-boot-spl.bin and FIT image (u-boot.itb) ...@@ -441,7 +443,7 @@ This will generate spl/u-boot-spl.bin and FIT image (u-boot.itb)
Flashing Flashing
-------- ~~~~~~~~
ZSBL loads the U-Boot SPL (u-boot-spl.bin) from a partition with GUID type ZSBL loads the U-Boot SPL (u-boot-spl.bin) from a partition with GUID type
5B193300-FC78-40CD-8002-E86C45580B47 5B193300-FC78-40CD-8002-E86C45580B47
...@@ -471,11 +473,12 @@ Program the SD card ...@@ -471,11 +473,12 @@ Program the SD card
sudo dd if=u-boot.itb of=/dev/sda seek=2082 sudo dd if=u-boot.itb of=/dev/sda seek=2082
Booting Booting
------- ~~~~~~~
Once you plugin the sdcard and power up, you should see the U-Boot prompt. Once you plugin the sdcard and power up, you should see the U-Boot prompt.
Sample boot log from HiFive Unleashed board Sample boot log from HiFive Unleashed board
------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: none .. code-block:: none
......
.. SPDX-License-Identifier: GPL-2.0+
base command
============
Synopsis
--------
::
base [address]
Description
-----------
The *base* command sets or displays the address offset used by the memory
commands *cmp, cp, md, mdc, mm, ms, mw, mwc*.
All other commands ignore the address defined by *base*.
address
new base address as hexadecimal number. If no value is provided, the current
value is displayed.
U-Boot FDT Overlay usage .. SPDX-License-Identifier: GPL-2.0+
============================================= .. Copyright (c) 2017, Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Overlays Syntax Device Tree Overlays
--------------- ====================
Overlays require slightly different syntax compared to traditional overlays. Overlay Syntax
Please refer to dt-object-internal.txt in the dtc sources for information --------------
regarding the internal format of overlays:
Device-tree overlays require a slightly different syntax compared to traditional
device-trees. Please refer to dt-object-internal.txt in the device-tree compiler
sources for information regarding the internal format of overlays:
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tree/Documentation/dt-object-internal.txt https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tree/Documentation/dt-object-internal.txt
Building Overlays Building Overlays
----------------- -----------------
In a nutshell overlays provides a means to manipulate a symbol a previous dtb In a nutshell overlays provides a means to manipulate a symbol a previous
or overlay has defined. It requires both the base and all the overlays device-tree or device-tree overlay has defined. It requires both the base
to be compiled with the -@ command line switch so that symbol information is device-tree and all the overlays to be compiled with the *-@* command line
included. switch of the device-tree compiler so that symbol information is included.
Note support for -@ option can only be found in dtc version 1.4.4 or newer. Note
Only version 4.14 or higher of the Linux kernel includes a built in version Support for *-@* option can only be found in dtc version 1.4.4 or newer.
of dtc that meets this requirement. Only version 4.14 or higher of the Linux kernel includes a built in version
of dtc that meets this requirement.
Building an overlay follows the same process as building a traditional dtb. Building a binary device-tree overlay follows the same process as building a
traditional binary device-tree. For example:
For example: **base.dts**
base.dts ::
--------
/dts-v1/; /dts-v1/;
/ { / {
...@@ -35,10 +39,13 @@ base.dts ...@@ -35,10 +39,13 @@ base.dts
}; };
}; };
.. code-block:: console
$ dtc -@ -I dts -O dtb -o base.dtb base.dts $ dtc -@ -I dts -O dtb -o base.dtb base.dts
bar.dts **overlay.dts**
-------
::
/dts-v1/; /dts-v1/;
/plugin/; /plugin/;
...@@ -54,16 +61,19 @@ bar.dts ...@@ -54,16 +61,19 @@ bar.dts
}; };
}; };
$ dtc -@ -I dts -O dtb -o bar.dtb bar.dts .. code-block:: console
$ dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts
Ways to Utilize Overlays in U-boot Ways to Utilize Overlays in U-Boot
---------------------------------- ----------------------------------
There are two ways to apply overlays in U-boot. There are two ways to apply overlays in U-Boot.
1. Include and define overlays within a FIT image and have overlays
automatically applied.
2. Manually load and apply overlays * Include and define overlays within a FIT image and have overlays
automatically applied.
* Manually load and apply overlays
The remainder of this document will discuss using overlays via the manual The remainder of this document will discuss using overlays via the manual
approach. For information on using overlays as part of a FIT image please see: approach. For information on using overlays as part of a FIT image please see:
...@@ -73,42 +83,52 @@ Manually Loading and Applying Overlays ...@@ -73,42 +83,52 @@ Manually Loading and Applying Overlays
-------------------------------------- --------------------------------------
1. Figure out where to place both the base device tree blob and the 1. Figure out where to place both the base device tree blob and the
overlay. Make sure you have enough space to grow the base tree without overlay. Make sure you have enough space to grow the base tree without
overlapping anything. overlapping anything.
::
=> setenv fdtaddr 0x87f00000
=> setenv fdtovaddr 0x87fc0000
=> setenv fdtaddr 0x87f00000 2. Load the base binary device-tree and the binary device-tree overlay.
=> setenv fdtovaddr 0x87fc0000
2. Load the base blob and overlay blobs ::
=> load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/base.dtb => load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/base.dtb
=> load ${devtype} ${bootpart} ${fdtovaddr} ${bootdir}/overlay.dtb => load ${devtype} ${bootpart} ${fdtovaddr} ${bootdir}/overlay.dtbo
3. Set it as the working fdt tree. 3. Set the base binary device-tree as the working fdt tree.
=> fdtaddr $fdtaddr ::
4. Grow it enough so it can 'fit' all the applied overlays => fdtaddr $fdtaddr
=> fdt resize 8192 4. Grow it enough so it can encompass all applied overlays
::
=> fdt resize 8192
5. You are now ready to apply the overlay. 5. You are now ready to apply the overlay.
=> fdt apply $fdtovaddr ::
=> fdt apply $fdtovaddr
6. Boot system like you would do with a traditional dtb. 6. Boot system like you would do with a traditional dtb.
For bootm: For bootm:
=> bootm ${kerneladdr} - ${fdtaddr} ::
=> bootm ${kerneladdr} - ${fdtaddr}
For bootz: For bootz:
=> bootz ${kerneladdr} - ${fdtaddr} ::
=> bootz ${kerneladdr} - ${fdtaddr}
Please note that in case of an error, both the base and overlays are going Please note that in case of an error, both the base and overlays are going
to be invalidated, so keep copies to avoid reloading. to be invalidated, so keep copies to avoid reloading.
Pantelis Antoniou
pantelis.antoniou@konsulko.com
11/7/2017
...@@ -2,7 +2,9 @@ Use U-Boot ...@@ -2,7 +2,9 @@ Use U-Boot
========== ==========
.. toctree:: .. toctree::
:maxdepth: 1
fdt_overlays
netconsole netconsole
Shell commands Shell commands
...@@ -11,6 +13,7 @@ Shell commands ...@@ -11,6 +13,7 @@ Shell commands
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
base
bootefi bootefi
bootmenu bootmenu
button button
......
.. SPDX-License-Identifier: GPL-2.0+ .. SPDX-License-Identifier: GPL-2.0+
PStore command pstore command
============== ==============
Synopsis
--------
::
pstore set <addr> <len> [record-size] [console-size] [ftrace-size] [pmsg_size] [ecc-size]
pstore display [record-type] [nb]
pstore save <interface> <dev[:part]> <directory-path>
Design Design
------ ------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册