momo zone

调核人的blog

交叉编译后miredo跑不起来

需修改/注释掉这句:

#if ${ac_cv_file__proc_self_maps} false; then;
# echo $ECHO_N “(cached) $ECHO_C” >&6
#else
# test “$cross_compiling” = yes &&
# { { echo “$as_me:$LINENO: error: cannot check for file existence when cross compiling” >&5
#echo “$as_me: error: cannot check for file existence when cross compiling” >&2;}
# { (exit 1); exit 1; }; }

配置参数:

./configure –disable-shared –enable-static –host=mipsel-linux –build=i686-linux –without-Judy –prefix=/opt –disable-rpath –disable-chroot –enable-miredo-user=root

编译成功

 

但跑起来后 teredo进程进入Z 状态,看了如下配置档(来自https://netst.org/pub/linux/distrib/openwrt/source/packages/net/miredo/Makefile)发现,缺少依赖的内核模块 tun :

#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id: Makefile 9695 2007-12-09 18:59:01Z nbd $

include $(TOPDIR)/rules.mk

PKG_NAME:=miredo
PKG_VERSION:=1.0.0
PKG_RELEASE:=1

PKG_SOURCE_URL:=http://www.remlab.net/files/miredo/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_MD5SUM:=b5a51cb98732decc2ada96b2caee5d3c

include $(INCLUDE_DIR)/package.mk

define Package/miredo/Default
  SECTION:=net
  CATEGORY:=Network
  DEPENDS:=+libpthread +uclibcxx +kmod-ipv6 +kmod-tun
  SUBMENU:=miredo: Teredo (IPv6 tunneling over UDP through NAT)
  URL:=http://www.simphalempin.com/dev/miredo/
endef

define Package/miredo-server
$(call Package/miredo/Default)
  TITLE:=Teredo (IPv6 tunneling over UDP through NAT) server daemon
endef

define Package/miredo-server/conffiles
/etc/miredo-server.conf
endef

define Package/miredo-client
$(call Package/miredo/Default)
  TITLE:=Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon
endef

define Package/miredo-client/conffiles
/etc/miredo.conf
endef

CONFIGURE_ARGS += \
	--disable-shared \
	--enable-static \
	--with-gnu-ld \
	--disable-rpath \
	--disable-chroot \
	--enable-teredo-client \
	--enable-teredo-relay \
	--enable-teredo-server \
	--enable-miredo-user=root \

CONFIGURE_VARS += \
	CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
	CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
	LIBS="-nodefaultlibs -luClibc++ -lm" \
	ac_cv_file__proc_self_maps=yes\

define Build/Compile
	$(MAKE) -C $(PKG_BUILD_DIR) \
		CXXLINK="\$$$$(LINK)" \
		DESTDIR="$(PKG_INSTALL_DIR)" \
		all install
endef

define Package/miredo-server/install
	$(INSTALL_DIR) $(1)/etc/
	$(CP) $(PKG_INSTALL_DIR)/etc/miredo-server.conf-dist $(1)/etc/miredo-server.conf
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/miredo-server.init $(1)/etc/init.d/miredo-server
	$(INSTALL_DIR) $(1)/usr/sbin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo-server $(1)/usr/sbin/
endef

define Package/miredo-client/install	
	$(INSTALL_DIR) $(1)/etc
	$(CP) $(PKG_INSTALL_DIR)/etc/miredo.conf-dist $(1)/etc/miredo.conf
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/miredo.init $(1)/etc/init.d/miredo
	$(INSTALL_DIR) $(1)/usr/sbin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,miredo-server))
$(eval $(call BuildPackage,miredo-client))
Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: