342 lines
11 KiB
Diff
342 lines
11 KiB
Diff
Index: zebra-0.93a-brcm/Makefile
|
|
===================================================================
|
|
--- zebra-0.93a-brcm.orig/Makefile 2014-02-12 19:12:30.000000000 +0800
|
|
+++ zebra-0.93a-brcm/Makefile 2014-02-12 19:22:57.352113220 +0800
|
|
@@ -71,7 +71,9 @@
|
|
#CPP = gcc -E
|
|
#for debug, add -DBRCM_RIP_DEBUG; command support, add -DDBRCM_CMD_SUPPORT;
|
|
#access/filter list support, add -DDBRCM_LIST_SUPPORT
|
|
-CFLAGS= -s -Os -fomit-frame-pointer
|
|
+CFLAGS += -s -Os -fomit-frame-pointer
|
|
+export CFLAGS
|
|
+export LDFLAGS
|
|
#these will be removed since they are on the top /user96345/Makefile
|
|
#TOOLCHAIN=/opt/toolchains/uclibc
|
|
#CROSS_COMPILE = $(TOOLCHAIN)/bin/mips-uclibc-
|
|
Index: zebra-0.93a-brcm/lib/Makefile
|
|
===================================================================
|
|
--- zebra-0.93a-brcm.orig/lib/Makefile 2014-02-12 19:12:30.000000000 +0800
|
|
+++ zebra-0.93a-brcm/lib/Makefile 2014-02-12 19:22:44.489137988 +0800
|
|
@@ -227,10 +227,12 @@
|
|
#BRCM begin
|
|
#for debug, add -DBRCM_RIP_DEBUG; command support, add -DDBRCM_CMD_SUPPORT;
|
|
#access/filter list support, add -DDBRCM_LIST_SUPPORT
|
|
-CFLAGS= -s -Os -fomit-frame-pointer -L$(LIB_PATH) $(CMS_COMPILE_FLAGS) $(CMS_INCLUDE_PATHS)
|
|
+#CFLAGS= -s -Os -fomit-frame-pointer -L$(LIB_PATH) $(CMS_COMPILE_FLAGS) $(CMS_INCLUDE_PATHS)
|
|
#BRCM end
|
|
|
|
-CFLAGS += -I$(TOOLCHAIN)/include
|
|
+CFLAGS += -s -Os -fomit-frame-pointer
|
|
+
|
|
+#CFLAGS += -I$(TOOLCHAIN)/include
|
|
|
|
DIST_SOURCES = $(libzebra_a_SOURCES)
|
|
HEADERS = $(noinst_HEADERS)
|
|
Index: zebra-0.93a-brcm/ripd/Makefile
|
|
===================================================================
|
|
--- zebra-0.93a-brcm.orig/ripd/Makefile 2014-02-12 19:12:30.000000000 +0800
|
|
+++ zebra-0.93a-brcm/ripd/Makefile 2014-02-12 19:22:18.505219030 +0800
|
|
@@ -15,13 +15,15 @@
|
|
#BRCM begin
|
|
#for debug, add -DBRCM_RIP_DEBUG; command support, add -DDBRCM_CMD_SUPPORT;
|
|
#access/filter list support, add -DDBRCM_LIST_SUPPORT
|
|
-CFLAGS= -s -Os -fomit-frame-pointer -I$(BUILD_DIR)/userspace/public/include -I$(BUILD_DIR)/userspace/public/include/linux
|
|
-CFLAGS += -Werror -Wfatal-errors
|
|
+#CFLAGS = -s -Os -fomit-frame-pointer -I$(BUILD_DIR)/userspace/public/include -I$(BUILD_DIR)/userspace/public/include/linux
|
|
+CFLAGS += -s -Os -fomit-frame-pointer
|
|
+#CFLAGS += -Werror -Wfatal-errors
|
|
+CFLAGS += -Wfatal-errors
|
|
ifeq ($(strip $(BUILD_ZEBRA)), static)
|
|
CFLAGS += -DBUILD_STATIC
|
|
endif
|
|
|
|
-CFLAGS += -I$(TOOLCHAIN)/include
|
|
+#CFLAGS += -I$(TOOLCHAIN)/include
|
|
|
|
SHELL = /bin/sh
|
|
srcdir = .
|
|
@@ -185,10 +187,11 @@
|
|
#ripd_LDFLAGS =
|
|
ripd_LDFLAGS = -Wl,-warn-common -Wl,-allow-shlib-undefined
|
|
#LDFLAGS =
|
|
-LDFLAGS = -Wl,-warn-common -Wl,-allow-shlib-undefined -L$(LIB_PATH)
|
|
+#LDFLAGS = -Wl,-warn-common -Wl,-allow-shlib-undefined -L$(LIB_PATH)
|
|
+LDFLAGS += -Wl,-warn-common -Wl,-allow-shlib-undefined
|
|
#BRCM end
|
|
-#LIBS = -lm -lcrypt
|
|
-LIBS = -lm -lcrypt -L$(INSTALL_DIR)/lib/public -lcms_msg $(CMS_COMMON_LIBS)
|
|
+LIBS = -lm -lcrypt
|
|
+#LIBS = -lm -lcrypt -L$(INSTALL_DIR)/lib/public -lcms_msg $(CMS_COMMON_LIBS)
|
|
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
|
CPPFLAGS =
|
|
|
|
@@ -220,8 +223,8 @@
|
|
#all: Makefile $(sbin_PROGRAMS) $(HEADERS)
|
|
|
|
all install: $(sbin_PROGRAMS)
|
|
- install -m 755 $(sbin_PROGRAMS) $(INSTALL_DIR)/bin
|
|
- $(STRIP) $(INSTALL_DIR)/bin/$(sbin_PROGRAMS)
|
|
+# install -m 755 $(sbin_PROGRAMS) $(INSTALL_DIR)/bin
|
|
+# $(STRIP) $(INSTALL_DIR)/bin/$(sbin_PROGRAMS)
|
|
|
|
|
|
.SUFFIXES:
|
|
Index: zebra-0.93a-brcm/ripd/rip_main.c
|
|
===================================================================
|
|
--- zebra-0.93a-brcm.orig/ripd/rip_main.c 2014-02-12 19:12:30.000000000 +0800
|
|
+++ zebra-0.93a-brcm/ripd/rip_main.c 2014-02-12 19:21:50.087655995 +0800
|
|
@@ -33,8 +33,10 @@
|
|
|
|
#include "ripd/ripd.h"
|
|
|
|
+#if 0 /* disable brcm cms */
|
|
#include "cms_msg.h"
|
|
static void *msgHandle=NULL;
|
|
+#endif
|
|
|
|
/* ripd options. */
|
|
static struct option longopts[] =
|
|
@@ -282,10 +284,10 @@
|
|
break;
|
|
}
|
|
}
|
|
-
|
|
+#if 0 /* disable brcm cms */
|
|
/* initialize the message pipe with smd */
|
|
cmsMsg_init(EID_RIPD, &msgHandle);
|
|
-
|
|
+#endif
|
|
/* Prepare master thread. */
|
|
master = thread_master_create ();
|
|
|
|
Index: zebra-0.93a-brcm/zebra/Makefile
|
|
===================================================================
|
|
--- zebra-0.93a-brcm.orig/zebra/Makefile 2014-02-12 19:12:30.000000000 +0800
|
|
+++ zebra-0.93a-brcm/zebra/Makefile 2014-02-12 19:21:25.697599689 +0800
|
|
@@ -15,10 +15,11 @@
|
|
#BRCM begin
|
|
#for debug, add -DBRCM_RIP_DEBUG; command support, add -DDBRCM_CMD_SUPPORT;
|
|
#access/filter list support, add -DDBRCM_LIST_SUPPORT
|
|
-CFLAGS= -s -Os -fomit-frame-pointer -L$(LIB_PATH) -I$(BUILD_DIR)/userspace/public/include -I$(BUILD_DIR)/userspace/public/include/linux
|
|
-CFLAGS += -I$(TOOLCHAIN)/include
|
|
-CFLAGS += -Werror -Wfatal-errors
|
|
-
|
|
+#CFLAGS= -s -Os -fomit-frame-pointer -L$(LIB_PATH) -I$(BUILD_DIR)/userspace/public/include -I$(BUILD_DIR)/userspace/public/include/linux
|
|
+CFLAGS += -s -Os -fomit-frame-pointer
|
|
+#CFLAGS += -I$(TOOLCHAIN)/include
|
|
+#CFLAGS += -Werror -Wfatal-errors
|
|
+CFLAGS += -Wfatal-errors
|
|
ifeq ($(strip $(BUILD_ZEBRA)), static)
|
|
CFLAGS += -DBUILD_STATIC
|
|
endif
|
|
@@ -190,10 +191,10 @@
|
|
CPPFLAGS =
|
|
#BRCM begin
|
|
#LDFLAGS =
|
|
-LDFLAGS = -Wl,-warn-common -Wl,-allow-shlib-undefined
|
|
+LDFLAGS += -Wl,-warn-common -Wl,-allow-shlib-undefined
|
|
#BRCM end
|
|
-#LIBS = -lm -lcrypt
|
|
-LIBS = -lm -lcrypt -L$(INSTALL_DIR)/lib/public -lcms_msg $(CMS_COMMON_LIBS)
|
|
+LIBS = -lm -lcrypt
|
|
+#LIBS = -lm -lcrypt -L$(INSTALL_DIR)/lib/public -lcms_msg $(CMS_COMMON_LIBS)
|
|
|
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
|
am__depfiles_maybe = depfiles
|
|
@@ -225,8 +226,8 @@
|
|
#all: Makefile $(sbin_PROGRAMS) $(HEADERS)
|
|
|
|
all install: $(sbin_PROGRAMS)
|
|
- install -m 755 $(sbin_PROGRAMS) $(INSTALL_DIR)/bin
|
|
- $(STRIP) $(INSTALL_DIR)/bin/$(sbin_PROGRAMS)
|
|
+# install -m 755 $(sbin_PROGRAMS) $(INSTALL_DIR)/bin
|
|
+# $(STRIP) $(INSTALL_DIR)/bin/$(sbin_PROGRAMS)
|
|
|
|
|
|
.SUFFIXES:
|
|
Index: zebra-0.93a-brcm/zebra/main.c
|
|
===================================================================
|
|
--- zebra-0.93a-brcm.orig/zebra/main.c 2014-02-12 19:12:30.000000000 +0800
|
|
+++ zebra-0.93a-brcm/zebra/main.c 2014-02-12 19:21:38.490365863 +0800
|
|
@@ -39,8 +39,10 @@
|
|
#endif
|
|
#include "zebra/rib.h"
|
|
|
|
+#if 0 /* disable brcm cms */
|
|
#include "cms_msg.h"
|
|
static void *msgHandle=NULL;
|
|
+#endif
|
|
|
|
/* Master of threads. */
|
|
struct thread_master *master;
|
|
@@ -268,10 +270,10 @@
|
|
break;
|
|
}
|
|
}
|
|
-
|
|
+#if 0 /* disable brcm cms */
|
|
/* initialize the message pipe with smd */
|
|
cmsMsg_init(EID_ZEBRA, &msgHandle);
|
|
-
|
|
+#endif
|
|
/* Make master thread emulator. */
|
|
master = thread_master_create ();
|
|
|
|
Index: zebra-0.93a-brcm/zebra/zserv.c
|
|
===================================================================
|
|
--- zebra-0.93a-brcm.orig/zebra/zserv.c 2014-02-12 19:12:30.000000000 +0800
|
|
+++ zebra-0.93a-brcm/zebra/zserv.c 2014-02-12 19:20:42.815581497 +0800
|
|
@@ -111,7 +111,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
/* Interface deletion from zebra daemon. */
|
|
@@ -142,7 +142,7 @@
|
|
/* Write packet length. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
/* Interface address is added. Send ZEBRA_INTERFACE_ADDRESS_ADD to the
|
|
@@ -188,7 +188,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
/* Interface address is deleted. Send ZEBRA_INTERFACE_ADDRESS_DELETE
|
|
@@ -232,7 +232,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
int
|
|
@@ -264,7 +264,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
int
|
|
@@ -296,7 +296,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
int
|
|
@@ -353,7 +353,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
int
|
|
@@ -407,7 +407,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
int
|
|
@@ -446,7 +446,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
int
|
|
@@ -485,7 +485,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
#ifdef HAVE_IPV6
|
|
@@ -525,7 +525,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
int
|
|
@@ -581,7 +581,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
int
|
|
@@ -620,7 +620,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
int
|
|
@@ -673,7 +673,7 @@
|
|
/* Write packet size. */
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
|
|
int
|
|
@@ -734,7 +734,7 @@
|
|
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
#endif /* HAVE_IPV6 */
|
|
|
|
@@ -791,7 +791,7 @@
|
|
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
#ifdef BRCM_SUPPORT
|
|
int
|
|
@@ -847,7 +847,7 @@
|
|
|
|
stream_putw_at (s, 0, stream_get_endp (s));
|
|
|
|
- return writen (client->sock, s->data, stream_get_endp (s));
|
|
+ return writen (client->sock, (char *)s->data, stream_get_endp (s));
|
|
}
|
|
#endif /* BRCM_SUPPORT */
|
|
|