Mailinglist Archive: opensuse-commit (1826 mails)

< Previous Next >
commit gfxboot
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Sat, 13 Sep 2008 01:23:52 +0200
  • Message-id: <20080912232353.0997E678161@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package gfxboot
checked in at Sat Sep 13 01:23:52 CEST 2008.


--------
--- arch/i386/gfxboot/gfxboot.changes 2008-08-25 11:18:35.000000000 +0200
+++ gfxboot/gfxboot.changes 2008-09-11 16:23:09.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Sep 11 16:22:45 CEST 2008 - snwint@xxxxxxx
+
+- support serial lines (fate #301595)
+
+-------------------------------------------------------------------



Old:
----
gfxboot-4.1.1.tar.bz2

New:
----
gfxboot-4.1.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gfxboot.spec ++++++
--- /var/tmp/diff_new_pack.e18929/_old 2008-09-13 01:23:01.000000000 +0200
+++ /var/tmp/diff_new_pack.e18929/_new 2008-09-13 01:23:01.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package gfxboot (Version 4.1.1)
+# spec file for package gfxboot (Version 4.1.2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -26,10 +26,10 @@
Requires: coreutils cpio mktemp perl master-boot-code dosfstools mtools
perl-HTML-Parser
AutoReqProv: on
Summary: Graphical Boot Logo for GRUB, LILO and SYSLINUX
-Version: 4.1.1
-Release: 2
+Version: 4.1.2
+Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gfxboot-4.1.1.tar.bz2
+Source: gfxboot-4.1.2.tar.bz2
Source1: openSUSE.tar.bz2
Source2: SLED.tar.bz2
Source3: SLES.tar.bz2
@@ -186,6 +186,8 @@
%ghost /boot/message

%changelog
+* Thu Sep 11 2008 snwint@xxxxxxx
+- support serial lines (fate #301595)
* Mon Aug 25 2008 snwint@xxxxxxx
- needs fribidi
- really add SLE themes

++++++ gfxboot-4.1.1.tar.bz2 -> gfxboot-4.1.2.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/gfxboot-4.1.1/bincode.asm new/gfxboot-4.1.2/bincode.asm
--- old/gfxboot-4.1.1/bincode.asm 2008-07-15 15:26:57.000000000 +0200
+++ new/gfxboot-4.1.2/bincode.asm 2008-09-11 15:26:30.000000000 +0200
@@ -77,7 +77,7 @@
sc.boot_drive equ 5
sc.callback equ 6
sc.bootloader_seg equ 8
-sc.reserved_1 equ 10
+sc.serial_port equ 10
sc.user_info_0 equ 12
sc.user_info_1 equ 16
sc.bios_mem_size equ 20
@@ -425,6 +425,27 @@

kbd_status dw 0

+sl.port equ 0
+sl.baud equ 2
+sl.scancode equ 4
+sl.status equ 5 ; bits:
+ ; 0: valid config
+ ; 1: input received
+ ; 2: baud autodetect
+sl.recv_mask equ 6 ; for autodetect
+sl.recv_cnt equ 7 ; dto.
+sl.baud_idx equ 8 ; dto.
+sl.size equ 9
+
+ ; 5 serial lines
+serial.lines.max equ 5
+serial.lines times serial.lines.max * sl.size db 0
+
+serial.port_noinit dw 0 ; port that was setup by bootloader
+serial.key dd 0 ; serial input
+
+ ; baud divisors
+serial.baud_tab db 1, 3, 6, 12, 0

sound_buf_size equ 4*1024
sound_buf_mask equ sound_buf_size - 1
@@ -783,6 +804,8 @@
pop dword [mem0.start]
push dword [es:esi+sc.mem0_end]
pop dword [mem0.end]
+ mov ax,[es:esi+sc.serial_port]
+ mov [serial.port_noinit],ax

mov eax,[es:esi+sc.callback]
or ax,ax ; check only offset
@@ -3950,12 +3973,19 @@
bits 32

get_key:
+ xor eax,eax
+ xchg eax,[serial.key]
+ or eax,eax
+ jnz get_key_90
+get_key_30:
mov ah,10h
int 16h
+get_key_80:
and eax,0ffffh
mov ecx,[es:417h-2]
xor cx,cx
add eax,ecx
+get_key_90:
ret


@@ -3987,6 +4017,20 @@
jmp get_key_to_60

get_key_to_30:
+ mov esi,serial.lines
+get_key_to_35:
+ test byte [esi+sl.status],1
+ jz get_key_to_40
+
+ call serial_get_byte
+ jnz get_key_to_60
+
+get_key_to_40:
+ add esi,sl.size
+ cmp esi,serial.lines + serial.lines.max * sl.size
+ jb get_key_to_35
+
+get_key_to_50:
call get_time
cmp edx,eax
jz get_key_to_20
@@ -4031,6 +4075,155 @@


; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+; Read serial line input.
+;
+; [esi] serial info struct
+;
+; return:
+; ZF 0: ok, key in [serial.key]
+; 1: no key
+;
+
+serial_get_byte:
+ pusha
+ mov dx,[esi+sl.port]
+ add dx,5
+ in al,dx
+ test al,1
+ jz serial_gb_80
+ mov ah,al
+ sub dx,5
+ in al,dx
+ test byte [esi+sl.status],4 ; autodetect?
+ jz serial_gb_70 ; no
+ mov bl,[esi+sl.recv_cnt]
+ inc bl
+ mov [esi+sl.recv_cnt],bl
+ mov bh,[esi+sl.recv_mask]
+ test ax,1880h
+ jz serial_gb_50
+ stc
+serial_gb_50:
+ adc bh,bh
+ mov [esi+sl.recv_mask],bh
+
+ cmp bl,1
+ ja serial_gb_62
+ ; 1 char
+ ; if ok, return it, else skip
+ test bh,1
+ jz serial_gb_70
+ jmp serial_gb_80
+serial_gb_62:
+ cmp bl,2
+ ja serial_gb_63
+ ; 2 chars
+ ; if last 2 were ok, return it, else skip
+ test bh,3
+ jz serial_gb_70
+ jmp serial_gb_80
+serial_gb_63:
+ cmp bl,3
+ ja serial_gb_64
+ ; 3 chars
+ ; if last 2 were ok, return it
+ ; if last 2 broken: choose new freq
+ test bh,3
+ jz serial_gb_70
+ and bh,3
+ cmp bh,3
+ jnz serial_gb_80
+ call serial_new_baud
+ jmp serial_gb_80
+serial_gb_64:
+ cmp bl,4
+ ja serial_gb_65
+ ; 4 chars
+ ; if last 2 were ok, return it
+ ; if last 2 broken: choose new freq
+ test bh,3
+ jz serial_gb_70
+ and bh,3
+ cmp bh,3
+ jnz serial_gb_80
+ call serial_new_baud
+ jmp serial_gb_80
+serial_gb_65:
+ ; 5 chars & more
+ ; if last 4 ok, return it & turn off autodetect
+ ; if last 2 were ok, return it
+ ; if last 2 broken: choose new freq
+ test bh,0fh
+ jnz serial_gb_66
+ and byte [esi+sl.status],~4
+serial_gb_66:
+ test bh,3
+ jz serial_gb_70
+ and bh,3
+ cmp bh,3
+ jnz serial_gb_80
+ call serial_new_baud
+ jmp serial_gb_80
+
+serial_gb_70:
+ and eax,0ffh
+ mov ah,[esi+sl.scancode]
+ mov [serial.key],eax
+ ; ZF = 0
+ or byte [esi+sl.status],2
+ jmp serial_gb_90
+serial_gb_80:
+ ; ZF = 1
+ xor ax,ax
+serial_gb_90:
+ popa
+ ret
+
+
+serial_new_baud:
+ movzx ebx,byte [esi+sl.baud_idx]
+ inc ebx
+ mov al,[serial.baud_tab+ebx]
+ or al,al
+ jnz serial_nb_20
+ xor ebx,ebx
+ mov al,[serial.baud_tab]
+serial_nb_20:
+ mov [esi+sl.baud_idx],bl
+ mov [esi+sl.baud],al
+
+ mov dx,[esi+sl.port]
+ add dx,3
+ mov al,83h
+ call slow_out
+ sub dx,3
+ mov al,[esi+sl.baud]
+ call slow_out
+ inc dx
+ mov al,[esi+sl.baud+1]
+ call slow_out
+ mov al,03h
+ add dx,2
+ call slow_out
+
+ xor eax,eax
+ mov [esi+sl.recv_mask],al
+ mov [esi+sl.recv_cnt],al
+
+serial_nb_80:
+ mov dx,[esi+sl.port]
+ add dx,5
+ in al,dx
+ test al,1
+ jz serial_nb_90
+ sub dx,5
+ in al,dx
+ jmp serial_nb_80
+
+serial_nb_90:
+ ret
+
+; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; Clear keyboard input buffer.
;

@@ -4048,6 +4241,155 @@


; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+; Setup serial lines.
+;
+
+ bits 32
+
+serial_setup:
+ mov esi,serial.lines
+
+ ; add bootloader configured port to end of our list
+ mov ax,[serial.port_noinit]
+ or ax,ax
+ jz serial_setup_10
+ mov [esi + (serial.lines.max - 1) * sl.size + sl.port],ax
+ mov byte [esi + (serial.lines.max - 1) * sl.size +
sl.scancode],0xf0 + serial.lines.max - 1
+ mov byte [esi + (serial.lines.max - 1) * sl.size + sl.status],1
+
+ ; ensure every port is listed only once
+
+serial_setup_10:
+ test byte [esi+sl.status],1
+ jz serial_setup_40
+ mov ax,[esi+sl.port]
+ lea edi,[esi+sl.size]
+serial_setup_20:
+ test byte [edi+sl.status],1
+ jz serial_setup_30
+ cmp ax,[edi+sl.port]
+ jnz serial_setup_30
+ mov byte [edi+sl.status],0
+serial_setup_30:
+ add edi,sl.size
+ cmp edi,serial.lines + serial.lines.max * sl.size
+ jb serial_setup_20
+
+serial_setup_40:
+ add esi,sl.size
+ cmp esi,serial.lines + (serial.lines.max - 1) * sl.size
+ jb serial_setup_10
+
+ ; set them up
+
+ mov esi,serial.lines
+serial_setup_50:
+ test byte [esi+sl.status],1
+ jz serial_setup_70
+
+ mov ax,[esi+sl.port]
+ cmp ax,[serial.port_noinit]
+ jz serial_setup_70
+
+ ; serial port init taken from syslinux
+ lea edx,[eax+3] ; DX -> LCR
+ mov al,83h ; Enable DLAB
+ call slow_out
+ sub dx,3 ; DX -> LS
+ mov al,[esi+sl.baud] ; Divisor, low
+ call slow_out
+ inc dx ; DX -> MS
+ mov al,[esi+sl.baud+1] ; Divisor, high
+ call slow_out
+ mov al,03h ; Disable DLAB
+ inc dx ; DX -> LCR
+ inc dx
+ call slow_out
+ in al,dx ; Read back LCR (detect missing
hw)
+ cmp al,03h ; If nothing here we'll read 00
or FF
+ jz serial_setup_60
+ mov byte [esi+sl.status],0
+ jmp serial_setup_70
+serial_setup_60:
+ dec dx
+ dec dx ; DX -> IER
+ xor al,al ; IRQ disable
+ call slow_out
+ inc dx ; DX -> FCR/IIR
+ mov al,01h
+ call slow_out ; Enable FIFOs if present
+ in al,dx
+ cmp al,0C0h ; FIFOs enabled and usable?
+ jae serial_setup_70
+ xor ax,ax ; Disable FIFO if unusable
+ call slow_out
+
+serial_setup_70:
+ add esi,sl.size
+ cmp esi,serial.lines + (serial.lines.max - 1) * sl.size
+ jb serial_setup_50
+
+serial_setup_90:
+ ret
+
+
+slow_out:
+ out dx,al
+
+ out 80h,al
+ out 80h,al
+ ret
+
+
+; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+; Setup serial lines.
+;
+; eax char
+;
+
+ bits 32
+
+serial_putc:
+ mov ebx,eax
+ mov ah,al
+ mov esi,serial.lines
+ shr ebx,24
+serial_putc_20:
+ test byte [esi+sl.status],2
+ jz serial_putc_70
+
+ or bl,bl
+ jz serial_putc_30
+ cmp bl,[esi+sl.scancode]
+ jnz serial_putc_70
+serial_putc_30:
+ mov dx,[esi+sl.port]
+
+ add dx,5
+ mov edi,[es:46ch]
+ add edi,3
+serial_putc_50:
+ ; wait until output reg ready (about 1/10s)
+ cmp edi,[es:46ch]
+ jb serial_putc_70
+
+ in al,dx
+ test al,20h
+ jz serial_putc_50
+ sub dx,5
+ mov al,ah
+ call slow_out
+
+serial_putc_70:
+ add esi,sl.size
+ cmp esi,serial.lines + serial.lines.max * sl.size
+ jb serial_putc_20
+
+serial_putc_90:
+ ret
+
+
+; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; Get system time.
;
; return:
@@ -10216,6 +10558,146 @@
jmp pr_getint


+;; serialputc - write char to serial line
+;
+; group: text
+;
+; ( int1 -- )
+;
+; int1: char (bit 0-23: char, bit 24-31: console id)
+;
+
+ bits 32
+
+prim_serialputc:
+ call pr_setint
+ call serial_putc
+ clc
+ ret
+
+
+;; serialsetconfig - set serial line config
+;
+; group: system
+;
+; ( int1 int2 int3 -- )
+;
+; int1: line number (0-4)
+; int2: port
+; int3: baud
+;
+
+ bits 32
+
+prim_serialsetconfig:
+ mov bp,pserr_pstack_underflow
+ cmp dword [pstack.ptr],3
+ jc prim_ssc_90
+ mov ecx,2
+ call get_pstack_tos
+ cmp dl,t_int
+ stc
+ mov bp,pserr_wrong_arg_types
+ jnz prim_ssc_90
+ push eax
+ mov dx,t_int + (t_int << 8)
+ call get_2args
+ pop ebx
+ jc prim_ssc_90
+ sub dword [pstack.ptr],3
+ ; ebx: line
+ ; ecx: port
+ ; eax: baud
+
+ cmp ebx,serial.lines.max - 1
+ jae prim_ssc_80
+ imul esi,ebx,sl.size
+ add esi,serial.lines
+ mov byte [esi+sl.status],0
+ add bl,0f0h
+ mov [esi+sl.scancode],bl
+ cmp ecx,10000h
+ jae prim_ssc_80
+ cmp ecx,4
+ jae prim_ssc_40
+ mov cx,[es:0x400+ecx*2]
+ or cx,cx
+ jz prim_ssc_80
+prim_ssc_40:
+ mov [esi+sl.port],cx
+ or eax,eax
+ jnz prim_ssc_60
+ mov byte [esi+sl.recv_mask],al
+ mov byte [esi+sl.recv_cnt],al
+ mov byte [esi+sl.baud_idx],al
+ movzx eax,byte [serial.baud_tab]
+ or byte [esi+sl.status],4
+ jmp prim_ssc_70
+prim_ssc_60:
+ cmp eax,450
+ jb prim_ssc_80
+ mov ebx,115200
+ cmp eax,ebx
+ ja prim_ssc_80
+ xchg eax,ebx
+ cdq
+ div ebx
+prim_ssc_70:
+ mov [esi+sl.baud],ax
+ or byte [esi+sl.status],1
+prim_ssc_80:
+ clc
+prim_ssc_90:
+ ret
+
+
+;; serialgetbaud - get current baud rate
+;
+; group: text
+;
+; ( int1 -- int2 )
+;
+; int1: console
+; int2: baud (0 = undefined)
+;
+
+ bits 32
+
+prim_serialgetbaud:
+ call pr_setint
+ cmp eax,serial.lines.max
+ jae prim_serialgetbaud_80
+ imul ebx,eax,sl.size
+ xor eax,eax
+ test byte [serial.lines+ebx+sl.status],1
+ jz prim_serialgetbaud_80
+ mov ax,[serial.lines+ebx+sl.baud]
+ mov ecx,115200
+ xchg eax,ecx
+ cdq
+ div ecx
+ jmp prim_serialgetbaud_90
+prim_serialgetbaud_80:
+ xor eax,eax
+prim_serialgetbaud_90:
+ jmp pr_getint
+
+
+;; serial.init - program serial lines
+;
+; group: system
+;
+; ( -- )
+;
+
+ bits 32
+
+prim_serialinit:
+ call serial_setup
+ clc
+ ret
+
+
;; idle - run stuff when idle
;
; group: system
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/gfxboot-4.1.1/Changelog new/gfxboot-4.1.2/Changelog
--- old/gfxboot-4.1.1/Changelog 2008-08-20 13:40:14.000000000 +0200
+++ new/gfxboot-4.1.2/Changelog 2008-09-11 15:57:38.000000000 +0200
@@ -1,3 +1,6 @@
+11/9/2008: v4.1.2
+ - support serial lines (fate #301595)
+
19/8/2008: v4.1.1
- activated SLE themes

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/gfxboot-4.1.1/mk_vocabulary
new/gfxboot-4.1.2/mk_vocabulary
--- old/gfxboot-4.1.1/mk_vocabulary 2008-04-28 10:26:49.000000000 +0200
+++ new/gfxboot-4.1.2/mk_vocabulary 2008-09-11 15:13:56.000000000 +0200
@@ -74,7 +74,7 @@

memcpy sysconfig _readsector sysinfo

- getkey
+ getkey serial.init serial.putc serial.setconfig serial.getbaud

xxx test1 test2 test3 test4 test5 test6

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/gfxboot-4.1.1/VERSION new/gfxboot-4.1.2/VERSION
--- old/gfxboot-4.1.1/VERSION 2008-08-20 13:39:57.000000000 +0200
+++ new/gfxboot-4.1.2/VERSION 2008-09-10 18:48:32.000000000 +0200
@@ -1 +1 @@
-4.1.1
+4.1.2

++++++ openSUSE.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/themes/openSUSE/data-install/gfxboot.cfg
new/themes/openSUSE/data-install/gfxboot.cfg
--- old/themes/openSUSE/data-install/gfxboot.cfg 2008-07-14
18:14:13.000000000 +0200
+++ new/themes/openSUSE/data-install/gfxboot.cfg 2008-09-11
15:25:47.000000000 +0200
@@ -94,9 +94,9 @@

[install]
; show welcome animation
-welcome=1
+welcome=0
; beep when menu is ready
-beep=1
+beep=0
; main menu item shown only if iso is tagged for media check
mediacheck=mediachk
; main menu items where user can't add boot options
@@ -130,6 +130,18 @@
dud.url=
; if 'dud=url': menu item name (default = 'URL')
dud.url.name=
+; serial line setup (up to four lines)
+; format: port,baud,dev
+; - port: 0-3: first four BIOS serial lines (COM1-COM4); >=4: I/O port
(0x3f8)
+; - baud: baud rate (e.g. 115200); 0 = autodetect (considers baud rates >=
9600)
+; - dev: linux device name (e.g. ttyS0)
+; - all lines are set up with 8 bits, no parity, 1 stop bit
+; - if the bootloader also has a serial line setup, the port is
+; automatically used
+serial.line0=0,0,ttyS0
+serial.line1=1,0,ttyS1
+serial.line2=
+serial.line3=

[boot]
; show welcome animation
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/themes/openSUSE/src/common.inc
new/themes/openSUSE/src/common.inc
--- old/themes/openSUSE/src/common.inc 2008-07-15 15:27:13.000000000 +0200
+++ new/themes/openSUSE/src/common.inc 2008-09-11 11:35:46.000000000 +0200
@@ -142,6 +142,8 @@
dup 0xff00 and 16 shl over 0xff and dup 0xe0 eq { pop 0 } if add /key exch
def
16 shr 0xffff and /keystat exch def

+ key 24 shr 0xff and dup 0xf0 ge exch 0xf4 le and { key serial.input return }
if
+
key

config.keymap { mapkey } if
@@ -714,6 +716,19 @@

dup .text info.msg put

+ serial.line.status {
+ serial.infobox .undef eq {
+ /serial.infobox .xm_size array def
+ serial.infobox .xm_current 0 put
+ } if
+
+ serial.infobox .xm_title 2 index .title get put
+ serial.infobox .xm_text info.msg put
+ serial.infobox .xm_list [ info.type 1 eq { "reboot" } { "ok" } ifelse ] put
+
+ serial.infobox.setup
+ } if
+
dup window.init
window.show

@@ -741,6 +756,12 @@

dup strsize pop neg progress.text.x add progress.text.y moveto
window.current .color.fg get setcolor
+
+ serial.line.status {
+ "\x08\x08\x08\x08" serial.show
+ dup serial.show
+ } if
+
dup show
free

@@ -815,6 +836,12 @@

0 progress.percent

+ serial.line.status {
+ "\n" serial.show
+ dia .text get serial.show
+ " 0%" serial.show
+ } if
+
} def


@@ -827,6 +854,9 @@
/load_error false def
boot.ed.list boot.window .ed.focus get get edit.showcursor
} if
+
+ serial.line.status { "\n\n" serial.show } if
+
} def


