wok-current rev 24942
BootProg: clear cmdline
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Apr 20 15:10:50 2022 +0000 (2022-04-20) |
parents | e7bde16e8f79 |
children | 810e3d0a38f7 |
files | BootProg/receipt BootProg/stuff/boot16.asm BootProg/stuff/boot32.asm BootProg/stuff/bootex.asm BootProg/stuff/bootprog.sh ipxe/stuff/bootloader.S memtest/stuff/bootloader.S memtest/stuff/memtest86+-5.01-array-size.patch pingus/receipt plop/stuff/bootloader.S tumbler-dev/receipt tumbler/receipt xaos/receipt |
line diff
1.1 --- a/BootProg/receipt Sat Apr 16 12:43:33 2022 +0000 1.2 +++ b/BootProg/receipt Wed Apr 20 15:10:50 2022 +0000 1.3 @@ -8,20 +8,17 @@ 1.4 LICENSE="MIT" 1.5 WEB_SITE="https://wiki.osdev.org/BootProg" 1.6 1.7 -BUILD_DEPENDS="nasm" 1.8 +BUILD_DEPENDS="nasm lzma" 1.9 1.10 # Rules to configure and make the package. 1.11 compile_rules() 1.12 { 1.13 mkdir -p $src && cd $src 1.14 - for i in bootex boot16 boot32 ; do 1.15 + sed '1,/^exit 1/!d' $stuff/bootprog.sh > bootprog 1.16 + for i in boot16 boot32 bootex ; do 1.17 cp $stuff/$i.asm . 1.18 - nasm $i.asm -f bin -o $i.bin -l $i.lst 1.19 - done 1.20 - sed '1,/^exit 1/!d' $stuff/bootprog.sh > bootprog 1.21 - tar czf - boot16.bin boot32.bin bootex.bin > set.tar.gz 1.22 - [ "$(which advdef)" ] && advdef -z4 set.tar.gz 1.23 - cat set.tar.gz >> bootprog 1.24 + nasm $i.asm -f bin -o $i.bin -l $i.lst && cat $i.bin 1.25 + done | lzma -9 >> bootprog 1.26 chmod +x bootprog 1.27 } 1.28
2.1 --- a/BootProg/stuff/boot16.asm Sat Apr 16 12:43:33 2022 +0000 2.2 +++ b/BootProg/stuff/boot16.asm Wed Apr 20 15:10:50 2022 +0000 2.3 @@ -213,14 +213,14 @@ 2.4 mul bx ; dx:ax = 0 = LBA (LBA are relative to FAT) 2.5 mov cx, word [bx(bpbSectorsPerFAT)] 2.6 2.7 - call ReadCXSectors ; read fat and clear cx 2.8 + call ReadCXSectors ; read fat and clear ax & cx 2.9 2.10 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.11 ;; load the root directory in ;; 2.12 ;; its entirety (16KB max) ;; 2.13 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.14 2.15 - mov ax, 32 2.16 + mov al, 32 2.17 2.18 mul word [bx(bpbRootEntries)] 2.19 div word [bx(bpbBytesPerSector)] 2.20 @@ -230,7 +230,7 @@ 2.21 mul bp ; [bx(bpbSectorsPerFAT)], set by ReadCXSectors 2.22 2.23 push es 2.24 - call ReadCXSectors ; read root directory, clear cx and di 2.25 + call ReadCXSectors ; read root directory; clear ax, cx and di 2.26 pop es 2.27 2.28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.29 @@ -248,15 +248,15 @@ 2.30 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.31 2.32 FindNameCycle: 2.33 - cmp byte [es:di], ch 2.34 - je FindNameFailed ; end of root directory (NULL entry found) 2.35 push di 2.36 mov cl, 11 2.37 mov si, ProgramName ; ds:si -> program name 2.38 repe cmpsb 2.39 pop di 2.40 je FindNameFound 2.41 - add di, byte 32 2.42 + scasb 2.43 + je FindNameFailed ; end of root directory (NULL entry found) 2.44 + add di, byte 31 2.45 dec word [bx(bpbRootEntries)] 2.46 jnz FindNameCycle ; next root entry 2.47 2.48 @@ -298,28 +298,26 @@ 2.49 jnc First64 2.50 mov ah, (1000h+ImageLoadSeg)>>8 ; adjust segment for 2nd part of FAT16 2.51 First64: 2.52 + mov dx, 0FFF8h 2.53 + 2.54 cmp [bx(bpbSectorsPerFAT)], cx ; 1..12 = FAT12, 16..256 = FAT16 2.55 mov ds, ax 2.56 - jbe ReadClusterFat12 2.57 + ja ReadClusterFat16 2.58 2.59 - lodsw ; ax = next cluster 2.60 - cmp ax, 0FFF8h 2.61 - jmp short ReadClusterDone 2.62 - 2.63 -ReadClusterFat12: 2.64 + mov dh, 0Fh 2.65 add si, [cs:di] 2.66 shr si, 1 ; si = cluster * 3 / 2 2.67 2.68 +ReadClusterFat16: 2.69 lodsw ; ax = next cluster 2.70 jnc ReadClusterEven 2.71 2.72 rol ax, cl 2.73 2.74 ReadClusterEven: 2.75 - and ax, 0FFFh ; mask cluster value 2.76 - cmp ax, 0FF8h 2.77 + and ah, dh ; mask cluster value 2.78 + cmp ax, dx 2.79 2.80 -ReadClusterDone: 2.81 push cs 2.82 pop ds 2.83 inc di 2.84 @@ -352,7 +350,7 @@ 2.85 add ax, bp ; LBA for cluster data 2.86 adc dx, bx ; dx:ax = LBA 2.87 2.88 - call ReadSector ; clear cx 2.89 + call ReadSector ; clear ax & cx, restore dx 2.90 2.91 jne ReadClusters 2.92 2.93 @@ -365,7 +363,6 @@ 2.94 mov ds, bp ; bp=ds=seg the file is loaded to 2.95 2.96 add bp, [bx+08h] ; bp = image base 2.97 - mov ax, [bx+06h] ; ax = reloc items 2.98 mov di, [bx+18h] ; di = reloc table pointer 2.99 2.100 cmp word [bx], 5A4Dh ; "MZ" signature? 2.101 @@ -374,19 +371,22 @@ 2.102 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.103 ;; Setup and run a .COM program ;; 2.104 ;; Set CS=DS=ES=SS SP=0 IP=100h ;; 2.105 +;; AX=0ffffh BX=0 CX=0 DX=drive ;; 2.106 +;; and cmdline=void ;; 2.107 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.108 2.109 + mov di, 100h ; ip 2.110 mov bp, ImageLoadSeg-10h ; "org 100h" stuff :) 2.111 mov ss, bp 2.112 xor sp, sp 2.113 push bp ; cs, ds and es 2.114 - mov bh, 1 ; ip 2.115 jmp short Run 2.116 2.117 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.118 ;; Relocate, setup and run a .EXE program ;; 2.119 ;; Set CS:IP, SS:SP, DS, ES and AX according ;; 2.120 ;; to wiki.osdev.org/MZ#Initial_Program_State ;; 2.121 +;; AX=0ffffh BX=0 CX=0 DX=drive cmdline=void ;; 2.122 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.123 2.124 ReloCycle: 2.125 @@ -397,8 +397,8 @@ 2.126 scasw ; point to next entry 2.127 2.128 RelocateEXE: 2.129 - dec ax ; 32768 max (128KB table) 2.130 - jns ReloCycle ; leave with ax=0ffffh: both FCB in the 2.131 + dec word [bx+06h] ; reloc items, 32768 max (128KB table) 2.132 + jns ReloCycle 2.133 ; PSP don't have a valid drive identifier 2.134 les si, [bx+0Eh] 2.135 add si, bp 2.136 @@ -409,13 +409,15 @@ 2.137 push si ; containing the PSP structure 2.138 2.139 add bp, [bx+16h] ; cs for EXE 2.140 - mov bx, [bx+14h] ; ip for EXE 2.141 + mov di, [bx+14h] ; ip for EXE 2.142 Run: 2.143 pop ds 2.144 push bp 2.145 - push bx 2.146 + push di 2.147 push ds 2.148 pop es 2.149 + mov [80h], ax ; clear cmdline 2.150 + dec ax ; both FCB in the PSP don't have a valid drive identifier 2.151 2.152 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.153 ;; Set the magic numbers so the program knows that it ;; 2.154 @@ -539,10 +541,17 @@ 2.155 dec di ; keep C 2.156 loopne ReadSectorNext ; until cluster sector count or file sector count is reached 2.157 pop si 2.158 + mov ax, bx ; clear ax 2.159 mov dx, [bx] ; pass the BIOS boot drive to Run or Error 2.160 2.161 ret 2.162 2.163 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.164 +;; Fill free space with zeroes ;; 2.165 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.166 + 2.167 + times (512-13-20-($-$$)) db 0 2.168 + 2.169 ;;;;;;;;;;;;;;;;;;;;;;;;;; 2.170 ;; Error Messaging Code ;; 2.171 ;;;;;;;;;;;;;;;;;;;;;;;;;; 2.172 @@ -566,12 +575,6 @@ 2.173 hlt 2.174 jmp short Stop 2.175 2.176 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.177 -;; Fill free space with zeroes ;; 2.178 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.179 - 2.180 - times (512-13-($-$$)) db 0 2.181 - 2.182 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.183 ;; Name of the file to load and run ;; 2.184 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3.1 --- a/BootProg/stuff/boot32.asm Sat Apr 16 12:43:33 2022 +0000 3.2 +++ b/BootProg/stuff/boot32.asm Wed Apr 20 15:10:50 2022 +0000 3.3 @@ -265,7 +265,6 @@ 3.4 mov ds, bp ; bp=ds=seg the file is loaded to 3.5 3.6 add bp, [bx+08h] ; bp = image base 3.7 - mov ax, [bx+06h] ; ax = reloc items 3.8 mov di, [bx+18h] ; di = reloc table pointer 3.9 3.10 cmp word [bx], 5A4Dh ; "MZ" signature? 3.11 @@ -275,9 +274,9 @@ 3.12 ;; Setup and run a .COM program ;; 3.13 ;; Set CS=DS=ES=SS SP=0 IP=100h ;; 3.14 ;; AX=0ffffh BX=0 CX=0 DX=drive ;; 3.15 +;; and cmdline=void ;; 3.16 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.17 3.18 - mov ax, 0ffffh ; both FCB in the PSP don't have a valid drive identifier 3.19 mov di, 100h ; ip 3.20 mov bp, ImageLoadSeg-10h ; "org 100h" stuff :) 3.21 mov ss, bp 3.22 @@ -289,7 +288,7 @@ 3.23 ;; Relocate, setup and run a .EXE program ;; 3.24 ;; Set CS:IP, SS:SP, DS, ES and AX according ;; 3.25 ;; to wiki.osdev.org/MZ#Initial_Program_State ;; 3.26 -;; AX=0ffffh BX=0 CX=0 DX=drive ;; 3.27 +;; AX=0ffffh BX=0 CX=0 DX=drive cmdline=void ;; 3.28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.29 3.30 ReloCycle: 3.31 @@ -300,13 +299,11 @@ 3.32 scasw ; point to next entry 3.33 3.34 RelocateEXE: 3.35 - dec ax ; 32768 max (128KB table) 3.36 - jns ReloCycle ; leave with ax=0ffffh: both FCB in the 3.37 - ; PSP don't have a valid drive identifier 3.38 - les si, [bx+0Eh] 3.39 - add si, bp 3.40 - mov ss, si ; ss for EXE 3.41 - mov sp, es ; sp for EXE 3.42 + dec word [bx+06h] ; reloc items, 32768 max (128KB table) 3.43 + jns ReloCycle 3.44 + 3.45 + add [bx+0Eh], bp 3.46 + lss sp, [bx+0Eh] ; ss:sp for EXE 3.47 3.48 lea si, [bp-10h] ; ds and es both point to the segment 3.49 push si ; containing the PSP structure 3.50 @@ -319,6 +316,9 @@ 3.51 push di 3.52 push ds 3.53 pop es 3.54 + xor ax, ax 3.55 + mov [80h], ax ; clear cmdline 3.56 + dec ax ; both FCB in the PSP don't have a valid drive identifier 3.57 3.58 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.59 ;; Set the magic numbers so the program knows that it ;; 3.60 @@ -431,6 +431,12 @@ 3.61 ReadSectorNext: 3.62 ret 3.63 3.64 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.65 +;; Fill free space with zeroes ;; 3.66 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.67 + 3.68 + times (512-13-20-($-$$)) db 0 3.69 + 3.70 ;;;;;;;;;;;;;;;;;;;;;;;;;; 3.71 ;; Error Messaging Code ;; 3.72 ;;;;;;;;;;;;;;;;;;;;;;;;;; 3.73 @@ -452,12 +458,6 @@ 3.74 hlt 3.75 jmp short Stop 3.76 3.77 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.78 -;; Fill free space with zeroes ;; 3.79 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.80 - 3.81 - times (512-13-($-$$)) db 0 3.82 - 3.83 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.84 ;; Name of the file to load and run ;; 3.85 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4.1 --- a/BootProg/stuff/bootex.asm Sat Apr 16 12:43:33 2022 +0000 4.2 +++ b/BootProg/stuff/bootex.asm Wed Apr 20 15:10:50 2022 +0000 4.3 @@ -160,7 +160,7 @@ 4.4 ;;;;;;;;;;;;;;;;;;;;;; 4.5 4.6 push es 4.7 - push byte main 4.8 + push word main 4.9 retf 4.10 4.11 main: 4.12 @@ -173,7 +173,7 @@ 4.13 mov esi, [bx(bpbRootDirCluster)] ; esi=cluster # of root dir 4.14 4.15 push byte ImageLoadSeg 4.16 - pop es 4.17 + pop es ; cx = 0 4.18 4.19 RootDirReadContinue: 4.20 call ReadCluster ; read one sector of root dir 4.21 @@ -207,11 +207,10 @@ 4.22 cmp al, 0c0h ; EXFAT_ENTRY_FILE_INFO ? 4.23 jne NotFileInfo 4.24 4.25 - mov bl, 30 4.26 + mov bl, 31 4.27 CopyInfo: 4.28 - mov ax, [es:di+bx] 4.29 - mov [bx], ax 4.30 - dec bx 4.31 + mov al, [es:di+bx] 4.32 + mov [bx], al 4.33 dec bx 4.34 jnz CopyInfo 4.35 4.36 @@ -232,6 +231,7 @@ 4.37 popf ; restore carry="not last sector" flag 4.38 jc RootDirReadContinue ; continue to the next root dir cluster 4.39 FindNameFailed: ; end of root directory (dir end reached) 4.40 +; mov dx, [bx] ; restore BIOS boot drive number 4.41 call Error 4.42 db "File not found." 4.43 FindNameFound: 4.44 @@ -251,6 +251,7 @@ 4.45 call ReadCluster ; read one cluster of root dir 4.46 sub [bx+FileSize], ebp 4.47 ja FileReadContinue 4.48 + mov dx, [bx] ; restore BIOS boot drive number 4.49 pop bp 4.50 4.51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4.52 @@ -260,7 +261,6 @@ 4.53 mov ds, bp ; bp=ds=seg the file is loaded to 4.54 4.55 add bp, [bx+08h] ; bp = image base 4.56 - mov ax, [bx+06h] ; ax = reloc items 4.57 mov di, [bx+18h] ; di = reloc table pointer 4.58 4.59 cmp word [bx], 5A4Dh ; "MZ" signature? 4.60 @@ -270,9 +270,9 @@ 4.61 ;; Setup and run a .COM program ;; 4.62 ;; Set CS=DS=ES=SS SP=0 IP=100h ;; 4.63 ;; AX=0ffffh BX=0 CX=0 DX=drive ;; 4.64 +;; and cmdline=void ;; 4.65 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4.66 4.67 - mov ax, 0ffffh ; both FCB in the PSP don't have a valid drive identifier 4.68 mov di, 100h ; ip 4.69 mov bp, ImageLoadSeg-10h ; "org 100h" stuff :) 4.70 mov ss, bp 4.71 @@ -284,7 +284,7 @@ 4.72 ;; Relocate, setup and run a .EXE program ;; 4.73 ;; Set CS:IP, SS:SP, DS, ES and AX according ;; 4.74 ;; to wiki.osdev.org/MZ#Initial_Program_State ;; 4.75 -;; AX=0ffffh BX=0 CX=0 DX=drive ;; 4.76 +;; AX=0ffffh BX=0 CX=0 DX=drive cmdline=void ;; 4.77 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4.78 4.79 ReloCycle: 4.80 @@ -295,13 +295,11 @@ 4.81 scasw ; point to next entry 4.82 4.83 RelocateEXE: 4.84 - dec ax ; 32768 max (128KB table) 4.85 - jns ReloCycle ; leave with ax=0ffffh: both FCB in the 4.86 - ; PSP don't have a valid drive identifier 4.87 - les si, [bx+0Eh] 4.88 - add si, bp 4.89 - mov ss, si ; ss for EXE 4.90 - mov sp, es ; sp for EXE 4.91 + dec word [bx+06h] ; reloc items, 32768 max (128KB table) 4.92 + jns ReloCycle 4.93 + 4.94 + add [bx+0Eh], bp 4.95 + lss sp, [bx+0Eh] ; ss:sp for EXE 4.96 4.97 lea si, [bp-10h] ; ds and es both point to the segment 4.98 push si ; containing the PSP structure 4.99 @@ -314,6 +312,9 @@ 4.100 push di 4.101 push ds 4.102 pop es 4.103 + xor ax, ax 4.104 + mov [80h], ax ; clear cmdline 4.105 + dec ax ; both FCB in the PSP don't have a valid drive identifier 4.106 4.107 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4.108 ;; Set the magic numbers so the program knows that it ;; 4.109 @@ -411,7 +412,7 @@ 4.110 ReadSectorRetry: 4.111 mov si, sp 4.112 mov ah, 42h ; ah = 42h = extended read function no. 4.113 - mov dl, [bx] 4.114 + mov dx, [bx] ; restore BIOS boot drive number 4.115 int 13h ; extended read sectors (DL, DS:SI) 4.116 4.117 jnc ReadSuccess 4.118 @@ -434,9 +435,14 @@ 4.119 4.120 cmp esi, byte -10 ; carry=0 if last cluster, and carry=1 otherwise 4.121 ReadSectorNext: 4.122 - mov dl, [bx] ; restore BIOS boot drive number 4.123 ret 4.124 4.125 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4.126 +;; Fill free space with zeroes ;; 4.127 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4.128 + 4.129 + times (512-13-20-($-$$)) db 0 4.130 + 4.131 ;;;;;;;;;;;;;;;;;;;;;;;;;; 4.132 ;; Error Messaging Code ;; 4.133 ;;;;;;;;;;;;;;;;;;;;;;;;;; 4.134 @@ -460,12 +466,6 @@ 4.135 hlt 4.136 jmp short Stop 4.137 4.138 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4.139 -;; Fill free space with zeroes ;; 4.140 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4.141 - 4.142 - times (512-13-($-$$)) db 0 4.143 - 4.144 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4.145 ;; Name of the file to load and run ;; 4.146 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5.1 --- a/BootProg/stuff/bootprog.sh Sat Apr 16 12:43:33 2022 +0000 5.2 +++ b/BootProg/stuff/bootprog.sh Wed Apr 20 15:10:50 2022 +0000 5.3 @@ -1,39 +1,30 @@ 5.4 #!/bin/sh 5.5 5.6 [ ! -e "$1" ] && cat <<EOT && exit 2 5.7 -Usage: [FAT=<FAT12|FAT16|FAT32|EXFAT>] $0 device [boot name entry] [boot.bin] 5.8 +Usage: [FAT=<FAT12|FAT16|FAT32|EXFAT>] $0 device [file] 5.9 Example: $0 /dev/fd0 STARTUP.BIN 5.10 EOT 5.11 5.12 -while read chk ofs fat bin name; do 5.13 - [ $FAT -eq $fat ] || [ "$(dd if="$1" bs=1 count=8 skip=$chk)" = "$fat " ] || continue 5.14 - echo "Install $fat bootsector on $1." 5.15 - for arg in "skip=$(($ofs+8)) seek=$(($ofs+8))" "count=11" ; do 5.16 - if [ "$3" ]; then 5.17 - cat "$3" 5.18 - else 5.19 - sed '1,/^exit 1/d' $0 | tar xzOf - boot$bin.bin 5.20 - fi | dd of="$1" bs=1 conv=notrunc $arg 5.21 +ddo="dd of=$1 bs=1 conv=notrunc" 5.22 +while read c o b f; do 5.23 + [ "${FAT:-$(dd if="$1" bs=1 count=5 skip=$c)}" = "$f" ] || continue 5.24 + echo "Install $f bootsector on $1." 5.25 + for a in "$((o+b)) seek=$o count=$((512-o))" "$b count=11"; do 5.26 + sed '1,/^exit 1/d' $0 | unlzma | $ddo skip=$a 5.27 done 5.28 - [ "$2" ] && echo "Set bootfile '$2'" && echo -en "$name" | \ 5.29 - dd of="$1" bs=1 conv=notrunc seek=499 count=11 5.30 - case "$fat" in 5.31 - EXFAT) dd if="$1" bs=512 count=11 | od -v -An -t u1 -w1 - | awk ' 5.32 -BEGIN { chk=0; i=-1 } 5.33 -{ 5.34 - i++ 5.35 - if (i == 106 || i == 107 || i == 112) next 5.36 - chk = or(lshift(chk,31),rshift(chk,1)) + $1 5.37 -} 5.38 -END { a=chk%256; b=(chk/256)%256; c=(chk/256/256)%256; d=chk/256/256/256 5.39 - for (i=0;i<128;i++) printf "echo -en \"\\x%02X\\x%02X\\x%02X\\x%02X\"\n",a,b,c,d 5.40 -} ' | sh | dd bs=512 of="$1" seek=11 5.41 - esac 5.42 + [ "$2" ] && echo "Set boot file '$2'" && echo -n "$2" | case "$f" in 5.43 + E*) sed 's| |.|;s| ||g' | cat - /dev/zero;; 5.44 + *) tr a-z A-Z | sed 's|\.| |;s|^\(.\{8\}\) *|\1|;s|$| |' 5.45 + esac | $ddo seek=499 count=11 5.46 + [ "$f" = "EXFAT" ] && dd if="$1" bs=512 count=11 | od -v -An -t u1 -w1 - | LANG=C awk ' 5.47 +BEGIN { a=0;i=-1;m=0xFFFFFFFE } 5.48 +{ if (++i!=106 && i!=107 && i!=112) a=or(and(lshift(a,31),m),and(rshift(a,1),m/2))+$1 } 5.49 +END { b=a/256;c=b/256; for (i=0;i<128;i++) printf "%c%c%c%c",a%256,b%256,c%256,(c/256)%256 }' | $ddo seek=5632 5.50 exit 0 5.51 -done 2> /dev/null <<EOT 5.52 -54 54 FAT12 16 $(A="${2/./ }";echo "${A:0:8}${A##* } " | tr '[a-z]' '[A-Z]' | sed 's| |\\\\x20|g') 5.53 -54 54 FAT16 16 $(A="${2/./ }";echo "${A:0:8}${A##* } " | tr '[a-z]' '[A-Z]' | sed 's| |\\\\x20|g') 5.54 -82 82 FAT32 32 $(A="${2/./ }";echo "${A:0:8}${A##* } " | tr '[a-z]' '[A-Z]' | sed 's| |\\\\x20|g') 5.55 -3 105 EXFAT ex $(echo "$2" | sed 's| |.|;s| ||g')\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0 5.56 +done 2>/dev/null <<EOT 5.57 +54 62 0 FAT12 5.58 +54 62 0 FAT16 5.59 +82 90 512 FAT32 5.60 +3 113 1024 EXFAT 5.61 EOT 5.62 exit 1
6.1 --- a/ipxe/stuff/bootloader.S Sat Apr 16 12:43:33 2022 +0000 6.2 +++ b/ipxe/stuff/bootloader.S Wed Apr 20 15:10:50 2022 +0000 6.3 @@ -20,6 +20,7 @@ 6.4 /* some extra features */ 6.5 #define EXE_SUPPORT real mode dos .exe file support +208/264 6.6 #define CMDLINE dos kernel cmdline support +45 6.7 +#define BUGGY_CMDLINE verify cmdline length +2 6.8 #define VCPI VCPI 4.0 support (386+) +109 6.9 #define SHUTDOWNDOS shutdown DOS services +29 6.10 6.11 @@ -28,7 +29,7 @@ 6.12 //#define FLOPPY_HAS_2_SIDES hardcoded heads count to 2 -15 6.13 //#define NO_CMDLINE_SHRINK remove heading spaces ? -6-21 6.14 //#define NO_CMDLINE_FILE remove @cmdline file support ? -21 6.15 -//#define NO_DOTS show progression dots ? -5 6.16 +#define NO_DOTS show progression dots ? -5 6.17 #ifndef BZIMAGE 6.18 //#define TINY_ZIMAGE system < 64Kb ? -11 6.19 //#define NO_MINSETUP default setup (dos only) ? -4 6.20 @@ -356,7 +357,12 @@ 6.21 lodsb 6.22 cbw 6.23 xchgw %ax, %cx 6.24 +#ifdef BUGGY_CMDLINE 6.25 + test %cl, %cl # C=O=0, set S & Z 6.26 + jng nocmdline # Z == 1 or O != S ? 6.27 +#else 6.28 jcxz nocmdline 6.29 +#endif 6.30 # if defined(BZIMAGE) && BZIMAGE >= 0x202 6.31 movw $INITSEG/16+stacktop/256, EXEADRS(cmd_line_ptr+1) 6.32 # else
7.1 --- a/memtest/stuff/bootloader.S Sat Apr 16 12:43:33 2022 +0000 7.2 +++ b/memtest/stuff/bootloader.S Wed Apr 20 15:10:50 2022 +0000 7.3 @@ -20,6 +20,7 @@ 7.4 /* some extra features */ 7.5 #define EXE_SUPPORT real mode dos .exe file support +208/264 7.6 #define CMDLINE dos kernel cmdline support +45 7.7 +#define BUGGY_CMDLINE verify cmdline length +2 7.8 #define VCPI VCPI 4.0 support (386+) +109 7.9 #define SHUTDOWNDOS shutdown DOS services +29 7.10 7.11 @@ -356,7 +357,12 @@ 7.12 lodsb 7.13 cbw 7.14 xchgw %ax, %cx 7.15 +#ifdef BUGGY_CMDLINE 7.16 + test %cl, %cl # C=O=0, set S & Z 7.17 + jng nocmdline # Z == 1 or O != S ? 7.18 +#else 7.19 jcxz nocmdline 7.20 +#endif 7.21 # if defined(BZIMAGE) && BZIMAGE >= 0x202 7.22 movw $INITSEG/16+stacktop/256, EXEADRS(cmd_line_ptr+1) 7.23 # else
8.1 --- a/memtest/stuff/memtest86+-5.01-array-size.patch Sat Apr 16 12:43:33 2022 +0000 8.2 +++ b/memtest/stuff/memtest86+-5.01-array-size.patch Wed Apr 20 15:10:50 2022 +0000 8.3 @@ -18,3 +18,30 @@ 8.4 pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid); 8.5 pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did); 8.6 vid &= 0xFFFF; 8.7 +@@ -1424,7 +1424,7 @@ 8.8 + unsigned long dramchr; 8.9 + float clockratio; 8.10 + double dramclock; 8.11 +- unsigned int dummy[3]; 8.12 ++ unsigned int dummy[4]; 8.13 + int ram_type; 8.14 + 8.15 + float coef = 10; 8.16 +@@ -3680,7 +3680,7 @@ 8.17 + static void poll_timings_k16(void) { 8.18 + 8.19 + ulong dramt0, dramt1; 8.20 +- int cas, rcd, rp, rc, ras; 8.21 ++ int cas, rcd, rp, ras; 8.22 + 8.23 + pci_conf_read(0, 24, 2, 0x200, 4, &dramt0); 8.24 + pci_conf_read(0, 24, 2, 0x204, 4, &dramt1); 8.25 +@@ -3690,7 +3690,7 @@ 8.26 + rp = ((dramt0 >> 16) & 0x1F); 8.27 + ras = ((dramt0 >> 24) & 0x3F); 8.28 + 8.29 +- rc = (dramt1 & 0x3F); 8.30 ++ //int rc = (dramt1 & 0x3F); 8.31 + 8.32 + print_ram_line(cas, rcd, rp, ras, 1); 8.33 + }
9.1 --- a/pingus/receipt Sat Apr 16 12:43:33 2022 +0000 9.2 +++ b/pingus/receipt Wed Apr 20 15:10:50 2022 +0000 9.3 @@ -11,7 +11,7 @@ 9.4 LICENSE="GPL2" 9.5 9.6 TARBALL="$PACKAGE-$VERSION.tar.bz2" 9.7 -WEB_SITE="https://pingus.seul.org/" 9.8 +WEB_SITE="https://gitlab.com/pingus/pingus" 9.9 WGET_URL="http://pingus.seul.org/files/$TARBALL" 9.10 9.11 DEPENDS="libsdl libsdl-image libsdl-mixer 9.12 @@ -23,8 +23,8 @@ 9.13 9.14 current_version() 9.15 { 9.16 - wget -O - $WEB_SITE/download.html 2>/dev/null | \ 9.17 - sed "/tar/!d;s|.*$PACKAGE-||;s|.tar.*||;q" 9.18 + wget -O - https://gitlab.com/pingus/pingus/-/tags?sort=updated_desc | \ 9.19 + sed '/item-title/!d;s|.*>v||;s|<.*||;q' 9.20 } 9.21 9.22 # Rules to configure and make the package.
10.1 --- a/plop/stuff/bootloader.S Sat Apr 16 12:43:33 2022 +0000 10.2 +++ b/plop/stuff/bootloader.S Wed Apr 20 15:10:50 2022 +0000 10.3 @@ -20,12 +20,13 @@ 10.4 /* some extra features */ 10.5 #define EXE_SUPPORT real mode dos .exe file support +208/264 10.6 #define CMDLINE dos kernel cmdline support +45 10.7 +#define BUGGY_CMDLINE verify cmdline length +2 10.8 #define VCPI VCPI 4.0 support (386+) +109 10.9 #define SHUTDOWNDOS shutdown DOS services +29 10.10 10.11 /* some contraints to reduce the code size */ 10.12 //#define FLOPPY_1440K_ONLY 1.44M floppies support only -26 10.13 -#define FLOPPY_HAS_2_SIDES hardcoded heads count to 2 -15 10.14 +//#define FLOPPY_HAS_2_SIDES hardcoded heads count to 2 -15 10.15 //#define NO_CMDLINE_SHRINK remove heading spaces ? -6-21 10.16 //#define NO_CMDLINE_FILE remove @cmdline file support ? -21 10.17 //#define NO_DOTS show progression dots ? -5 10.18 @@ -313,8 +314,8 @@ 10.19 #else 10.20 subw %ax, %bx 10.21 jnc forward 10.22 + //movw $0x8FFF, %ax 10.23 movb $0x90, %ah 10.24 - ;decw %ax 10.25 forward: 10.26 movw %ax, %es 10.27 movw %ax, %di 10.28 @@ -356,7 +357,12 @@ 10.29 lodsb 10.30 cbw 10.31 xchgw %ax, %cx 10.32 +#ifdef BUGGY_CMDLINE 10.33 + test %cl, %cl # C=O=0, set S & Z 10.34 + jng nocmdline # Z == 1 or O != S ? 10.35 +#else 10.36 jcxz nocmdline 10.37 +#endif 10.38 # if defined(BZIMAGE) && BZIMAGE >= 0x202 10.39 movw $INITSEG/16+stacktop/256, EXEADRS(cmd_line_ptr+1) 10.40 # else
11.1 --- a/tumbler-dev/receipt Sat Apr 16 12:43:33 2022 +0000 11.2 +++ b/tumbler-dev/receipt Wed Apr 20 15:10:50 2022 +0000 11.3 @@ -6,7 +6,7 @@ 11.4 SHORT_DESC="Development files for tumbler." 11.5 MAINTAINER="al.bobylev@gmail.com" 11.6 LICENSE="GPL2 LGPL2.1" 11.7 -WEB_SITE="https://docs.xfce.org/xfce/thunar/tumbler" 11.8 +WEB_SITE="https://gitlab.xfce.org/xfce/tumbler/" 11.9 11.10 DEPENDS="pkg-config tumbler" 11.11 WANTED="tumbler"
12.1 --- a/tumbler/receipt Sat Apr 16 12:43:33 2022 +0000 12.2 +++ b/tumbler/receipt Wed Apr 20 15:10:50 2022 +0000 12.3 @@ -6,7 +6,7 @@ 12.4 SHORT_DESC="A D-Bus thumbnailing service based on the thumbnail management D-Bus specification." 12.5 MAINTAINER="al.bobylev@gmail.com" 12.6 LICENSE="GPL2 LGPL2.1" 12.7 -WEB_SITE="https://docs.xfce.org/xfce/thunar/tumbler" 12.8 +WEB_SITE="https://gitlab.xfce.org/xfce/tumbler/" 12.9 12.10 TARBALL="$PACKAGE-$VERSION.tar.bz2" 12.11 WGET_URL="http://archive.xfce.org/src/xfce/$PACKAGE/${VERSION%.*}/$TARBALL"
13.1 --- a/xaos/receipt Sat Apr 16 12:43:33 2022 +0000 13.2 +++ b/xaos/receipt Wed Apr 20 15:10:50 2022 +0000 13.3 @@ -7,7 +7,7 @@ 13.4 MAINTAINER="pascal.bellard@slitaz.org" 13.5 LICENSE="GPL2" 13.6 TARBALL="$PACKAGE-$VERSION.tar.gz" 13.7 -WEB_SITE="https://matek.hu/xaos/" 13.8 +WEB_SITE="https://xaos-project.github.io/" 13.9 WGET_URL="http://heanet.dl.sourceforge.net/project/xaos/XaoS/$VERSION/$TARBALL" 13.10 13.11 DEPENDS="libpng zlib"