1.å¦ä½ç¼è¯OpenWrt
2.openwrt是码分什么意思
3.å¦ä½å¨OpenWRTç¯å¢ä¸åå¼å
4.openwrt编译流程
5.openwrt的扩容——extroot
6.openWRT简介
å¦ä½ç¼è¯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æéå®è£ ä¸å软件å (å¯è½å¹¶ä¸å®æ´ï¼ä¼ææ示ï¼æ示缺å°å³è£ å°±å¯ä»¥äºï¼:
ããä½(x)请æ§è¡ä¸åå½ä»¤:
ãã# apt-get install build-essential asciidoc binutils bzip2 gawk gettext \
ããgit libncurses5-dev libz-dev patch unzip zlib1g-dev
ãã
ããä½(x_)请æ§è¡ä¸åå½ä»¤ï¼å¤è£ äºåªäºåºæ软件å å¢ï¼è¯·æ¨ä»ç»çä¸çå¦ï¼:
ãã# apt-get install build-essential asciidoc binutils bzip2 gawk gettext \
ããgit libncurses5-dev libz-dev patch unzip zlib1g-dev ia-libs \
ããlibgcc1 libc6-dev-i
ãã
ããåè æ¬åè¡¨ä¸ æåçç¼è¯ç¯å¢æéè¦è½¯ä»¶å æåºã
ããæäºä¾èµç为åºæ软件å ä¹è®¸æä½ç³»ç»ä¸å·²ç»å®è£ è¿ï¼æ¤æ¶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 . "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_.
ãã
ãã使ç¨å¼åçæºä»£ç
ããå½åçå¼åçæ¬åæ¯(trunk)å·²å å«ææ°çå®éªè¡¥ä¸ãæ¤åæ¯æ许è¿çªç ´äºOpenwrtåæ¥æä¸æ¯æç硬件设å¤çéå¶å¦ï¼æåçåæ¶ä¹æé£é©åå¨ãå æ¤ï¼ç¼è¯trunkçï¼æ ä¹ï½
ãã# mkdir OpenWrt/
ãã# cd OpenWrt/
ãã# svn co svn://svn.openwrt.org/openwrt/trunk/
ãã
ããæ´å¤è¯¦ç»èµæ详è§ï¼ binations 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 modules' option is required if you need specific (non-standard) drivers and so forth â this would typically be things like modules 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 make -j 2
ãã
ããç¼è¯ç®åçåºæ¬ç软件å
ããå½ä½ 为OpenWrtå¼åææå 软件å ,ç¼è¯ç®åçåºæ¬ç软件å å¯ä»¥å¾è½»æå°ç¼è¯è¯¥è½¯ä»¶å (ä¾å¦ï¼ 软件å cups):
ãã# make package/cups/compile V=
ãã
ããä¸ä¸ªå¨Feedséç软件å 大约æ¯è¿æ ·åç:
ãã# make package/feeds/packages/ndyndns/compile V=
ãã
ããç¼è¯é误
ããå¦æå æç§ä¸ç¥éçåå èç¼è¯å¤±è´¥,ä¸é¢æç§ç®åçæ¹æ³æ¥å¾ç¥ç¼è¯å°åºéå¨åªéäº:
ãã# make V= 2>&1 |tee build.log |grep -i error
ãã
ããä¸è¿°ç¼è¯å½ä»¤æ为ï¼Våæ°ï¼å°åºéä¿¡æ¯ä¿åå¨build.logï¼çæè¾åºå®æ´è¯¦ç»çå¯æ¬ï¼with stdout piped to stderrï¼ï¼åªæå¨å±å¹ä¸æ¾ç¤ºçé误ã
ãã举ä¾è¯´æ:
ãã# ionice -c 3 nice -n make -j 2 V= CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
ãã|tee build.log |egrep -i '(warn|error)'
ãã
ããThe above saves a full verbose copy 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 dual core CPU.
ããä¸é®ç¼è¯
ããå³ä½¿ç¨èæ¬æ¥ç¼è¯Openwrtåºä»¶ã许å¤æåç¼è¯Openwrtæ¯ç¨çèæ¬æ¥ç¼è¯çï¼è¯¦è§: pile?\n\n");
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-brcmxx-for-Linux-x_-gcc-4.3.3+cs_uClibc-0.9..1.tar.bz2解å
tar âxvf OpenWrt-SDK-brcmxx-for-Linux-x_-gcc-4.3.3+cs_uClibc-0.9..1.tar.bz2
ããï¼3ï¼è¿å ¥SDK
cd OpenWrt-SDK-brcmxx-for-Linux-x_-gcc-4.3.3+cs_uClibc-0.9..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 copy 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 copying 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 copy 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_bcmxx.ipk
ããï¼8ï¼ä¸ä¼ helloworld_1_bcmxx.ipk
使ç¨sftp软件ä¸ä¼ helloworld_1_bcmxx.ipkè³è·¯ç±å¨
æ§è¡ opkg install helloworld_1_bcmxx.ipk
è¾å ¥helloç¶åæTabé®ï¼åç°openwrtä¸å·²ç»æhelloworldå¯æ§è¡å½ä»¤ã
æ§è¡ helloworld æ¥çç¨åºçææã
ããHell! O' world, why won't my code compile?
ãããEndã
ããå¸æ对大家è½æå¸®å© :)
ãã转载
openwrt编译流程
编译OpenWRT源码至Ubuntu下,需先进入OpenWRT根目录。码分通常,码分简单操作为执行命令make V=。码分若系统为多核处理器,码分为加速编译过程,码分分发app内测源码可添加-j选项,码分如make –j3 V=。码分在编译过程中,码分系统将自动下载所需软件包,码分请确保网络畅通。码分若在编译时遇到下载失败,码分可先执行make download指令,码分提前下载所需包,码分折话费充值源码以避免后续错误。码分
初次编译耗时较长,且需下载大量源码包,建议使用较好的***,以加速过程。完成编译后,会在源码目录中生成一个名为bin的文件夹,其中包含两个文件:openwrt-ramips-rtx-wrn-squashfs-factory.bin 和 openwrt-ramips-rtx-wrn-squashfs-sysupgrade.bin。根据路由器的原始固件或已安装的OpenWRT版本,选择相应的固件进行刷写。
在编译过程中,掌握一些技巧有助于提升效率。例如,笔记移动端源码执行make clean可以清理基本编译文件,make dirclean则会深度清理文件,相当于执行make clean后再清除交叉编译工具链目录。使用make distclean则会清除所有相关东西,包括下载的软件包、配置文件及feed内容等。在个人开发中,常遇menuconfig无法更新问题,可通过删除tmp缓存目录解决。预先下载软件包,再执行编译的make download V=方法同样有效。最后,删除.config文件以清空所有配置。买米铺源码网
openwrt的扩容——extroot
开放源代码的路由系统OpenWRT提供了一种强大的方法来管理和配置路由器。在本文中,我们将讨论如何进行OpenWRT的扩展,即“extroot”。这一操作旨在提高系统性能和存储容量。尽管官方指南提供了详细步骤,但在实际操作中,可能会遇到挑战。通过一次尝试和错误的学习过程,我们最终实现了这一目标。下文将介绍实现OpenWRT扩展的关键步骤。
在开始扩展之前,需要准备待扩展的反汇编源码工具存储设备,通常我们假设其设备标识为/dev/sda。首先,通过SSH登录到路由器后端,或者如果可能,直接使用显示器连接。接下来,利用opkg工具安装必要的包,并执行特定命令以执行分区操作。请注意,使用特定的扇区范围(例如“s -s”)是至关重要的,以避免警告信息的出现。这一步骤是整个扩展过程的基础。
为了实现“extroot”,需要对系统进行配置,具体涉及修改/etc/config/fstab文件,以便将新的存储空间挂载到一个不同的目录。此外,需要调整原始的overlay挂载点,将其替换为新创建的extroot,确保系统能够正确识别和利用新增的存储资源。
在配置完extroot后,使用特定命令检查设备的UUID信息,以确认所有设置都已正确应用。接下来,格式化新分区并调整openwrt的uci配置,确保所有设置与新扩展的存储空间相匹配。这一过程需要细心和耐心,确保没有错误发生。
在完成所有步骤后,通过reboot命令重启系统。重启后,系统会自动使用新的扩展存储空间。为了确认扩展是否成功,可以检查系统状态或运行特定命令以验证新的存储空间已正确挂载并可用。
作者在操作中对第1步进行了调整,将扇区范围更改为“Mib Mib”,以适应不同的存储需求。第2步的配置过程中,作者遇到等同的/etc/mtab文件中未包含overlay的情况,但根目录下的overlay目录存在。在这种情况下,仍按照指导执行所有步骤。最终,作者在重启后发现系统成功实现了扩展,体验到了成功的满足感。
openWRT简介
自Linksys发布WRTG/GS的源码后,开发者们纷纷对其进行了定制,以增强原有功能。然而,这些非官方的固件多数基于Linksys源码进行改造,只添加了少量自定义内容,且针对特定市场设计,这导致了两个问题:一是难以整合所有版本的优点,二是与Linux主流发行版的差距逐渐拉大。 OpenWRT则选择了一个不同的路线。它从头开始,逐步构建软件,力求接近Linksys固件的功能。其独特之处在于采用了可写文件系统,这使得开发者在每次修改后无需重新编译,从而赋予它更接近小型Linux电脑系统的特性。这种设计显著提高了开发效率,使得OpenWRT在功能丰富度和灵活性上表现出色。[1] (系统构建参考:[2],详细内容来源:[3])扩展资料
OpenWrt的被描述为一个嵌入式设备的Linux发行版,而不是试图建立一个单一的,静态的固件,OpenWrt的包管理提供了一个完全可写的文件系统,从应用程序供应商提供的选择和配置,并允许您自定义的设备,以适应任何应用程序通过使用包。对于开发人员,OpenWrt的是框架来构建应用程序,而无需建立一个完整的固件左右;对于用户来说,这意味着完全定制的能力,从来没有预想的方式使用该设备。