wok-6.x view grub2-efi-x64/receipt @ rev 22204
linld: 8086 may load zImage (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Nov 11 12:29:56 2019 +0100 (2019-11-11) |
parents | 9b196667495f |
children | 996067d113c6 |
line source
1 # SliTaz package receipt.
3 PACKAGE="grub2-efi-x64"
4 SOURCE="grub"
5 VERSION="2.02"
6 CATEGORY="base-system"
7 SHORT_DESC="GRUB2 boot loader."
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL3"
10 TARBALL="$SOURCE-$VERSION.tar.xz"
11 WEB_SITE="http://www.gnu.org/software/grub/"
12 WGET_URL="ftp://ftp.gnu.org/gnu/grub/$TARBALL"
14 DEPENDS="zlib freetype ncurses libusb-compat grep libusb libdevmapper"
15 BUILD_DEPENDS="flex bison zlib-dev xz-dev freetype-dev ncurses-dev fuse-dev \
16 libusb-compat-dev libusb-dev libdevmapper-dev uclibc-cross-compiler-x86_64"
18 AUFS_NOT_RAMFS="uclibc-cross-compiler-x86_64 is not compatible with aufs+tmpfs 8("
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 sed -i 's|sys/types.h>|&\n#include <sys/sysmacros.h>|' \
24 util/getroot.c grub-core/kern/emu/hostdisk.c
26 # CVE-2015-8370
27 sed -i "s/'.b'/& \\&\\& cur_len/" grub-core/lib/crypto.c \
28 grub-core/normal/auth.c
30 # Fixes for flex 2.5.37
31 export CFLAGS="-Wno-error=sign-compare -Wno-error=unused-value"
32 sed -i '/#undef gets/{N;s/.*/#ifdef gets\n&\n#endif/}' \
33 grub-core/gnulib/stdio*h
34 sed -i 's/YY_FATAL_ERROR/REMOVED_&/' grub-core/script/yylex.l
36 export EFI_ARCH=x86_64
37 sed -i 's/is_symbol_local /type == 2 || /' util/grub-module-verifier*.c*
38 sed -i 's/.*unsupported relocation.*/continue;/' util/grub-module-verifier*.c*
39 sed -i 's|.*add fixup entry for R_X86_64_32|// &|' util/grub-mkimage*.c*
40 ./configure BUILD_CC=gcc CFLAGS="${CFLAGS/-march=i486/-g0}" \
41 TARGET_CC=uclibc-x86_64-gcc TARGET_OBJCOPY=uclibc-x86_64-objcopy \
42 TARGET_NM=uclibc-x86_64-nm TARGET_STRIP=uclibc-x86_64-strip \
43 TARGET_RANLIB='uclibc-x86_64-ranlib' \
44 --prefix=/usr --sysconfdir=/etc \
45 --with-platform=efi --target=${EFI_ARCH} --program-prefix="" \
46 --mandir=/usr/share/man $CONFIGURE_ARGS &&
47 sed -i 's| -Werror||;s|-Wl,--copy-dt-needed-entries||' \
48 Makefile grub-core/Makefile &&
49 make $MAKEFLAGS &&
50 cd grub-core &&
51 ../grub-mkimage -d . -o ../bootx64.efi -O x86_64-efi -p /boot/grub \
52 -c $stuff/grub.cfg \
53 lsefisystab lssal lsefimmap lsacpi ls \
54 ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus \
55 iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd \
56 xfs xnu part_bsd part_gpt search search_fs_file chain btrfs \
57 loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart \
58 scsi loopback normal configfile gzio all_video efi_gop efi_uga \
59 gfxterm gettext echo boot chain
60 }
62 # Rules to gen a SliTaz package suitable for Tazpkg.
63 genpkg_rules()
64 {
65 mkdir -p $fs/boot/efi/boot
66 cp $src/bootx64.efi $fs/boot/efi/boot
67 }