@@ -1573,6 +1603,15 @@
/dud.url "dud.url" "" gfxconfig.set.str
/dud.url.name "dud.url.name" "" gfxconfig.set.str

+/serial.line0 "serial.line0" [ ] gfxconfig.set.array_str
+/serial.line1 "serial.line1" [ ] gfxconfig.set.array_str
+/serial.line2 "serial.line2" [ ] gfxconfig.set.array_str
+/serial.line3 "serial.line3" [ ] gfxconfig.set.array_str
+
+/serial.lines [
+ serial.line0 serial.line1 serial.line2 serial.line3
+] def
+
% Array of menu entries with no boot option input field.
/config.nobootoptions "nobootoptions" [ ] gfxconfig.set.array_str

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/themes/openSUSE/src/main.bc
new/themes/openSUSE/src/main.bc
--- old/themes/openSUSE/src/main.bc 2008-04-08 12:54:33.000000000 +0200
+++ new/themes/openSUSE/src/main.bc 2008-09-03 17:23:35.000000000 +0200
@@ -3,6 +3,7 @@

%% include timeout.inc
%% include common.inc
+%% include serial.inc

%% include ../po/text.inc
%% include window.inc
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/themes/openSUSE/src/serial.inc
new/themes/openSUSE/src/serial.inc
--- old/themes/openSUSE/src/serial.inc 1970-01-01 01:00:00.000000000 +0100
+++ new/themes/openSUSE/src/serial.inc 2008-09-11 15:18:04.000000000 +0200
@@ -0,0 +1,517 @@
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

