From 961d82e37f3bd1d4971db84b4578a00ed92d99b1 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 8 Jul 2015 22:34:44 +0200 Subject: [PATCH] Add x86-64 target --- modules | 2 +- ...-it-breaks-ebtables-on-64bit-targets.patch | 73 +++++++++++++++++++ targets/targets.mk | 1 + targets/x86-64/config | 4 + targets/x86-64/profiles.mk | 17 +++++ targets/x86-64/vermagic | 1 + 6 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 patches/openwrt/0016-ebtables-remove-musl-build-fix-it-breaks-ebtables-on-64bit-targets.patch create mode 100644 targets/x86-64/config create mode 100644 targets/x86-64/profiles.mk create mode 100644 targets/x86-64/vermagic diff --git a/modules b/modules index f64e4605..2d7cb2ae 100644 --- a/modules +++ b/modules @@ -8,7 +8,7 @@ PACKAGES_OPENWRT_COMMIT=fa7ed79149b371294f12905210bb032610a11621 PACKAGES_OPENWRT_BRANCH=for-15.05 PACKAGES_GLUON_REPO=git://github.com/freifunk-gluon/packages.git -PACKAGES_GLUON_COMMIT=1faf424b35f1c87994ef27638d2deb04793619de +PACKAGES_GLUON_COMMIT=b06388df9aceb28082e02ad525a1e5ad7b2e1c4f PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git PACKAGES_ROUTING_COMMIT=6172dcef329e1b306149cded3340da8f28501266 diff --git a/patches/openwrt/0016-ebtables-remove-musl-build-fix-it-breaks-ebtables-on-64bit-targets.patch b/patches/openwrt/0016-ebtables-remove-musl-build-fix-it-breaks-ebtables-on-64bit-targets.patch new file mode 100644 index 00000000..6831e74b --- /dev/null +++ b/patches/openwrt/0016-ebtables-remove-musl-build-fix-it-breaks-ebtables-on-64bit-targets.patch @@ -0,0 +1,73 @@ +From: Matthias Schiffer +Date: Thu, 9 Jul 2015 01:04:52 +0200 +Subject: ebtables: remove musl build fix, it breaks ebtables on 64bit targets + +diff --git a/package/network/utils/ebtables/Makefile b/package/network/utils/ebtables/Makefile +index 4f6d7f5..d3d714f 100644 +--- a/package/network/utils/ebtables/Makefile ++++ b/package/network/utils/ebtables/Makefile +@@ -49,7 +49,7 @@ endef + MAKE_VARS += EXT_LIBSI="$(LIBGCC_S)" + + MAKE_FLAGS += \ +- CFLAGS="$(TARGET_CFLAGS)" \ ++ CFLAGS="$(TARGET_CFLAGS) -g" \ + LIBDIR="/usr/lib/ebtables" + + define Package/ebtables/install +diff --git a/package/network/utils/ebtables/patches/100-musl_fix.patch b/package/network/utils/ebtables/patches/100-musl_fix.patch +deleted file mode 100644 +index 462fea6..0000000 +--- a/package/network/utils/ebtables/patches/100-musl_fix.patch ++++ /dev/null +@@ -1,50 +0,0 @@ +---- a/extensions/ebt_among.c +-+++ b/extensions/ebt_among.c +-@@ -13,7 +13,6 @@ +- #include +- #include +- #include "../include/ebtables_u.h" +--#include +- #include "../include/ethernetdb.h" +- #include +- #include +---- a/extensions/ebt_arpreply.c +-+++ b/extensions/ebt_arpreply.c +-@@ -12,7 +12,6 @@ +- #include +- #include +- #include "../include/ebtables_u.h" +--#include +- #include +- +- static int mac_supplied; +---- a/extensions/ebt_nat.c +-+++ b/extensions/ebt_nat.c +-@@ -11,7 +11,6 @@ +- #include +- #include +- #include "../include/ebtables_u.h" +--#include +- #include +- +- static int to_source_supplied, to_dest_supplied; +---- a/useful_functions.c +-+++ b/useful_functions.c +-@@ -25,7 +25,6 @@ +- #include "include/ebtables_u.h" +- #include "include/ethernetdb.h" +- #include +--#include +- #include +- #include +- #include +---- a/include/ebtables_u.h +-+++ b/include/ebtables_u.h +-@@ -23,6 +23,7 @@ +- +- #ifndef EBTABLES_U_H +- #define EBTABLES_U_H +-+#include +- #include +- #include +- #include diff --git a/targets/targets.mk b/targets/targets.mk index dba77e30..48b166d4 100644 --- a/targets/targets.mk +++ b/targets/targets.mk @@ -3,6 +3,7 @@ $(eval $(call GluonTarget,ar71xx,nand)) $(eval $(call GluonTarget,mpc85xx,generic)) $(eval $(call GluonTarget,x86,generic)) $(eval $(call GluonTarget,x86,kvm_guest)) +$(eval $(call GluonTarget,x86,64)) ifneq ($(BROKEN),) $(eval $(call GluonTarget,ramips,rt305x)) diff --git a/targets/x86-64/config b/targets/x86-64/config new file mode 100644 index 00000000..f00279eb --- /dev/null +++ b/targets/x86-64/config @@ -0,0 +1,4 @@ +CONFIG_TARGET_x86=y +CONFIG_TARGET_x86_64=y +CONFIG_VDI_IMAGES=y +CONFIG_VMDK_IMAGES=y diff --git a/targets/x86-64/profiles.mk b/targets/x86-64/profiles.mk new file mode 100644 index 00000000..49cf02ef --- /dev/null +++ b/targets/x86-64/profiles.mk @@ -0,0 +1,17 @@ +X86_64_NETWORK_MODULES := kmod-3c59x kmod-e100 kmod-e1000 kmod-e1000e kmod-natsemi kmod-ne2k-pci kmod-pcnet32 kmod-8139too kmod-r8169 kmod-sis900 kmod-tg3 kmod-via-rhine kmod-via-velocity + + +$(eval $(call GluonProfile,GENERIC,$(X86_64_NETWORK_MODULES))) +$(eval $(call GluonProfileFactorySuffix,GENERIC,-ext4,.img.gz)) +$(eval $(call GluonProfileSysupgradeSuffix,GENERIC,-ext4,.img.gz)) +$(eval $(call GluonModel,GENERIC,combined,x86-64)) + +$(eval $(call GluonProfile,VDI,$(X86_64_NETWORK_MODULES))) +$(eval $(call GluonProfileFactorySuffix,VDI,-ext4,.vdi)) +$(eval $(call GluonProfileSysupgradeSuffix,VDI)) +$(eval $(call GluonModel,VDI,combined,x86-64-virtualbox)) + +$(eval $(call GluonProfile,VMDK,$(X86_64_NETWORK_MODULES))) +$(eval $(call GluonProfileFactorySuffix,VMDK,-ext4,.vmdk)) +$(eval $(call GluonProfileSysupgradeSuffix,VMDK)) +$(eval $(call GluonModel,VMDK,combined,x86-64-vmware)) diff --git a/targets/x86-64/vermagic b/targets/x86-64/vermagic new file mode 100644 index 00000000..3f67824e --- /dev/null +++ b/targets/x86-64/vermagic @@ -0,0 +1 @@ +c98e41bf75d421d517bb83bb2dd9f0a4