# ipxe/ipxe architecture

> Architecture diagram of the GitHub repository ipxe/ipxe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ipxe/ipxe
- Repository: https://github.com/ipxe/ipxe

## Overview

iPXE is network-boot firmware. Its documented user-facing workflow is to start the firmware, choose or script a boot action, retrieve an image or SAN resource, and boot it; it also supports interactive menus and forms. The main entry point’s call to `ipxe(NULL)` is visible, and the README documents the capabilities. Other runtime links are omitted where the sampled evidence does not establish who calls whom.

Main entry points: [`src/usr/autoboot.c`](https://github.com/ipxe/ipxe/blob/master/src/usr/autoboot.c) (Autoboot), [`src/core/main.c`](https://github.com/ipxe/ipxe/blob/master/src/core/main.c) (Firmware entry), [`src/crypto/tlskey.c`](https://github.com/ipxe/ipxe/blob/master/src/crypto/tlskey.c) (TLS security), [`src/net/tcp/httpauth.c`](https://github.com/ipxe/ipxe/blob/master/src/net/tcp/httpauth.c) (HTTP boot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Boot control"]
  node_entry["Firmware entry<br/>[main.c]"]
  node_autoboot["Autoboot<br/>[autoboot.c]"]
  node_menus["PXE menus<br/>[pxemenu.c]"]
  node_image_cmd["Image commands<br/>[image_cmd.c]"]
end

subgraph group_network["Network boot"]
  node_http["HTTP boot<br/>[httpauth.c]"]
  node_dhcp["DHCP configuration<br/>[dhcp.c]"]
  node_wifi["Wi-Fi networking<br/>[net80211.c]"]
  node_tls["TLS security<br/>[tlskey.c]"]
  node_certificates["Certificate validation<br/>[x509.c]"]
end

subgraph group_storage["Boot sources"]
  node_sanboot["SAN boot<br/>[sanboot.c]"]
  node_nfs["NFS access<br/>[nfs_open.c]"]
  node_image["EFI images<br/>[efi_image.c]"]
end

subgraph group_interfaces["Firmware interfaces"]
  node_network_devices["Network drivers"]
  node_usb["USB host support<br/>[xhci.c]"]
  node_efi["EFI services<br/>[efi_service.c]"]
end

subgraph group_pxe["PXE compatibility"]
  node_undi["UNDI network interface<br/>[undinet.c]"]
  node_pxe_api["PXE API<br/>[pxe_api.h]"]
  node_pxe_types["PXE data types<br/>[pxe_types.h]"]
end

node_operator(("Boot operator"))
node_web_server["Web server"]
node_san_target["SAN target"]

node_operator -.->|"starts firmware"| node_entry
node_entry -->|"calls ipxe"| node_autoboot
node_operator -.->|"chooses menu"| node_menus
node_operator -.->|"runs script"| node_image_cmd
node_autoboot -.->|"configures network"| node_dhcp
node_autoboot -.->|"retrieves image"| node_http
node_autoboot -.->|"boots SAN"| node_sanboot
node_autoboot -.->|"opens NFS"| node_nfs
node_autoboot -.->|"boots image"| node_image
node_web_server -->|"serves boot files"| node_http
node_web_server -->|"secures HTTPS"| node_tls
node_tls -.->|"validates certificates"| node_certificates
node_san_target -->|"provides SAN"| node_sanboot
node_network_devices -.->|"supports network boot"| node_undi
node_pxe_types -->|"defines types"| node_pxe_api

click node_entry "https://github.com/ipxe/ipxe/blob/master/src/core/main.c"
click node_autoboot "https://github.com/ipxe/ipxe/blob/master/src/usr/autoboot.c"
click node_menus "https://github.com/ipxe/ipxe/blob/master/src/usr/pxemenu.c"
click node_image_cmd "https://github.com/ipxe/ipxe/blob/master/src/hci/commands/image_cmd.c"
click node_http "https://github.com/ipxe/ipxe/blob/master/src/net/tcp/httpauth.c"
click node_dhcp "https://github.com/ipxe/ipxe/blob/master/src/net/udp/dhcp.c"
click node_wifi "https://github.com/ipxe/ipxe/blob/master/src/net/80211/net80211.c"
click node_tls "https://github.com/ipxe/ipxe/blob/master/src/crypto/tlskey.c"
click node_certificates "https://github.com/ipxe/ipxe/blob/master/src/crypto/x509.c"
click node_sanboot "https://github.com/ipxe/ipxe/blob/master/src/core/sanboot.c"
click node_nfs "https://github.com/ipxe/ipxe/blob/master/src/net/oncrpc/nfs_open.c"
click node_image "https://github.com/ipxe/ipxe/blob/master/src/image/efi_image.c"
click node_network_devices "https://github.com/ipxe/ipxe/tree/master/src/drivers/net"
click node_usb "https://github.com/ipxe/ipxe/blob/master/src/drivers/usb/xhci.c"
click node_efi "https://github.com/ipxe/ipxe/blob/master/src/interface/efi/efi_service.c"
click node_undi "https://github.com/ipxe/ipxe/blob/master/src/arch/x86/drivers/net/undinet.c"
click node_pxe_api "https://github.com/ipxe/ipxe/blob/master/src/arch/x86/include/pxe_api.h"
click node_pxe_types "https://github.com/ipxe/ipxe/blob/master/src/arch/x86/include/pxe_types.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_autoboot,node_menus,node_image_cmd toneBlue
class node_http,node_dhcp,node_wifi,node_tls,node_certificates toneAmber
class node_sanboot,node_nfs,node_image,node_web_server toneMint
class node_network_devices,node_usb,node_efi toneRose
class node_undi,node_pxe_api,node_pxe_types,node_operator,node_san_target toneIndigo
```

## Components

### Boot control

- [Firmware entry](https://github.com/ipxe/ipxe/blob/master/src/core/main.c): `src/core/main.c`
- [Autoboot](https://github.com/ipxe/ipxe/blob/master/src/usr/autoboot.c): `src/usr/autoboot.c`
- [PXE menus](https://github.com/ipxe/ipxe/blob/master/src/usr/pxemenu.c): `src/usr/pxemenu.c`
- [Image commands](https://github.com/ipxe/ipxe/blob/master/src/hci/commands/image_cmd.c): `src/hci/commands/image_cmd.c`

### Network boot

- [HTTP boot](https://github.com/ipxe/ipxe/blob/master/src/net/tcp/httpauth.c): `src/net/tcp/httpauth.c`
- [DHCP configuration](https://github.com/ipxe/ipxe/blob/master/src/net/udp/dhcp.c): `src/net/udp/dhcp.c`
- [Wi-Fi networking](https://github.com/ipxe/ipxe/blob/master/src/net/80211/net80211.c): `src/net/80211/net80211.c`
- [TLS security](https://github.com/ipxe/ipxe/blob/master/src/crypto/tlskey.c): `src/crypto/tlskey.c`
- [Certificate validation](https://github.com/ipxe/ipxe/blob/master/src/crypto/x509.c): `src/crypto/x509.c`

### Boot sources

- [SAN boot](https://github.com/ipxe/ipxe/blob/master/src/core/sanboot.c): `src/core/sanboot.c`
- [NFS access](https://github.com/ipxe/ipxe/blob/master/src/net/oncrpc/nfs_open.c): `src/net/oncrpc/nfs_open.c`
- [EFI images](https://github.com/ipxe/ipxe/blob/master/src/image/efi_image.c): `src/image/efi_image.c`

### Firmware interfaces

- [Network drivers](https://github.com/ipxe/ipxe/tree/master/src/drivers/net): `src/drivers/net`
- [USB host support](https://github.com/ipxe/ipxe/blob/master/src/drivers/usb/xhci.c): `src/drivers/usb/xhci.c`
- [EFI services](https://github.com/ipxe/ipxe/blob/master/src/interface/efi/efi_service.c): `src/interface/efi/efi_service.c`

### PXE compatibility

- [UNDI network interface](https://github.com/ipxe/ipxe/blob/master/src/arch/x86/drivers/net/undinet.c): `src/arch/x86/drivers/net/undinet.c`
- [PXE API](https://github.com/ipxe/ipxe/blob/master/src/arch/x86/include/pxe_api.h): `src/arch/x86/include/pxe_api.h`
- [PXE data types](https://github.com/ipxe/ipxe/blob/master/src/arch/x86/include/pxe_types.h): `src/arch/x86/include/pxe_types.h`

### Other components

- **Boot operator**
- **Web server**
- **SAN target**

## Connections

- Boot operator → Firmware entry: starts firmware
- Firmware entry → Autoboot: calls ipxe (evidence: `src/core/main.c`)
- Boot operator → PXE menus: chooses menu
- Boot operator → Image commands: runs script
- Autoboot → DHCP configuration: configures network
- Autoboot → HTTP boot: retrieves image
- Autoboot → SAN boot: boots SAN
- Autoboot → NFS access: opens NFS
- Autoboot → EFI images: boots image
- Web server → HTTP boot: serves boot files
- Web server → TLS security: secures HTTPS
- TLS security → Certificate validation: validates certificates
- SAN target → SAN boot: provides SAN
- Network drivers → UNDI network interface: supports network boot
- PXE data types → PXE API: defines types (evidence: `src/arch/x86/include/pxe_api.h`)