+% Some vars.
+
+/act.nop 0 def
+/act.boot 1 def
+
+/.sm.setup 0 def
+/.sm.ok 1 def
+
+/serial.action act.nop def
+
+/serial.setup /serial.setup.start def
+
+/serial.menu.index 0 def
+
+/serial.line.status 0 def
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

+% serial line input event handling
+%
+% ( key -- input_buffer menu_entry action )
+%
+% key
+% bit 0-7 ascii
+% bit 24-32 scan code (0xf0 + serial line number)
+%
+% action
+% 0: ok, stay in input loop
+% 1: switch to text mode
+% >=2: start linux
+%
+/serial.input {
+ dup 24 shr 0x0f and 1 exch shl serial.line.status or /serial.line.status
exch def
+
+ 0xffffff and
+
+ % ^? -> ^H
+ dup 0x7f eq { pop 8 } if
+
+ serial.setup exec
+
+ serial.edit
+ dup 0 eq { pop "" -1 0 return } if
+
+ 1 eq { serial.menu.ok } { serial.menu.prev } ifelse
+
+ window.action actCloseInfo eq {
+ /window.action actNothing def
+ window.done
+ } if
+
+ serial.action act.boot eq {
+ % /serial.setup serial.menu.layout serial.menu.index get .sm.setup get def
+
+ serial.cmdline serial.menu_idx 2
+ return
+ } if
+
+ "" -1 0
+} def
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Write string to serial line.
+%
+% ( str1 -- )
+%
+/serial.show {
+ {
+ dup 0x0a eq { 0x0d serial.putc } if
+ serial.putc
+ } forall
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% ( str1 -- )
+%
+/serial.edit.init {
+ serial.edit.buf exch strcpy
+ "> " serial.show serial.show
+} def
+
+/serial.edit.buf 1024 string def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% ( int1 -- int2 )
+%
+/serial.edit {
+ dup 0x0d eq {
+ "\n\n" serial.show
+ pop 1 return
+ } if
+
+ dup 0x1b eq {
+ "\n\n" serial.show
+ pop 2 return
+ } if
+
+ dup 0x08 eq {
+ serial.edit.buf length 0 gt {
+ serial.edit.buf dup length 1 sub 0 put
+ "\x08 \x08" serial.show
+ } if
+ pop 0 return
+ } if
+
+ dup 0x15 eq {
+ serial.edit.buf length 0 gt {
+ serial.edit.buf length {
+ "\x08 \x08" serial.show
+ } repeat
+ serial.edit.buf 0 0 put
+ } if
+ pop 0 return
+ } if
+
+ dup 0x20 ge over 0x7e le and {
+ serial.edit.buf cvp length serial.edit.buf length 1 add gt {
+ serial.edit.buf dup length add dup 1 0 put 0 2 index put
+
+ serial.putc 0 return
+ } if
+ } if
+
+ pop 0
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% ( -- )
+%
+/serial.smenu.init {
+ "\n=== " serial.show
+ smenu .xm_title get exec serial.show
+ " ===\n\n" serial.show
+ smenu .xm_text get exec serial.show
+ "\n\n" serial.show
+
+ /serial.smenu.cnt 0 def
+ /serial.smenu.tmp 256 string def
+
+ smenu .xm_list get {
+ exec
+ serial.smenu.cnt smenu .xm_current get eq { " * " } { " " } ifelse
+ /serial.smenu.cnt inc
+ serial.smenu.cnt
+ smenu .xm_list get length 10 ge { "%2d)%s%s\n" } { "%d)%s%s\n" } ifelse
+ serial.smenu.tmp sprintf
+ serial.smenu.tmp serial.show
+ } forall
+
+ /serial.smenu.tmp xfree
+
+ "\n" serial.show
+
+ "" serial.edit.init
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Draw main menu.
+%
+% ( int1 -- int2 )
+%
+% int1: key
+% int2: key
+%
+/serial.setup.start {
+ /serial.menu.layout [
+ [ /serial.main.setup /serial.main.ok ]
+ xmenu.bits .xm_list get length 1 gt { [ /serial.bits.setup /serial.bits.ok
] } if
+ xmenu.kernelopts .undef ne { [ /serial.kernel.setup /serial.kernel.ok ] }
if
+ [ /serial.options.setup /serial.options.ok ]
+ [ /serial.infobox.setup /serial.infobox.ok ]
+ ] def
+
+ % go for text mode (or use 0?)
+ xmenu.video .xm_current 1 put
+
+ "\nopenSUSE 11.1 installation\n\n" serial.show
+
+ /serial.setup /serial.nop def
+
+ serial.menu.again
+
+ pop 0
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Setup main menu.
+%
+% ( -- )
+%
+/serial.main.setup {
+ smenu.main .undef eq {
+ /smenu.main .xm_size array def
+
+ smenu.main .xm_current menu.entry put
+ smenu.main .xm_title "Main Menu" put
+ smenu.main .xm_text "Select a boot entry." put
+ smenu.main .xm_list [ menu.texts { menuitemmap } forall ] put
+ } if
+
+ /smenu smenu.main def
+
+ serial.smenu.init
+
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Leave main menu.
+%
+% ( -- )
+%
+/serial.main.ok {
+ serial.edit.buf to_number
+
+ menu.entry false MenuSelect
+
+ serial.smenu.select {
+ /menu.entry smenu .xm_current get def
+ serial.menu.next
+ } {
+ serial.menu.again
+ } ifelse
+
+ menu.entry true MenuSelect
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Setup kernel menu.
+%
+% ( -- )
+%
+/serial.kernel.setup {
+ xmenu.kernelopts .xm_text "Select a predefined set of kernel options." put
+
+ /smenu xmenu.kernelopts def
+
+ serial.smenu.init
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Leave kernel menu.
+%
+% ( -- )
+%
+/serial.kernel.ok {
+ serial.edit.buf to_number
+ serial.smenu.select { serial.menu.next } { serial.menu.again } ifelse
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Setup arch menu.
+%
+% ( -- )
+%
+/serial.bits.setup {
+ xmenu.bits .xm_text "32 or 64 bit?" put
+
+ /smenu xmenu.bits def
+
+ serial.smenu.init
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Leave arch menu.
+%
+% ( -- )
+%
+/serial.bits.ok {
+ serial.edit.buf to_number
+ serial.smenu.select { serial.menu.next } { serial.menu.again } ifelse
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Setup lang menu.
+%
+% ( -- )
+%
+/serial.lang.setup {
+ /smenu xmenu.lang def
+
+ serial.smenu.init
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Leave lang menu.
+%
+% ( -- )
+%
+/serial.lang.ok {
+ serial.edit.buf to_number
+ serial.smenu.select { serial.menu.next } { serial.menu.again } ifelse
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Setup options menu.
+%
+% ( -- )
+%
+/serial.options.setup {
+ "=== Boot Options ===\n" serial.show
+
+"
+Edit boot options.
+
+- lang=<locale> selects the default language
+- install=<url> sets the install repository
+- dud=<url> adds a driverupdate (option can be given more than once)
+
+"
+ serial.show
+
+ boot.ed.list buildcmdline /serial.menu_idx exch def /serial.cmdline exch def
+
+ serial.console.option dup .undef ne {
+ " %s" serial.cmdline dup length add sprintf
+ } { pop } ifelse
+
+ serial.cmdline serial.edit.init
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Options -> Boot.
+%
+% ( -- )
+%
+/serial.options.ok {
+ serial.cmdline serial.edit.buf strcpy pop
+
+ % point to infobox
+ /serial.menu.index inc
+
+ /serial.action act.boot def
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Setup infobox.
+%
+% ( -- )
+%
+/serial.infobox.setup {
+ /smenu serial.infobox def
+
+ serial.smenu.init
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Leave infobox.
+%
+% ( -- )
+%
+/serial.infobox.ok {
+ serial.edit.buf to_number
+ serial.smenu.select {
+ serial.menu.prev
+ /window.action actCloseInfo def
+ } {
+ serial.menu.again
+ } ifelse
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Do nothing.
+%
+% ( -- )
+%
+/serial.nop {
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Convert String to number.
+%
+% ( str1 -- int1 )
+%
+% Returns -1 if str1 is not a number.
+%
+/to_number {
+ dup cvn
+ dup 0 ne { exch pop return } if
+ pop
+ dup "" eq exch "0" eq or { 0 } { -1 } ifelse
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Ensure serial.menu.index has a valid value.
+%
+% ( -- )
+%
+/serial.menu.index.normalize {
+ serial.menu.index serial.menu.layout length gt { /serial.menu.index
serial.menu.layout length def } if
+ serial.menu.index 0 lt { /serial.menu.index 0 def } if
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Reinit current menu.
+%
+% ( -- )
+%
+/serial.menu.again {
+ serial.menu.index.normalize
+ serial.menu.layout serial.menu.index get .sm.setup get exec
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Run 'ok' action for current menu.
+%
+% ( -- )
+%
+/serial.menu.ok {
+ serial.menu.index.normalize
+ serial.menu.layout serial.menu.index get .sm.ok get exec
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Go to next menu.
+%
+% ( -- )
+%
+/serial.menu.next {
+ /serial.menu.index inc
+ serial.menu.again
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Go to previous menu.
+%
+% ( -- )
+%
+/serial.menu.prev {
+ /serial.menu.index dec
+ serial.menu.again
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Select menu item (update smenu->.xm_current).
+%
+% ( int1 -- bool1 )
+%
+/serial.smenu.select {
+ smenu .xm_list get length over lt over 0 lt or {
+ pop
+
+ false
+ } {
+ dup 0 eq { pop smenu .xm_current get 1 add } if
+
+ 1 sub smenu .xm_current rot put
+
+ true
+ } ifelse
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Build 'console' option for kernel.
+%
+% ( -- str1 )
+%
+/serial.console.option {
+
+ /serial.tmp.bm 0 def
+ {
+ serial.line.status 1 serial.tmp.bm shl and { exit } if
+ /serial.tmp.bm inc
+ serial.tmp.bm 8 ge { /serial.tmp.bm .undef def exit } if
+ } loop
+
+ serial.tmp.bm .undef eq { .undef return } if
+ serial.lines length serial.tmp.bm le { .undef return } if
+
+ serial.lines serial.tmp.bm get 2 aget dup .undef ne {
+ serial.tmp.bm serial.getbaud exch
+ "console=%s,%d" serial.console.buf sprintf
+ serial.console.buf
+ } if
+
+} def
+
+/serial.console.buf 64 string def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Setup serial lines.
+%
+0 1 serial.lines length 1 sub {
+ serial.lines over get dup length 2 ge {
+ dup 0 get cvn exch 1 get cvn serial.setconfig
+ } {
+ pop pop
+ } ifelse
+} for
+
+serial.init
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/themes/openSUSE/src/system.inc
new/themes/openSUSE/src/system.inc
--- old/themes/openSUSE/src/system.inc 2008-06-24 15:27:25.000000000 +0200
+++ new/themes/openSUSE/src/system.inc 2008-09-10 11:33:04.000000000 +0200
@@ -365,6 +365,16 @@


% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+% Decrement variable.
+%
+% ( dict_ref ) ==> ( )
+%
+/dec {
+ dup exec 1 sub def
+} def
+
+
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Copy src to dst.
%
% Watch overlapping src & dst!
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/themes/openSUSE/src/xmenu.inc
new/themes/openSUSE/src/xmenu.inc
--- old/themes/openSUSE/src/xmenu.inc 2008-05-15 16:24:02.000000000 +0200
+++ new/themes/openSUSE/src/xmenu.inc 2008-09-10 12:11:23.000000000 +0200
@@ -27,7 +27,8 @@
/.xm_panel_x 6 def % panel entry x pos
/.xm_vspace 7 def % vspace per menu
/.xm_title 8 def % xmenu title
-/.xm_size 9 def % xmenu size
+/.xm_text 9 def % xmenu text
+/.xm_size 10 def % xmenu size


% short hands

++++++ SLED.tar.bz2 ++++++

++++++ SLES.tar.bz2 ++++++

++++++ upstream.tar.bz2 ++++++


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread