当前位置:首页 » 币种行情 » bin转trx工具

bin转trx工具

发布时间: 2025-02-10 09:15:38

1. 斐讯303b海蜘蛛怎么刷回原版

刷机方法有两种,一种是原厂固件直刷(我就是选择这种),另一种是TFTP智能刷机,各有各的好处吧,萝卜白菜各有所爱,看各位喜欢了。

需要注意的是,FIR302B的原厂固件如果更新到SW_FIR302B_703003238_V1.0.25.9的话,默认会提示不支持第三方固件更新的,这个时候只需要把Hi-spider_wifidog_Mini_V3.3_1028.trx 改名成为Hi-spider_wifidog_Mini_V3.3_1028.bin 然后在选择系统工具,选择升级就可以了。
具体刷机步骤:
第一步 登录 FIR302B 管理地址,如果没有改动则通过默认 192.168.1.1 登录,如果改动,通
过改动后地址登录。
第二步 选择系统工具,选择升级
第三步 在 CMD 中输入 ping 192.168.1.1 – t 观察,升级完成,直到 ping 稳定,切记升级过程中别断电,不然就杯具了!
第四步 升级完成后,提示输入用户名和密码,此时登录提示换成海蜘蛛了 Hi-Wi-Fi Mini,输入 admin/admin 发现无法登录,用户名和密码不正确
第五步 此时按住路由 RESET 键不放,拔电,在通电,持续 5-10 秒后松开即可,再次登录,密码正确。

2. .bin文件如何导入数据如何将bin文件中的数据读取出来

模式有几种导入方式。bin文件。

开关ios丢失,系统无法启动。

将控制台线连接到交换机的控制台端口,控制台会出现交换机IOS丢失的接口“switch:”模式。

当您在超级终端的“switch:”模式下输入flash_init时,会出现许多提示。继续输入load_helper,输入复制命令。

开关:flash_init

开关:load_helper

开关:复制xmodem:

flash:c2950-i6k2l2q4-mz.121-22。EA.bin

系统提示字母C一直出现,可以开始传输文件了。

点击超级终端菜单:传输-→发送文件,在协议选项中选择Xmodem或Xmodem-1K协议,然后选择IOS文件开始传输。

开关:启动

修改串行波特率以提高传输速度。

开关:设置波特

115200

步骤1:执行flash_init

开关:flash_init

第二步:修改波特率。

为了提高文件传输速率,有必要修改控制台端口的波特率。首先,使用以下指令修改设备的波特率

开关:设置波特

115200

第三步:用xmodem传输IOS文件。

在设备上输入以下说明:

开关:复制xmodem:

flash:c3560-ipservicesk9-mz.122-53。SE.bin

Flash:下面的“c3560-ipservicesk9-mz.122-53.se.bin”是IOS文件名,需要在本地PC上提前准备好。

然后点击超级终端的“发送”菜单,选择发送文件,并使用xmodem模式。

文件开始通过控制台发送到交换机,传输时间根据文件大小决定。10M文件大约需要50分钟。

第四步:设置启动文件。

当IOS文件正确传输到交换机后,执行以下指令来设置启动文件。

开关:设置启动

flash:c3560-ipservicesk9-mz.122-53。SE.bin

第五步:重置波特率。

在交换机上执行以下命令来重置波特率:

开关:复位波特

在PC上将超级终端的波特率更改为9600。

第六步:启动IOS

在交换机上执行以下命令启动IOS。

开关:启动

bin文件转音频文件?

1.先使用虚拟光驱(如DAEMONTools)导入bin文件,2.打开格式工厂,点击左边图标栏的光驱设备/dvd/cd/iso,再点击音乐CD转到音频文件3.在CD驱动器那个选项下面选择你放入bin文件的那个驱动盘,4.选择音频格式(一般来说选择MP3够了,)点击高质量,将比特率改为320KB/秒,点击确定5.点击转换即可.(我上面的办法是可行,如果楼主的文件时正确的话)

数据库怎么导入数据,数据库怎么导入表?

1>.采用InnoDB存储引擎;

2>.设置innodb_buffer_pool_size较大的值,且设置脏数据:innodb_max_dirty_pages_pct=95;

3>.关闭log-bin日志;

4>.设置sort_buffer_pool_size的值稍微大一点;

5>.使用多表空间:innodb_file_per_table;

