Skip to content

Commit

Permalink
grub2 & grub2-efi-2.12 (#52)
Browse files Browse the repository at this point in the history
* update grub2-2.12

please add .signature

* update grub2-efi-2.12

please add .signature
  • Loading branch information
mac-a-r0ni authored Dec 29, 2023
1 parent 2093395 commit 381c4c1
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 72 deletions.
8 changes: 7 additions & 1 deletion grub2-efi/.footprint
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ drwxr-xr-x root/root usr/lib/grub/arm64-efi/
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/bitmap.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/bitmap_scale.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/bitmap_scale.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/bli.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/bli.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/blocklist.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/blocklist.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/boot.mod
Expand Down Expand Up @@ -85,6 +87,8 @@ drwxr-xr-x root/root usr/lib/grub/arm64-efi/
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/efifwsetup.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/efinet.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/efinet.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/efitextmode.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/efitextmode.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/elf.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/elf.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/eval.mod
Expand Down Expand Up @@ -158,6 +162,7 @@ drwxr-xr-x root/root usr/lib/grub/arm64-efi/
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gcry_whirlpool.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/gcry_whirlpool.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gdb_grub
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gdb_helper.py
-rw-r--r-- root/root usr/lib/grub/arm64-efi/geli.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/geli.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gettext.mod
Expand All @@ -170,7 +175,6 @@ drwxr-xr-x root/root usr/lib/grub/arm64-efi/
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/gfxterm_background.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gfxterm_menu.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/gfxterm_menu.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gmodule.pl
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gptsync.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/gptsync.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gzio.mod
Expand Down Expand Up @@ -325,6 +329,8 @@ drwxr-xr-x root/root usr/lib/grub/arm64-efi/
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/pbkdf2_test.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/pgp.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/pgp.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/plainmount.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/plainmount.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/png.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/png.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/priority_queue.mod
Expand Down
10 changes: 6 additions & 4 deletions grub2-efi/Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
# Depends on: grub2 efibootmgr

name=grub2-efi
version=2.06
release=2
source=(http://ftp.gnu.org/gnu/grub/grub-$version.tar.xz csum_seed.diff)
version=2.12
release=1
source=(http://ftp.gnu.org/gnu/grub/grub-$version.tar.xz csum_seed.diff extra_deps.lst)

build() {
export CFLAGS="${CFLAGS} -Wno-error"
export PYTHON=python3

MODLIST="boot chain configfile fat ext2 linux normal ntfs part_gpt part_msdos"

patch -d grub-$version -p1 -i $SRC/csum_seed.diff
#patch -d grub-$version -p1 -i $SRC/csum_seed.diff

cp $SRC/extra_deps.lst grub-$version/grub-core/

for ARCH in aarch64
do
Expand Down
1 change: 1 addition & 0 deletions grub2-efi/extra_deps.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
depends bli part_gpt
9 changes: 8 additions & 1 deletion grub2/.footprint
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ drwxr-xr-x root/root etc/grub.d/
-rwxr-xr-x root/root etc/grub.d/00_header
-rwxr-xr-x root/root etc/grub.d/10_linux
-rwxr-xr-x root/root etc/grub.d/20_linux_xen
-rwxr-xr-x root/root etc/grub.d/25_bli
-rwxr-xr-x root/root etc/grub.d/30_os-prober
-rwxr-xr-x root/root etc/grub.d/30_uefi-firmware
-rwxr-xr-x root/root etc/grub.d/40_custom
Expand Down Expand Up @@ -52,6 +53,8 @@ drwxr-xr-x root/root usr/lib/grub/arm64-efi/
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/bitmap.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/bitmap_scale.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/bitmap_scale.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/bli.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/bli.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/blocklist.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/blocklist.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/boot.mod
Expand Down Expand Up @@ -115,6 +118,8 @@ drwxr-xr-x root/root usr/lib/grub/arm64-efi/
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/efifwsetup.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/efinet.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/efinet.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/efitextmode.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/efitextmode.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/elf.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/elf.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/eval.mod
Expand Down Expand Up @@ -188,6 +193,7 @@ drwxr-xr-x root/root usr/lib/grub/arm64-efi/
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gcry_whirlpool.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/gcry_whirlpool.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gdb_grub
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gdb_helper.py
-rw-r--r-- root/root usr/lib/grub/arm64-efi/geli.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/geli.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gettext.mod
Expand All @@ -200,7 +206,6 @@ drwxr-xr-x root/root usr/lib/grub/arm64-efi/
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/gfxterm_background.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gfxterm_menu.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/gfxterm_menu.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gmodule.pl
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gptsync.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/gptsync.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/gzio.mod
Expand Down Expand Up @@ -355,6 +360,8 @@ drwxr-xr-x root/root usr/lib/grub/arm64-efi/
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/pbkdf2_test.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/pgp.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/pgp.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/plainmount.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/plainmount.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/png.mod
-rwxr-xr-x root/root usr/lib/grub/arm64-efi/png.module
-rw-r--r-- root/root usr/lib/grub/arm64-efi/priority_queue.mod
Expand Down
10 changes: 6 additions & 4 deletions grub2/Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@
# Depends on: libdevmapper freetype python3

name=grub2
version=2.06
release=5
version=2.12
release=1
source=(http://ftp.gnu.org/gnu/grub/grub-$version.tar.xz \
http://jaeger.morpheus.net/linux/crux/files/unifont-9.0.06.pcf.gz \
$name-tweaks.diff grub.cfg.sample csum_seed.diff)
$name-tweaks.diff grub.cfg.sample csum_seed.diff extra_deps.lst)

build() {
export CFLAGS="${CFLAGS} -Wno-error -Os"
export PYTHON=python3
cd grub-$version
patch -p1 -i $SRC/$name-tweaks.diff
patch -p1 -i $SRC/csum_seed.diff
#patch -p1 -i $SRC/csum_seed.diff

cp $SRC/extra_deps.lst grub-core/

./configure --prefix=/usr \
--sysconfdir=/etc \
Expand Down
1 change: 1 addition & 0 deletions grub2/extra_deps.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
depends bli part_gpt
75 changes: 13 additions & 62 deletions grub2/grub2-tweaks.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -urN grub-2.06.orig/util/grub.d/00_header.in grub-2.06/util/grub.d/00_header.in
--- grub-2.06.orig/util/grub.d/00_header.in 2018-11-24 11:13:02.000000000 -0600
+++ grub-2.06/util/grub.d/00_header.in 2023-01-20 20:18:25.323977639 -0600
diff -urN grub-2.12.orig/util/grub.d/00_header.in grub-2.12/util/grub.d/00_header.in
--- grub-2.12.orig/util/grub.d/00_header.in 2022-10-04 14:58:22.000000000 +0000
+++ grub-2.12/util/grub.d/00_header.in 2023-12-21 19:19:03.142352196 +0000
@@ -152,7 +152,7 @@
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT}"` ; then
EOF
Expand All @@ -10,65 +10,16 @@ diff -urN grub-2.06.orig/util/grub.d/00_header.in grub-2.06/util/grub.d/00_heade
for basename in unicode unifont ascii; do
path="${dir}/${basename}.pf2"
if is_path_readable_by_grub "${path}" > /dev/null ; then
diff -urN grub-2.06.orig/util/grub.d/10_hurd.in grub-2.06/util/grub.d/10_hurd.in
--- grub-2.06.orig/util/grub.d/10_hurd.in 2019-10-21 07:02:43.000000000 -0500
+++ grub-2.06/util/grub.d/10_hurd.in 2023-01-20 20:20:15.763433153 -0600
@@ -176,7 +176,7 @@
hurd_entry "$kernel" advanced
hurd_entry "$kernel" recovery

- kernels=`echo $kernels | tr ' ' '\n' | fgrep -vx "$kernel" | tr '\n' ' '`
+ kernels=`echo $kernels | tr ' ' '\n' | grep -Fvx "$kernel" | tr '\n' ' '`
done

# If at least one kernel was found, then we need to
diff -urN grub-2.06.orig/util/grub.d/10_kfreebsd.in grub-2.06/util/grub.d/10_kfreebsd.in
--- grub-2.06.orig/util/grub.d/10_kfreebsd.in 2019-10-21 07:02:43.000000000 -0500
+++ grub-2.06/util/grub.d/10_kfreebsd.in 2023-01-20 20:20:21.670249001 -0600
@@ -239,7 +239,7 @@
kfreebsd_entry "${OS}" "${version}" recovery "-s"
fi

- list=`echo $list | tr ' ' '\n' | fgrep -vx "$kfreebsd" | tr '\n' ' '`
+ list=`echo $list | tr ' ' '\n' | grep -Fvx "$kfreebsd" | tr '\n' ' '`
done

# If at least one kernel was found, then we need to
diff -urN grub-2.06.orig/util/grub.d/10_linux.in grub-2.06/util/grub.d/10_linux.in
--- grub-2.06.orig/util/grub.d/10_linux.in 2020-12-22 17:24:17.000000000 -0600
+++ grub-2.06/util/grub.d/10_linux.in 2023-01-20 20:19:01.471557011 -0600
@@ -213,6 +213,7 @@
initrd_real=
for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
"initrd-${version}" "initramfs-${version}.img" \
+ "initramfs-${version}.gz" \
diff -urN grub-2.12.orig/util/grub.d/10_linux.in grub-2.12/util/grub.d/10_linux.in
--- grub-2.12.orig/util/grub.d/10_linux.in 2022-12-07 13:47:11.000000000 +0000
+++ grub-2.12/util/grub.d/10_linux.in 2023-12-21 19:21:16.004258494 +0000
@@ -226,7 +226,8 @@
for i in "initrd.img-${version}" "initrd-${version}.img" \
"initrd-${alt_version}.img.old" "initrd-${version}.gz" \
"initrd-${alt_version}.gz.old" "initrd-${version}" \
- "initramfs-${version}.img" "initramfs-${alt_version}.img.old" \
+ "initramfs-${version}.img" "initramfs-${version}.gz" \
+ "initramfs-${alt_version}.img.old" \
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
"initramfs-genkernel-${version}" \
@@ -290,7 +291,7 @@
"single ${GRUB_CMDLINE_LINUX}"
fi

- list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
+ list=`echo $list | tr ' ' '\n' | grep -Fvx "$linux" | tr '\n' ' '`
done

# If at least one kernel was found, then we need to
diff -urN grub-2.06.orig/util/grub.d/20_linux_xen.in grub-2.06/util/grub.d/20_linux_xen.in
--- grub-2.06.orig/util/grub.d/20_linux_xen.in 2020-12-22 17:24:17.000000000 -0600
+++ grub-2.06/util/grub.d/20_linux_xen.in 2023-01-20 20:19:11.451809007 -0600
@@ -346,12 +346,12 @@
"single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
fi

- list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
+ list=`echo $list | tr ' ' '\n' | grep -Fvx "$linux" | tr '\n' ' '`
done
if [ x"$is_top_level" != xtrue ]; then
echo ' }'
fi
- xen_list=`echo $xen_list | tr ' ' '\n' | fgrep -vx "$current_xen" | tr '\n' ' '`
+ xen_list=`echo $xen_list | tr ' ' '\n' | grep -Fvx "$current_xen" | tr '\n' ' '`
done

# If at least one kernel was found, then we need to

0 comments on commit 381c4c1

Please sign in to comment.