mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-24 08:09:22 +00:00
add diskless support.
This commit is contained in:
1 parent
8ba5340fb8
commit
f85b90abd2
13 files changed
+643
-106
No files matched your search
+32
-9
@@ -19,7 +19,11 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "shared.h"
|
||||
#include <shared.h>
|
||||
|
||||
#ifdef SUPPORT_DISKLESS
|
||||
# include <etherboot.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Shared BIOS/boot data.
|
||||
@@ -125,6 +129,25 @@ mmap_avail_at (unsigned long bottom)
|
||||
}
|
||||
#endif /* ! STAGE1_5 */
|
||||
|
||||
#ifdef SUPPORT_DISKLESS
|
||||
/* Set up the diskless environment so that GRUB can get a configuration
|
||||
file from a network. */
|
||||
static int
|
||||
setup_diskless_environment (void)
|
||||
{
|
||||
/* For now, there is no difference between BOOTP and DHCP in GRUB. */
|
||||
if (! bootp ())
|
||||
{
|
||||
grub_printf ("BOOTP/DHCP fails.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This will be erased soon, though... */
|
||||
print_network_configuration ();
|
||||
return 1;
|
||||
}
|
||||
#endif /* SUPPORT_DISKLESS */
|
||||
|
||||
/* This queries for BIOS information. */
|
||||
void
|
||||
init_bios_info (void)
|
||||
@@ -240,16 +263,16 @@ init_bios_info (void)
|
||||
|
||||
#endif /* STAGE1_5 */
|
||||
|
||||
/*
|
||||
* Set boot drive and partition.
|
||||
*/
|
||||
|
||||
#ifdef SUPPORT_DISKLESS
|
||||
/* If SUPPORT_DISKLESS is defined, initialize the network here. */
|
||||
if (! setup_diskless_environment ())
|
||||
return;
|
||||
#endif
|
||||
|
||||
/* Set boot drive and partition. */
|
||||
saved_drive = boot_drive;
|
||||
saved_partition = install_partition;
|
||||
|
||||
/*
|
||||
* Start main routine here.
|
||||
*/
|
||||
|
||||
/* Start main routine here. */
|
||||
cmain ();
|
||||
}
|
||||
Reference in new issue
Block a user