mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
doc: README.iscsi: make compatible with restructured text
The Sphinx documentation system uses restructured text. Make the README.iscsi file compatible. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
0445978806
commit
76a472dc44
1 changed files with 65 additions and 59 deletions
124
doc/README.iscsi
124
doc/README.iscsi
|
@ -1,6 +1,8 @@
|
||||||
# iSCSI booting with U-Boot and iPXE
|
iSCSI booting with U-Boot and iPXE
|
||||||
|
==================================
|
||||||
|
|
||||||
## Motivation
|
Motivation
|
||||||
|
----------
|
||||||
|
|
||||||
U-Boot has only a reduced set of supported network protocols. The focus for
|
U-Boot has only a reduced set of supported network protocols. The focus for
|
||||||
network booting has been on UDP based protocols. A TCP stack and HTTP support
|
network booting has been on UDP based protocols. A TCP stack and HTTP support
|
||||||
|
@ -32,14 +34,15 @@ via HTTPS and to download any other files needed for booting via iSCSI from the
|
||||||
same target where the operating system is installed.
|
same target where the operating system is installed.
|
||||||
|
|
||||||
An alternative to implementing these protocols in U-Boot is to use an existing
|
An alternative to implementing these protocols in U-Boot is to use an existing
|
||||||
software that can run on top of U-Boot. iPXE is the "swiss army knife" of
|
software that can run on top of U-Boot. iPXE[1] is the "swiss army knife" of
|
||||||
network booting. It supports both HTTPS and iSCSI. It has a scripting engine for
|
network booting. It supports both HTTPS and iSCSI. It has a scripting engine for
|
||||||
fine grained control of the boot process and can provide a command shell.
|
fine grained control of the boot process and can provide a command shell.
|
||||||
|
|
||||||
iPXE can be built as an EFI application (named snp.efi) which can be loaded and
|
iPXE can be built as an EFI application (named snp.efi) which can be loaded and
|
||||||
run by U-Boot.
|
run by U-Boot.
|
||||||
|
|
||||||
## Boot sequence
|
Boot sequence
|
||||||
|
-------------
|
||||||
|
|
||||||
U-Boot loads the EFI application iPXE snp.efi using the bootefi command. This
|
U-Boot loads the EFI application iPXE snp.efi using the bootefi command. This
|
||||||
application has network access via the simple network protocol offered by
|
application has network access via the simple network protocol offered by
|
||||||
|
@ -56,67 +59,68 @@ For a selected iSCSI target iPXE sets up a handle with the block IO protocol. It
|
||||||
uses the ConnectController boot service of U-Boot to request U-Boot to connect a
|
uses the ConnectController boot service of U-Boot to request U-Boot to connect a
|
||||||
file system driver. U-Boot reads from the iSCSI drive via the block IO protocol
|
file system driver. U-Boot reads from the iSCSI drive via the block IO protocol
|
||||||
offered by iPXE. It creates the partition handles and installs the simple file
|
offered by iPXE. It creates the partition handles and installs the simple file
|
||||||
protocol. Now iPXE can call the simple file protocol to load Grub. U-Boot uses
|
protocol. Now iPXE can call the simple file protocol to load GRUB[2]. U-Boot
|
||||||
the block IO protocol offered by iPXE to fulfill the request.
|
uses the block IO protocol offered by iPXE to fulfill the request.
|
||||||
|
|
||||||
Once Grub is started it uses the same block IO protocol to load Linux. Via
|
Once GRUB is started it uses the same block IO protocol to load Linux. Via
|
||||||
the EFI stub Linux is called as an EFI application.
|
the EFI stub Linux is called as an EFI application::
|
||||||
|
|
||||||
```
|
+--------+ +--------+
|
||||||
+--------+ +--------+
|
| | Runs | |
|
||||||
| | Runs | |
|
| U-Boot |========>| iPXE |
|
||||||
| U-Boot |=========>| iPXE |
|
| EFI | | snp.efi|
|
||||||
| EFI | | snp.efi|
|
+--------+ | | DHCP | |
|
||||||
+--------+ | | DHCP | |
|
| |<===|********|<========| |
|
||||||
| |<====|********|<=========| |
|
| DHCP | | | Get IP | |
|
||||||
| DHCP | | | Get IP | |
|
| Server | | | Address | |
|
||||||
| Server | | | Address | |
|
| |===>|********|========>| |
|
||||||
| |====>|********|=========>| |
|
+--------+ | | Response| |
|
||||||
+--------+ | | Response | |
|
| | | |
|
||||||
| | | |
|
| | | |
|
||||||
| | | |
|
+--------+ | | HTTPS | |
|
||||||
+--------+ | | HTTPS | |
|
| |<===|********|<========| |
|
||||||
| |<====|********|<=========| |
|
| HTTPS | | | Load | |
|
||||||
| HTTPS | | | Load | |
|
| Server | | | Script | |
|
||||||
| Server | | | Script | |
|
| |===>|********|========>| |
|
||||||
| |====>|********|=========>| |
|
+--------+ | | | |
|
||||||
+--------+ | | | |
|
| | | |
|
||||||
| | | |
|
| | | |
|
||||||
| | | |
|
+--------+ | | iSCSI | |
|
||||||
+--------+ | | iSCSI | |
|
| |<===|********|<========| |
|
||||||
| |<====|********|<=========| |
|
| iSCSI | | | Auth | |
|
||||||
| iSCSI | | | Auth | |
|
| Server |===>|********|========>| |
|
||||||
| Server |====>|********|=========>| |
|
| | | | | |
|
||||||
| | | | | |
|
| | | | Loads | |
|
||||||
| | | | Loads | |
|
| |<===|********|<========| | +--------+
|
||||||
| |<====|********|<=========| | +--------+
|
| | | | GRUB | | Runs | |
|
||||||
| | | | Grub | | Runs | |
|
| |===>|********|========>| |======>| GRUB |
|
||||||
| |====>|********|=========>| |=======>| Grub |
|
| | | | | | | |
|
||||||
| | | | | | | |
|
| | | | | | | |
|
||||||
| | | | | | | |
|
| | | | | | Loads | |
|
||||||
| | | | | | Loads | |
|
| |<===|********|<========|********|<======| | +--------+
|
||||||
| |<====|********|<=========|********|<=======| | +--------+
|
| | | | | | Linux | | Runs | |
|
||||||
| | | | | | Linux | | Runs | |
|
| |===>|********|========>|********|======>| |=====>| Linux |
|
||||||
| |====>|********|=========>|********|=======>| |=====>| Linux |
|
| | | | | | | | | |
|
||||||
| | | | | | | | | |
|
+--------+ +--------+ +--------+ +--------+ | |
|
||||||
+--------+ +--------+ +--------+ +--------+ | |
|
| |
|
||||||
| |
|
| |
|
||||||
| |
|
| ~ ~ ~ ~|
|
||||||
| ~ ~ ~ ~|
|
|
||||||
```
|
|
||||||
|
|
||||||
## Security
|
Security
|
||||||
|
--------
|
||||||
|
|
||||||
The iSCSI protocol is not encrypted. The traffic could be secured using IPsec
|
The iSCSI protocol is not encrypted. The traffic could be secured using IPsec
|
||||||
but neither U-Boot nor iPXE does support this. So we should at least separate
|
but neither U-Boot nor iPXE does support this. So we should at least separate
|
||||||
the iSCSI traffic from all other network traffic. This can be achieved using a
|
the iSCSI traffic from all other network traffic. This can be achieved using a
|
||||||
virtual local area network (VLAN).
|
virtual local area network (VLAN).
|
||||||
|
|
||||||
## Configuration
|
Configuration
|
||||||
|
-------------
|
||||||
|
|
||||||
### iPXE
|
iPXE
|
||||||
|
^^^^
|
||||||
|
|
||||||
For running iPXE on arm64 the bin-arm64-efi/snp.efi build target is needed.
|
For running iPXE on arm64 the bin-arm64-efi/snp.efi build target is needed::
|
||||||
|
|
||||||
git clone http://git.ipxe.org/ipxe.git
|
git clone http://git.ipxe.org/ipxe.git
|
||||||
cd ipxe/src
|
cd ipxe/src
|
||||||
|
@ -132,7 +136,7 @@ http://ipxe.org/cfg
|
||||||
|
|
||||||
iPXE by default will put the CPU to rest when waiting for input. U-Boot does
|
iPXE by default will put the CPU to rest when waiting for input. U-Boot does
|
||||||
not wake it up due to missing interrupt support. To avoid this behavior create
|
not wake it up due to missing interrupt support. To avoid this behavior create
|
||||||
file src/config/local/nap.h.
|
file src/config/local/nap.h::
|
||||||
|
|
||||||
/* nap.h */
|
/* nap.h */
|
||||||
#undef NAP_EFIX86
|
#undef NAP_EFIX86
|
||||||
|
@ -140,7 +144,7 @@ file src/config/local/nap.h.
|
||||||
#define NAP_NULL
|
#define NAP_NULL
|
||||||
|
|
||||||
The supported commands in iPXE are controlled by an include, too. Putting the
|
The supported commands in iPXE are controlled by an include, too. Putting the
|
||||||
following into src/config/local/general.h is sufficient for most use cases.
|
following into src/config/local/general.h is sufficient for most use cases::
|
||||||
|
|
||||||
/* general.h */
|
/* general.h */
|
||||||
#define NSLOOKUP_CMD /* Name resolution command */
|
#define NSLOOKUP_CMD /* Name resolution command */
|
||||||
|
@ -153,7 +157,9 @@ following into src/config/local/general.h is sufficient for most use cases.
|
||||||
#define DOWNLOAD_PROTO_NFS /* Network File System Protocol */
|
#define DOWNLOAD_PROTO_NFS /* Network File System Protocol */
|
||||||
#define DOWNLOAD_PROTO_FILE /* Local file system access */
|
#define DOWNLOAD_PROTO_FILE /* Local file system access */
|
||||||
|
|
||||||
## Links
|
Links
|
||||||
|
-----
|
||||||
|
|
||||||
* https://ipxe.org - iPXE open source boot firmware
|
* [1](https://ipxe.org) https://ipxe.org - iPXE open source boot firmware
|
||||||
* https://www.gnu.org/software/grub/ - GNU Grub (Grand Unified Bootloader)
|
* [2](https://www.gnu.org/software/grub/) https://www.gnu.org/software/grub/ -
|
||||||
|
GNU GRUB (Grand Unified Bootloader)
|
||||||
|
|
Loading…
Add table
Reference in a new issue