# HG changeset patch # User Pascal Bellard # Date 1667319192 0 # Node ID 2155b2665e2648ca242c82744ea0d68a57ff484c # Parent 4d54d397986224e1fee1c02bd2906bada1111135 BootProg/fat32: active fat support diff -r 4d54d3979862 -r 2155b2665e26 BootProg/receipt --- a/BootProg/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/BootProg/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -14,11 +14,16 @@ compile_rules() { mkdir -p $src && cd $src - sed '1,/^exit/!d' $stuff/bootprog.sh > bootprog - for i in boot16 boot32 bootex ; do + bs="boot16 bootex boot32" + for i in $bs ; do cp $stuff/$i.asm . - nasm $i.asm -f bin -o $i.bin -l $i.lst && cat $i.bin - done | xz -z --format=lzma --lzma1=lc=0,pb=0,nice=102,dict=4k >> bootprog + nasm $i.asm -f bin -o $i.bin -l $i.lst || return 1 + done + sed '1,2!d' $stuff/bootprog.sh > bootprog + { + sed "1,2d;s|FAT32SZ|$(stat -c %s boot32.bin)|" $stuff/bootprog.sh + cat ${bs// /.bin }.bin + } | xz -z --format=lzma --lzma1=lc=0,pb=0,nice=33,dict=4k >> bootprog chmod +x bootprog } diff -r 4d54d3979862 -r 2155b2665e26 BootProg/stuff/boot32.asm --- a/BootProg/stuff/boot32.asm Mon Oct 17 07:58:57 2022 +0100 +++ b/BootProg/stuff/boot32.asm Tue Nov 01 16:13:12 2022 +0000 @@ -79,16 +79,18 @@ %define bx(label) bx+label-boot %define si(label) si+label-boot +ExtraBootSector equ 1 ClusterMask equ 1 ; +9 bytes NullEntryCheck equ 1 ; +5 bytes +CheckAttrib equ 1 ; +6 bytes +NonMirroredFATs equ 1 ; +18 bytes ReadRetry equ 1 ; +7 bytes LBA48bits equ 1 ; +15 bytes -CHSsupport equ 1 ; +27 bytes -CHSupTo8GB equ 1 ; +11 bytes -CHSupTo32MB equ 1 ; +7 bytes -SectorOf512Bytes equ 1 ; -5 bytes +CHSsupport equ 1 ; +27 bytes max 16MB, 32MB or 8GB +CHSupTo32MB equ 1 ; +6 bytes +CHSupTo8GB equ 1 ; +14 bytes +SectorOf512Bytes equ 0 ; -5 bytes Always2FATs equ 0 ; -4 bytes -CheckAttrib equ 0 ; +6 bytes [BITS 16] @@ -173,8 +175,10 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; mov es, ax ; cs:0 = ds:0 = ss:0 -> top - 512 - StackSize +%if ExtraBootSector == 0 mov ss, ax mov sp, 512+StackSize ; bytes 0-511 are reserved for the boot code +%endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Copy ourselves to top of memory ;; @@ -192,13 +196,25 @@ ;;;;;;;;;;;;;;;;;;;;;; push byte main + push es + pop ds retf main: - push cs - pop ds - xor ebx, ebx +%if ExtraBootSector != 0 + add al, 32 + mov es, ax + mov eax, [bx(bpbHiddenSectors)] + inc eax + %if LBA48bits != 0 + mov [bx(HiLBA)], bx + %endif + call ReadSectorBoot + push ds + pop ss + mov sp, 512+StackSize ; bytes 0-511 are reserved for the boot code +%endif %if ClusterMask != 0 and byte [bx(bsRootDirectoryClusterNo+3)], 0Fh ; mask cluster value @@ -305,7 +321,12 @@ mov ss, bp xor sp, sp push bp ; cs, ds and es +%if ExtraBootSector != 0 + jmp Run +%macro BootFileName 0 +%else jmp short Run +%endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Relocate, setup and run a .EXE program ;; @@ -356,6 +377,9 @@ ;; All done, transfer control to the program now ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; retf +%if ExtraBootSector != 0 +%endm +%endif ;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Error Messaging Code ;; @@ -413,8 +437,19 @@ div esi ; eax=FAT sector #, edx=entry # in sector imul si, dx, byte 4 ; si=entry # in sector, clear C -%if LBA48bits != 0 +%if NonMirroredFATs != 0 + cwde + or dl, byte [bx(bsExtendedFlags)] + jns MirroredFATs ; Non-mirrored FATs ? + and dl, 0Fh + imul edx, dword [bx(bsSectorsPerFAT32)] ; we need to read the active one + add eax, edx +MirroredFATs: + cwde +%else + %if LBA48bits != 0 xor dx, dx + %endif %endif call ReadSectorLBAfromFAT ; read 1 FAT32 sector @@ -464,6 +499,7 @@ %if LBA48bits != 0 adc word [bx(HiLBA)], bx %endif +ReadSectorBoot: mov dx, [bx(DriveNumber)] ; restore BIOS boot drive number pusha @@ -572,3 +608,10 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;; dw 0AA55h ; BIOS checks for this ID + +%if ExtraBootSector != 0 + dd 61415252h ; "RRaA" + BootFileName + times (996-($-$$)) db 0 +; dd 41617272h ; "rrAa" +%endif diff -r 4d54d3979862 -r 2155b2665e26 BootProg/stuff/bootprog.sh --- a/BootProg/stuff/bootprog.sh Mon Oct 17 07:58:57 2022 +0100 +++ b/BootProg/stuff/bootprog.sh Tue Nov 01 16:13:12 2022 +0000 @@ -1,33 +1,33 @@ #!/bin/sh - -set -- "$1" "${2:-startup.bin}" +p=/tmp/bp$$;sed '1,2d' $0|unlzma>$p;sh $p $0 "$@";s=$?;rm $p;exit $s +set -- "$2" "${3:-startup.bin}" $1 [ ! -e "$1" ] && cat<] $0 device [file] -Example: $0 /dev/fd0 $2 +Usage: [FS=] $3 device [file] +Example: $3 /dev/fd0 $1 S r="dd if=$1 count" w="dd of=$1 bs=1 conv=notrunc seek" -while read c o b f +while read c o b s f do [ "${FS:-$($r=5 bs=1 skip=$c)}" = "$f" ] || continue echo "Install $f bootsector on $1." - for a in "$o skip=$((o+b)) count=$((512-o))" "0 skip=$b count=11" - do sed '1,/^exit/d' $0 | unlzma | $w=$a; done + for a in "$o skip=$((o+b)) count=$((s-o))" "0 skip=$b count=11" + do sed '1,/^exit/d' $0 | $w=$a; done echo -n $f | $w=$c echo "Set boot file $2" && echo -n "$2" | case "$f" in E*) sed 's| |.|;s| ||g' | cat - /dev/zero;; *) tr a-z A-Z | sed 's|\.| |;s|^\(.\{8\}\) *|\1|;s|$| |' esac | $w=499 count=11 case "$f" in - *32) $w=1536 if=$1 count=512;; + *32) $w=$(($(od -An -j50 -N2 -d $1)<<9)) if=$1 count=$s;; E*) $r=11 bs=1b | od -vAn -tu1 -w1 - | LANG=C awk 'BEGIN { a=0;i=-1;m=0xFFFFFFFE } { if (++i!=106 && i!=107 && i!=112) a=or(and(lshift(a,31),m),and(rshift(a,1),m/2))+$1 } END { b=a/256;c=b/256; for (;i>0;i-=44) printf "%c%c%c%c",a%256,b%256,c%256,(c/256)%256 }' | $w=5632 esac exit 0 done</dev/null -54 59 0 FAT12 -54 59 0 FAT16 -82 87 512 FAT32 -3 113 1024 EXFAT +54 59 0 512 FAT12 +54 59 0 512 FAT16 +3 113 512 512 EXFAT +82 87 1024 FAT32SZ FAT32 S exit 1 diff -r 4d54d3979862 -r 2155b2665e26 cups-filters-dev/receipt --- a/cups-filters-dev/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/cups-filters-dev/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -7,7 +7,7 @@ MAINTAINER="mojo@slitaz.org" LICENSE="GPL" WANTED="cups-filters" -WEB_SITE="http://www.linuxfoundation.org/collaborate/workgroups/openprinting" +WEB_SITE="https://wiki.linuxfoundation.org/openprinting/cups-filters" DEPENDS="cups-filters pkg-config" diff -r 4d54d3979862 -r 2155b2665e26 cups-filters/receipt --- a/cups-filters/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/cups-filters/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -6,7 +6,7 @@ SHORT_DESC="OpenPrinting CUPS Filters" MAINTAINER="mojo@slitaz.org" LICENSE="GPL" -WEB_SITE="http://www.linuxfoundation.org/collaborate/workgroups/openprinting" +WEB_SITE="https://wiki.linuxfoundation.org/openprinting/cups-filters" TARBALL="$PACKAGE-$VERSION.tar.xz" WGET_URL="https://www.openprinting.org/download/cups-filters/$TARBALL" diff -r 4d54d3979862 -r 2155b2665e26 gnustep-back/receipt --- a/gnustep-back/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/gnustep-back/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -9,7 +9,7 @@ WEB_SITE="http://www.gnustep.org/" TARBALL="$PACKAGE-$VERSION.tar.gz" -WGET_URL="http://ftp.gnustep.org/pub/gnustep/core/$TARBALL" +WGET_URL="https://web.archive.org/web/20210518140736/http://ftp.gnustep.org/pub/gnustep/core/$TARBALL" DEPENDS="audiofile aspell cairo freetype giflib gnustep-base gnustep-gui gnutls icu libart_lgpl libbfd libtasn1 util-linux-uuid xorg-libXmu" diff -r 4d54d3979862 -r 2155b2665e26 gnustep-make/receipt --- a/gnustep-make/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/gnustep-make/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -9,7 +9,8 @@ WEB_SITE="http://www.gnustep.org/" TARBALL="$PACKAGE-$VERSION.tar.gz" -WGET_URL="http://ftp.gnustep.org/pub/gnustep/core/$TARBALL" +#WGET_URL="http://ftp.gnustep.org/pub/gnustep/core/$TARBALL" +WGET_URL="https://kacabenggala.uny.ac.id/gentoo/distfiles/40/$TARBALL" DEPENDS="" diff -r 4d54d3979862 -r 2155b2665e26 gxine/receipt --- a/gxine/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/gxine/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -7,7 +7,7 @@ MAINTAINER="jozee@slitaz.org" LICENSE="GPL2" TARBALL="$PACKAGE-$VERSION.tar.bz2" -WEB_SITE="https://www.xine-project.org/" +WEB_SITE="https://xine-project.org/" WGET_URL="https://sourceforge.net/projects/xine/files/$PACKAGE/$VERSION/$TARBALL" DEPENDS="xine-lib libvorbis gtk+ spidermonkey dbus" diff -r 4d54d3979862 -r 2155b2665e26 opencore-amr-dev/receipt --- a/opencore-amr-dev/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/opencore-amr-dev/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -6,7 +6,7 @@ SHORT_DESC="Adaptive Multi Rate (AMR) speech codec - development files." MAINTAINER="domcox@slitaz.org" LICENSE="Apache" -WEB_SITE="https://opencore-amr.sourceforge.io/" +WEB_SITE="https://sourceforge.net/projects/opencore-amr/" DEPENDS="pkg-config" WANTED="opencore-amr" diff -r 4d54d3979862 -r 2155b2665e26 opencore-amr/receipt --- a/opencore-amr/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/opencore-amr/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -6,7 +6,7 @@ SHORT_DESC="Adaptive Multi Rate (AMR) speech codec." MAINTAINER="domcox@slitaz.org" LICENSE="Apache" -WEB_SITE="https://opencore-amr.sourceforge.io/" +WEB_SITE="https://sourceforge.net/projects/opencore-amr/" TARBALL="$PACKAGE-$VERSION.tar.gz" WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" diff -r 4d54d3979862 -r 2155b2665e26 ortp-dev/receipt --- a/ortp-dev/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/ortp-dev/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -6,7 +6,7 @@ SHORT_DESC="Library implementing the Real-time Transport Protocol (RFC3550), development files." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="LGPL2.1" -WEB_SITE="http://freecode.com/projects/ortp" +WEB_SITE="https://linphone.org/" WANTED="ortp" DEPENDS="ortp pkg-config" diff -r 4d54d3979862 -r 2155b2665e26 ortp/receipt --- a/ortp/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/ortp/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -7,7 +7,7 @@ MAINTAINER="pascal.bellard@slitaz.org" LICENSE="LGPL2.1" TARBALL="$PACKAGE-$VERSION.tar.gz" -WEB_SITE="http://freecode.com/projects/ortp" +WEB_SITE="https://linphone.org/" WGET_URL="http://download-mirror.savannah.gnu.org/releases/linphone/$PACKAGE/sources/$TARBALL" # What is the latest version available today? diff -r 4d54d3979862 -r 2155b2665e26 secure-delete/receipt --- a/secure-delete/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/secure-delete/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -8,7 +8,7 @@ LICENSE="MIT" SOURCE="secure_delete" TARBALL="$SOURCE-$VERSION.tar.gz" -WEB_SITE="http://www.thc.org/" +WEB_SITE="https://www.thc.org/" WGET_URL="http://deb.debian.org/debian/pool/main/s/$PACKAGE/${PACKAGE}_$VERSION.orig.tar.gz" DEPENDS="glibc-base" diff -r 4d54d3979862 -r 2155b2665e26 xine-ui/receipt --- a/xine-ui/receipt Mon Oct 17 07:58:57 2022 +0100 +++ b/xine-ui/receipt Tue Nov 01 16:13:12 2022 +0000 @@ -7,7 +7,7 @@ MAINTAINER="pankso@slitaz.org" LICENSE="GPL2" TARBALL="$PACKAGE-$VERSION.tar.xz" -WEB_SITE="https://www.xine-project.org/" +WEB_SITE="https://xine-project.org/" WGET_URL="$SF_MIRROR/project/xine/xine-ui/$VERSION/$TARBALL" # Keep Xine small for Live system, we have MPlaye or VLC has big video player.