1.arm-linux-gcc å arm-elf-gcc çåºå«
2.openWRT发展历程
3.openwrt是源码什么
arm-linux-gcc å arm-elf-gcc çåºå«
å¨åºäºARMçåµå ¥å¼ç³»ç»å¼åä¸ï¼å¸¸å¸¸ç¨å°äº¤åç¼è¯çGCCå·¥å ·é¾æ两ç§ï¼
arm-linux-*å arm-elf-*ï¼ä¸¤è åºå«ä¸»è¦å¨äºä½¿ç¨ä¸åçCåºæ件ãarm-linux-*使ç¨
GNUçGlibcï¼èarm-elf-*ä¸è¬ä½¿ç¨ uClibc/uC-libcæè 使ç¨REDHATä¸é¨ä¸ºåµå ¥å¼ç³»ç»
çå¼åçCåºnewlib.GlibcãuClibc/uC-libc以å newlibé½æ¯Cè¯è¨åºæ件ï¼åªæ¯æåº
ç¨çé¢åä¸åèå·²ï¼Glibcæ¯é对PCå¼åçï¼uClibc/uC-libcæ¯ä¸Glibc APIå ¼å®¹çå°å
åCè¯è¨åºï¼å®ç°äºGlibcé¨ååè½ã
ããå ³äºuClibc/uC-libcç说æï¼è¯¦è§å¦ä¸ï¼
ããThere are two libc libraries commonly used with uClinux. uC-libc and
uClibc. They are quite different despite their similar names. Here is a
quick overview of how they are different.
ããuC-libc is the original library for uClinux. It was based on sources
from the Linux- C library which was part of the ELKs project with m
support added by Jeff Dionne and Kenneth Albanowski. It is a fairly complete
libc implementation, however, some of the API's are a little non-standard
and quite a few common libc routines are not present. Currently it has
stable support for m, ColdFire and ARM (Non-MMU) architectures. It was
primary design goal is to be small and light weight. It does try to conform
to any standards, although its API tries to be compatible with most libcs,
it is not always exactly the same.
ããThe uClinux distribution provides an environment that can compile using
either uC-libc or uClibc depending on your needs. For m and Coldfire
platforms it is generally better to chose uC-libc as it supports shared
libraries and is the most commonly used libc for these CPUs. uClibc also
works quite well with almost all platforms supported by the distribution.
Which libc you choose to use will be decided by your requirements
uClinuxæ两个ç»å¸¸ä½¿ç¨çlibcåºï¼uC-libcåuClibcãè½ç¶ä¸¤è ååå¾ç¸ä¼¼ï¼å ¶å®æå·®
å«ï¼ä¸é¢å°±ç®åçä»ç»ä¸ä¸äºè çä¸åä¹å¤ãuC -libcæ¯ææ©ä¸ºuClinuxå¼åçåºï¼æ¯
Jeff DionneåKenneth Albanowski为å¨EKLs项ç®ä¸æ¯æmå¨Linux- Cåºæºç
ä¸ç§»æ¤çãuC-libcæ¯ä¸ä¸ªå®å ¨çlibcå®ç°ï¼ä½å ¶ä¸æä¸äºapiæ¯éæ åçï¼æäºlibcç
æ åä¹æ²¡æå®ç°ãuC-libc稳å®å°æ¯æ mï¼ColdFireå没æMMUçARMãå ¶ä¸»è¦è®¾è®¡
ç®æ æ¯âå°âã"è½»"ï¼å¹¶å°½éä¸æ åä¸è´ï¼è½ç¶å®çAPIåå¾å¤libcå ¼å®¹ï¼ä½æ¯ä¼¼ä¹å¹¶
ä¸åå®ææçé£æ ·åæææ åä¸è´ã
uClibcå°±æ¯ä¸ºäºè§£å³è¿ä¸ªé®é¢ä»uC-libcä¸åå±åºæ¥çãå®çææAPIé½æ¯æ åç(æ£ç¡®
çè¿åç±»åï¼åæ°çç)ï¼å®å¼¥è¡¥äºuC-libcä¸æ²¡æå®ç°çlibcæ åï¼ç°å¨å·²ç»è¢«ç§»æ¤å°
å¤ç§æ¶æä¸ãä¸è¬æ¥è®²ï¼å®å°½éå ¼å®¹glibc以便使åºç¨ç¨åºç¨uClibcæ¹ååç容æã
uClibcè½å¤å¨æ åç VM linuxåuClinuxä¸é¢ä½¿ç¨ã为äºåºç¨ç¨åºçç®æ´ï¼å®çè³å¯ä»¥
å¨è®¸å¤æ¯æMMUçå¹³å°ä¸è¢«ç¼è¯æå ±äº«åºãErik Andersonå¨uClibcèååäºå¾å¤çå·¥
ä½ãuClibcæ¯æ许å¤ç³»åçå¤çå¨ï¼mï¼Coldfireï¼ARMï¼MIPSï¼vï¼ xï¼
iï¼Sparcï¼SuperHï¼Alphaï¼PowerPCåHitachi 8ãä¸æå¢å çå¹³å°æ¯ææ¾ç¤ºuClibc
è½å¤å¾å®¹æçéåºæ°çæ¶æãuClinuxåè¡çæä¾äºç¯å¢è½å¤è®©ä½ éæ©ä½¿ç¨uC-libcææ¯
uClibcç¼è¯ã对äºmåColdfireå¹³å°æ¥è¯´ï¼éæ©uC-libcè¿æ¯ç¨å¾®å¥½ä¸ç¹ï¼å 为å®
æ¯æå ±äº«åºï¼èå ±äº«åºæ¯è¿äºcpuç»å¸¸ä½¿ç¨ç libc.uClibcä¹å ä¹åææçå¹³å°é½è½å¾
好çå·¥ä½ãéæ©åªç§libcåå³äºä½ çéæ±ã
newlib æ¯ä¸ä¸ªç¨äºåµå ¥å¼ç³»ç»çå¼æ¾æºä»£ç çCè¯è¨ç¨åºåºï¼ç±libcålibm两个åºç»
æï¼ç¹ç¹æ¯è½»é级ï¼é度快ï¼å¯ç§»æ¤å°å¾å¤CPUç»æä¸ãnewlibå®ç°äºè®¸å¤å¤æçå
è½ï¼å æ¬å符串æ¯æï¼æµ®ç¹è¿ç®ï¼å ååé (å¦malloc)åI/Oæµå½æ°(printfï¼fprinf()
çç)ãå ¶ä¸libcæä¾äºc è¯è¨åºçå®ç°ï¼èlibmæä¾äºæµ®ç¹è¿ç®æ¯æã
å¨ä¸ºARM交åç¼è¯gccç¼è¯å¨æ¶ï¼å¯¹gccæå®ä¸åçé ç½®é项æ¶ï¼ä½¿ç¨çCè¯è¨åºå°±ä¸åï¼
gccç¼è¯å¨é»è®¤ä½¿ç¨Glibcï¼ä¹å¯ä»¥ä½¿ç¨ uClibc/uC-libc(åºæ¬å ¼å®¹Glibc API)ï¼å½ä½¿ç¨
--with-newlibæ¶ï¼gccç¼è¯å¨ä¸ä½¿ç¨Glibcãå½æ²¡æ交åç¼è¯Glibcæ¶ï¼å¯ä»¥ä½¿ç¨
--with-newlibç¦æ¢è¿æ¥Glibcèç¼è¯bootstrap gccç¼è¯å¨ãä»gccæºç®å½ä¸ç
config/armä¸çt-linuxåt-arm-elfä¸å¯ä»¥çåºï¼ä¸åç--targetä¹å½±ågccè¿æ¥Cè¯è¨
åºï¼t-linux(--target=arm-linux)é»è®¤ä½¿ç¨Glibcï¼-arm-elf(--target=arm-elf)使ç¨
- Dinhibit_libcç¦æ¢è¿æ¥Glibcï¼è¿æ¶æ们就å¯ä»¥ä½¿ç¨newlibçå ¶ä»Cè¯è¨åºç¼è¯GCCå·¥
å ·é¾ã
è½ç¶GCCå·¥å ·é¾é ç½®äºä¸åççCè¯è¨åºï¼ä½ç±äºè¿äºCè¯è¨åºé½å¯ä»¥ç¨æ¥æ¯æGCCï¼å®ä»¬
å¯¹æ ¸å¿æ°æ®çå¤çä¸ä¸åå¨è¾å¤§åºå ¥ãå èarm-linux-* å arm-elf-*åºå«ä¸»è¦è¡¨ç°å¨
Cè¯è¨åºçå®ç°ä¸ï¼ä¾å¦ä¸åç³»ç»è°ç¨ï¼ä¸åçå½æ°éå®ç°ï¼ä¸åçABI\å¯å¨ä»£ç 以å
ä¸åç³»ç»ç¹æ§çå¾®å°çå·®å«ã
arm-linux-*å arm-elf-*ç使ç¨æ²¡æä¸ä¸ªç»å¯¹çæ åï¼æé¤ä¸ååºå®ç°çå·®å¼ï¼gccå¯
以ç¼è¯ä»»ä½ç³»ç»ãarm-linux-*å arm-elf-*é½å¯ä»¥ç¨æ¥ç¼è¯è£¸æºç¨åºåæä½ç³»ç»ï¼åª
æ¯å¨éµå¾ªä¸é¢çæè¿°æ¶ç³»ç»ç¨åºæ¾å¾æ´å åè°ï¼
arm-linux-*é对è¿è¡linuxçARMæºå¨ï¼å ¶ä¾èµäºæå®çCè¯è¨åºGlibcï¼å 为åæ ·ä½¿ç¨
Glibcçlinuxè使å¾arm-linux-*å¨è¿è¡linuxçARMæºå¨ä¸ç¼è¯æ¾å¾æ´å åè°ã
arm-elf-*åæ¯ä¸ä¸ªç¬ç«çç¼è¯ä½ç³»ï¼ä¸ä¾èµäºæå®çCè¯è¨åºGlibcï¼å¯ä»¥ä½¿ç¨newlib
çå ¶ä»Cè¯è¨åºï¼ä¸è¦æ±æä½ç³»ç»æ¯æï¼å½å ¶ä½¿ç¨ä¸ºåµå ¥å¼ç³»ç»è设计çä¸äºè½»å·§çCè¯
è¨åºæ¶ç¼è¯è£¸æºç¨åº(没ælinuxç大åæä½ç³»ç»çç¨åº)ï¼å¦çæ§ç¨åºï¼bootloaderç
è½ä½¿å¾ç³»ç»ç¨åºæ´å å°å·§å¿«æ·ã
Linaro prebuilt toolchain does support both hard and soft floating
point. You can get it from /linaro-toolchain-binaries/+milestone/. try: ./arm-linux-gnueabihf-gcc -print-multi-lib
The default configure is --with-arch=armv7-a --with-tune=cortex-a9
--with-fpu=vfpv3-d --with-float=hard --with-mode=thumb
To use soft floating, you need options: -marm -march=armv4t -mfloat-abi=soft.
In your case, please try to change -march=armv5 to "-march=armv4t"
If you want to change to configure to cortex-a8 and armv5. You need
* Change cortex-a9 to cortex-a8 in
samples/linaro-arm-linux-gnueabihf/crosstool.config
* Change armv4t to armv5 in
contrib/linaro/patches/gcc/linaro-4.7-./multilib.patch,
Then follow the instructions to rebuild the toolchain
(contrib/linaro/doc/README.txt)
BTW: crosstool-ng-linaro does not support multilib for eglibc. It uses
the prebuilt sysroot from Ubuntu Precise. If it does not work for you,
please use the latest crosstool-ng from http://crosstool-ng.org/.
openWRT发展历程
OpenWRT的发展历程始于年1月,其起源可以追溯到Linksys提供的详解GPL源码和基于uclibc的buildroot项目,这个被称为“stable”版本的源码OpenWrt至今仍被许多项目所采用,如著名的详解Freifunk-Firmware和Sip@Home。 到了年初,源码OpenWRT项目迎来了新的详解云码付源码开发者力量。几个月后,源码他们推出了首个“experimental”版本,详解这一版本与早期显著不同,源码它摒弃了Linksys的详解GPL源码,转而采用了buildroot2作为核心技术,源码实现了OpenWrt的详解全面模块化。这个版本使用了Linux标准发行的源码舵式导航源码2.4.内核源码,并添加了一系列补丁和网络驱动,详解增强了其功能。源码开发团队为OpenWrt增添了更多免费工具,允许用户直接将Image写入Flash(mtd),同时还支持无线功能和VLAN交换功能。这一版本被命名为“White Russian”,php付费站源码标志着项目的一个重要里程碑。据记载,1.0版本大约在年底正式发布。扩展资料
OpenWrt的被描述为一个嵌入式设备的Linux发行版,而不是试图建立一个单一的,静态的悠风 pck源码固件,OpenWrt的包管理提供了一个完全可写的文件系统,从应用程序供应商提供的选择和配置,并允许您自定义的设备,以适应任何应用程序通过使用包。对于开发人员,OpenWrt的网页刷平台源码是框架来构建应用程序,而无需建立一个完整的固件左右;对于用户来说,这意味着完全定制的能力,从来没有预想的方式使用该设备。openwrt是什么
OpenWrt 是一个专为路由器设计的 Linux 发行版,主要用途是管理并疏导网络流量。此发行版的核心是基于 Linux 内核构建。
简而言之,OpenWrt 是一种针对嵌入式设备的 Linux 发行版。与其他主流路由器固件如 dd-wrt、tomato 相比,OpenWrt 提供了高度可定制化,允许用户根据需求自定义配置,以适应各种应用需求。
对于开发者而言,OpenWrt 提供了一个框架,便于构建应用程序,而无需开发一个完整的固件来支持。对于用户而言,这代表了无限的定制能力,能够以前所未有的方式利用设备。
OpenWrt 项目始于年1月,首次版本基于 Linksys 提供的 GPL 源码及 uclibc 中的 buildroot 项目。这个版本被称为“稳定版”,至今仍有许多项目在使用,其中知名度较高的有 Freifunk-Firmware 和 Sip@Home。