diff options
Diffstat (limited to 'main/alpine-ipxe')
-rw-r--r-- | main/alpine-ipxe/APKBUILD | 79 | ||||
-rw-r--r-- | main/alpine-ipxe/DST_Root_CA_X3.pem | 20 | ||||
-rw-r--r-- | main/alpine-ipxe/alpine-netboot-ca.crt | 24 | ||||
-rw-r--r-- | main/alpine-ipxe/boot.ipxe | 4 |
4 files changed, 127 insertions, 0 deletions
diff --git a/main/alpine-ipxe/APKBUILD b/main/alpine-ipxe/APKBUILD new file mode 100644 index 0000000000..914bd61f8d --- /dev/null +++ b/main/alpine-ipxe/APKBUILD @@ -0,0 +1,79 @@ +# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org> +# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org> +pkgname=alpine-ipxe +pkgver=1.0_git20180327 +_sha=8c17ee115d140ceb509f97158b581cd7a19ee586 +pkgrel=2 +pkgdesc="iPXE build for Alpine Linux netboot" +url="https://boot.alpinelinux.org" +arch="x86 x86_64 aarch64" +license="GPL-2.0-or-later" +depends="" +makedepends="xz-dev perl coreutils bash syslinux xorriso" +options="!strip !check !archcheck !tracedeps" # no tests +install="" +subpackages="" +source="ipxe-$pkgver.tar.gz::https://github.com/ipxe/ipxe/archive/$_sha.tar.gz + DST_Root_CA_X3.pem + alpine-netboot-ca.crt + boot.ipxe + " +builddir="$srcdir/ipxe-$_sha/src" + +# default build targets for x86 systems +_targets="bin/ipxe.iso bin/ipxe.lkrn bin/ipxe.pxe bin/undionly.kpxe bin/ipxe.usb" + +case $CARCH in +x86) _targets="$_targets bin-i386-efi/ipxe.efi";; +x86_64) _targets="$_targets bin-x86_64-efi/ipxe.efi";; +aarch64) + _targets="bin-arm64-efi/snp.efi" + makedepends="xz-dev perl coreutils bash";; +esac + +for _target in $_targets; do + _target=${_target##*/} + _target=${_target/./_} + subpackages="$subpackages $pkgname-$_target:_split" +done + +prepare() { + cd "$builddir" + local general="DIGEST_CMD NET_PROTO_IPV6 DOWNLOAD_PROTO_HTTPS IMAGE_TRUST_CMD + NSLOOKUP_CMD PING_CMD REBOOT_CMD NTP_CMD PCI_CMD TIME_CMD VLAN_CMD" + mkdir -p config/local + local opt; for opt in $general; do + echo "#define $opt" >> config/local/general.h + done +} + +build() { + cd "$builddir" + # DST_Root_CA_X3.pem is need for https (letsencrypt) + make EMBED="$srcdir/boot.ipxe" \ + CERT="$srcdir"/alpine-netboot-ca.crt,"$srcdir"/DST_Root_CA_X3.pem \ + TRUST="$srcdir"/alpine-netboot-ca.crt,"$srcdir"/DST_Root_CA_X3.pem \ + $_targets +} + +package() { + local target; for target in $_targets; do + install -Dm644 "$builddir"/$target \ + "$pkgdir"/usr/share/$pkgname/${target##*/} + done +} + +_split() { + local name=${subpkgname##*-} + name=${name/_/.} + pkgdesc="$pkgname $name binary" + install_if="$pkgname=$pkgver-r$pkgrel" + mkdir -p "$subpkgdir"/usr/share/$pkgname + mv "$pkgdir"/usr/share/$pkgname/$name \ + "$subpkgdir"/usr/share/$pkgname +} + +sha512sums="60e6696f02d9b1e9e4f82c134ca093862654191f8b9ed969a79e923d03589e35bd964bb11da67362dd1ef4b5aa290844317927ea6f076cd75fec09d78ada1540 ipxe-1.0_git20180327.tar.gz +1f52b62aa9e3ec0656ea3cb5c8e52eda924d58728e64bb03ca6c112858b91b13cf0a9328b105bb232973e240406b240ed14e72b5bd325e82e6fddf3126dbcc58 DST_Root_CA_X3.pem +68030e3f30983ee45c7f740445a246ea0df225becdd0644e06ffdbd84682ac576934dab79fecceb31b70929d81ce85b40301a977862bf7beb042270be21e6d34 alpine-netboot-ca.crt +21b0f6fe0604b2a13a0514e74eef1c5af5d311bead5241fd5da8e3d76bfbaaed02d5517bd446a33f5642ff9ec6f20de73493b0cb3dd13692484076da9b6c4fde boot.ipxe" diff --git a/main/alpine-ipxe/DST_Root_CA_X3.pem b/main/alpine-ipxe/DST_Root_CA_X3.pem new file mode 100644 index 0000000000..b2e43c9381 --- /dev/null +++ b/main/alpine-ipxe/DST_Root_CA_X3.pem @@ -0,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FoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo +Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ +-----END CERTIFICATE----- diff --git a/main/alpine-ipxe/alpine-netboot-ca.crt b/main/alpine-ipxe/alpine-netboot-ca.crt new file mode 100644 index 0000000000..e70c337353 --- /dev/null +++ b/main/alpine-ipxe/alpine-netboot-ca.crt @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIECTCCAvGgAwIBAgIJAPsXmNg45AZdMA0GCSqGSIb3DQEBCwUAMIGaMQswCQYD +VQQGEwJFVTENMAsGA1UECAwETm9uZTENMAsGA1UEBwwETm9uZTEVMBMGA1UECgwM +QWxwaW5lIExpbnV4MRcwFQYDVQQLDA5JbmZyYXN0cnVjdHVyZTEQMA4GA1UEAwwH +aXB4ZS1jYTErMCkGCSqGSIb3DQEJARYcYWxwaW5lLWluZnJhQGFscGluZWxpbnV4 +Lm9yZzAeFw0xODAzMDQxMTU2MThaFw0yODAzMDExMTU2MThaMIGaMQswCQYDVQQG +EwJFVTENMAsGA1UECAwETm9uZTENMAsGA1UEBwwETm9uZTEVMBMGA1UECgwMQWxw +aW5lIExpbnV4MRcwFQYDVQQLDA5JbmZyYXN0cnVjdHVyZTEQMA4GA1UEAwwHaXB4 +ZS1jYTErMCkGCSqGSIb3DQEJARYcYWxwaW5lLWluZnJhQGFscGluZWxpbnV4Lm9y +ZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALNtGkI2gLaq2XCW82i8 +R+BHPENvetbViRD5R4RoOZ4Y9O+kSuG9J43TpRDGJdZbx7DGdZ+IDBA27pCudfFV +EQhe2/oMxSgl+Z++dHkZlg7Xf7UCBlrQa9tDx/CfKkDp5usVl6zFxUEi7H8SE5Wk +htQpcdkpeHXZN4Z/ZaU7Z5S84Ja1+MDSYmRhbf1JoiAHQC6xYaHJeb876Ihu+1dL +3hn23potFHi/8pM8hUYZF5PBzOeh2mwAsWnwMZOof6ntWPIFZHJKY1o/VYMfFQO1 +qtnUCIa+YcgwPMrq5/ukYSF0Vw92Td7LZjvWZ9IEeoevpe1Marfdazg4IiIxpYyP +IpUCAwEAAaNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4EFgQUSyO9NL4Gs5UnZw2/ +Tpg/0b8HyIIwHwYDVR0jBBgwFoAUSyO9NL4Gs5UnZw2/Tpg/0b8HyIIwDQYJKoZI +hvcNAQELBQADggEBABLeFBjgfm0qoXnd4RnjXSgW2jRTjRCQmn1Lc0ZserCKwL9t +0WrHNC2rgb2oaV4wVqY/KpXK3wChrK7c4Mmk+d6LkktTc01ikoKxMBP1KIy5CZz/ +ihK1693psiHFg0sIJqyUoZq7SLxnegRDov5VOzwWibtkEjTUk+0Q8kUOJ5M/fwjU +jkaIymewzi6SLOkihG0D49QybBKsDAE5v+hgTmgYItdrOh2OmLG6IuFNO+gM6kNO +RZMqzFQHNZ/1YAW0dz4BL+Vu/QnX0SxoLljU8zpJBhNFK+cajaAPmlTW+CVDt3Kh +I1QfrAhkdh6ph81VLS8hTXoFS+qIlvEMdza67Ck= +-----END CERTIFICATE----- diff --git a/main/alpine-ipxe/boot.ipxe b/main/alpine-ipxe/boot.ipxe new file mode 100644 index 0000000000..9434db43c9 --- /dev/null +++ b/main/alpine-ipxe/boot.ipxe @@ -0,0 +1,4 @@ +#!ipxe +ifconf +chain https://boot.alpinelinux.org/boot.ipxe || shell +exit |