#
- #TCPSTACK, uIP is used currently
+ #uIP, ON -- used, OFF -- not used
#
UIP=OFF
COMMON_C_OBJS := $(COMMON_C_SRCS:%.c=common/%.o)
V3_LD_FLAGS := -L./palacios/
#V3_LIBS := -lxed -lv3vee
V3_LIBS := ./palacios/libxed.a ./palacios/libv3vee.a ./palacios/libxed.a ./palacios/libv3vee.a
-
+V3_OBJS := ./palacios/libxed.a ./palacios/libv3vee.a ./palacios/vm_kernel
-
-
-
-
ifeq ($(UIP),ON)
UIP_C_SRCS := psock.c timer.c uip_arp.c uip.c uip-fw.c uiplib.c uip-neighbor.c uip-split.c resolv.c
UIP_C_OBJS := $(UIP_C_SRCS:%.c=net/%.o)
endif
ifeq ($(LWIP),ON)
++<<<<<<< HEAD:geekos/build/Makefile
+ LWIP_OBJS := lwip
+ CC_LWIP_OPTS := -I$(PROJECT_ROOT)/include/lwip -I$(PROJECT_ROOT)/include/lwip/ipv4 -I$(PROJECT_ROOT)/include/libc -DLWIP_DEBUG
++=======
+ LWIP_OBJS := lwip/*.o
+ CC_LWIP_OPTS := -I$(PROJECT_ROOT)/include/lwip -I$(PROJECT_ROOT)/include/lwip/ipv4 -I$(PROJECT_ROOT)/include/libc -DLWIP_DEBUG -DLWIP
++>>>>>>> 64bit:geekos/build/Makefile
else
LWIP_OBJS :=
CC_LWIP_OPTS :=
all : $(ALL_TARGETS)
-force_lwip:
+lwip:
(cd ../src/lwip/build; make clean; make)
$(PAD) $@ 512
# The kernel executable and symbol map.
-geekos/kernel.exe : $(KERNEL_OBJS) $(COMMON_C_OBJS) force_lwip
+geekos/kernel.exe : $(KERNEL_OBJS) $(COMMON_C_OBJS) $(TCPSTACK_OBJS) $(V3_OBJS)
$(TARGET_LD) -o geekos/kernel.exe -Ttext $(KERNEL_BASE_ADDR) -e $(KERNEL_ENTRY) \
$(V3_LD_FLAGS) \
$(KERNEL_OBJS) $(COMMON_C_OBJS) $(TCPSTACK_OBJS) $(V3_LIBS) -b binary ./palacios/vm_kernel
#include <geekos/net.h>
#include <geekos/socket.h>
#include <geekos/ne2k.h>
+
#include <geekos/debug.h>
#ifdef LWIP
+
#include <lwip/apps/ping.h>
#include <lwip/lwip/sockets.h>
#include <lwip/ipv4/lwip/ip_addr.h>
#include <lwip/sys.h>
#include <lwip/netifapi.h>
#include <lwip/tcpip.h>
+
#include <netif/etharp.h>
sys_sem_signal(*sem);
}
+ #endif
+
void Init_Network() {
//temporay now we are using lwip sockets
// init_socket_layer();
+
+ #ifdef LWIP
struct ip_addr ipaddr, netmask, gateway;
sys_sem_t sem;
//initial a network application
ping_init();
+
+ #endif
+
}
+#endif
+
#if 0
void test_network() {
#ifdef __V3VEE__
#include <palacios/vmm_types.h>
- #ifdef __V3_32BIT__
+
typedef long off_t;
typedef sint32_t ssize_t;
typedef unsigned int rd_bool;
typedef ushort_t Bit16u;
typedef uint32_t Bit32u;
typedef uint64_t Bit64u;
- #endif
+
#define MAX_ATA_CHANNEL 4
rd_bool ready;
rd_bool locked;
- struct cdrom_interface * cd;
+ struct cdrom_ops * cd;
uint32_t capacity;
int next_lba;
struct sense_info_t sense;
struct atapi_t atapi;
+ /* JRL */
+ void * private_data;
+
Bit8u model_no[41];
};
#endif
+#if 0
+
+// FLAT MODE
+// Open a image. Returns non-negative if successful.
+//int open (const char* pathname);
+
+// Open an image with specific flags. Returns non-negative if successful.
+int rd_open (const char* pathname, int flags);
+
+// Close the image.
+void rd_close ();
+
+// Position ourselves. Return the resulting offset from the
+// beginning of the file.
+off_t rd_lseek (off_t offset, int whence);
+
+// Read count bytes to the buffer buf. Return the number of
+// bytes read (count).
+ssize_t rd_read (void* buf, size_t count);
+
+// Write count bytes from buf. Return the number of bytes
+// written (count).
+ssize_t rd_write (const void* buf, size_t count);
+
+
+#endif