6>.innodb_flush_log_at_trx_commit=0且sync_binlog=0;

7>.多个mysql客户端同时导入数据库备份文件,后台执行就是;

行车记录仪bin文件怎么打开?

你应该是说录像的文件,随便的播放软件也可以打开,但是每个软件播放的画质会有所区别,最好是把文件传到电脑上在打开。我用雷圣的记录仪有自己的软件,也可以播放。

app文件夹视频全是bin文件?

bin文件是2进制文件,不一定是视频文件,一般是程序文件。

程序文件用播放器是播放不了的。

但有时候可能仅仅是扩展名是bin,但文件内容还是视频格式的,这时可以播放,但这种情况很少见。

你可以根据bin文件的大概大小来初步判断该文件是影音文件的可能性。视频文件的体积一般都比较大。

凭证导入显示正在导入怎么回事?

一般情况下,等就是了!不过,往服务器上导入大数据文件最好用ftp工具在bin模式下将文件传到服务器,在服务器上进行imp,在本地imp的话,可能会因为网络问题导致连接中断造成无响应。

3. 如何在OpenWRT环境下做开发

1、搭建开发环境
首先,在执行make menuconfig后,会出现下图:

其中,图中红框部分是我定制路由器的系统版本,大家可以根据不同的路由器进行不同的选择;绿框部分表示我们需要编译一个SDK开发环境(默认情况下,此项未勾选)。

编译过程中需要通过官网下载很多相关的软件包,所以必须保证能够顺利连上外网。由于下载速度的限制,编译过程大概需要数小时。编译结束后,所有的产品都会放在编译根目录下的bin/yourtarget/. 例如:我所编译的产物都放在./bin/brcm47xx/下,其中文件主要有几类:

(1).bin/.trx 文件: 这些都是在我们所选的target-system的类别之下,针对不同路由器型号、版本编译的路由器固件。这些不同路由器的型号和版本是openwrt预先设置好的,我们不需要更改。至于.bin和.trx的区别,一种说法是,第一次刷路由器的时候,需要用.bin文件,如果需要再升级,则不能再使用.bin文件,而需要用.trx文件。原因是,.bin是将路由器的相关配置信息和.trx封装在一起而生成的封包,也就是说是包含路由器版本信息的.trx。在第一次刷固件的时候,我们需要提供这样的信息,而在后续升级时,则不再需要,用.trx文件即可。

(2)packages文件夹: 里面包含了我们在配置文件里设定的所有编译好的软件包。默认情况下,会有默认选择的软件包。

(3)OpenWrt-SDK.**.tar.bz2: 这个也就是我们定制编译好的OpenWRT SDK环境。我们将用这个来进行OpenWrt软件包的开发。例如,我所编译好的SDK环境包为:/bin/brcm47xx/OpenWrt-SDK-brcm47xx-for-Linux-x86_64-gcc-4.3.3+cs_uClibc-0.9.30.1.tar.bz2
可以从名称上看出,target system是brcm47xx,host system是Linux-x86_64,使用的编译工具以及库是4.3.3+cs_uClibc-0.9.30.1。

(4)md5sums 文件: 这个文件记录了所有我们编译好的文件的MD5值,来保证文件的完整性。因为文件的不完整,很容易将路由器变成“砖头”。

需要主要的是,编译完成后,一定要将编译好的bin目录进行备份(如果里面东西对你很重要的话),因为在下次编译之前,执行make clean 会将bin目录下的所有文件给清除掉!!

2、 更改原有packages

在编译根目录下会有一个dl的目录,这个目录其实是“download”的简写,在编译前期,需要从网络下载的数据包都会放在这个目录下,这些软件包的一个特点就是,会自动安装在所编译的固件中,也就是我们make menuconfig的时候,为固件配置的一些软件包。如果我们需要更改这些源码包,只需要将更改好的源码包打包成相同的名字放在这个目录下,然后开始编译即可。编译时,会将软件包解压到build_dir目录下。
当然,你也可以自己在dl里面创建自己的软件包,然后更改相关的配置文件,让openwrt可以识别这个文件包。

由于我的项目更改的内容是底层的,需要跟固件一起安装。所以,我使用的方法就是直接更改dl目录下软件包,然后重新进行固件编译。感觉类似于Linux的内核编译。反复编过十多次,没有任何问题。

3、 新建自己的packages
对于自己新建的package,而这个package又不需要随固件一起安装,换句话说,就是可以当做一个可选软件包的话。我们可以利用我们的SDK环境来单独编译,编译后会生成一个ipk的文件包。然后利用 opkg install xxx.ipk 来安装这个软件。

下面具体说下,如何编译一个helloword的软件包。
(1)首先,编写helloworld程序
编写helloworld.c
/****************
* Helloworld.c
* The most simplistic C program ever written.
* An epileptic monkey on crack could write this code.
*****************/

#include <stdio.h>
#include <unistd.h>
int main(void)
{
printf("Hell! O' world, why won't my code compile? ");
return 0;
}

编写Makefile文件
# build helloworld executable when user executes "make"

helloworld: helloworld.o
$(CC) $(LDFLAGS) helloworld.o -o helloworld

helloworld.o: helloworld.c
$(CC) $(CFLAGS) -c helloworld.c

# remove object files and executable when user executes "make clean"
clean:
rm *.o helloworld
在这两个文件的目录下,执行make 应该可以生成helloworld的可执行文件。执行helloworld后,能够打印出“Hell! O' world, why won't my code compile?”。 这一步,主要保证我们的源程序是可以正常编译的。下面我们将其移植到OpenWRT上。

(2)将OpenWrt-SDK-brcm47xx-for-Linux-x86_64-gcc-4.3.3+cs_uClibc-0.9.30.1.tar.bz2解压
tar –xvf OpenWrt-SDK-brcm47xx-for-Linux-x86_64-gcc-4.3.3+cs_uClibc-0.9.30.1.tar.bz2

(3)进入SDK
cd OpenWrt-SDK-brcm47xx-for-Linux-x86_64-gcc-4.3.3+cs_uClibc-0.9.30.1
可以看到里面的目录结构跟我们之前source的目录结构基本相同,所需要编译的软件包,需要放置在package目录下

(4)在package目录下创建helloworld目录
cd package
mkdir helloworld
cd helloworld

(5)创建src目录,拷贝 helloworld文件
mkdir src
cp /home/wrt/test/helloworld.c src
cp /home/wrt/test/Makefile src

(6)在helloworld目录下创建Makefile文件
这个Makefile文件是给OpenWRT读的,而之前写的那个Makefile文件是针对helloworld给编译其读的。两个Makefile不在同一层目录下。

touch Makefile
vim Makefile

Makefile文件模板内容如下:
##############################################
# OpenWrt Makefile for helloworld program
#
#
# Most of the variables used here are defined in
# the include directives below. We just need to
# specify a basic description of the package,
# where to build our program, where to find
# the source files, and where to install the
# compiled program on the router.
#
# Be very careful of spacing in this file.
# Indents should be tabs, not spaces, and
# there should be no trailing whitespace in
# lines that are not commented.
#
##############################################

include $(TOPDIR)/rules.mk

# Name and release number of this package
PKG_NAME:=helloworld
PKG_RELEASE:=1

# This specifies the directory where we're going to build the program.
# The root build directory, $(BUILD_DIR), is by default the build_mipsel
# directory in your OpenWrt SDK directory
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

# Specify package information for this program.
# The variables defined here should be self explanatory.
# If you are running Kamikaze, delete the DESCRIPTION
# variable below and uncomment the Kamikaze define
# directive for the description below
define Package/helloworld
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Helloworld -- prints a snarky message
endef

# Uncomment portion below for Kamikaze and delete DESCRIPTION variable above
define Package/helloworld/description
If you can't figure out what this program does, you're probably
brain-dead and need immediate medical attention.
endef

# Specify what needs to be done to prepare for building the package.
# In our case, we need to the source files to the build directory.
# This is NOT the default. The default uses the PKG_SOURCE_URL and the
# PKG_SOURCE which is not defined here to download the source from the web.
# In order to just build a simple program that we have just written, it is
# much easier to do it this way.
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef

# We do not need to define Build/Configure or Build/Compile directives
# The defaults are appropriate for compiling a simple program such as this one

