# HG changeset patch # User Pascal Bellard # Date 1624023955 0 # Node ID 2b9019bb1593e37459b8754845abe1e13ed5ae93 # Parent 668f2e7befb0fcd75ebeef9b43c9b8afba230f7f tazlito: hexdump -R may not by supported in busybox diff -r 668f2e7befb0 -r 2b9019bb1593 tazlito --- a/tazlito Wed Nov 18 09:07:41 2020 +0000 +++ b/tazlito Fri Jun 18 13:45:55 2021 +0000 @@ -173,6 +173,11 @@ } +hexdump_R() { + sed '/ /!d;s/ |.*//;s| *$||;s| *|\\\\x|g;s|^[^\\]*|busybox echo -en |' | sh +} + + # Download a file from this mirror download_from() { @@ -455,7 +460,7 @@ printf "0 %02X %02X %02X %02X |\n",c[i+1]%256,(c[i+1]/256)%256,(c[i+1]/65536)%256,(c[i+1]/16777216)%256 } } -}' | hexdump -R | dd of="$1" seek=$((4*$efiblock+$fatsz+$resv)) \ +}' | hexdump_R | dd of="$1" seek=$((4*$efiblock+$fatsz+$resv)) \ conv=notrunc bs=512 > /dev/null 2>&1 dd if="$1" of="$1" conv=notrunc bs=512 skip=$((4*$efiblock+$fatsz+$resv)) \ count=$fatsz seek=$((4*$efiblock+$resv)) > /dev/null 2>&1 @@ -555,7 +560,7 @@ # Create boot sector doslabel="$(echo "SLITAZ BOOT " | od -v -N 11 -t x1 -w1 -An)" if [ "$ftype" = "33 32" ]; then - hexdump -R < /dev/null # Create fats - echo "0 $fhead |" | hexdump -R | dd of=$basedir/$efi_img \ + echo "0 $fhead |" | hexdump_R | dd of=$basedir/$efi_img \ seek=$(($rsect)) bs=512 conv=notrunc 2> /dev/null - echo "0 $fhead |" | hexdump -R | dd of=$basedir/$efi_img \ + echo "0 $fhead |" | hexdump_R | dd of=$basedir/$efi_img \ seek=$(($rsect+$fsect)) bs=512 conv=notrunc 2> /dev/null # Add label - echo "0 $doslabel 08 |" | hexdump -R | \ + echo "0 $doslabel 08 |" | hexdump_R | \ dd of=$basedir/$efi_img bs=512 conv=notrunc \ seek=$(($rsect+$fsect+$fsect)) 2> /dev/null @@ -654,7 +659,7 @@ $PWD/$efi_img $PWD/boot/bzImage* $PWD/efi/boot/linux.cmdline* -$PWD/boot/rootfs* +$(ls $PWD/boot/rootfs* | tac) EOT action 'Computing md5...' @@ -1351,9 +1356,9 @@ else [ ! -f /usr/sbin/mksquashfs ] && ! install_package squashfs && return 1 for v in $version ; do - while [ ! -f /lib/modules/$v/kernel/fs/squashfs/squashfs.ko.?z ]; do + if [ ! -f /lib/modules/$v/kernel/fs/squashfs/squashfs.ko.?z ]; then install_package linux-squashfs $v || return 1 - done + fi done for v in $version ; do cp /lib/modules/$v/kernel/fs/squashfs/squashfs.ko.?z \