iPXE
|
Automatic booting. More...
#include <ipxe/device.h>
Go to the source code of this file.
Macros | |
#define | URIBOOT_NO_SAN |
Enumerations | |
enum | uriboot_flags { URIBOOT_NO_SAN_DESCRIBE = 0x0001, URIBOOT_NO_SAN_BOOT = 0x0002, URIBOOT_NO_SAN_UNHOOK = 0x0004 } |
uriboot() flags More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
void | set_autoboot_busloc (unsigned int bus_type, unsigned int location) |
Identify autoboot device by bus type and location. More... | |
void | set_autoboot_ll_addr (const void *ll_addr, size_t len, unsigned int vlan) |
Identify autoboot device by link-layer address. More... | |
int | uriboot (struct uri *filename, struct uri **root_paths, unsigned int root_path_count, int drive, struct san_boot_config *san_config, unsigned int flags) |
Boot from filename and root-path URIs. More... | |
struct uri * | fetch_next_server_and_filename (struct settings *settings) |
Fetch next-server and filename settings into a URI. More... | |
int | netboot (struct net_device *netdev) |
Boot from a network device. More... | |
int | ipxe (struct net_device *netdev) |
Main iPXE flow of execution. More... | |
int | pxe_menu_boot (struct net_device *netdev) |
Boot using PXE boot menu. More... | |
Automatic booting.
Definition in file autoboot.h.
#define URIBOOT_NO_SAN |
Definition at line 26 of file autoboot.h.
enum uriboot_flags |
uriboot() flags
Enumerator | |
---|---|
URIBOOT_NO_SAN_DESCRIBE | |
URIBOOT_NO_SAN_BOOT | |
URIBOOT_NO_SAN_UNHOOK |
Definition at line 20 of file autoboot.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
void set_autoboot_busloc | ( | unsigned int | bus_type, |
unsigned int | location | ||
) |
Identify autoboot device by bus type and location.
bus_type | Bus type |
location | Location |
Definition at line 490 of file autoboot.c.
References autoboot_desc, device_description::bus_type, is_autoboot_busloc(), is_autoboot_device, and device_description::location.
Referenced by pci_autoboot_init().
void set_autoboot_ll_addr | ( | const void * | ll_addr, |
size_t | len, | ||
unsigned int | vlan | ||
) |
Identify autoboot device by link-layer address.
ll_addr | Link-layer address |
len | Length of link-layer address |
vlan | VLAN tag |
Definition at line 520 of file autoboot.c.
References autoboot_ll_addr, autoboot_vlan, is_autoboot_device, is_autoboot_ll_addr(), len, and memcpy().
Referenced by efi_set_autoboot_ll_addr().
int uriboot | ( | struct uri * | filename, |
struct uri ** | root_paths, | ||
unsigned int | root_path_count, | ||
int | drive, | ||
struct san_boot_config * | san_config, | ||
unsigned int | flags | ||
) |
Boot from filename and root-path URIs.
filename | Filename |
root_paths | Root path(s) |
root_path_count | Number of root paths |
drive | SAN drive (if applicable) |
san_config | SAN boot configuration parameters |
flags | Boot action flags |
rc | Return status code |
The somewhat tortuous flow of control in this function exists in order to ensure that the "sanboot" command remains identical in function to a SAN boot via a DHCP-specified root path, and to provide backwards compatibility for the "keep-san" and "skip-san-boot" options.
Definition at line 129 of file autoboot.c.
References drive, fetch_intz_setting(), san_boot_config::filename, flags, image::flags, IMAGE_AUTO_UNREGISTER, image_exec(), imgdownload(), imgstat(), NULL, printf(), rc, san_boot(), san_describe(), san_hook(), SAN_NO_DESCRIBE, san_unhook(), strerror(), URIBOOT_NO_SAN_BOOT, URIBOOT_NO_SAN_DESCRIBE, and URIBOOT_NO_SAN_UNHOOK.
Referenced by netboot(), pxe_menu_boot(), and sanboot_core_exec().
Fetch next-server and filename settings into a URI.
settings | Settings block |
uri | URI, or NULL on failure |
Definition at line 241 of file autoboot.c.
References AF_INET, expand_settings(), fetch_ipv4_setting(), fetch_setting(), fetch_string_setting_copy(), free, inet_ntoa(), memset(), NULL, printf(), pxe_uri(), sa, and sin.
Referenced by netboot(), and pxe_menu_boot().
int netboot | ( | struct net_device * | netdev | ) |
Boot from a network device.
netdev | Network device |
rc | Return status code |
Definition at line 391 of file autoboot.c.
References close_other_netdevs(), ENOENT_BOOT, fetch_next_server_and_filename(), fetch_root_path(), fetch_san_filename(), san_boot_config::filename, free, have_pxe_menu(), ifconf(), ifopen(), ifstat(), memset(), netdev, NULL, printf(), pxe_menu_boot(), rc, route(), san_default_drive(), uri::scheme, strerror(), uri_is_absolute(), uri_put(), uriboot(), URIBOOT_NO_SAN, and xfer_uri_opener().
Referenced by autoboot(), autoboot_payload(), and ipxe().
int ipxe | ( | struct net_device * | netdev | ) |
Main iPXE flow of execution.
netdev | Network device, or NULL |
rc | Return status code |
Definition at line 585 of file autoboot.c.
References autoboot(), BOLD, CYAN, feature, FEATURES, fetch_string_setting_copy(), first_image(), for_each_table_entry, free, image_exec(), feature::name, netboot(), netdev, NORMAL, NULL, printf(), PRODUCT_NAME, PRODUCT_SHORT_NAME, PRODUCT_TAG_LINE, PRODUCT_URI, product_version, rc, shell(), shell_banner(), and system.
Referenced by efi_snp_load_file(), and main().
int pxe_menu_boot | ( | struct net_device * | netdev | ) |
Boot using PXE boot menu.
rc | Return status code |
Note that a success return status indicates that a PXE boot menu item has been selected, and that the DHCP session should perform a boot server request/ack.
Definition at line 344 of file pxemenu.c.
References assert(), ENOMEM, fetch_next_server_and_filename(), find_settings(), free, pxe_menu::items, netdev, NULL, pxe_menu_parse(), pxe_menu_prompt_and_select(), pxebs(), PXEBS_SETTINGS_NAME, rc, pxe_menu::selection, pxe_menu_item::type, uri_put(), uriboot(), and URIBOOT_NO_SAN.