1.å¦ä½ç¼è¯OpenWrt
2.百分之九十八的人不知道git操作如何查看所有版本
3.ç¼è¯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æ¯ç¨çèæ¬æ¥ç¼è¯çï¼è¯¦è§: https://forum.openwrt.org/viewtopic.php?id=
ããçæçåºä»¶å¨åª
ããç¼è¯æååæçæçåºä»¶æ件ä½äºbinç®å½ä¸ï¼å¯ç¨å¦ä¸å½ä»¤æ¥çï¼
ãã# cd bin/
ãã# ls */
ãã
ããæ¸ ç
ããç¼è¯OpneWrtæ¶ä½ å¯è½éè¦ä¸ä¸ªæ¸ æ´å¹²åçç¼è¯ç¯å¢ã 以ä¸æä½æå©ç¨ç¼è¯å·¥ä½:
ããæ¸ æ´
ããæ¸ æ´trunk/ ç®å½ï¼å¨ç¼è¯è¿ç¨ä¸ä½¿ç¨âmake cleanâå½ä»¤å³å¯ã æ¤å½ä»¤å°å é¤binç®å½åbuild_dirç®å½ä¸çæææ件åæ件夹ã
ãã## See CAUTION below
ãã# make clean
百分之九十八的人不知道git操作如何查看所有版本
Git, 一款强大且流行的工具,它超越了传统的SVN局域网文件管理,成为分布式版本控制系统的代表。它的核心使命是高效地管理项目版本,特别适合处理大型项目,爬梯软件源码且资源存储在全球网络中,parser源码编码使得异地协作更为便捷。
Git源于Linux内核开发的需求,由Linus Torvalds开源,旨在提升代码管理的效率。尽管它功能众多,本文重点聚焦于查看版本信息的实用操作。对于OpenWrt源码中的龙腾虎跃指标源码多个分支和版本,很多人可能不清楚如何查看每个分支的具体版本历史。
要查看所有分支,使用命令:
git branch -a,这将展示所有分支,linux pcie源码包括本地和远程的。而要查看所有版本标签,可以使用:
git tag,这将揭示分支历史中的rtmp源码解析每一个版本标记。
在实际操作中,如果你需要从一个分支迁移到另一个分支,如从lede-.迁移到origin/lede-.,命令是:
git checkout -b lede-. origin/lede-.。此外,直接迁出特定版本代码,比如v..1,可以使用:
git checkout v..1。这一技巧对于经常处理版本切换的开发者来说,无疑是实用且容易被忽视的。
ç¼è¯openwrt ç¨ä»ä¹ç³»ç»
å¦æä½ åªæ¯è¦ç¼è¯ä¸ä¸ªèªå®ä¹çåºä»¶ï¼é»è®¤å¸¦ä»ä¹è½¯ä»¶ï¼ä¸å¸¦ä»ä¹è½¯ä»¶ï¼èªå®ä¹é»è®¤çé ç½®ççï¼ï¼é£æ¨èä½ ç¨ImageBuilderï¼ç®åå¿«éï¼çå¿çåä½ è¦æ¯éè¦èªå·±å¼å软件å ï¼ç¨OpenWRTçSDKï¼ç´æ¥åºipkæ件è¦å®å ¨éåå°±buildrootï¼å®å ¨ä»æºä»£ç å¼å§æ¹èµ·ï¼SVNåGITé½ææº
2024-12-27 14:52
2024-12-27 14:35
2024-12-27 14:25
2024-12-27 13:53
2024-12-27 13:45
2024-12-27 13:44
2024-12-27 13:09
2024-12-27 13:04