bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bugs #9984] Run DiskEMU1x.bin from Grub


From: Gandalf
Subject: [bugs #9984] Run DiskEMU1x.bin from Grub
Date: Wed, 11 Aug 2004 21:19:12 -0400
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.1.4322)

This mail is an automated notification from the bugs tracker
 of the project: GNU GRUB.




/**************************************************************************/
[bugs #9984] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9984>
Project: GNU GRUB
Submitted by: Gandalf
On: Thu 08/12/04 at 01:15

Category:  Booting
Severity:  Major
Priority:  5 - Normal
Item Group:  None
Resolution:  None
Assigned to:  None
Originator Name:  
Originator Email:  address@hidden
Status:  Open
Release:  0.95
Reproducibility:  Every Time
Planned Release:  


Summary:  Run DiskEMU1x.bin from Grub

Original Submission:  * For MultiBoot Support *

Since Grub can be loaded from CD, we may want it load some binary boot file 
from system, such as DiskEMU.bin, xpboot.bin, or bootsect.dat, and so on.

Yes, here are functions for this:
1). builtins.c
static int run_func(char *arg, int flags) {
 int ret;
 unsigned long run_drv;
 struct term_entry *prev_term = current_term;
        
 run_drv = saved_drive;
 if(run_drv == cdrom_drive)
 {
  if (cdrom_drive != 0xe0) 
  {
   grub_printf("n Please init CD-ROM 1st. n");
   return 1;
  }
 }
 if (! grub_open (arg))
 {
   grub_printf("n incorect parameter. n");
   return 1;
  }
 
 /* Read whole file.  */
 ret = grub_read ((char *) RAW_ADDR (0x60000), -1); 
        
 grub_close();

 if (current_term->shutdown) 
 {
  (*current_term->shutdown)();
   current_term = term_table; /* assumption: console is first */
 }

 gateA20 (0);
 run_jump(0x7c0, 0, run_drv);

 /* if we get back here, we should go back to what our term was before */
 current_term = prev_term;
 if (current_term->startup)
      /* if our terminal fails to initialize, fall back to console since
       * it should always work */

  if ((*current_term->startup)() == 0)
 current_term = term_table; /* we know that console is first */ 
 return 0;
}

static struct builtin builtin_run=
{
        "run",
        run_func,
        BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST,
        "run FILE",
        "Run a NO-Emul Boot Sector file for CD-ROM Boot",
};


struct builtin *builtin_table[] =
{
   ... ...

  &builtin_run,

   ... ...
}











For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=9984>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]