# HG changeset patch # User Pascal Bellard # Date 1539700640 -7200 # Node ID 2e46d946d7a8c1dd39bd5c7bc06388f9588ec5c4 # Parent a3684252aaf10b34117a55288c7d8067c5a879fb Up ncdu (1.13) diff -r a3684252aaf1 -r 2e46d946d7a8 linld/stuff/src/HIMEM.CPP --- a/linld/stuff/src/HIMEM.CPP Fri Oct 12 19:21:44 2018 +0200 +++ b/linld/stuff/src/HIMEM.CPP Tue Oct 16 16:37:20 2018 +0200 @@ -12,7 +12,7 @@ // Called from inside kernel just before rm->pm // _loadds _saveregs: done by hand void far last_ditch() { - cli(); // we start doing *really* destructive things to DOS/BIOS +// cli(); // we start doing *really* destructive things to DOS/BIOS // it means: do not even try to enable ints // or call BIOS services after this asm { diff -r a3684252aaf1 -r 2e46d946d7a8 linld/stuff/src/JUMP.ASM --- a/linld/stuff/src/JUMP.ASM Fri Oct 12 19:21:44 2018 +0200 +++ b/linld/stuff/src/JUMP.ASM Tue Oct 16 16:37:20 2018 +0200 @@ -30,6 +30,65 @@ segment _TEXT byte public use16 'CODE' ;*************************************************************** +;void dos_shutdown() +;*************************************************************** + + macro dos_shutdown + xor bx,bx + mov ds,bx + ifndef NO386 + push [dword bx+4] ; save step + mov [word bx+4],offset step19 + else + mov ax,offset step19 + xchg ax,[word bx+4] + push [word bx+6] + push ax ; save step + endif + mov [word cs:sssp],sp + ;cmp [byte bx+7],0F0h + ;jnc notdos + mov [bx+6],cs + pushf + pushf + pop ax + inc ah ; set TF + push ax + popf + call [dword bx+4*19h] +notdos: + ifndef NO386 + lss sp,[dword cs:sssp] + else + lds ax,[dword cs:sssp] + push ds + pop ss + xchg ax,sp + endif + xor bx,bx + mov ds,bx + ifndef NO386 + pop [dword bx+4] ; restore step + else + pop [word bx+4] ; restore step + pop [word bx+6] + endif + endm + macro step19code +step19: + push bx + push ds + mov bx,sp + lds bx,[dword ss:bx+4] ; read cs:ip + cmp [word bx],19CDh ; int 19h ? + pop ds + pop bx + je notdos + iret + endm + + +;*************************************************************** ;void boot_kernel(); ;****** Never returns ;*************************************************************** @@ -37,42 +96,39 @@ proc _boot_kernel near p8086 -; Shrink stack: we won't need much of it now and have no malloc() plans extrn _heap_top:word - mov ax,[_heap_top] - inc ah - cmp ax,sp - ja @@samesp - xchg ax,sp -@@samesp: ifdef NO386 extrn _topseg:near call near _topseg - mov es,ax xchg ax,bx + mov ax,[_heap_top] + inc ah mov cl,4 - mov ax,sp shr ax,cl else p386 mov bx,9000h - mov es,bx - mov ax,sp + mov ax,[_heap_top] + inc ah shr ax,4 endif + mov es,bx mov dx,cs add ax,dx cmp ax,bx jb @@nooverflow + global sssp +sssp: ; Oops! We can stomp on our toes... better stop now mov bx,offset overflow extrn die:near call near die @@nooverflow: - cli ; we start doing destructive things to DOS + ;cli ; we start doing destructive things to DOS push es pop ss mov sp,0A000h + mov [word sssp+2],ss extrn _csip:dword push [dword _csip] extrn _rm_size:word @@ -92,7 +148,11 @@ rep movsb cmp al,cl ; load high ? + ifdef noelks jne @@isbzimage + else + jne @@isbzimagez + endif ifdef NO386 add bh,9 push bx ; topseg()+0x0900 @@ -112,40 +172,36 @@ mov cx,offset movedend rep movsb + push ax push es - call near @@doretf ; mov cs,es - push ss - pop es + dos_shutdown ; clear bx + call near @@doretf ; pop cs push cs pop ds - push ax - extrn dos_shutdown:near - call near dos_shutdown ;in al,70h ;or al,80h ; disable NMI ;out 70h,al - pop bx + pop dx ; move zImage pm mov ax,8 - cwd ; clear dx - cmp bx,ax + cmp dx,ax ja @@bufhigh - sub ax,bx + sub ax,dx inc ax @@bufhigh: push ax - push dx ; size=up to 512k - push bx ; src ofs= pm.fallback - push dx - push dx ; srcseg=0 + push bx ; size=up to 512k + push dx ; src ofs= pm.fallback + push bx + push bx ; srcseg=0 ifdef NO386 - inc dx - push dx ; dst - dec dx + inc bx + push bx ; dst + dec bx else push 1 ; dst endif - push dx ; ofs=64k + push bx ; ofs=64k extrn _memcpy32:near call _memcpy32 add sp,14 @@ -155,37 +211,40 @@ pop ds ifndef NO386 cmp [dword 1E6h],'SKLE' + jne @@notelks +@@isbzimagez: + jne @@isbzimage else cmp [word 1E6h],'LE' jne @@notelks +@@isbzimagez: + jne @@isbzimage cmp [word 1E8h],'SK' + jne @@notelks endif - jne @@notelks ifdef NO386 - mov cx,120h + mov cx,120h ; CS=0120 push cx - mov cl,0h + mov cl,0h ; DS=ES=SS=0100 push cx else - push 120h - push 100h + push 120h ; CS=0120 + push 100h ; DS=ES=SS=0100 endif pop es xor si,si xor di,di - mov ch,05h + mov ch,05h ; 500h mini rep movsw push es pop ss - push cx + push cx ; IP=0000 @@notelks: endif @@isbzimage: push ss pop ds - ;push ss - ;pop es ifndef NO386 push ss pop fs @@ -195,8 +254,11 @@ assume nothing assume cs:DGROUP @@doretf: + push ss + pop es retf + step19code movedend: endp _boot_kernel diff -r a3684252aaf1 -r 2e46d946d7a8 linld/stuff/src/MEMCPY32.ASM --- a/linld/stuff/src/MEMCPY32.ASM Fri Oct 12 19:21:44 2018 +0200 +++ b/linld/stuff/src/MEMCPY32.ASM Tue Oct 16 16:37:20 2018 +0200 @@ -11,91 +11,15 @@ p386 endif - group DGROUP _TEXT,_DATA,_BSS + group DGROUP _TEXT,_DATA assume cs:DGROUP,ds:DGROUP segment _DATA byte public use16 'DATA' ends _DATA - segment _BSS byte public use16 'BSS' - global sssp:dword -sssp dd ? - ends _BSS - segment _TEXT byte public use16 'CODE' ;*************************************************************** -;void dos_shutdown() -;*************************************************************** - global dos_shutdown:near - proc dos_shutdown near - -dos_shutdown: - ifndef NO386 - ;pusha - else - ;push bp si di - endif - xor bx,bx - mov ds,bx - ifndef NO386 - push [dword bx+4] ; save step - mov [word bx+4],offset step19 - else - mov ax,offset step19 - xchg ax,[word bx+4] - push [word bx+6] - push ax ; save step - endif - mov [word sssp],sp - mov [word sssp+2],ss - ;cmp [byte bx+7],0F0h - ;jnc notdos - mov [bx+6],cs - pushf - pop ax - inc ah ; set TF - push ax - popf - jmp [dword bx+4*19h] -doiret: - iret -step19: - push bx - push ds - mov bx,sp - lds bx,[dword ss:bx+4] ; read cs:ip - cmp [word bx],19CDh ; int 19h ? - pop ds - pop bx - jne doiret -notdos: - ifndef NO386 - lss sp,[dword cs:sssp] - else - lds ax,[dword cs:sssp] - push ds - pop ss - xchg ax,sp - endif - xor bx,bx - mov ds,bx - ifndef NO386 - pop [dword bx+4] ; restore step - ;popa - else - pop [word bx+4] ; restore step - pop [word bx+6] - ;pop di si bp - endif - push cs - pop ds - ret - - endp dos_shutdown - - -;*************************************************************** ;void memcpy32(u32 dstofs,u16 srcseg,u32 srcofs,u32 size); ;*************************************************************** ;****** Uses: Flags diff -r a3684252aaf1 -r 2e46d946d7a8 linld/stuff/src/TAZBOOT.CPP --- a/linld/stuff/src/TAZBOOT.CPP Fri Oct 12 19:21:44 2018 +0200 +++ b/linld/stuff/src/TAZBOOT.CPP Tue Oct 16 16:37:20 2018 +0200 @@ -76,7 +76,7 @@ if (!*iso || isoreset(*iso) < 0) return; skip_alloc++; base_himem = memtop() /2; - //if (base_himem > _64m) base_himem = _64m; + //if (base_himem >= _64m) base_himem = _64m; if (* ((char *) &base_himem +3) >= 4) base_himem = _64m; isoopen("boot") >= 0 || isoopen("live") >= 0 || // debian @@ -132,8 +132,7 @@ if (*init && isolseek(&initrddesc) != -1) { read(x->fd, &x->filemod, 10); // + x->fileofs & x->filesize magic = x->filemod; - //x->fileofs &= 0xFFFFL; - * ((short *) &x->fileofs + 1) = 0; + x->fileofs &= 0xFFFFL; //x->fileofs -= 0xC0L + (x->filesize &= 0xFFFF); * ((short *) &x->filesize + 1) = 0; x->fileofs -= 0xC0L + x->filesize; diff -r a3684252aaf1 -r 2e46d946d7a8 linld/stuff/src/VCPI.ASM --- a/linld/stuff/src/VCPI.ASM Fri Oct 12 19:21:44 2018 +0200 +++ b/linld/stuff/src/VCPI.ASM Tue Oct 16 16:37:20 2018 +0200 @@ -379,9 +379,15 @@ global _vm2rm:near proc _vm2rm near + ifdef NO386 p8086 extrn _vcpi:byte test [_vcpi],-1 + else + p386 + smsw ax ;SMSW cannot be trapped! :-) + and al,1 ;MSW_PE + endif jz vcpi_ret p386 pop ax @@ -391,7 +397,7 @@ push ds extrn sssp:word mov [sssp],sp - mov [sssp+2],ss + ;mov [sssp+2],ss call switch_to_pm diff -r a3684252aaf1 -r 2e46d946d7a8 ncdu/receipt --- a/ncdu/receipt Fri Oct 12 19:21:44 2018 +0200 +++ b/ncdu/receipt Tue Oct 16 16:37:20 2018 +0200 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="ncdu" -VERSION="1.12" +VERSION="1.13" CATEGORY="utilities" SHORT_DESC="NCurses Disk Usage." MAINTAINER="paul@slitaz.org" @@ -16,7 +16,6 @@ # Rules to configure and make the package. compile_rules() { - cd $src ./configure \ --prefix=/usr \ --infodir=/usr/share/info \ @@ -31,4 +30,3 @@ mkdir -p $fs/usr cp -a $install/usr/bin $fs/usr } -