# Specify where and how to install the program. Since we only have one file,
# the helloworld executable, install it by ing it to the /bin directory on
# the router. The $(1) variable represents the root directory on the router running
# OpenWrt. The $(INSTALL_DIR) variable contains a command to prepare the install
# directory if it does not already exist. Likewise $(INSTALL_BIN) contains the
# command to the binary file from its current location (in our case the build
# directory) to the install directory.
define Package/helloworld/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/helloworld $(1)/bin/
endef

# This line executes the necessary commands to compile our program.
# The above define directives specify all the information needed, but this
# line calls BuildPackage which in turn actually uses this information to
# build a package.
$(eval $(call BuildPackage,helloworld))

(7)返回到SDK的根目录
执行make进行编译
编译过程会在build_dir目录下完成
编译结果会放在 bin/[yourtarget]/package目录下helloworld_1_bcm47xx.ipk

(8)上传helloworld_1_bcm47xx.ipk
使用sftp软件上传helloworld_1_bcm47xx.ipk至路由器
执行 opkg install helloworld_1_bcm47xx.ipk
输入hello然后按Tab键,发现openwrt中已经有helloworld可执行命令。
执行 helloworld 查看程序的效果。

Hell! O' world, why won't my code compile?

【End】

希望对大家能有帮助 :)

转载

4. openwrt刷固件恢复原厂固件

There is little point in merely uninstalling OpenWrt, what you actually want to do, is to replace OpenWrt with the original firmware. You are here, because the wiki-page for your device, does not help you with that. So, first have a look at the flash.layout

To replace OpenWrt with the original firmware, you most probably do not have to change the boot partition, or the partition containing specific information like NVRAM or ART. Even if you overwrote the bootloader when you installed OpenWrt on your device.

通过OpenWrt CLI恢复原厂

You can use the program mtd for this:

cd /tmp

wget http://www.example.org/original_firmware.bin

mtd -r write /tmp/original_firmware.bin firmware

OpenWrt has no built-in "pleasantries" to prevent you from going back to original firmware. But sometimes you need to be careful, see e.g. back.to.original.firmware.

If you get a error message on the above mtd command like "no valid command given" you are using an old version of mtd which doesn't support the -r or -e parameters.

Download a newer statically compiled version

cd /tmp

wget http://www.freewrt.org/downloads/tools/mtd-static

chmod a+x mtd.static

wget http://www.example.org/original.trx

./mtd.static -e linux -r write original.trx linux

TIP: PLEASE READ - Common mistakes thread section 2 also. It describes when you should use the

openwrt-brcm-2.4-squashfs.trx

image.

Only flash a trx, never flash a bin file?

If you only have a Linksys .bin firmware file, this is not a problem, simply cut off the header before using the commands below:

dd bs=32 skip=1 if=original.bin of=original.trx

TIP: If your replacement firmware has a web interface, remember to flush your browser cache, sessions etc. This will avoid misleading 404 errors.

通过OpenWrt的WebUI管理界面恢复原厂固件

通过 Booloader恢复原厂固件

To flash the original firmware back again via the bootloader, please follow the proceres already described in Installing OpenWrt. They are basically the same.

5. 如何编译OpenWrt

Openwrt 官方正式的发行版是已编译好了的映像文件(后缀名bin或trx、trx2),此映像文件可从Openwrt官方网站的下载页面中轻松获取到,连接地址为 OpenWrt官方网站。这些编译好的映像文件是基于默认的配置设置,且只针对受支持的平台或设备的。因此,为什么要打造一个自己的映像文件,理由有以下四点:
您想拥有一个个性化的配置OpenWrt(彰显个性,在朋友圈子里显摆显摆,开个玩笑);
您想在实验性的平台上测试OpenWrt;
您参与测试或参与开发OpenWrt的工作;
或者,最简单的目的就是为了保持自己的Openwrt为最新版本;
若想实现上述目的,其实很简单,按下述文字即可成功编译出一个您的Openwrt来。
准备工作
在开始编译Openwrt之前需要您做些准备工作;与其他编译过程一样,类似的编译工具和编译环境是必不可少的:
一个构建OpenWrt映像的系统平台,简单说就是准备一个操作系统(比如Ubuntu、Debian等);
确保安装了所需的依赖关系库, (在debian系统中就是安装各种需要的软件包)
OpenWrt源代码副本
首先, 开机登陆到支持编译Openwrt的操作系统(废话了)。实体机或者虚拟机(Vmware 或者 Qemu)里的操作系统都行,这里推荐使用Linux系统。 bsd和mac osx系统也可以编,但不推荐,且未验证是否可编译成功。下文假定您使用的是Debian操作系统,使用 apt-get 来管理包. 替代的选择是 Ubuntu (分支 Kubuntu, Xubuntu 等即可)。
第二步, 就是安装所需要的各种软件包, 包括编译器,解压工具,特定的库等. 这些工作可以简单的通过键入以下命令 (通常需要root 或者是 sudo 权限),以root权限安装下列软件包(可能并不完整,会有提示,提示缺少即装就可以了):
32位(x86)请执行下列命令:
# apt-get install build-essential asciidoc binutils bzip2 gawk gettext \
git libncurses5-dev libz-dev patch unzip zlib1g-dev

