ntop / n2n

Peer-to-peer VPN
GNU General Public License v3.0
6.14k stars 927 forks source link

Can anyone build n2n successfullly for Rockchip borad, linux buildroot? #571

Open chilinkiot opened 3 years ago

chilinkiot commented 3 years ago

I want to use n2n in Rockchip RK3308 platform, ARM64. When I compile it in buildroot, it always failed. My Makefile as below: ################################################################################ #

n2n

# ################################################################################ N2N_VERSION = 2.8 N2N_SITE = $(call github,ntop,n2n,$(N2N_VERSION))

N2N_DEPENDENCIES += zlib openssl N2N_LICENSE = GPL-3.0 N2N_LICENSE_FILES = LICENSE

N2N_AUTORECONF = YES

define N2N_RUN_AUTOGEN cd $(@D) && PATH=$(BR_PATH) ./autogen.sh endef N2N_PRE_CONFIGURE_HOOKS += N2N_RUN_AUTOGEN

N2N_MAKE_OPTS += TARGET_ARCHITECTURE=$(BR2_ARCH)

define N2N_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) endef

define N2N_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 -D $(@D)/edge $(TARGET_DIR)/usr/sbin/edge $(INSTALL) -m 0755 -D $(@D)/supernode $(TARGET_DIR)/usr/sbin/supernode endef

$(eval $(autotools-package))

Comile fail with errors:

/home/gitlab/Workspace/rockchip_ff_rk3308_linux/buildroot/output/firefly_rk3308_qt_release/host/lib/gcc/aarch64-rockchip-linux-gnu/6.4.0/../../../../aarch64-rockchip-linux-gnu/bin/ld: warning: -z ,relro ignored. /home/gitlab/Workspace/rockchip_ff_rk3308_linux/buildroot/output/firefly_rk3308_qt_release/host/lib/gcc/aarch64-rockchip-linux-gnu/6.4.0/../../../../aarch64-rockchip-linux-gnu/bin/ld: warning: -z ,relro ignored. /home/gitlab/Workspace/rockchip_ff_rk3308_linux/buildroot/output/firefly_rk3308_qt_release/host/lib/gcc/aarch64-rockchip-linux-gnu/6.4.0/../../../../aarch64-rockchip-linux-gnu/bin/ld: warning: -z ,relro ignored. /usr/bin/ld: warning: -z ,relro ignored. /usr/bin/ld: warning: -z ,relro ignored. /usr/bin/ld: ../libn2n.a(transform_aes.o): Relocations in generic ELF (EM: 183) ../libn2n.a: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status Makefile:34: recipe for target 'n2n-benchmark' failed make[3]: [n2n-benchmark] Error 1 Makefile:72: recipe for target 'tools' failed make[2]: [tools] Error 2 make[2]: *** Waiting for unfinished jobs.... /home/gitlab/Workspace/rockchip_ff_rk3308_linux/buildroot/output/firefly_rk3308_qt_release/host/lib/gcc/aarch64-rockchip-linux-gnu/6.4.0/../../../../aarch64-rockchip-linux-gnu/bin/ld: warning: -z ,relro ignored.

Does anyone know the problems? Thanks very much.

Logan007 commented 3 years ago

I am sorry that no one has been able to help with buildroot so far. Have you succeeded meanwhile?

I just want to say thank you for your hint to the RK3308. I saw that this ARM design has the crypto extensions included (which my Raspberry does not) and there are some interesting devices out there, e.g. the 'Rock Pi S'. For these devices, implementation of optional hardware ARM AES support might be worth considering.