common = grub-core/commands/blocklist.c;
common = grub-core/commands/extcmd.c;
common = grub-core/commands/ls.c;
+ common = grub-core/net/net.c;
common = grub-core/disk/dmraid_nvidia.c;
- common = grub-core/disk/host.c;
common = grub-core/disk/loopback.c;
common = grub-core/disk/lvm.c;
common = grub-core/disk/mdraid_linux.c;
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/boot.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/net.h
+ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h
+ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/memory.h
if COND_i386_pc
- KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/loader.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pxe.h
common = hook/datehook.c;
};
+module = {
+ name = net;
+ common = net/net.c;
+ common = net/ip.c;
+ common = net/udp.c;
+ common = net/ethernet.c;
+ common = net/arp.c;
+ common = net/interface.c;
+ common = net/netbuff.c;
+};
+
+module = {
+ name = tftp;
+ common = net/tftp.c;
+};
+
+module = {
+ name = ofnet;
+ ieee1275 = net/drivers/ieee1275/ofnet.c;
+ enable = ieee1275;
+};
+
+module = {
+ name = emunet;
+ emu = net/drivers/emu/emunet.c;
+ enable = ieee1275;
+};
++
+ module = {
+ name = legacycfg;
+ common = commands/legacycfg.c;
+ common = lib/legacy_parse.c;
+ emu = lib/i386/pc/vesa_modes_table.c;
+ enable = i386_pc;
+ enable = emu;
+ };
+
+ module = {
+ name = test_blockarg;
+ common = tests/test_blockarg.c;
+ };
+
+ module = {
+ name = xzio;
+ common = io/xzio.c;
+ common = lib/xzembed/xz_dec_bcj.c;
+ common = lib/xzembed/xz_dec_lzma2.c;
+ common = lib/xzembed/xz_dec_stream.c;
+ cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed';
+ };
+
+ module = {
+ name = testload;
+ common = commands/testload.c;
+ };
+
+ module = {
+ name = lsapm;
+ common = commands/i386/pc/lsapm.c;
+ enable = i386_pc;
+ };
+
+ module = {
+ name = keylayouts;
+ common = commands/keylayouts.c;
+ enable = videomodules;
+ };
}
#endif
+ /* Resolve aliases. */
+ char *
+ grub_ieee1275_canonicalise_devname (const char *path)
+ {
+ struct canon_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t path;
+ grub_ieee1275_cell_t buf;
+ grub_ieee1275_cell_t inlen;
+ grub_ieee1275_cell_t outlen;
+ }
+ args;
+ char *buf = NULL;
+ grub_size_t bufsize = 64;
+ int i;
+
+ for (i = 0; i < 2; i++)
+ {
+ grub_free (buf);
+
+ buf = grub_malloc (bufsize);
+ if (!buf)
+ return NULL;
+
+ INIT_IEEE1275_COMMON (&args.common, "canon", 3, 1);
+ args.path = (grub_ieee1275_cell_t) path;
+ args.buf = (grub_ieee1275_cell_t) buf;
+ args.inlen = (grub_ieee1275_cell_t) (bufsize - 1);
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return 0;
+ if (args.outlen > bufsize - 1)
+ {
+ bufsize = args.outlen + 2;
+ continue;
+ }
+ return buf;
+ }
+ /* Shouldn't reach here. */
+ grub_free (buf);
+ return NULL;
+ }
++
+ ALIGN_UP (sizeof(PACKAGE_STRING), 4)
+ grub_get_multiboot_mmap_count () * sizeof (struct multiboot_mmap_entry)
+ elf_sec_entsize * elf_sec_num
- + 256 * sizeof (struct multiboot_color);
+ + 256 * sizeof (struct multiboot_color)
+ #if GRUB_MACHINE_HAS_VBE
+ + sizeof (struct grub_vbe_info_block)
+ + sizeof (struct grub_vbe_mode_info_block)
+ #endif
+ + ALIGN_UP (sizeof (struct multiboot_apm_info), 4);
+
+ FOR_NET_NETWORK_LEVEL_INTERFACES(net)
+ if (net->dhcp_ack)
+ {
+ ret += net->dhcp_acklen;
+ break;
+ }
+
+ return ret;
}
/* Fill previously allocated Multiboot mmap. */
if (curr_file != 0)
grub_pxe_call (GRUB_PXENV_TFTP_CLOSE, &o, pxe_rm_entry);
- o.server_ip = disk_data->server_ip;
- o.gateway_ip = disk_data->gateway_ip;
+ o.server_ip = data->server_ip;
+ o.gateway_ip = data->gateway_ip;
grub_strcpy ((char *)&o.filename[0], data->filename);
o.tftp_port = grub_cpu_to_be16 (GRUB_PXE_TFTP_PORT);
- o.packet_size = grub_pxe_blksize;
+ o.packet_size = data->block_size;
grub_pxe_call (GRUB_PXENV_TFTP_OPEN, &o, pxe_rm_entry);
if (o.status)
{
GRUB_ERR_TIMEOUT,
GRUB_ERR_IO,
GRUB_ERR_ACCESS_DENIED,
- GRUB_ERR_EXTRACTOR
++ GRUB_ERR_EXTRACTOR,
+ GRUB_ERR_NET_BAD_ADDRESS,
+ GRUB_ERR_NET_ROUTE_LOOP,
+ GRUB_ERR_NET_NO_ROUTE,
+ GRUB_ERR_WAIT
}
grub_err_t;
int EXPORT_FUNC(grub_ieee1275_devices_iterate) (int (*hook)
(struct grub_ieee1275_devalias *
alias));
-
+char *EXPORT_FUNC(grub_ieee1275_get_aliasdevname) (const char *path);
+void EXPORT_FUNC(grub_ofnet_findcards) (void);
+void EXPORT_FUNC(grub_ofnet_probecards) (void);
+ char *EXPORT_FUNC(grub_ieee1275_canonicalise_devname) (const char *path);
+
#endif /* ! GRUB_IEEE1275_HEADER */