64位(x86_64)请执行下列命令(多装了哪些库或软件包呢?请您仔细看一看哦):
# apt-get install build-essential asciidoc binutils bzip2 gawk gettext \
git libncurses5-dev libz-dev patch unzip zlib1g-dev ia32-libs \
lib32gcc1 libc6-dev-i386

参考 本列表中 所列的编译环境所需要软件包或库。
某些依赖的为库或软件包也许操作系统中已经安装过,此时apt-get会作出提示(提示您忽略或重新安装的),别紧张,放轻松些,编译Openwrt不会像编译DD-WRT那样难的(至少本人是体会到了编译DD-WRT的难)。
最后下载一份完整的 Openwrt 源码到编译环境中。关于Openwrt的源代码下载,途径有二,一是通过 svn ,一是通过 git,建议使用 svn ,因为Openwrt主要以 svn 来维护Openwrt系统的版本。另外,请注意Openwrt中不同的分支版本,一个是用得较多的开发快照,俗称 trunk,二是稳定版,俗称 backfire。
安装Subversion
若你想通过svn下载源代码,你需安装 Subversion。Subversion,或称SVN, 是OpenWrt的project中用来控制版本的系统,它非常类似的 CVS的界面和使用条款。 执行下述命令即可安装SVN,很容易的:
# apt-get install subversion

Subversion安装完毕,通过SVN命令可获取得到一份OpenWrt纯净源代码。您还得创建一个目录以便存放获取得到的Openwrt源代码,要获取源代码你还得输入subversion命令来获取 (svn里这种操作称之为'check out') 。命令很简单的,继续看下去就能见到了,别着急,耐心点儿。
编译流程
编译专属于您的设备的特定Openwrt固件以一下五个步骤:
通过Subversion命令获得源代码;
更新(或安装) package feeds〔package feeds无法确切翻译,待译吧);
创建一个默认配置以检查编译环境是否搭建好了 (假如需要的话);
用Menuconfig来配置即将编译生成的固件映像文件的配置项;
最后开始编译固件;
下载源代码
最后,下载一份完整的OpenWrt源代码。你可选择:
下载稳定发行版,或
下载开发版 (俗称"trunk"版)。
使用发行版的源码
截止本文时, Openwrt公开发行的稳定版为 OpenWrt 10.03 "backfire"。此版本是最稳定的,但也许不包括最新更新的补丁或最新编写的出的新功能。
下述代码即举例说明了通过svn从brandkfire获得backfire源代码(此版本意思是从trunk分支的补丁也在backfire版本中了,即包含修复补丁):
# mkdir OpenWrt/
# cd OpenWrt/
# svn co svn://svn.openwrt.org/openwrt/branches/backfire

注解: 上述svn命令将在当前目录创建一个 OpenWrt/backfire/ 子目录,此目录包含此命令获取到的源代码。
您也可以通过下述命令,下载不含修复补丁的backfire的原版源码:
# svn co svn://svn.openwrt.org/openwrt/tags/backfire_10.03

使用开发版源代码
当前的开发版本分支(trunk)已包含最新的实验补丁。此分支或许还突破了Openwrt原来所不支持的硬件设备的限制哦,惊喜的同时也有风险存在。因此,编译trunk版,慎之~
# mkdir OpenWrt/
# cd OpenWrt/
# svn co svn://svn.openwrt.org/openwrt/trunk/

更多详细资料详见: https://dev.openwrt.org/wiki/GetSource.
跟进并更新源代码
因Openwrt的源代码随时都会变动,故此命令将确保您所获取得到的源码的最新性。下述假设您用的是backfire版本的源码:
## Here, backfire is the directory name of the current release branch you're tracking
# cd OpenWrt/backfire/
# svn up

