[syslinux] Custom com32
Coe, Colin C. (Unix Engineer)
Colin.Coe at woodside.com.au
Wed Jan 24 22:59:49 PST 2007
OK, stupid question time. How do I specify the initrd? Currently I do:
strcpy((char *)__com32.cs_bounce, array_model[i]);
strcat((char *)__com32.cs_bounce, "_");
strcat((char *)__com32.cs_bounce, array_bios[i]);
strcat((char *)__com32.cs_bounce, ".img");
memset(®, 0, sizeof reg);
reg.eax.w[0] = 0x0003;
reg.ebx.w[0] = OFFS(__com32.cs_bounce);
reg.es = SEG(__com32.cs_bounce);
#ifdef DEBUG
printf("About to boot image %s\n", (char *)__com32.cs_bounce);
fgets(buffer, sizeof buffer, stdin);
#endif
__intcall(0x22, ®, ®);
if ( reg.eflags.l & EFLAGS_CF )
return 0;
else
return reg.eax.l;
This is using the 'Run Command', how do I do this with 'Run Kernel
Image'?
Thanks
CC
-----Original Message-----
From: H. Peter Anvin [mailto:hpa at zytor.com]
Sent: Thursday, 25 January 2007 12:56 PM
To: Coe, Colin C. (Unix Engineer)
Cc: syslinux at zytor.com
Subject: Re: [syslinux] Custom com32
Coe, Colin C. (Unix Engineer) wrote:
> Hi all
>
> I've written a basic COM32 module that checks (using the DMI example
> code) the product and BIOS and if the BIOS is not at the required
> level, is supposed to exit and boot using a DOS floppy image to flash
> the BIOS.
>
> The problem is that I can't work out how to call the DOS floppy image.
> Looking at the website, I see "Run Command" AX=0003H via int 22. The
> image name will be <productname>_<bios_rev> (i.e. xw9300_2.09.img)
>
> Is "Run Command" the right thing to do? How do I call it from my
> module?
>
You're probably better off using "Run kernel image" (AX=0016h). The
kernel image would me "memdisk" and the command like something like
"initrd=xw9300_2.09.img".
-hpa
NOTICE: This email and any attachments are confidential.
They may contain legally privileged information or
copyright material. You must not read, copy, use or
disclose them without authorisation. If you are not an
intended recipient, please contact us at once by return
email and then delete both messages and all attachments.
More information about the Syslinux
mailing list