summaryrefslogtreecommitdiffstats
path: root/src/config/cloud
Commit message (Collapse)AuthorAgeFilesLines
* [pci] Use runtime selectable PCI I/O API for EFI cloud buildsMichael Brown2025-11-251-0/+10
| | | | | | | | | | | | | | | On some systems (observed on an AWS m8g.medium instance in eu-west-2), the UEFI firmware omits the PCI host bridge drivers for all but the first PCI bus. The observable result is that any devices on other PCI buses (such as the ENA network device) are not enumerated by the UEFI firmware and are therefore unusable by iPXE. Support these systems by switching to using PCIAPI_CLOUD for EFI cloud builds, trying the EFI PCI I/O API first and falling back to direct access (via ECAM) for devices that the UEFI firmware has failed to enumerate itself. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Use linker tables for runtime selectable PCI APIsMichael Brown2025-11-241-0/+3
| | | | | | | Use the linker table mechanism to enumerate the underlying PCI I/O APIs, to allow PCIAPI_CLOUD to become architecture-independent code. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cloud] Display instance type in AWS EC2Michael Brown2025-10-291-1/+1
| | | | | | | | Experiments suggest that the instance type is exposed via the SMBIOS product name. Include this information within the default output, since it is often helpful in debugging. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cloud] Display build architecture in AWS EC2Michael Brown2025-10-201-1/+1
| | | | | | | | | | | | | | | | | | | On some newer (7th and 8th generation) instance types, the 32-bit build of iPXE cannot access PCI configuration space since the ECAM is placed outside of the 32-bit address space. The visible symptom is that iPXE fails to detect any network devices. The public AMIs are all now built as 64-bit binaries, but there is nothing that prevents the building and importing of a 32-bit AMI. There are still potentially valid use cases for 32-bit AMIs (e.g. if planning to use the AMI only for older instance types), and so we cannot sensibly prevent this error at build time. Display the build architecture as part of the AWS EC2 embedded script, to at least allow for easy identification of this particular failure mode at run time. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Select PCI I/O API at runtime for cloud imagesMichael Brown2022-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pretty much all physical machines and off-the-shelf virtual machines will provide a functional PCI BIOS. We therefore default to using only the PCI BIOS, with no fallback to an alternative mechanism if the PCI BIOS fails. AWS EC2 provides the opportunity to experience some exceptions to this rule. For example, the t3a.nano instances in eu-west-1 have no functional PCI BIOS at all. As of commit 83516ba ("[cloud] Use PCIAPI_DIRECT for cloud images") we therefore use direct Type 1 configuration space accesses in the images built and published for use in the cloud. Recent experience has discovered yet more variation in AWS EC2 instances. For example, some of the metal instance types have multiple PCI host bridges and the direct Type 1 accesses therefore see only a subset of the PCI devices. Attempt to accommodate future such variations by making the PCI I/O API selectable at runtime and choosing ECAM (if available), falling back to the PCI BIOS (if available), then finally falling back to direct Type 1 accesses. This is implemented as a dedicated PCIAPI_CLOUD API, rather than by having the PCI core select a suitable API at runtime (as was done for timers in commit 302f1ee ("[time] Allow timer to be selected at runtime"). The common case will remain that only the PCI BIOS API is required, and we would prefer to retain the optimisations that come from inlining the configuration space accesses in this common case. Cloud images are (at present) disk images rather than ROM images, and so the increased code size required for this design approach in the PCIAPI_CLOUD case is acceptable. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cloud] Retry DHCP aggressively in AWS EC2Michael Brown2021-07-201-1/+16
| | | | | | | | | | | | | The DHCP service in EC2 has been observed to occasionally stop responding for bursts of several seconds. This can easily result in a failed boot, since the current cloud boot script will attempt DHCP only once. Work around this problem by retrying DHCP in a fairly tight cycle within the cloud boot script, and falling back to a reboot after several failed DHCP attempts. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cloud] Show ifstat output after a failed boot attemptMichael Brown2021-06-232-2/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cloud] Attempt to include CPUID_SETTINGS only for x86 buildsMichael Brown2021-05-021-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cloud] Enable "poweroff" command in cloud imagesMichael Brown2021-04-101-0/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cloud] Do not enable serial console on EFI platformsMichael Brown2021-02-171-0/+5
| | | | | | | | | | Most EFI firmware builds (including those found on ARM64 instances in AWS EC2) will already send console output to the serial port. Do not enable direct serial console output in EFI builds using CONFIG=cloud. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cloud] Enable IPv6 and HTTPS in cloud boot imagesMichael Brown2021-02-161-0/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cloud] Use PCIAPI_DIRECT for cloud imagesMichael Brown2021-02-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | The version of SeaBIOS found on some AWS EC2 instances (observed with t3a.nano in eu-west-1) has no support for the INT 1A PCI BIOS calls. Bring config/ioapi.h into the named-configuration set of headers, and specify the use of PCIAPI_DIRECT for CONFIG=cloud, to work around the missing PCI BIOS support. Switching to a different named configuration will now unfortunately cause an almost complete rebuild of iPXE. As described in commit c801cb2 ("[build] Allow for named configurations at build time"), this is the reason why config/ioapi.h was not originally in the named-configuration set of header files. This rebuild cost is acceptable given that build times are substantially faster now than seven years ago, and that very few people are likely to be switching named configurations on a regular basis. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cloud] Show CPU vendor and model in example cloud boot scriptsMichael Brown2017-01-243-0/+6
| | | | | | | | | Some problems arise only when running on a specific CPU type (e.g. non-functional timer interrupts as observed in Azure AMD instances). Include the CPU vendor and model within the sample cloud boot scripts, to assist in debugging such problems. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cloud] Add ability to retrieve Google Compute Engine metadataMichael Brown2017-01-232-0/+11
| | | | | | | | | | | | | | | | | | | | | | | For some unspecified "security" reason, the Google Compute Engine metadata server will refuse any requests that do not include the non-standard HTTP header "Metadata-Flavor: Google". Attempt to autodetect such requests (by comparing the hostname against "metadata.google.internal"), and add the "Metadata-Flavor: Google" header if applicable. Enable this feature in the CONFIG=cloud build, and include a sample embedded script allowing iPXE to boot from a script configured as metadata via e.g. # Create shared boot image make bin/ipxe.usb CONFIG=cloud EMBED=config/cloud/gce.ipxe # Configure per-instance boot script gcloud compute instances add-metadata <instance> \ --metadata-from-file ipxeboot=boot.ipxe Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Add named configuration for public cloud environmentsMichael Brown2016-01-189-0/+38
Add a named CONFIG=cloud configuration, which enables console types useful for obtaining output from virtual machines in public clouds such as AWS EC2. An image suitable for use in AWS EC2 can be built using make bin/ipxe.usb CONFIG=cloud EMBED=config/cloud/aws.ipxe The embedded script will direct iPXE to download and execute the EC2 "user-data" file, which is always available to an EC2 VM via the URI http://169.254.169.254/latest/user-data (regardless of the VPC networking settings). The boot can therefore be controlled by modifying the per-instance user data, without having to modify the boot disk image. Console output can be obtained via syslog (with a syslog server configured in the user-data script), via the AWS "System Log" (after the instance has been stopped), or as a last resort from the log partition on the boot disk. Signed-off-by: Michael Brown <mcb30@ipxe.org>