专做教育网站拿站,网页开发和网站开发一样吗,动画制作专业,Wordpress虚拟资源下载类主题众所周知OpenWRT是目前最流行的嵌入式Linux之一。支持广泛的CPU包括#xff1a;x86、MIPS、ARM、PPC等。OpenWRT的trunk中所带的那个asterisk问题很多#xff0c;缺少很多包#xff0c;作者似乎仅仅是为了自己使用而移植的#xff0c;而目前网上除了不详细的官方资料外也无… 众所周知OpenWRT是目前最流行的嵌入式Linux之一。支持广泛的CPU包括x86、MIPS、ARM、PPC等。 OpenWRT的trunk中所带的那个asterisk问题很多缺少很多包作者似乎仅仅是为了自己使用而移植的 而目前网上除了不详细的官方资料外也无太多资料介绍怎么做这个包我在分析摸索以后自己编写了一个移植包。特别在这里说明下。 首先看看最需要的几个文件: 主目录 ./feeds/packages/net/myasterisk 编译配置 ./feeds/packages/net/myasterisk/Makefile 补丁文件 ./feeds/packages/net/myasterisk/patches/xxxx 其他文件 ./feeds/packages/net/files 编译时系统是先执行patches里的补丁进行打补丁具体的补丁可以参考系统已有的那个asterisk18的目录下patches里的东西。 files都是自己执行的一些文件比如复制启动文件什么的。 这里最主要的就是Makefile了。 openwrt下包的编译流程 1. 进入包目录 2. 如果没有文件根据makefile下载asterisk 3. 打补丁 4. 根据Makefile设置进行配置和编译 5. 完成工作 相关目录 编译过程的文件都保存在./build_dir/targetxxxxx/xxx目录下的ipk-install目录中。 这里我把我的makefile共享给大家看看吧 # # Copyright by Sun Binghoowa.sungmail.com # include $(TOPDIR)/rules.mk PKG_NAME:freeiriswrt-ast18 PKG_VERSION:1.8.10.1 PKG_RELEASE:1 PKG_SOURCE:$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:http://downloads.asterisk.org/pub/telephony/asterisk/releases/ PKG_MD5SUM:415738d347b9037cbe5f8bfbe66843de PKG_BUILD_DIR$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) #include $(INCLUDE_DIR)/ltqtapi.mk include $(INCLUDE_DIR)/package.mk define Package/freeiriswrt-ast18/Default SUBMENU:Telephony SECTION:net CATEGORY:Network URL:http://www.asterisk.org/ MAINTAINER:Sun Binghoowa.sungmail.com endef define Package/freeiriswrt-ast18/Default/description FreeirisWRT Combined Asterisk 1.8.X endef define Package/freeiriswrt-ast18 $(call Package/freeiriswrt-ast18/Default) TITLE:FreeirisWRT Combined Asterisk1.8.X DEPENDS: libsqlite3 sqlite3-clilibopenssl libncurses libpopt libpthread zlib!TARGET_avr32 endef define Package/freeiriswrt-ast18/description $(call Package/freeiriswrt-ast18/Default/description) endef CONFIGURE_ARGS \ --without-curses \ --with-gsminternal \ --without-cap \ --without-gtk \ --without-gtk2 \ --without-isdnnet \ --without-kde \ --without-misdn \ --without-nbs \ --with-ncurses$(STAGING_DIR)/usr \ --without-netsnmp \ --without-newt \ --without-odbc \ --without-ogg \ --without-osptk \ --with-popt$(STAGING_DIR)/usr \ --with-sqlite3$(STAGING_DIR)/usr \ --without-pri \ --without-qt \ --without-radius \ --without-sdl \ --without-suppserv \ --without-tds \ --without-termcap \ --without-tinfo \ --without-vorbis \ --without-vpb \ --with-z$(STAGING_DIR)/usr \ --with-sounds-cache$(DL_DIR) \ --without-dahdi \ --without-gnutls \ --without-iksemel \ --without-curl \ --without-mysqlclient \ --without-spandsp \ --without-bluetooth \ --without-srtp \ --disable-xmldoc EXTRA_CFLAGS $(TARGET_CPPFLAGS) EXTRA_LDFLAGS $(TARGET_LDFLAGS) define Build/Prepare $(call Build/Prepare/Default) endef define Build/Configure $(call Build/Configure/Default,,$(SITE_VARS)) endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ include/asterisk/version.h \ include/asterisk/buildopts.h defaults.h \ makeopts.embed_rules ./set_menuselect $(PKG_BUILD_DIR) ASTCFLAGS$(EXTRA_CFLAGS) -DLOW_MEMORY \ ASTLDFLAGS$(EXTRA_LDFLAGS) \ $(MAKE) -C $(PKG_BUILD_DIR) \ ASTVARLIBDIR/usr/lib/asterisk \ ASTDATADIR/usr/lib/asterisk \ ASTKEYDIR/usr/lib/asterisk \ ASTDBDIR/usr/lib/asterisk \ NOISY_BUILD1 \ DEBUG \ OPTIMIZE \ DESTDIR$(PKG_INSTALL_DIR) \ all install endef define Build/InstallDev $(INSTALL_DIR)$(1)/usr/include/asterisk-1.8/include/asterisk/ $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h$(1)/usr/include/asterisk-1.8/include/asterisk/ $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h$(1)/usr/include/asterisk-1.8/include/ endef define Package/freeiriswrt-ast18/install # $(INSTALL_DIR) $(1)/etc/asterisk $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*.so$(1)/usr/lib/asterisk/modules/ $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk$(1)/usr/sbin/ # $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/ # $(INSTALL_DIR) $(1)/usr/lib/asterisk/moh/ # $(INSTALL_DIR) $(1)/etc/default # $(INSTALL_DATA) ./files/asterisk.default$(1)/etc/default/asterisk # $(INSTALL_DIR) $(1)/etc/init.d # $(INSTALL_BIN) ./files/asterisk.init$(1)/etc/init.d/asterisk endef $(eval $(call BuildPackage,freeiriswrt-ast18)) 包的调试方法 如果你已经编写好配置文件。就先建立索引 ./scripts/feeds update -i ./scripts/feeds install xxxxxxx 如果这个步骤报错就去修改makefile移植到正确为止。 如果以上步骤正确。make menuconfig 选择你自己的那个包。 然后你就可以单独编译了 make package/你的包名字/{clean,compile} V99 编译完成后在bin/下能找到你那个软件包的名字。 最后顺便说下其实嵌入式下asterisk还是很稳定的也不像很多人说的那么多问题主要是由于嵌入式环境的性能限制导致asterisk出现很多问题。早在06年我就知道openwrt项目存在但是由于当时的嵌入式设备能力太低不适合HostDSP(泛指利用高性能CPU的运算能力来替代昂贵的DSP处理器的技术)这种模式软件的运行。 本文作者hoowa.sun是国人他也是开源运动的推广者同时也是全球唯一出自中国的开源通信平台Freeiris的作者其本人是一个不折不扣的技术狂人每年1/3的时间用来写代码但是写代码的效率是别人的5倍以上那么2/3的时间都用来看电视剧打游戏了。。。。。。