diff options
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-support/bridge-utils')
4 files changed, 159 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch new file mode 100644 index 0000000000..0a72c6b2c4 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch @@ -0,0 +1,40 @@ +From 9d63838d12c772dfe33371e2bb8b8191625539f2 Mon Sep 17 00:00:00 2001 +From: Joe MacDonald <joe_macdonald@mentor.com> +Date: Mon, 30 Oct 2017 13:37:48 -0400 +Subject: [PATCH] build: don't ignore CFLAGS from environment +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We need to take them into account so as to behave nicely towards +build environments which expect to be able to set them, e.g. for +optimisation flags, or debug options. + +Therefore they need to be added to the compiler command line of +every source file, and in addition, the same CFLAGS that were +used during compilation must also always be used during linking! + +Upstream-Status: Pending + +Signed-off-by: André Draszik <git@andred.net> +Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> +--- + brctl/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/brctl/Makefile.in b/brctl/Makefile.in +index e1956d6..eff260c 100644 +--- a/brctl/Makefile.in ++++ b/brctl/Makefile.in +@@ -34,7 +34,7 @@ install: $(PROGRAMS) + $(INSTALL) -m 755 $(PROGRAMS) $(DESTDIR)$(sbindir) + + brctl: $(brctl_OBJECTS) ../libbridge/libbridge.a +- $(CC) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl ++ $(CC) $(CFLAGS) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl + + %.o: %.c brctl.h + $(CC) $(CFLAGS) $(INCLUDE) -c $< +-- +2.7.4 + diff --git a/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch new file mode 100644 index 0000000000..3f65761f54 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch @@ -0,0 +1,51 @@ +From c924f66743c054d7ebafef90ca1bbebc96732357 Mon Sep 17 00:00:00 2001 +From: Joe MacDonald <joe_macdonald@mentor.com> +Date: Mon, 30 Oct 2017 13:48:33 -0400 +Subject: [PATCH] libbridge: Modifying the AR to cross toolchain +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The Makefile uses the host “ar” tool when it should be using the ar from +the target toolchain. + +Upstream-Status: Pending + +Signed-off-by: Li Zhou <li.zhou@windriver.com> +Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> +--- + configure.ac | 1 + + libbridge/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 8b2e2ea..8426b7c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -12,6 +12,10 @@ dnl Checks for programs. + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_RANLIB ++AN_MAKEVAR([AR], [AC_PROG_AR]) ++AN_PROGRAM([ar], [AC_PROG_AR]) ++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) ++AC_PROG_AR + + dnl Checks for header files. + AC_HEADER_STDC +diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in +index 7932bfe..bd55e9b 100644 +--- a/libbridge/Makefile.in ++++ b/libbridge/Makefile.in +@@ -1,7 +1,7 @@ + + KERNEL_HEADERS=-I@KERNEL_HEADERS@ + +-AR=ar ++AR=@AR@ + RANLIB=@RANLIB@ + + CC=@CC@ +-- +2.7.4 + diff --git a/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch new file mode 100644 index 0000000000..8a23a3070c --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch @@ -0,0 +1,33 @@ +From 824f838cc9c7b8a44174358446993d61be7bbb3f Mon Sep 17 00:00:00 2001 +From: Joe MacDonald <joe_macdonald@mentor.com> +Date: Mon, 30 Oct 2017 13:18:20 -0400 +Subject: [PATCH] include missing kernel header + +Fixes errors like + +| /b/kraj/jlinux-next/poky/build/tmp-eglibc/sysroots/re-64b/usr/include/linux/if_bridge.h:172:20: error: field 'ip6' has incomplete type +| In file included from ../libbridge/libbridge.h:24:0, + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> +--- + libbridge/libbridge.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h +index c038b92..fd09306 100644 +--- a/libbridge/libbridge.h ++++ b/libbridge/libbridge.h +@@ -24,6 +24,7 @@ + #include <sys/time.h> + #include <netinet/in.h> + ++#include <linux/in6.h> + #include <linux/if.h> + #include <linux/if_bridge.h> + +-- +2.7.4 + diff --git a/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb new file mode 100644 index 0000000000..1c87c48bfa --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb @@ -0,0 +1,35 @@ +SUMMARY = "Tools for ethernet bridging" +HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge" +SECTION = "net" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37" + +SRCREV = "42c1aefc303fdf891fbb099ea51f00dca83ab606" + +SRC_URI = "\ + git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git \ + file://kernel-headers.patch \ + file://0005-build-don-t-ignore-CFLAGS-from-environment.patch \ + file://0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch \ +" + +S = "${WORKDIR}/git" + +DEPENDS = "sysfsutils" + +inherit autotools-brokensep update-alternatives + +ALTERNATIVE_${PN} = "brctl" +ALTERNATIVE_PRIORITY[brctl] = "100" +ALTERNATIVE_LINK_NAME[brctl] = "${sbindir}/brctl" + +EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}" + +do_install_append () { + install -d ${D}/${datadir}/bridge-utils + install -d ${D}/${sysconfdir}/network/if-pre-up.d + install -d ${D}/${sysconfdir}/network/if-post-down.d +} + +RRECOMMENDS_${PN} = "kernel-module-bridge" |