Index: ioemu/cpu-all.h =================================================================== --- ioemu.orig/cpu-all.h 2006-08-06 02:14:09.796902750 +0100 +++ ioemu/cpu-all.h 2006-08-06 02:15:39.707879423 +0100 @@ -822,7 +822,7 @@ /* memory API */ -extern int phys_ram_size; +extern uint64_t phys_ram_size; extern int phys_ram_fd; extern uint8_t *phys_ram_base; extern uint8_t *phys_ram_dirty; Index: ioemu/hw/pc.c =================================================================== --- ioemu.orig/hw/pc.c 2006-08-06 02:14:09.797902638 +0100 +++ ioemu/hw/pc.c 2006-08-06 02:15:39.708879311 +0100 @@ -155,7 +155,7 @@ } /* hd_table must contain 4 block drivers */ -static void cmos_init(int ram_size, int boot_device, BlockDriverState **hd_table) +static void cmos_init(uint64_t ram_size, int boot_device, BlockDriverState **hd_table) { RTCState *s = rtc_state; int val; @@ -610,7 +610,7 @@ } /* PC hardware initialisation */ -static void pc_init1(int ram_size, int vga_ram_size, int boot_device, +static void pc_init1(uint64_t ram_size, int vga_ram_size, int boot_device, DisplayState *ds, const char **fd_filename, int snapshot, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, @@ -882,7 +882,7 @@ } } -static void pc_init_pci(int ram_size, int vga_ram_size, int boot_device, +static void pc_init_pci(uint64_t ram_size, int vga_ram_size, int boot_device, DisplayState *ds, const char **fd_filename, int snapshot, const char *kernel_filename, @@ -895,7 +895,7 @@ initrd_filename, 1); } -static void pc_init_isa(int ram_size, int vga_ram_size, int boot_device, +static void pc_init_isa(uint64_t ram_size, int vga_ram_size, int boot_device, DisplayState *ds, const char **fd_filename, int snapshot, const char *kernel_filename, Index: ioemu/vl.c =================================================================== --- ioemu.orig/vl.c 2006-08-06 02:15:31.040845624 +0100 +++ ioemu/vl.c 2006-08-06 02:15:39.711878977 +0100 @@ -122,7 +122,7 @@ const char* keyboard_layout = NULL; int64_t ticks_per_sec; int boot_device = 'c'; -int ram_size; +uint64_t ram_size; int pit_min_timer_count = 0; int nb_nics; NICInfo nd_table[MAX_NICS]; @@ -5895,7 +5895,7 @@ help(); break; case QEMU_OPTION_m: - ram_size = atoi(optarg) * 1024 * 1024; + ram_size = atol(optarg) * 1024 * 1024; if (ram_size <= 0) help(); if (ram_size > PHYS_RAM_MAX_SIZE) { Index: ioemu/vl.h =================================================================== --- ioemu.orig/vl.h 2006-08-06 02:15:10.368150219 +0100 +++ ioemu/vl.h 2006-08-06 02:15:39.711878977 +0100 @@ -146,7 +146,7 @@ extern int xc_handle; extern int domid; -extern int ram_size; +extern uint64_t ram_size; extern int bios_size; extern int rtc_utc; extern int cirrus_vga_enabled; @@ -561,7 +561,7 @@ #ifndef QEMU_TOOL -typedef void QEMUMachineInitFunc(int ram_size, int vga_ram_size, +typedef void QEMUMachineInitFunc(uint64_t ram_size, int vga_ram_size, int boot_device, DisplayState *ds, const char **fd_filename, int snapshot, const char *kernel_filename, const char *kernel_cmdline, Index: ioemu/hw/vga.c =================================================================== --- ioemu.orig/hw/vga.c 2006-08-06 02:15:10.364150665 +0100 +++ ioemu/hw/vga.c 2006-08-06 02:15:39.712878866 +0100 @@ -1365,7 +1365,8 @@ static void vga_draw_graphic(VGAState *s, int full_update) { int y1, y, update, page_min, page_max, linesize, y_start, double_scan, mask; - int width, height, shift_control, line_offset, page0, page1, bwidth; + int width, height, shift_control, line_offset, bwidth; + ram_addr_t page0, page1; int disp_width, multi_scan, multi_run; uint8_t *d; uint32_t v, addr1, addr; #n11'>11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
# 
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=kmod-switch
PKG_RELEASE:=6

include $(INCLUDE_DIR)/package.mk

define KernelPackage/switch
  SUBMENU:=Other modules
  DEPENDS:=@TARGET_brcm47xx @!LINUX_3_10
  TITLE:=Switch drivers
  FILES:= \
	$(PKG_BUILD_DIR)/switch-core.ko \
	$(PKG_BUILD_DIR)/switch-adm.ko \
	$(PKG_BUILD_DIR)/switch-robo.ko
  AUTOLOAD:=$(call AutoLoad,20,switch-core switch-robo switch-adm,1)
endef

define KernelPackage/switch/description
 This package contains switch drivers for ADM6996L and BCM53XX RoboSwitch.
endef

define Build/Prepare
	mkdir -p $(PKG_BUILD_DIR)
	$(CP) ./src/* $(PKG_BUILD_DIR)/
endef

define Build/Compile
	$(MAKE) -C "$(LINUX_DIR)" \
		CROSS_COMPILE="$(TARGET_CROSS)" \
		ARCH="$(LINUX_KARCH)" \
		SUBDIRS="$(PKG_BUILD_DIR)" \
		EXTRA_CFLAGS="$(BUILDFLAGS)" \
		modules
endef

define Build/InstallDev
	mkdir -p $(1)/usr/include
	$(CP) ./src/switch-core.h $(1)/usr/include/
endef

define Build/UninstallDev
	rm -f $(1)/usr/include/switch-core.h
endef

define KernelPackage/switch/install
	$(INSTALL_DIR) $(1)/lib/network/
	$(INSTALL_BIN) ./files/switch.sh $(1)/lib/network/
endef

$(eval $(call KernelPackage,switch))