wok-next annotate ipxe/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents ac50637642b7
children
rev   line source
al@20443 1 # SliTaz package receipt v2.
pascal@13422 2
pascal@13422 3 PACKAGE="ipxe"
pascal@21340 4 VERSION="1.20.1"
pascal@13422 5 CATEGORY="system-tools"
al@20443 6 SHORT_DESC="Open source network boot firmware"
pascal@13422 7 MAINTAINER="pascal.bellard@slitaz.org"
al@19601 8 LICENSE="GPL2 UBDL"
pascal@13422 9 WEB_SITE="http://ipxe.org/"
al@19601 10
al@19601 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@21340 12 WGET_URL="https://github.com/ipxe/ipxe/archive/v$VERSION.tar.gz"
pascal@13422 13
al@21094 14 COOKOPTS="force-arch" # different ipxe, .pxe ?
al@21094 15
al@20443 16 BUILD_DEPENDS="perl xz-dev"
al@21020 17 SPLIT="$PACKAGE-pxe"
pascal@13422 18
al@20443 19 compile_rules() {
pascal@13422 20 cd $src/src
al@20443 21
pascal@21340 22 sed -i 's|\(SIZEOF_LOW_4GB\) / \(SIZEOF_2MB_PAGE\)|1<<(\1_LOG2-\2_LOG2)|' \
pascal@19622 23 arch/x86/transitions/librm.S
pascal@19622 24
pascal@19622 25 #sed -i 's/^ASFLAGS.*/& -adhlns=$(<:.S=.lst)/' Makefile
al@20905 26 sed -i 's|-llzma|& -lpthread|' Makefile.*
al@20905 27 sed -i '
al@20905 28 s|//\(#define.*CONSOLE_FRAMEBUFFER\)|\1|;
al@20905 29 s|//\(#define.*CONSOLE_SERIAL\)|\1|' config/console.h
al@20905 30 sed -i '
al@20905 31 s|//\(#define.*IMAGE_PNG\)|\1|;
pascal@21340 32 s|.*\(NET_PROTO_IPV6\)|#define \1|;
pascal@21340 33 s|undef \(DOWNLOAD_PROTO_HTTPS\)|define \1|;
pascal@21340 34 s|.*\(VLAN_CMD\)|#define \1|;
pascal@21340 35 s|.*\(CERT_CMD\)|#define \1|;
al@20905 36 s|//\(#define.*CONSOLE_CMD\)|\1|;
al@20905 37 s|//\(#define.*REBOOT_CMD\)|\1|' config/general.h
pascal@21340 38 sed -i "s|\(TAG_LINE \"\)|\1${VERSION#*-} -- |" config/branding.h
pascal@21340 39 sed -i 's|//\(#define.*CPUID_SETTINGS\)|\1|' config/settings.h
al@20905 40 # cp $stuff/lkrnprefix.S arch/i386/prefix
al@19601 41
al@20519 42 # refer to http://ipxe.org/appnote/buildtargets
al@20519 43 case $ARCH in
al@20519 44 i?86) platform='bin-i386-pcbios';;
al@20519 45 x86_64) platform='bin-x86_64-pcbios';;
al@20519 46 esac
al@20519 47
al@20519 48 make $platform || return 1
al@19601 49 separator
al@19601 50
al@20519 51 make $platform/undionly.pxe $platform/undionly.kpxe \
al@20519 52 $platform/undionly.kkpxe $platform/undionly.kkkpxe \
al@20519 53 $platform/ipxe.pxe $platform/ipxe.kpxe \
al@20519 54 $platform/ipxe.kkpxe $platform/ipxe.kkkpxe \
al@20519 55 $platform/ipxe.nbi $platform/ipxe.lkrn \
al@20443 56 EMBED=$stuff/ipxe.cmd || return 1
pascal@13422 57
al@20519 58 mkdir -p $install/boot/
al@20519 59 cp -a $src/src/$platform/ipxe.lkrn $install/boot/ipxe
pascal@17475 60 OFS=$((0x156))
al@20443 61 unix2dos <<EOT | dd bs=1 of=$install/boot/ipxe conv=notrunc \
pascal@15368 62 seek=$OFS count=$((0x1F0-$OFS))
pascal@15368 63 $SHORT_DESC
pascal@13422 64 EOT
al@20519 65
al@20519 66 mkdir -p $install/usr/share/boot/
al@20519 67 cp -a $src/src/$platform/ipxe.kpxe $install/usr/share/boot/ipxe.pxe
al@20519 68 cp -a $src/src/$platform/undionly.kpxe $install/usr/share/boot/undi.pxe
pascal@13422 69 }
al@20443 70
al@20443 71 genpkg_rules() {
al@20464 72 case $PACKAGE in
al@20464 73 ipxe)
al@20519 74 copy ipxe
al@20464 75 ;;
al@20464 76 ipxe-pxe)
al@20519 77 copy *.pxe
al@20464 78 CAT="system-tools|for pxe server"
al@20464 79 ;;
al@20464 80 esac
al@20443 81 }