wok-6.x rev 23989
syslinux: iso2exe/init should keep keyboard config
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Dec 05 09:55:13 2020 +0000 (2020-12-05) |
parents | 6b474fa55170 |
children | fb34bff6cff6 |
files | linld/stuff/src/HIMEM.CPP linld/stuff/src/LINK.CMD linld/stuff/src/LINKX.CMD linld/stuff/src/pipehole.awk syslinux/stuff/iso2exe/init |
line diff
1.1 --- a/linld/stuff/src/HIMEM.CPP Thu Dec 03 09:39:27 2020 +0000 1.2 +++ b/linld/stuff/src/HIMEM.CPP Sat Dec 05 09:55:13 2020 +0000 1.3 @@ -7,11 +7,11 @@ 1.4 #include "common.h" 1.5 1.6 u16 skip_alloc; 1.7 +static u32 buf; 1.8 1.9 void load_image(struct image_himem *m) { 1.10 m->remaining = m->size; 1.11 m->buf = m->fallback; // set no_exit btw: die() won't return to DOS 1.12 - u32 buf; 1.13 u32* bufv= &buf; 1.14 if(((u16 *)&m->fallback)[1] >= (skip_alloc|0x10)) { // >= _1m ? 1.15 if(vcpi) {
2.1 --- a/linld/stuff/src/LINK.CMD Thu Dec 03 09:39:27 2020 +0000 2.2 +++ b/linld/stuff/src/LINK.CMD Sat Dec 05 09:55:13 2020 +0000 2.3 @@ -1,1 +1,1 @@ 2.4 -_beg.obj memtop.obj memcpy32.obj jump.obj vcpi.obj xmm.obj a20.obj crtl.obj himem.obj load.obj linld.obj _end.obj, linld 2.5 +_beg.obj memtop.obj memcpy32.obj jump.obj vcpi.obj xmm.obj a20.obj crtl.obj load.obj himem.obj linld.obj _end.obj, linld
3.1 --- a/linld/stuff/src/LINKX.CMD Thu Dec 03 09:39:27 2020 +0000 3.2 +++ b/linld/stuff/src/LINKX.CMD Sat Dec 05 09:55:13 2020 +0000 3.3 @@ -1,1 +1,1 @@ 3.4 -_beg.obj memtop.obj memcpy32.obj jump.obj vcpi.obj xmm.obj a20.obj crtl.obj himem.obj load.obj iso9660.obj tazboot.obj _end.obj, tazboot 3.5 +_beg.obj memtop.obj memcpy32.obj jump.obj vcpi.obj xmm.obj a20.obj crtl.obj load.obj himem.obj iso9660.obj tazboot.obj _end.obj, tazboot
4.1 --- a/linld/stuff/src/pipehole.awk Thu Dec 03 09:39:27 2020 +0000 4.2 +++ b/linld/stuff/src/pipehole.awk Sat Dec 05 09:55:13 2020 +0000 4.3 @@ -55,25 +55,30 @@ 4.4 if (/do strcatb/) islinld=5 4.5 } # file == "linld.cpp" 4.6 if (file == "himem.cpp") { 4.7 + if (/sp,bp/ || /pop bp/) next 4.8 if (/void load_image/) ishimem=1 4.9 if (ishimem == 1 && is386 == 0) { 4.10 if (/si\+8\]$/ || /si\+4\]$/ || /si\+16\]$/) next 4.11 if (/si\+6\]$/ || /si\+2\]$/ || /si\+14\]$/) sub(/mov dx,/,"les dx,d") 4.12 - if (/si\+12\],ax/ || /si\+16\],ax/ || /bp-2\],ax/) sub(/,ax/,",es") 4.13 + if (/si\+12\],ax/ || /si\+16\],ax/ || /DGROUP:buf\+2,ax/) sub(/,ax/,",es") 4.14 + if (/dx,dword ptr \[si\+14\]/ || /DGROUP:buf,dx/) sub(/dx/,"ax") 4.15 } 4.16 if (ishimem == 1) { 4.17 if (/do \{/) ishimem=2 4.18 if (/byte ptr DGROUP:_vcpi,0/) print " mov bx,si" 4.19 - if (/bx,si/) next 4.20 - if (/sp,6/) { 4.21 - print " push si" 4.22 - print " push si" 4.23 + if (/bx,si/ || /push bp/ || /bp,sp/ || /push di/) next 4.24 + if (/sp,2/) { 4.25 next 4.26 } 4.27 + if (/bp\+4/) { 4.28 + print " global load_imagez:near" 4.29 + print "load_imagez:" 4.30 + $0=" xchg ax,si" 4.31 + } 4.32 } 4.33 if (ishimem == 2) { 4.34 if (/movzx/) print " cwde" 4.35 - if (/bp-6/) next 4.36 + if (/bp-2/ || /pop di/) next 4.37 if (/storepage.bufv/) { 4.38 print " inc ax" 4.39 print " push ax" 4.40 @@ -81,10 +86,28 @@ 4.41 if (/buf \+= size;/) { 4.42 print " pop ax" 4.43 } 4.44 - if (/Read error/) ishimem=0 4.45 + if (/endp/) ishimem=0 4.46 } 4.47 } # file == "himem.cpp" 4.48 if (file == "load.cpp") { 4.49 + if (/load_image\(/) { 4.50 + if (isload == 3) isload=13 4.51 + else isload=14 4.52 + } 4.53 + if (isload == 14) { # LOAD.LST 4.54 + if (/call/) { 4.55 + print " xchg ax,di" 4.56 + print " pop di" 4.57 + print " extrn load_imagez" 4.58 + $0=" jmp short load_imagez" 4.59 + } 4.60 + if (/ret/) isload=0 4.61 + if (/pop/ || /ret/ || /push/) next 4.62 + } 4.63 + if (isload == 13) { # LOAD.LST 4.64 + sub(/push /,"mov ax,") 4.65 + if (/pop/) { isload=3; next } 4.66 + } 4.67 if (/i\+21\],513$/) isload=11 4.68 if (isload == 12) { # LOAD.LST 4.69 if (/cmp/) next 4.70 @@ -138,20 +161,16 @@ 4.71 if (/\[0\] = m-\>fallback/) isload=6 4.72 if (isload == 6) { # LOAD.LST 4.73 if (/si\+2/) $0=" lodsw" 4.74 - if (/les/) sub(/bx,/,"ax,") 4.75 - if (/bx\+4/ || /es:/) { 4.76 - if (/bx\+4/) isload=0 4.77 + if (/les/) sub(/bx,/,"di,") 4.78 + if (/bx\+4/ || /es:/) next 4.79 + if (/si\+6/) { 4.80 + print " movsw" 4.81 + print " movsw" 4.82 + print " movsw" 4.83 + print " movsw" 4.84 next 4.85 } 4.86 - if (/si\+6/) { 4.87 - print " xchg ax,di" 4.88 - print " movsw" 4.89 - print " movsw" 4.90 - print " movsw" 4.91 - print " movsw" 4.92 - print " xchg ax,di" 4.93 - next 4.94 - } 4.95 + if (/ pop si/) print " pop di" 4.96 } 4.97 if (/version_string = /) isload=5 4.98 if (isload == 5) { # LOAD.LST 4.99 @@ -176,9 +195,15 @@ 4.100 } 4.101 if (/void load_initrd\(\)/) isload=3 4.102 if (isload == 3) { # LOAD.LST 4.103 - if(/push di/ || /pop di/) next 4.104 + if (/push si/) { print; $0=" push di" } 4.105 + if(/jmp/) next 4.106 sub(/\[di/,"[bx") 4.107 sub(/\di,/,"bx,") 4.108 + if (/@puts\$qpxzc/) { 4.109 + if (hold == 3) { print s; hold=0 } 4.110 + print " pop si" 4.111 + sub(/call/,"jmp") 4.112 + } 4.113 } 4.114 if (/vid_mode = vid_mode/) isload=2 4.115 if (isload == 2) { # LOAD.LST 4.116 @@ -203,6 +228,13 @@ 4.117 } 4.118 } # file == "load.cpp" 4.119 if (file == "iso9660.cpp") { 4.120 + if (/x->curpos \+= x->entrysize/) isiso=14 4.121 + if (isiso == 14) { # ISO9660.LST 4.122 + if (/ax,ax/) { 4.123 + print "return0:" 4.124 + isiso=0 4.125 + } 4.126 + } 4.127 if (/p = x->buffer \+ 34/) isiso=13 4.128 if (isiso == 13) { # ISO9660.LST 4.129 if (/di,si/) $0=" xchg ax,bx" 4.130 @@ -323,6 +355,8 @@ 4.131 if (/add word ptr \[si\+32\],ax/) $0=" add bx,word ptr [si+16]" 4.132 if (/al,/ || /,al/) sub(/al/,"cl") 4.133 if (/cmp byte ptr \[si\+34\],0/) $0=" or cl,cl" 4.134 + if (/ax,ax/) next 4.135 + if (/short @.@506/) $0=" jmp return0" 4.136 if (/jne @@0$/) next 4.137 if (/jmp @.@58$/) sub(/jmp/,"je") 4.138 sub(/mov ax,-1/,"dec ax")
5.1 --- a/syslinux/stuff/iso2exe/init Thu Dec 03 09:39:27 2020 +0000 5.2 +++ b/syslinux/stuff/iso2exe/init Sat Dec 05 09:55:13 2020 +0000 5.3 @@ -123,7 +123,6 @@ 5.4 xhascustomconf=false 5.5 text() 5.6 { 5.7 - $uncpio $(ls -r $media/boot/rootfs?*.* | sed q) 5.8 init= 5.9 cmdline="$(cat /proc/cmdline)" 5.10 if $xhascustomconf 2> /dev/null; then