Re: Please unblock syslinux 3.31-2

2007-02-06 Thread Daniel Baumann
Luk Claes wrote:
> Unblocked.

thanks.

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  [EMAIL PROTECTED]
Internet:   http://people.panthera-systems.net/~daniel-baumann/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Please unblock syslinux 3.31-2

2007-02-05 Thread Luk Claes

Daniel Baumann wrote:

Hi,

I included the other *.c32 modules and added a patch to allow syslinux
autodetecting while booting if the system has a 32bit or a 64bit CPU,
and hence choosing the configured kernel for it.

Please unblock syslinux, debdiff is attached.


Unblocked.

Cheers

Luk


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Please unblock syslinux 3.31-2

2007-02-04 Thread Daniel Baumann
Hi,

I included the other *.c32 modules and added a patch to allow syslinux
autodetecting while booting if the system has a 32bit or a 64bit CPU,
and hence choosing the configured kernel for it.

Please unblock syslinux, debdiff is attached.

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  [EMAIL PROTECTED]
Internet:   http://people.panthera-systems.net/~daniel-baumann/
diff -u syslinux-3.31/debian/patches/00list syslinux-3.31/debian/patches/00list
--- syslinux-3.31/debian/patches/00list
+++ syslinux-3.31/debian/patches/00list
@@ -1,0 +2 @@
+02-64bit-autodetection
diff -u syslinux-3.31/debian/rules syslinux-3.31/debian/rules
--- syslinux-3.31/debian/rules
+++ syslinux-3.31/debian/rules
@@ -63,7 +63,7 @@
 	install -d -m 0755 debian/syslinux/usr/lib/syslinux
 	install -m 0644 build/* debian/syslinux/usr/lib/syslinux
 
-	install -m 0644 copybs.com isolinux.bin isolinux-debug.bin ldlinux.bss ldlinux.sys pxelinux.0 com32/modules/menu.c32 dos/syslinux.com mbr.bin memdisk/memdisk win32/syslinux.exe debian/syslinux/usr/lib/syslinux
+	install -m 0644 copybs.com isolinux.bin isolinux-debug.bin ldlinux.bss ldlinux.sys pxelinux.0 com32/modules/*.c32 dos/syslinux.com mbr.bin memdisk/memdisk win32/syslinux.exe debian/syslinux/usr/lib/syslinux
 
 binary-indep: build install
 
diff -u syslinux-3.31/debian/changelog syslinux-3.31/debian/changelog
--- syslinux-3.31/debian/changelog
+++ syslinux-3.31/debian/changelog
@@ -1,3 +1,11 @@
+syslinux (3.31-2) unstable; urgency=medium
+
+  * Including all *.c32 modules (Closes: #391152).
+  * Added patch from Byron Stanoszek <[EMAIL PROTECTED]> to autodetect 64bit
+CPUs (Closes: #408138).
+
+ -- Daniel Baumann <[EMAIL PROTECTED]>  Sun,  4 Feb 2007 16:52:00 +0100
+
 syslinux (3.31-1) unstable; urgency=low
 
   * New upstream release.
only in patch2:
unchanged:
--- syslinux-3.31.orig/debian/patches/02-64bit-autodetection.dpatch
+++ syslinux-3.31/debian/patches/02-64bit-autodetection.dpatch
@@ -0,0 +1,142 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 01-64bit-autodetection.dpatch by Byron Stanoszek <[EMAIL PROTECTED]>
+##
+## DP: Allows auto-detection of 64bit CPUs (Closes: #408138), see
+## DP: http://syslinux.zytor.com/archives/2007-January/007832.html
+
[EMAIL PROTECTED]@
+
+diff -Naur syslinux-3.31.orig/cpuinit.inc syslinux-3.31/cpuinit.inc
+--- syslinux-3.31.orig/cpuinit.inc	2006-09-26 04:52:22.0 +
 syslinux-3.31/cpuinit.inc	2007-02-04 16:02:26.0 +
+@@ -48,12 +48,10 @@
+ 		rep movsd
+ 
+ ;
+-; Check if we're 386 (as opposed to 486+); if so we need to blank out
+-; the WBINVD instruction
++; Determine if we're running on a 64-bit CPU
+ ;
+-; We check for 486 by setting EFLAGS.AC
++; First, check if we're 386. If so, we need to blank out the WBINVD instruction
+ ;
+-%if DO_WBINVD
+ 		pushfd; Save the good flags
+ 		pushfd
+ 		pop eax
+@@ -69,6 +67,47 @@
+ ;
+ ; 386 - Looks like we better blot out the WBINVD instruction
+ ;
++%if DO_WBINVD
+ 		mov byte [try_wbinvd],0c3h		; Near RET
+-is_486:
+ %endif	; DO_WBINVD
++		jmp is_32bit
++is_486:
++;
++; Check if this CPU supports the CPUID command
++;
++		pushfd; Save the flags again
++		pushfd
++		pop eax
++		mov ebx,eax
++		xor eax,(1 << 21)		; CPUID bit
++		push eax
++		popfd
++		pushfd
++		pop eax
++		popfd; Restore the original flags
++		xor eax,ebx
++		jz is_32bit
++;
++; Now check for the 64-bit flag in the CPU features byte ($_0001, edx)
++; This is bit 30 for Intel CPUs, and bit 29 for AMD CPUs
++;
++		mov eax, h		; Find last Intel cpuid #
++		cpuid
++		cmp eax, h
++		je test_amd
++		mov eax, 0001h		; Read Intel CPU flags
++		cpuid
++		bt edx, 30			; 64-bit if bit 30 is set
++		jc is_64bit
++
++test_amd:	mov eax, 8000h		; Find last AMD cpuid #
++		cpuid
++		cmp eax, 8000h
++		jbe is_32bit
++		mov eax, 8001h		; Read AMD CPU flags
++		cpuid
++		bt edx, 29			; 64-bit if bit 29 is set
++		jnc is_32bit
++
++is_64bit:	mov byte [Is64Bit],1		; Flag that we're 64-bit
++is_32bit:
+diff -Naur syslinux-3.31.orig/keywords syslinux-3.31/keywords
+--- syslinux-3.31.orig/keywords	2006-09-26 04:52:22.0 +
 syslinux-3.31/keywords	2007-02-04 16:02:26.0 +
+@@ -1,6 +1,7 @@
+ menu
+ append
+ default
++default64
+ display
+ font
+ implicit
+diff -Naur syslinux-3.31.orig/keywords.inc syslinux-3.31/keywords.inc
+--- syslinux-3.31.orig/keywords.inc	2006-09-26 04:52:22.0 +
 syslinux-3.31/keywords.inc	2007-02-04 16:02:26.0 +
+@@ -46,6 +46,7 @@
+ 		keyword menu,	   pc_comment
+ 		keyword append,pc_append
+ 		keyword default,   pc_default
++		keyword default64, pc_default64
+ 		keyword display,   pc_filecmd,  get_msg_file
+ 		keyword font,  pc_filecmd,  loadfont
+ 		keyword implicit,  pc_setint16, AllowImplicit
+diff -Naur syslinux-3.31.orig/kwdhash.gen syslinux-3.31/kwdhash.gen
+--- syslinux-3.31.orig/kwdhash.gen	2006-09-26 04:52:27.0 +
 syslinux-3.31/kwdhash