Initial commit
This commit is contained in:
commit
28b1689987
5 changed files with 94 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
bin
|
||||
bin-x86_64-efi
|
36
Dockerfile
Normal file
36
Dockerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
FROM rockylinux:9
|
||||
|
||||
RUN set -eux ; \
|
||||
dnf upgrade -y ; \
|
||||
dnf -y install --nodocs --setopt=install_weak_deps=False \
|
||||
gcc \
|
||||
genisoimage \
|
||||
git \
|
||||
make \
|
||||
patch \
|
||||
syslinux \
|
||||
xz-devel \
|
||||
; \
|
||||
dnf -y clean all ; \
|
||||
rm -rf /var/cache/dnf
|
||||
|
||||
RUN set -eux ; \
|
||||
useradd -c "iPXE Builder" -d /build -m build
|
||||
|
||||
WORKDIR /build
|
||||
USER build
|
||||
|
||||
COPY --chmod=0644 config.patch embed.ipxe .
|
||||
|
||||
CMD set -eux ; \
|
||||
{ \
|
||||
git clone https://github.com/ipxe/ipxe.git ; \
|
||||
cd ipxe/src ; \
|
||||
patch -p0 < /build/config.patch ; \
|
||||
make \
|
||||
bin/ipxe.iso bin/ipxe.usb bin/undionly.kpxe \
|
||||
bin-x86_64-efi/ipxe.iso bin-x86_64-efi/ipxe.usb \
|
||||
EMBEDDED_IMAGE=/build/embed.ipxe ; \
|
||||
} 1>&2 ; \
|
||||
tar cf - bin/ipxe.iso bin/ipxe.usb bin/undionly.kpxe \
|
||||
bin-x86_64-efi/ipxe.iso bin-x86_64-efi/ipxe.usb
|
8
build.sh
Executable file
8
build.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
docker build -t ipxe .
|
||||
|
||||
docker run --log-driver none --rm -i ipxe | tar xvf -
|
42
config.patch
Normal file
42
config.patch
Normal file
|
@ -0,0 +1,42 @@
|
|||
--- config/general.h.orig 2024-06-15 18:56:04.002548342 +0000
|
||||
+++ config/general.h 2024-06-15 19:23:07.500619158 +0000
|
||||
@@ -36,10 +36,10 @@
|
||||
|
||||
#define NET_PROTO_IPV4 /* IPv4 protocol */
|
||||
//#define NET_PROTO_IPV6 /* IPv6 protocol */
|
||||
-#undef NET_PROTO_FCOE /* Fibre Channel over Ethernet protocol */
|
||||
-#define NET_PROTO_STP /* Spanning Tree protocol */
|
||||
-#define NET_PROTO_LACP /* Link Aggregation control protocol */
|
||||
-#define NET_PROTO_EAPOL /* EAP over LAN protocol */
|
||||
+//#undef NET_PROTO_FCOE /* Fibre Channel over Ethernet protocol */
|
||||
+//#define NET_PROTO_STP /* Spanning Tree protocol */
|
||||
+//#define NET_PROTO_LACP /* Link Aggregation control protocol */
|
||||
+//#define NET_PROTO_EAPOL /* EAP over LAN protocol */
|
||||
//#define NET_PROTO_LLDP /* Link Layer Discovery protocol */
|
||||
|
||||
/*
|
||||
@@ -54,9 +54,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
-#define DOWNLOAD_PROTO_TFTP /* Trivial File Transfer Protocol */
|
||||
+#undef DOWNLOAD_PROTO_TFTP /* Trivial File Transfer Protocol */
|
||||
#define DOWNLOAD_PROTO_HTTP /* Hypertext Transfer Protocol */
|
||||
-#undef DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */
|
||||
+#define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */
|
||||
#undef DOWNLOAD_PROTO_FTP /* File Transfer Protocol */
|
||||
#undef DOWNLOAD_PROTO_SLAM /* Scalable Local Area Multicast */
|
||||
#undef DOWNLOAD_PROTO_NFS /* Network File System Protocol */
|
||||
@@ -67,9 +67,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
-//#undef SANBOOT_PROTO_ISCSI /* iSCSI protocol */
|
||||
-//#undef SANBOOT_PROTO_AOE /* AoE protocol */
|
||||
-//#undef SANBOOT_PROTO_IB_SRP /* Infiniband SCSI RDMA protocol */
|
||||
+#undef SANBOOT_PROTO_ISCSI /* iSCSI protocol */
|
||||
+#undef SANBOOT_PROTO_AOE /* AoE protocol */
|
||||
+#undef SANBOOT_PROTO_IB_SRP /* Infiniband SCSI RDMA protocol */
|
||||
//#undef SANBOOT_PROTO_FCP /* Fibre Channel protocol */
|
||||
//#undef SANBOOT_PROTO_HTTP /* HTTP SAN protocol */
|
||||
|
6
embed.ipxe
Normal file
6
embed.ipxe
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!ipxe
|
||||
|
||||
:retry
|
||||
dhcp || goto retry
|
||||
|
||||
chain https://boot.foo.sh/boot.ipxe
|
Loading…
Add table
Reference in a new issue