wok-current rev 25696

Update tazlito to use grub2-efi-x64 for EFI boot
author Stanislas Leduc <shann@slitaz.org>
date Thu Apr 04 12:30:52 2024 +0000 (4 weeks ago)
parents db14014acdba
children bf7fc7b1447c
files grub2-efi-x64/stuff/grub-live.cfg tazlito/receipt tazlito/stuff/support-efi.patch
line diff
     1.1 --- a/grub2-efi-x64/stuff/grub-live.cfg	Thu Apr 04 08:53:51 2024 +0000
     1.2 +++ b/grub2-efi-x64/stuff/grub-live.cfg	Thu Apr 04 12:30:52 2024 +0000
     1.3 @@ -1,7 +1,7 @@
     1.4  set timeout=5
     1.5  set delay=5
     1.6  
     1.7 -menuentry "SliTaz" {
     1.8 +menuentry "SliTaz Live [EFI]" {
     1.9  	echo 'Loading Linux ...'
    1.10  	linux /EFI/BOOT/vmlinuz rw root=/dev/null video=-32 autologin
    1.11  	echo 'Loading initrd ...'
     2.1 --- a/tazlito/receipt	Thu Apr 04 08:53:51 2024 +0000
     2.2 +++ b/tazlito/receipt	Thu Apr 04 12:30:52 2024 +0000
     2.3 @@ -33,6 +33,9 @@
     2.4  	# Fix mount iso image bug
     2.5  	patch -p1 < $stuff/fix-mountiso.patch
     2.6  
     2.7 +	# Patch for support efi livecd
     2.8 +	patch -p1 < $stuff/support-efi.patch
     2.9 +
    2.10  	sed -i "s/^VERSION=.*/VERSION=$VERSION/" tazlito
    2.11  	make DESTDIR=$DESTDIR VERSION=$VERSION install
    2.12  }
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tazlito/stuff/support-efi.patch	Thu Apr 04 12:30:52 2024 +0000
     3.3 @@ -0,0 +1,39 @@
     3.4 +---a/tazlito
     3.5 ++++ b/tazlito
     3.6 +@@ -509,21 +509,18 @@
     3.7 + 		if [ ! -s $basedir/EFI/boot/$efifile ] &&
     3.8 + 		   [ $(get $((0x82)) "$1") = $((0x4550)) ]; then
     3.9 + 			mkdir -p $basedir/EFI/boot 2> /dev/null
    3.10 +-			ln "$1" "$basedir/EFI/boot/$efifile"
    3.11 ++			ln "$1" "$basedir/EFI/boot/vmlinuz"
    3.12 ++			## Add grub bootloader stuff
    3.13 ++			for i in "source/grub2-efi-x64-2.04/bootx64-live.efi,$efifile" "stuff/grub-live.cfg,grub.cfg"; do
    3.14 ++				ln "/home/slitaz/wok/grub2-efi-x64/${i%,*}" "$basedir/EFI/boot/${i#*,}" &&
    3.15 ++					stat -c "%s %n" "/home/slitaz/wok/grub2-efi-x64/${i%,*}"
    3.16 ++			done 2> /dev/null	
    3.17 + 			stat -c "%s %n" "$1"
    3.18 + 			for i in $basedir/boot/rootfs* ; do
    3.19 + 				ln "$i" $basedir/EFI/boot/ &&
    3.20 + 				stat -c "%s %n" "$i"
    3.21 + 			done 2> /dev/null
    3.22 +-			if [ ! -s $basedir/EFI/boot/linux.cmdline ]; then
    3.23 +-				sed 's|/|\\|g' > $basedir/EFI/boot/linux.cmdline <<EOT
    3.24 +-rw root=0x100$(sed '/bzImage/!d;s|.*root=[^ ]*||;q' $basedir/boot/isolinux/isolinux.cfg)\
    3.25 +-$( ( cd $basedir/EFI/boot ; ls -r rootfs*gz ) | while read f ; do \
    3.26 +-echo -n " initrd=/EFI/boot/$f";done)
    3.27 +-EOT
    3.28 +-				stat -c "%s %n" $basedir/EFI/boot/linux.cmdline
    3.29 + 			fi
    3.30 +-		fi
    3.31 + 		shift
    3.32 + 	done; } | sort | uniq | awk '{ n+=int(($1+2047)/2048) } END { print n }')
    3.33 + 	[ ${fclust:-0} -eq 0 ] && return
    3.34 +@@ -666,7 +663,7 @@
    3.35 + 	deduplicate
    3.36 + 	sed -i "s|20[1-9][0-9]|$(date +%Y)|" $2/README $2/index.html
    3.37 + 
    3.38 +-	[ $(ls $2/boot/grub* 2> /dev/null | wc -l) -lt 2 ] && rm -rf $2/boot/grub*
    3.39 ++#	[ $(ls $2/boot/grub* 2> /dev/null | wc -l) -lt 2 ] && rm -rf $2/boot/grub*
    3.40 + 	make_bzImage_hardlink $2/boot
    3.41 + 	alloc_uefi_part $(ls -r $2/boot/vmlinuz*slitaz*)
    3.42 +