'svn up' 命令用于更新SVN上更新了,但本地尚未更新的这部分源代码(本人实践证明此命令会将本地源码与SVN上的源码先比较,若SVN有更新才会下载更新的部分,很实用的一个命令)。如果未指定目标路径,则此命令将更新当前目录及当前目录的子目录内的源码。
Feeds下载
Feeds即为包含到你的OpenWrt环境中的额外软件包的索引之类的。(feed译名很多,莫衷一是,至2008年底为止,还没有一个十分通用而备受认可的中文译名;所以此文当中我们用英文feed来称呼)。 最主要的Feeds有以下三个:
'packages' - 路由的基本功能,
'LuCI' - OpenWrt默认的GUI(WEB管理界面), 及
'Xwrt' - 其他的GUI。
一般情况,你至少需要含 'packages' 和 'LuCI'两个Feeds。
下载完feeds之后, (为编译OpenWrt的recipies额外的预定义包) 您可以检查哪些feeds要包括在内。编辑在你的编译环境的根目录下的'feeds.conf.default'文件。
然后使用下列命令开始下载(注:可能你需要先运行cd trunk进入trunk目录才能成功执行下列命令):
# ./scripts/feeds update -a

在此之后,下载的软件包需要安装。亦即指的下边的命令啦。若路过下边的install命令则后续make menuconfig将无法成功执行!(注:可能你需要先运行cd trunk进入trunk目录才能成功执行下列命令):
# ./scripts/feeds install -a

只需编辑Feeds的配置文件或运行更新命令,即可很方便地更新或添加新的实验性的packages到源码中并编译到OpenWrt固件去。
注意:请老坛友及旧的新闻组成员们注意了,这一步取代了创建符号链接symlinks的老办法哦。
更新Feeds
诸如此类源码,你得定期更新Feeds。 通过如上相同的命令:
# ./scripts/feeds update -a
# ./scripts/feeds install -a

注意:若你清楚地知道你不需添加新的packages到menuconfig中去,那么你可在更新Feeds时跳过这一步。
生成配置
You may not have to make configration always after updating sources and feeds, but making it ensures that all packages from source and feeds are correctly included in your build configuration.
Defconfig
下一步是检查编译环境,若可进行编译则生成默认配置:
# make defconfig

若defconfig回显提示缺少软件包或编译库等依赖,则按提示安装所缺软件包或库等即可,不难的,细心点就行。
Menuconfig
menuconfig是一个基于文本的工具,它处理选择的目标(需要还是不需要)、编译生成软件包(openwrt下是IPKG格式)以及内核选项(编译成模块还是内核)等等
# make menuconfig

在你离开并保存配置文件(默认都是.config)后,将自动配置依赖关系,让你可以着手编译更新的固件。
大众可通过'menuconfig'这一简单的图形化的配置环境,非常轻松地编译出专属您本人的OpenWrt固件。
可以用'menuconfig',以开发的意图来编译OpenWrt的固件,为自己(个人)创造一个结构简单但是功能强大的环境。(上句实在难翻译,只能意译。并且也请大家都学习下编译OP固件,让以OP固件盈利的人丢掉那肮脏的饭碗!)
Menuconfig或多或少有些难以说明的地方,即使是最专业的配置,也可以寻求帮助并加以解决。 需要你指定何种目标平台,要包含的package软件包和内核模块等均需要你指定,配置标准的过程中会包括修改:
目标平台(即路由器何种架构,BCM呢还是AR均可选择)
选择要包含的package软件包
构建系统设置
内核模块
Target system is selected from the extensive list of supported platforms, with the numerous target profiles – ranging from specific devices to generic profiles, all depending on the particular device at hand. Package selection has the option of either 'selecting all package', which might be un-practical in certain situation, or relying on the default set of packages will be adequate or make an indivial selection. It is here needed to mention that some package combinations might break the build process, so it can take some experimentation before the expected result is reached. Added to this, the OpenWrt developers are themselves only maintaining a smaller set of packages – which includes all default packages – but, the feeds-script makes it very simple to handle a locally maintained set of packages and integrate them in the build-process.
假如你需要LuCI, 要到Administration 菜单里,在LuCI组件的子菜单下, 并选择: luci-admin-core, luci-admin-full, and luci-admin-mini组件包。
假如你不需要PPP,你可到Network菜单下取消对它的选择,以便编译时不包含此组件。
Menuconfig用法: 确保这些组件包是以 '*'星号标记而不是 'M'标记。
如果你是以星号 '*'标记该组件包, 则该组件包将编译进最终生成的OpenWrt固件中。
如果你仅以 'M'标记该组件包, 则该组件包将不会编译进最终生成的OpenWrt固件中。
The final step before the process of compiling the intended image(s) is to exit 'menuconfig' – this also includes the option to save a specific configuration or load an already existing, and pre-configured, version.
Exit and save.
Source Mirrors
The 'Build system settings' include some efficient options for changing package locations which makes it easy to handle a local package set:
Local mirror for source packages
Download folder
In the case of the first option, you simply enter a full URL to the web or ftp server on which the package sources are hosted. Download folder would in the same way be the path to a local folder on the build system (or network). If you have a web/ftp-server hosting the tarballs, the OpenWrt build system will try this one before trying to download from the location(s) mentioned in the Makefiles . Similar if a local 'download folder', residing on the build system, has been specified. The 'Kernel moles' option is required if you need specific (non-standard) drivers and so forth – this would typically be things like moles for USB or particular network interface drivers etc.
编译固件
万事具备,只欠东风,通过下面简单的make命令来编译:
# make

