x86_64: provide grub-efi (i386-efi) [release 2.12-6mamba;Sat Nov 23 2024]
This commit is contained in:
parent
eeca92bca8
commit
fc104cf426
167
grub.spec
167
grub.spec
@ -5,7 +5,7 @@
|
||||
Name: grub
|
||||
Epoch: 2
|
||||
Version: 2.12
|
||||
Release: 5mamba
|
||||
Release: 6mamba
|
||||
Summary: A Multiboot boot loader derived from GRUB, the GRand Unified Bootloader
|
||||
Group: System/Kernel and Hardware
|
||||
Vendor: openmamba
|
||||
@ -95,9 +95,11 @@ This package contains the efi boot files needed to boot according to EFI standar
|
||||
%debug_package
|
||||
|
||||
%prep
|
||||
%setup -q -n grub-%{majver}
|
||||
#-D -T
|
||||
%setup -q -c -a0
|
||||
#% setup -q -D -T
|
||||
#:<< _EOF
|
||||
mv grub-%{version} grub
|
||||
cd grub
|
||||
%patch 1 -p1
|
||||
%patch 3 -p1
|
||||
%patch 9 -p1
|
||||
@ -121,85 +123,115 @@ sh ./linguas.sh
|
||||
# 2.12: workaround for *** No rule to make target '../grub-core/extra_deps.lst', needed by 'syminfo.lst'
|
||||
touch grub-core/extra_deps.lst
|
||||
|
||||
%ifarch x86_64 %{ix86}
|
||||
cd ..
|
||||
cp -a grub grub-efi-i386
|
||||
cp -a grub grub-efi-x86_64
|
||||
%endif
|
||||
|
||||
%build
|
||||
#:<< _EOF
|
||||
CONFIGURE_OPTIONS="
|
||||
--prefix=%{_prefix}
|
||||
--bindir=%{_bindir}
|
||||
--sbindir=%{_bindir}
|
||||
--mandir=%{_mandir}
|
||||
--infodir=%{_infodir}
|
||||
--datarootdir=%{_datadir}
|
||||
--sysconfdir=%{_sysconfdir}
|
||||
--libdir=%{_prefix}/lib
|
||||
--enable-mm-debug
|
||||
--enable-nls
|
||||
--enable-device-mapper
|
||||
--enable-cache-stats
|
||||
--enable-boot-time
|
||||
--enable-grub-mkfont
|
||||
--enable-grub-mount
|
||||
--disable-silent-rules
|
||||
--disable-werror
|
||||
CFLAGS=
|
||||
CXXFLAGS=
|
||||
FFLAGS=
|
||||
"
|
||||
|
||||
cd grub
|
||||
# WARNING: build requires ld.bfd; ld.gold produces not working binary
|
||||
%configure \
|
||||
./configure \
|
||||
%ifarch x86_64 %{ix86}
|
||||
--with-platform="pc" \
|
||||
--target="i386" \
|
||||
%endif
|
||||
--libdir=%{_prefix}/lib \
|
||||
%ifarch x86_64
|
||||
--enable-efiemu \
|
||||
%else
|
||||
--disable-efiemu \
|
||||
%endif
|
||||
--enable-mm-debug \
|
||||
--enable-nls \
|
||||
--enable-device-mapper \
|
||||
--enable-cache-stats \
|
||||
--enable-boot-time \
|
||||
--enable-grub-mkfont \
|
||||
--enable-grub-mount \
|
||||
--enable-libzfs \
|
||||
--disable-silent-rules \
|
||||
--disable-werror \
|
||||
CFLAGS= \
|
||||
CXXFLAGS= \
|
||||
FFLAGS=
|
||||
${CONFIGURE_OPTIONS}
|
||||
|
||||
# don't use % make because unset *FLAGS are needed
|
||||
make
|
||||
cd ..
|
||||
#_EOF
|
||||
|
||||
%ifarch x86_64 %{ix86}
|
||||
# i386-efi
|
||||
cd grub-efi-i386
|
||||
#export EFI_ARCH=i586-openmamba-linux-gnu
|
||||
export EFI_ARCH=i386
|
||||
./configure \
|
||||
--disable-efiemu \
|
||||
--enable-boot-time \
|
||||
--with-platform=efi \
|
||||
--target=${EFI_ARCH} \
|
||||
%ifarch %{ix86}
|
||||
--enable-libzfs \
|
||||
%endif
|
||||
${CONFIGURE_OPTIONS}
|
||||
|
||||
#--host=%{_host_arch} TARGET_CC="%{_host}-gcc"
|
||||
make
|
||||
#-j1 CFLAGS="-Wno-error %{optflags} -Os -m32" LDFLAGS_PLATFORM="-m32"
|
||||
|
||||
# x86_64-efi
|
||||
cd ../grub-efi-x86_64
|
||||
#export EFI_ARCH=x86_64-openmamba-linux-gnu
|
||||
export EFI_ARCH=x86_64
|
||||
./configure \
|
||||
--disable-efiemu \
|
||||
--enable-boot-time \
|
||||
--with-platform=efi \
|
||||
--target=${EFI_ARCH} \
|
||||
%ifarch x86_64
|
||||
--enable-libzfs \
|
||||
%endif
|
||||
${CONFIGURE_OPTIONS}
|
||||
|
||||
make -j1 CFLAGS="-Wno-error"
|
||||
%endif
|
||||
|
||||
## Generate Latin-1, Latin Extended A+B, Arrows, Box and Block characters:
|
||||
#./grub-mkfont --output=unifont.pf2 --range=0x0000-0x0241,0x2190-0x21FF,0x2500-0x259f unifont.bdf
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
%makeinstall
|
||||
%makeinstall -C grub
|
||||
|
||||
# Build EFI grub (x86_64 build disabled for now because it requires lib32-libdevmapper)
|
||||
%ifarch %{ix86}
|
||||
%find_lang grub || touch %{name}.lang
|
||||
|
||||
%ifarch x86_64 %{ix86}
|
||||
# i386-efi
|
||||
make clean
|
||||
rm -f *.d
|
||||
export EFI_ARCH=i586-openmamba-linux-gnu
|
||||
./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --libdir=%{_prefix}/lib \
|
||||
--with-platform=efi --target=${EFI_ARCH}
|
||||
#--host=%{_host_arch} TARGET_CC="%{_host}-gcc"
|
||||
make -j1 CFLAGS="-Wno-error %{optflags} -Os -m32" LDFLAGS_PLATFORM="-m32"
|
||||
cd grub-efi-i386
|
||||
ARCHOUT=i386-efi
|
||||
install -d %{buildroot}%{_prefix}/lib/grub/${ARCHOUT}
|
||||
cp grub-core/{*.mod,*.lst,*.img,*.sh,*.lst} %{buildroot}%{_libdir}/grub/${ARCHOUT}/
|
||||
cp grub-core/{*.mod,*.lst,*.img,*.sh,*.lst} %{buildroot}%{_prefix}/lib/grub/${ARCHOUT}/
|
||||
#./grub-mkimage -o bootia32.efi -O ${ARCHOUT} -p /efi/boot -d ./grub-core part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot linux echo help gfxterm gettext png efi_gop efi_uga
|
||||
#`find . -name *.mod | xargs | sed -e 's/.mod//g'`
|
||||
#% makeinstall
|
||||
#cp bootia32.efi %{buildroot}%{_prefix}/lib/grub/
|
||||
|
||||
# x86_64-efi
|
||||
make clean
|
||||
rm -f *.d
|
||||
export EFI_ARCH=x86_64-openmamba-linux-gnu
|
||||
./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --libdir=%{_prefix}/lib \
|
||||
--with-platform=efi --target=${EFI_ARCH}
|
||||
make -j1 CFLAGS="-Wno-error"
|
||||
ARCHOUT=x86_64-efi
|
||||
install -d %{buildroot}%{_prefix}/lib/grub/${ARCHOUT}
|
||||
cp grub-core/{*.mod,*.lst,*.img,*.sh,*.lst} %{buildroot}%{_prefix}/lib/grub/${ARCHOUT}/
|
||||
#./grub-mkimage -o bootx64.efi -O ${ARCHOUT} -p /efi/boot -d ./grub-core part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot linux echo help gfxterm gettext png efi_gop efi_uga
|
||||
#`find . -name *.mod | xargs | sed -e 's/.mod//g'`
|
||||
#% makeinstall
|
||||
#cp bootx64.efi %{buildroot}%{_prefix}/lib/grub/
|
||||
%endif
|
||||
|
||||
%ifarch x86_64
|
||||
make clean
|
||||
rm -f *.d
|
||||
export EFI_ARCH=x86_64-openmamba-linux-gnu
|
||||
./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --libdir=%{_prefix}/lib \
|
||||
--with-platform=efi
|
||||
make -j1 CFLAGS="-Wno-error"
|
||||
cd ../grub-efi-x86_64
|
||||
ARCHOUT=x86_64-efi
|
||||
install -d %{buildroot}%{_prefix}/lib/grub/${ARCHOUT}
|
||||
cp grub-core/{*.mod,*.lst,*.img,*.sh,*.lst} %{buildroot}%{_prefix}/lib/grub/${ARCHOUT}/
|
||||
@ -212,13 +244,13 @@ cp grub-core/{*.mod,*.lst,*.img,*.sh,*.lst} %{buildroot}%{_prefix}/lib/grub/${AR
|
||||
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/default/grub
|
||||
install -D -m0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/grub
|
||||
|
||||
cat > %{buildroot}%{_sbindir}/update-grub << _EOF
|
||||
cat > %{buildroot}%{_bindir}/update-grub << _EOF
|
||||
#!/bin/bash
|
||||
cp -f /boot/grub/grub.cfg /boot/grub/grub.cfg.old
|
||||
%{_sbindir}/grub-mkconfig $@ > /boot/grub/grub.cfg
|
||||
exit $?
|
||||
_EOF
|
||||
chmod +x %{buildroot}%{_sbindir}/update-grub
|
||||
chmod +x %{buildroot}%{_bindir}/update-grub
|
||||
|
||||
install -d -m0755 %{buildroot}/boot/grub
|
||||
install -d -m0755 %{buildroot}/boot/efi
|
||||
@ -226,8 +258,6 @@ install -d -m0755 %{buildroot}/boot/efi
|
||||
# Provide a simple sbat.csv required for EFI with secure boot support
|
||||
sed -e "s/%%PKGVER%/%{epoch}:%{version}-%{release}/" < %{SOURCE7} > %{buildroot}%{_datadir}/grub/sbat.csv
|
||||
|
||||
%find_lang grub || touch %{name}.lang
|
||||
|
||||
rm -f %{buildroot}%{_infodir}/dir
|
||||
|
||||
%post
|
||||
@ -320,16 +350,16 @@ fi
|
||||
%{_bindir}/grub-render-label
|
||||
%{_bindir}/grub-script-check
|
||||
%{_bindir}/grub-syslinux2cfg
|
||||
%{_sbindir}/grub-bios-setup
|
||||
%{_sbindir}/grub-install
|
||||
%{_sbindir}/grub-macbless
|
||||
%{_sbindir}/grub-mkconfig
|
||||
%{_sbindir}/grub-ofpathname
|
||||
%{_sbindir}/grub-reboot
|
||||
%{_sbindir}/grub-set-default
|
||||
%{_sbindir}/grub-sparc64-setup
|
||||
%{_sbindir}/grub-probe
|
||||
%{_sbindir}/update-grub
|
||||
%{_bindir}/grub-bios-setup
|
||||
%{_bindir}/grub-install
|
||||
%{_bindir}/grub-macbless
|
||||
%{_bindir}/grub-mkconfig
|
||||
%{_bindir}/grub-ofpathname
|
||||
%{_bindir}/grub-reboot
|
||||
%{_bindir}/grub-set-default
|
||||
%{_bindir}/grub-sparc64-setup
|
||||
%{_bindir}/grub-probe
|
||||
%{_bindir}/update-grub
|
||||
%dir /boot/grub
|
||||
%dir %{_datadir}/grub
|
||||
%{_datadir}/grub/ascii.h
|
||||
@ -350,7 +380,7 @@ fi
|
||||
%{_mandir}/man1/grub*.1.gz
|
||||
%{_mandir}/man8/grub*.8.gz
|
||||
%{_datadir}/info/grub.info.gz
|
||||
%doc AUTHORS COPYING
|
||||
%doc grub/AUTHORS grub/COPYING
|
||||
#% doc ChangeLog NEWS README THANKS TODO
|
||||
|
||||
%files theme-starfield
|
||||
@ -358,11 +388,11 @@ fi
|
||||
%dir %{_datadir}/grub/themes/starfield
|
||||
%{_datadir}/grub/themes/starfield/*
|
||||
|
||||
%ifarch %{ix86} aarch64
|
||||
%ifarch %{ix86} aarch64 x86_64
|
||||
%files efi
|
||||
%defattr(-,root,root)
|
||||
%dir /boot/efi
|
||||
%ifarch %{ix86}
|
||||
%ifarch x86_64 %{ix86}
|
||||
%dir %{_prefix}/lib/grub/i386-efi
|
||||
%{_prefix}/lib/grub/i386-efi/*
|
||||
%endif
|
||||
@ -381,6 +411,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat Nov 23 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2.12-6mamba
|
||||
- x86_64: provide grub-efi (i386-efi)
|
||||
|
||||
* Sun Oct 27 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2.12-5mamba
|
||||
- provide a simple sbat.csv file to be used to generate EFI images with secure boot support
|
||||
- update unifont to 16.0.01
|
||||
|
Loading…
Reference in New Issue
Block a user