openwrt 遍译php_分享我编译openwrt for mini2440 的过程以及编译好的 mini2440 openwrt 固件以及一些ipk软件包...

主要参考编译环境准备sudo apt-get install subversion

需要安装的包

sudo apt-get install libtool autoconf automake gcc-multilib bison screen gcc g++ binutils patch bzip2 flex make gettext unzip libc6 git-core git build-essential libncurses5-dev zlib1g-dev gawk quilt asciidoc libz-dev对于RHEL或fedora

yum install autoconf binutils bison bzip2 flex gawk gcc gcc-c++ gettext make ncurses-devel patch unzip wget zlib-devel下载代码主要参考安装feeds主要参考之前一步要make defconfig检查编译环境  若可进行则生成默认配置配置menuconfig(注意:有些带有--->的无法进入只需先把前面[ ]勾选即可进入子菜单)添加luci

LuCI ->Collections -> luci

添加luci的中文语言包

LuCI ->Translations -> luci-i18n-chinese

添加DDNS

LuCI ->Applications -> luci-app-ddns

添加USB挂载

Base system -> block-mount

添加自动挂载工具

Utilities -> Filesystem -> badblocks

添加复位键支持

Utilities -> restorefactory

添加一键开关无线

Utilities -> wifitoggle如果需要单独配置OpenWrt-DreamBox的linux kernel,可以使用下面命令配置:$ make kernel_menuconfigluci中的app可以按需选择Translations: luci-i18n-chinese、luci-i18n-english我编译2440固件选中的选项Target System:Samsung S3C24xxSubtarget:Subtarget (MINI2440 Development Board)Target Profile:(router)MINI2440 Development Board(因为我主要是作为路由系统)Target Images:我只选了squashfs可以选jffs2Package features选umontuBase system去掉dnsmasq和firewall,选上librt、libpthreadluci里面第一项选luci,Translate里选上luci-i18n-chineseKernel modules是大头Kernel modules -> Filesystems -> kmod-fs-ext4    添加硬盘格式支持Kernel modules -> Native Language Support -> kmod-nls-utf8  添加UTF8编码Kernel modules -> USB Support -> kmod-usb-storage-extras.   添加USB扩展支持其他还需选kmod-uѕb-core、kmod-uѕb-ohci、kmod-uѕb-storage、kmod-uѕb-storage-extras、kmod-uѕb-uhci、kmod-uѕb-video、kmod-uѕb2我还选了usbip相关的I2C support里选上kmod-i2c-core、kmod-i2c-s3c24xx.other里选kmod-input-coreVideo Support  --->  kmod-video-core、kmod-video-uvc(我全选了)Wireless Drivers  --->  可以根据你的网卡类型选择Network中我还选了iftop  aircrack-ng  amuleUtilities选了vim相关编译选项make -j 3   针对多核[/pre]我使用的完整编译命令[/pre]make V=99 2>&1 |tee build.log |egrep -i '(warn|error)'[/pre]出错处理如果因某种不知道的原因而编译失败,下面有种简单的方法来得知编译到底错在哪里了:$ make V=99 2>&1 |tee build.log |grep -i error输出详细的编译信息到build.log中,在终端只显示error错误的信息,或者:$ make V=99 2>&1 |tee build.log |egrep -i '(warn|error)'输出详细的编译信息到build.log中,在终端只显示warn警告,和error Error错误的信息。(补充说明:tee指令会从标准输入设备读取数据,将其内容输出到标准输出设备,同时保存成文件。)[root@localhost ~]# who | tee who.out

root     pts/0        2009-02-17 07:47 (123.123.123.123)我在编译过程中一开始是找不到transmission的包,用迅雷下载放到dl目录下 就OK了然后又是一个 implicit declaration of function 'time' 我在router.c中添加了#include 但是没有uboot产生  make menuconfig中Bootloader项也无法选中没有uboot估计是lintel哥没有把uboot集成到svn源码中placido回复说   ”原来配置编译uboot不是这个选项,而是在Device下面“  囧

mini2440  固件刷写教程

http://www.arm9home.net/read.php?tid-81329.html

本部分内容设定了隐藏,需要回复后才能看到

[ 此帖被feifei435在2014-02-07 18:11重新编辑 ]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1. 下载SDK 首先需要从OpenWrt官网下载SDK。选择与路由器硬件平台对应的SDK,例如:如果你的路由器是MT7620A芯片,则需要下载MT7620A SDK。 2. 解压SDK 将下载的SDK解压到任意目录下,例如:/opt/mt7620a_sdk。 3. 进入SDK目录 打开终端,进入SDK目录,例如:cd /opt/mt7620a_sdk。 4. 配置SDK 执行make menuconfig命令,进入SDK配置界面,进行以下配置: - Target System: 选择路由器的芯片类型,例如:MediaTek Ralink MIPS - Target Profile: 选择路由器的型号,例如:MT7620A based boards - Target Images: 选择编译软件包的目标平台,例如:ramips/mt7620a 5. 添加软件包源 执行以下命令,添加软件包源: echo "src/gz openwrt_custom http://openwrt.inkworm.com/chaos_calmer/15.05/mt7620a/packages/custom" >> /etc/opkg/customfeeds.conf opkg update 6. 安装编译工具 执行以下命令,安装编译工具: opkg install gcc make libpthread libstdcpp 7. 编写Makefile文件 在任意目录下创建一个文件夹,例如:/opt/my_package,并在该文件夹下创建一个名为Makefile的文件。在Makefile文件中编写软件包编译规则。 以下是一个简单的Makefile文件示例: ``` include $(TOPDIR)/rules.mk PKG_NAME:=hello-world PKG_VERSION:=1.0 PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk define Package/hello-world SECTION:=utils CATEGORY:=Utilities TITLE:=Hello World DEPENDS:=@TARGET_ramips_mt7620a endef define Package/hello-world/description This is a Hello World package. endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) endef define Package/hello-world/install $(INSTALL_DIR) $(1)/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/hello-world $(1)/bin/ endef $(eval $(call BuildPackage,hello-world)) ``` 8. 编译软件包 执行以下命令,编译软件包make package/hello-world/compile V=s 编译完成后,在SDK目录下的bin目录中可以找到编译好的软件包。 9. 安装软件包编译好的软件包拷贝到路由器上,并执行以下命令安装: opkg install hello-world_1.0-1_ramips_24kec.ipk 安装完成后,在路由器上执行hello-world命令即可看到输出结果。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值