在多核电脑中编译
具有多核CPU处理器的电脑进行编译,使用下述参数可令编译过程加速。 常规用法为 <您cpu处理器的数目 + 1> – 例如使用3进程来编译 (即双核CPU), 命令及参数如下:
# make -j 3

后台编译
若你在这个系统内编译OpenWrt的同时还处理其他,可以让闲置的I/O及CPU来在后台编译固件 (双核CPU):
# ionice -c 3 nice -n 20 make -j 2

编译简单的基本的软件包
当你为OpenWrt开发或打包软件包,编译简单的基本的软件包可以很轻易地编译该软件包 (例如, 软件包cups):
# make package/cups/compile V=99

一个在Feeds里的软件包大约是这样子的:
# make package/feeds/packages/ndyndns/compile V=99

编译错误
如果因某种不知道的原因而编译失败,下面有种简单的方法来得知编译到底错在哪里了:
# make V=99 2>&1 |tee build.log |grep -i error

上述编译命令意为:V99参数,将出错信息保存在build.log,生成输出完整详细的副本(with stdout piped to stderr),只有在屏幕上显示的错误。
举例说明:
# ionice -c 3 nice -n 20 make -j 2 V=99 CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
|tee build.log |egrep -i '(warn|error)'

The above saves a full verbose of the build output (with stdout piped to stderr) in build.log and outputs only warnings and errors while building using only background resources on a al core CPU.
一键编译
即使用脚本来编译Openwrt固件。许多朋友编译Openwrt是用的脚本来编译的,详见: https://forum.openwrt.org/viewtopic.php?id=28267
生成的固件在哪
编译成功后所生成的固件文件位于bin目录下,可用如下命令查看:
# cd bin/
# ls */

清理
编译OpneWrt时你可能需要一个清洁干净的编译环境。 以下操作有利用编译工作:
清洁
清洁trunk/ 目录,在编译过程中使用“make clean”命令即可。 此命令将删除bin目录和build_dir目录下的所有文件及文件夹。
## See CAUTION below
# make clean

热点内容
bin转trx工具 发布:2025-02-10 09:15:38 浏览:555
KUSD和USDT 发布:2025-02-10 09:08:59 浏览:636
世界区块链大会海南 发布:2025-02-10 09:01:54 浏览:75
公信宝挖矿算力计算器 发布:2025-02-10 09:01:10 浏览:741
区块链里的主流币 发布:2025-02-10 08:59:11 浏览:989
数字货币价格差别 发布:2025-02-10 08:44:44 浏览:41
我的世界手机版116一个挖矿法 发布:2025-02-10 08:34:36 浏览:973
区块链软件图片 发布:2025-02-10 08:34:33 浏览:154
有赚区块链是资金盘吗会跑路吗 发布:2025-02-10 08:33:03 浏览:775
元宇宙概念营业执照 发布:2025-02-10 07:52:26 浏览:484