Arnold Maderthaner
2005-Dec-09 19:55 UTC
[syslinux] Development Question for version 2.11 of isolinux
Hi 2 all !
I want to implement a new option into version 2.11 of syslinux:
The feature should do the following:
Ask the user if he really wants to boot from dvd. If no keyboard key
is pressed in an amount of time it should boot from the next device
configured in BIOS (INT 18h).
I looked up the isolinux.asm and tried 2 entry points for my code:
1. entry point: label _start1 after the
mov si,syslinux_banner
call writestr
I implemented following code (have to say that I'm assembler
newbie):
mov si,really_boot
call writestr
mov si,caution_str
call writestr
mov cx,20
jmp sleep_loop
jmp kaboom
sleep_loop:
push cx
xor ax,ax
mov ah,01h ; look for available char from
keyboard
int 16h
jnz booting_dvd ; boot from cd / dvd
xor ax,ax
mov ax,500 ; wait 0,5s
mov bx,1000 ; 1000 times
mul bx
mov cx,dx
mov dx,ax
mov ah,86h
int 15h
pop cx
loop sleep_loop
jmp boot_next_device
boot_next_device: mov si,boot_next_dev
call writestr
mov ax,-1
jmp local_boot
jmp kaboom
booting_dvd: pop cx
xor ax,ax
int 16h
xor ax,ax
After booting_dvd is the checksum stuff. This code did all I wanted but I
had a problem when booting from dvd because the checksum generated by
isolinux was wrong.
2. entry point:
So i tried to do my code after generation the checksum stuff. I placed
my code in the integrity_ok label. Now i it is completly functional on
normal PCs but I also tried it in a VMWare and in QEMU and there its not
working (but with my first hack it did, now sometimes the timer doesn't wait
and if int 18h is called not the next boot device is used, its using the
network boot device if I have a boot order of dvd,harddisk,network).
So I'm asking if anyone could help me with my poor assembler knowledge
fixing that code.
yours
arnold
H. Peter Anvin
2005-Dec-10 18:44 UTC
[syslinux] Development Question for version 2.11 of isolinux
Arnold Maderthaner wrote:> Hi 2 all ! > > I want to implement a new option into version 2.11 of syslinux: > The feature should do the following: > Ask the user if he really wants to boot from dvd. If no keyboard key > is pressed in an amount of time it should boot from the next device > configured in BIOS (INT 18h).You don't need to implement anything. Use the "ontimeout" feature. -hpa
Geert Stappers
2005-Dec-10 19:07 UTC
[syslinux] Development Question for version 2.11 of isolinux
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Dec 09, 2005 at 08:55:33PM +0100, Arnold Maderthaner wrote:> Hi 2 all ! > > I want to implement a new option into version 2.11 of syslinux:There is also a 3.11 available ( at http://www.kernel.org/pub/linux/utils/boot/syslinux/ )> The feature should do the following: > Ask the user if he really wants to boot from dvd. If no keyboard key > is pressed in an amount of time it should boot from the next device > configured in BIOS (INT 18h).That seems to me a menu function that is allready available. GSt -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFDmydcOSINbgwa/7sRAo1zAJ9xXOQtTpjpXDCVZH3W/NKO70tHMwCfUgiT Vf6MZTSyWDMPuNBShtRpB+Y=ielx -----END PGP SIGNATURE-----