wok rev 24525
Up libav (0.6.6 -> 12.3)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Feb 22 16:15:28 2022 +0000 (2022-02-22) |
parents | 42a93682ac45 |
children | 83d03a36ee6b |
files | BootProg/receipt BootProg/stuff/boot32.asm BootProg/stuff/bootex.asm chromaprint/receipt elspci/receipt libav-dev/receipt libav/receipt peazip/receipt |
line diff
1.1 --- a/BootProg/receipt Tue Feb 22 17:08:18 2022 +0100 1.2 +++ b/BootProg/receipt Tue Feb 22 16:15:28 2022 +0000 1.3 @@ -18,7 +18,7 @@ 1.4 mkdir -p $src && cd $src 1.5 for i in bootex boot16 boot32 ; do 1.6 cp $stuff/$i.asm . 1.7 - nasm $i.asm -f bin -o $i.bin -l $i.lst -O0 1.8 + nasm $i.asm -f bin -o $i.bin -l $i.lst 1.9 done 1.10 sed '1,/^exit 1/!d' $stuff/bootprog.sh > bootprog 1.11 tar czf - boot16.bin boot32.bin bootex.bin > set.tar.gz
2.1 --- a/BootProg/stuff/boot32.asm Tue Feb 22 17:08:18 2022 +0100 2.2 +++ b/BootProg/stuff/boot32.asm Tue Feb 22 16:15:28 2022 +0000 2.3 @@ -11,12 +11,12 @@ 2.4 ;; ;; 2.5 ;; Features: ;; 2.6 ;; ~~~~~~~~~ ;; 2.7 -;; - FAT32 supported using BIOS int 13h function 42h (IOW, it will only ;; 2.8 -;; work with modern BIOSes supporting HDDs bigger than 8 GB) ;; 2.9 +;; - FAT32 supported using BIOS int 13h function 42h or 02h. ;; 2.10 ;; ;; 2.11 ;; - Loads a 16-bit executable file in the MS-DOS .COM or .EXE format ;; 2.12 ;; from the root directory of a disk and transfers control to it ;; 2.13 ;; (the "ProgramName" variable holds the name of the file to be loaded) ;; 2.14 +;; Its maximum size can be up to 636KB without Extended BIOS Data area. ;; 2.15 ;; ;; 2.16 ;; - Prints an error if the file isn't found or couldn't be read ;; 2.17 ;; ("File not found" or "Read error") ;; 2.18 @@ -48,10 +48,10 @@ 2.19 ;; | Loaded Image | ;; 2.20 ;; +------------------------+ nnnnnH ;; 2.21 ;; | Available Memory | ;; 2.22 -;; +------------------------+ A0000H - 512 - 2KB ;; 2.23 -;; | 2KB Boot Stack | ;; 2.24 -;; +------------------------+ A0000H - 512 ;; 2.25 +;; +------------------------+ A0000H - 2KB ;; 2.26 ;; | Boot Sector | ;; 2.27 +;; +------------------------+ A0000H - 1.5KB ;; 2.28 +;; | 1.5KB Boot Stack | ;; 2.29 ;; +------------------------+ A0000H ;; 2.30 ;; | Video RAM | ;; 2.31 ;; ;; 2.32 @@ -80,6 +80,7 @@ 2.33 [BITS 16] 2.34 2.35 ImageLoadSeg equ 60h ; <=07Fh because of "push byte ImageLoadSeg" instructions 2.36 +StackSize equ 1536 2.37 2.38 [SECTION .text] 2.39 [ORG 0] 2.40 @@ -149,24 +150,23 @@ 2.41 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.42 2.43 int 12h ; get conventional memory size (in KBs) 2.44 - shl ax, 6 ; and convert it to 16-byte paragraphs 2.45 + dec ax 2.46 + dec ax ; reserve 2K bytes for the code and the stack 2.47 + mov cx, 106h 2.48 + shl ax, cl ; and convert it to 16-byte paragraphs 2.49 2.50 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.51 ;; Reserve memory for the boot sector and its stack ;; 2.52 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.53 2.54 - sub ax, 512 / 16 ; reserve 512 bytes for the boot sector code 2.55 - mov es, ax ; es:0 -> top - 512 2.56 - 2.57 - sub ax, 2048 / 16 ; reserve 2048 bytes for the stack 2.58 - mov ss, ax ; ss:0 -> top - 512 - 2048 2.59 - mov sp, 2048 ; 2048 bytes for the stack 2.60 + mov es, ax ; cs:0 = ds:0 = ss:0 -> top - 512 - StackSize 2.61 + mov ss, ax 2.62 + mov sp, 512+StackSize ; bytes 0-511 are reserved for the boot code 2.63 2.64 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.65 ;; Copy ourselves to top of memory ;; 2.66 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.67 2.68 - mov cx, 256 2.69 mov si, 7C00h 2.70 xor di, di 2.71 mov ds, di 2.72 @@ -193,11 +193,7 @@ 2.73 RootDirReadContinue: 2.74 push byte ImageLoadSeg 2.75 pop es 2.76 - push es 2.77 call ReadCluster ; read one cluster of root dir 2.78 - pop es 2.79 - pushad ; save esi=next cluster # of root dir 2.80 - ; save eax=next sector # of root dir 2.81 pushf ; save carry="not last cluster" flag 2.82 2.83 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.84 @@ -205,7 +201,6 @@ 2.85 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.86 2.87 xor di, di ; es:di -> root entries array 2.88 - mov si, ProgramName ; ds:si -> program name 2.89 2.90 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.91 ;; Looks for a file/dir by its name ;; 2.92 @@ -213,38 +208,37 @@ 2.93 ;; Input: DS:SI -> file name (11 chars) ;; 2.94 ;; ES:DI -> root directory array ;; 2.95 ;; DX = number of root entries ;; 2.96 +;; BP = paragraphs in sector ;; 2.97 ;; Output: ESI = cluster number ;; 2.98 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.99 2.100 FindName: 2.101 - mov cx, 11 2.102 FindNameCycle: 2.103 - cmp byte [es:di], ch 2.104 + cmp byte [es:di], bh 2.105 je ErrFind ; end of root directory (NULL entry found) 2.106 FindNameNotEnd: 2.107 pusha 2.108 + mov cl, 11 2.109 + mov si, ProgramName ; ds:si -> program name 2.110 repe cmpsb 2.111 + je FindNameFound 2.112 popa 2.113 - je FindNameFound 2.114 - add di, 32 2.115 + add di, byte 32 2.116 dec bp 2.117 dec bp 2.118 jnz FindNameCycle ; next root entry 2.119 popf ; restore carry="not last cluster" flag 2.120 - ; restore eax=next sector # of root dir 2.121 - popad ; restore esi=next cluster # of root dir 2.122 jc RootDirReadContinue ; continue to the next root dir cluster 2.123 ErrFind: 2.124 call Error ; end of root directory (dir end reached) 2.125 db "File not found." 2.126 FindNameFound: 2.127 - push word [es:di+14h] 2.128 - push word [es:di+1Ah] 2.129 + push word [es:di+14h-11] 2.130 + push word [es:di+1Ah-11] 2.131 pop esi ; esi = cluster no. cx = 0 2.132 2.133 - dec dword [es:di+1Ch] ; load ((n - 1)/256)*16 +1 paragraphs 2.134 - imul di, [es:di+1Ch+1], 16 ; file size in paragraphs (full pages) 2.135 - xor cx, cx 2.136 + dec dword [es:di+1Ch-11] ; load ((n - 1)/256)*16 +1 paragraphs 2.137 + imul di, [es:di+1Ch+1-11], byte 16 ; file size in paragraphs (full pages) 2.138 2.139 ;;;;;;;;;;;;;;;;;;;;;;;;;; 2.140 ;; Load the entire file ;; 2.141 @@ -298,7 +292,8 @@ 2.142 add [di+2], bp ; item seg (abs) 2.143 les si, [di] ; si = item ofs, es = item seg 2.144 add [es:si], bp ; fixup 2.145 - add di, 4 ; point to next entry 2.146 + scasw ; di += 2 2.147 + scasw ; point to next entry 2.148 2.149 RelocateEXE: 2.150 dec ax ; 32768 max (128KB table) 2.151 @@ -334,52 +329,48 @@ 2.152 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.153 retf 2.154 2.155 +ReadCluster: 2.156 + mov bp, [bx(bpbBytesPerSector)] 2.157 + shr bp, 4 ; bp = paragraphs per sector 2.158 + inc cx 2.159 + loop ReadSectorLBA 2.160 + 2.161 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.162 ;; Reads a FAT32 cluster ;; 2.163 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.164 ;; Inout: ES:BX -> buffer ;; 2.165 ;; ESI = cluster no ;; 2.166 ;; Output: ESI = next cluster ;; 2.167 -;; ES:BX -> next addr ;; 2.168 +;; BP -> para / sector ;; 2.169 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.170 2.171 -ReadCluster: 2.172 - inc cx 2.173 - loop ReadSectorLBA 2.174 - 2.175 - mov ax, [bpbBytesPerSector] 2.176 - push ax 2.177 - shr ax, 2 ; ax=# of FAT32 entries per sector 2.178 + imul ax, bp, byte 2 ; ax=# of FAT32 entries per sector 2.179 cwde 2.180 - lea ebp, [esi-2] ; esi=cluster # 2.181 + lea edi, [esi-2] ; esi=cluster # 2.182 xchg eax, esi 2.183 cdq 2.184 div esi ; eax=FAT sector #, edx=entry # in sector 2.185 2.186 - imul si, dx, 4 ; si=entry # in sector 2.187 + imul si, dx, byte 4 ; si=entry # in sector, clear C 2.188 mov word [bx(HiLBA)], bx 2.189 call ReadSectorLBAabsolute ; read 1 FAT32 sector 2.190 2.191 and byte [es:si+3], 0Fh ; mask cluster value 2.192 mov esi, [es:si] ; esi=next cluster # 2.193 2.194 - xchg eax, ebp 2.195 + movzx eax, byte [bx(bpbNumberOfFATs)] 2.196 + mul dword [bx(bsSectorsPerFAT32)] 2.197 + mov word [bx(HiLBA)], dx 2.198 + 2.199 + xchg eax, edi 2.200 movzx ecx, byte [bx(bpbSectorsPerCluster)] 2.201 mul ecx ; edx:eax=sector number in data area 2.202 - xchg eax, ebp 2.203 - mov word [bx(HiLBA)], dx 2.204 2.205 - movzx eax, byte [bx(bpbNumberOfFATs)] 2.206 - mul dword [bx(bsSectorsPerFAT32)] 2.207 - 2.208 - add eax, ebp 2.209 + add eax, edi 2.210 adc word [bx(HiLBA)], dx 2.211 2.212 - pop bp ; [bpbBytesPerSector] 2.213 - shr bp, 4 ; bp = paragraphs per sector 2.214 - 2.215 ReadSectorLBAabsolute: 2.216 - movzx edx, word [bx(bpbReservedSectors)] 2.217 + mov dx, word [bx(bpbReservedSectors)] 2.218 add eax, edx 2.219 adc word [bx(HiLBA)], bx 2.220 add eax, [bx(bpbHiddenSectors)] 2.221 @@ -395,7 +386,6 @@ 2.222 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.223 2.224 ReadSectorLBA: 2.225 - mov dx, [bx(bsDriveNumber)] ; restore BIOS boot drive number 2.226 pusha 2.227 2.228 push bx 2.229 @@ -404,23 +394,50 @@ 2.230 push es 2.231 push bx 2.232 push byte 1 ; sector count word = 1 2.233 - mov cx, 16 ; retry count 2.234 - push cx ; packet size byte = 16, reserved byte = 0 2.235 + push byte 16 ; packet size byte = 16, reserved byte = 0 2.236 + push eax 2.237 + pop cx ; low LBA 2.238 + pop ax ; high LBA 2.239 + cwd ; clear dx (CHS disk <2TB) 2.240 + div word [bx(bpbSectorsPerTrack)] ; up to 8GB CHS disks 2.241 2.242 -ReadSectorRetry: 2.243 + xchg ax, cx ; restore low LBA, save high LBA / SPT 2.244 + div word [bx(bpbSectorsPerTrack)] 2.245 + ; ax = LBA / SPT 2.246 + ; dx = LBA % SPT = sector - 1 2.247 + inc dx 2.248 + 2.249 + xchg cx, dx ; restore high LBA / SPT, save sector no. 2.250 + div word [bx(bpbHeadsPerCylinder)] 2.251 + ; ax = (LBA / SPT) / HPC = cylinder 2.252 + ; dx = (LBA / SPT) % HPC = head 2.253 + shl ah, 6 2.254 + mov ch, al 2.255 + ; ch = LSB 0...7 of cylinder no. 2.256 + or cl, ah 2.257 + ; cl = MSB 8...9 of cylinder no. + sector no. 2.258 + mov dh, dl 2.259 + ; dh = head no. 2.260 + 2.261 +ReadSectorLBARetry: 2.262 + mov dl, [bx(bsDriveNumber)] ; restore BIOS boot drive number 2.263 + mov si, sp 2.264 mov ah, 42h ; ah = 42h = extended read function no. 2.265 - mov si, sp 2.266 - push ss 2.267 - pop ds 2.268 int 13h ; extended read sectors (DL, DS:SI) 2.269 - push cs 2.270 - pop ds 2.271 jnc ReadSuccess ; CF = 0 if no error 2.272 2.273 - xor ax, ax ; ah = 0 = reset function 2.274 +ReadSectorCHSRetry: 2.275 + mov ax, 201h ; al = sector count = 1 2.276 + ; ah = 2 = read function no. 2.277 + int 13h ; read sectors (AL, CX, DX, ES:BX) 2.278 + jnc ReadSuccess ; CF = 0 if no error 2.279 + 2.280 + cbw ; ah = 0 = reset function 2.281 int 13h ; reset drive (DL) 2.282 2.283 - loop ReadSectorRetry ; extra attempt 2.284 + dec bp 2.285 + jnz ReadSectorLBARetry 2.286 + 2.287 call Error 2.288 db "Read error." 2.289 2.290 @@ -439,6 +456,7 @@ 2.291 cmp esi, 0FFFFFF8h ; carry=0 if last cluster, and carry=1 otherwise 2.292 2.293 ReadSectorNext: 2.294 + mov dx, [bx(bsDriveNumber)] ; restore BIOS boot drive number 2.295 ret 2.296 2.297 ;;;;;;;;;;;;;;;;;;;;;;;;;; 2.298 @@ -455,8 +473,12 @@ 2.299 cmp al, '.' 2.300 jne puts 2.301 cbw 2.302 - int 16h ; wait for a key... 2.303 - int 19h ; bootstrap 2.304 +; int 16h ; wait for a key... 2.305 +; int 19h ; bootstrap 2.306 + 2.307 +Stop: 2.308 + hlt 2.309 + jmp short Stop 2.310 2.311 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.312 ;; Fill free space with zeroes ;;
3.1 --- a/BootProg/stuff/bootex.asm Tue Feb 22 17:08:18 2022 +0100 3.2 +++ b/BootProg/stuff/bootex.asm Tue Feb 22 16:15:28 2022 +0000 3.3 @@ -269,19 +269,22 @@ 3.4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.5 ;; Setup and run a .COM program ;; 3.6 ;; Set CS=DS=ES=SS SP=0 IP=100h ;; 3.7 +;; AX=0ffffh BX=0 CX=0 DX=drive ;; 3.8 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.9 3.10 + mov ax, 0ffffh ; both FCB in the PSP don't have a valid drive identifier 3.11 + mov di, 100h ; ip 3.12 mov bp, ImageLoadSeg-10h ; "org 100h" stuff :) 3.13 mov ss, bp 3.14 xor sp, sp 3.15 push bp ; cs, ds and es 3.16 - mov bh, 1 ; ip 3.17 jmp short Run 3.18 3.19 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.20 ;; Relocate, setup and run a .EXE program ;; 3.21 ;; Set CS:IP, SS:SP, DS, ES and AX according ;; 3.22 ;; to wiki.osdev.org/MZ#Initial_Program_State ;; 3.23 +;; AX=0ffffh BX=0 CX=0 DX=drive ;; 3.24 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.25 3.26 ReloCycle: 3.27 @@ -304,11 +307,11 @@ 3.28 push si ; containing the PSP structure 3.29 3.30 add bp, [bx+16h] ; cs for EXE 3.31 - mov bx, [bx+14h] ; ip for EXE 3.32 + mov di, [bx+14h] ; ip for EXE 3.33 Run: 3.34 pop ds 3.35 push bp 3.36 - push bx 3.37 + push di 3.38 push ds 3.39 pop es 3.40 3.41 @@ -355,7 +358,7 @@ 3.42 xchg eax, esi 3.43 div esi ; eax=FAT sector #, edx=entry # in sector 3.44 3.45 - imul si, dx, 4 ; si=entry # offset in sector 3.46 + imul si, dx, byte 4 ; si=entry # offset in sector 3.47 3.48 cdq 3.49 add eax, [bx(bpbFatSectorStart)] ; sector # relative to FAT32
4.1 --- a/chromaprint/receipt Tue Feb 22 17:08:18 2022 +0100 4.2 +++ b/chromaprint/receipt Tue Feb 22 16:15:28 2022 +0000 4.3 @@ -23,10 +23,7 @@ 4.4 # Rules to configure and make the package. 4.5 compile_rules() 4.6 { 4.7 - #lavc 55.28.1 (2013-12-11) 4.8 - sed -i -e 's|avcodec_alloc_frame|av_frame_alloc|' \ 4.9 - -e 's|avcodec_free_frame|av_frame_free|' \ 4.10 - src/audio/ffmpeg_audio_reader.h 4.11 + sed 's|AV_ERROR_MAX_STRING_SIZE|64|' -i src/audio/ffmpeg_audio_reader.h 4.12 4.13 export CC=gcc-83 4.14 export CXX=g++-83
5.1 --- a/elspci/receipt Tue Feb 22 17:08:18 2022 +0100 5.2 +++ b/elspci/receipt Tue Feb 22 16:15:28 2022 +0000 5.3 @@ -14,6 +14,13 @@ 5.4 5.5 BUILD_DEPENDS="dietlibc" 5.6 5.7 +# What is the latest version available today? 5.8 +current_version() 5.9 +{ 5.10 + wget -O - ${WGET_URL%/*}/ 2>/dev/null | \ 5.11 + sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-||;s|.tar.*||" | sort -Vr | sed q 5.12 +} 5.13 + 5.14 # Rules to configure and make the package. 5.15 compile_rules() 5.16 {
6.1 --- a/libav-dev/receipt Tue Feb 22 17:08:18 2022 +0100 6.2 +++ b/libav-dev/receipt Tue Feb 22 16:15:28 2022 +0000 6.3 @@ -1,7 +1,7 @@ 6.4 # SliTaz package receipt. 6.5 6.6 PACKAGE="libav-dev" 6.7 -VERSION="0.6.6" 6.8 +VERSION="12.3" 6.9 CATEGORY="development" 6.10 SHORT_DESC="Development files for libav." 6.11 MAINTAINER="al.bobylev@gmail.com"
7.1 --- a/libav/receipt Tue Feb 22 17:08:18 2022 +0100 7.2 +++ b/libav/receipt Tue Feb 22 16:15:28 2022 +0000 7.3 @@ -1,7 +1,7 @@ 7.4 # SliTaz package receipt. 7.5 7.6 PACKAGE="libav" 7.7 -VERSION="0.6.6" 7.8 +VERSION="12.3" 7.9 CATEGORY="multimedia" 7.10 SHORT_DESC="Audio and video conversion library." 7.11 MAINTAINER="al.bobylev@gmail.com" 7.12 @@ -12,7 +12,8 @@ 7.13 #WGET_URL="git|git://github.com/andoma/libav.git" 7.14 #BRANCH="v$VERSION" 7.15 TARBALL="$PACKAGE-$VERSION.tar.gz" 7.16 -WGET_URL="${WEB_SITE}releases/$TARBALL" 7.17 +#WGET_URL="${WEB_SITE}releases/$TARBALL" 7.18 +WGET_URL="https://github.com/libav/libav/archive/refs/tags/v$VERSION.tar.gz" 7.19 7.20 DEPENDS="libsdl xorg-libXfixes zlib" 7.21 BUILD_DEPENDS="binutils bzlib coreutils-file-format faac-dev 7.22 @@ -23,8 +24,8 @@ 7.23 # What is the latest version available today? 7.24 current_version() 7.25 { 7.26 - wget -O - $WEB_SITE 2>/dev/null | \ 7.27 - sed '/Libav/!d;/<h/!d;s|.*Libav ||;s|<.*||;q' 7.28 + wget -O - https://github.com/libav/libav/tags 2>/dev/null | \ 7.29 + sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q' 7.30 } 7.31 7.32 # Rules to configure and make the package. 7.33 @@ -33,16 +34,13 @@ 7.34 ./configure \ 7.35 --prefix=/usr \ 7.36 --enable-avfilter \ 7.37 - --enable-avfilter-lavf \ 7.38 --disable-debug \ 7.39 --disable-doc \ 7.40 --enable-gpl \ 7.41 --enable-nonfree \ 7.42 - --enable-postproc \ 7.43 --enable-pthreads \ 7.44 --enable-runtime-cpudetect \ 7.45 --enable-shared \ 7.46 - --enable-x11grab \ 7.47 --arch=i486 \ 7.48 --cpu=i486 && 7.49 make &&
8.1 --- a/peazip/receipt Tue Feb 22 17:08:18 2022 +0100 8.2 +++ b/peazip/receipt Tue Feb 22 16:15:28 2022 +0000 8.3 @@ -18,10 +18,11 @@ 8.4 DEPENDS="desktop-file-utils xorg-libX11 atk glibc-base cairo gtk+ \ 8.5 gdk-pixbuf glib gmp pango libcurl ncurses upx zpaq xdg-utils" 8.6 8.7 +# What is the latest version available today? 8.8 current_version() 8.9 { 8.10 - wget -O - http://peazip.org/peazip-linux-x86.html 2>/dev/null | \ 8.11 - sed '/Linux x86 /!d;s|.*x86 ||;s|<.*||;q' 8.12 + wget -O - https://github.com/peazip/PeaZip/releases 2>/dev/null | \ 8.13 + sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q' 8.14 } 8.15 8.16 # Rules to gen a SliTaz package suitable for Tazpkg.