Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
zh:docs:guide-developer:build-system:install-buildsystem [2019/03/27 02:33] – [Install procedure on Linux] penghanyezh:docs:guide-developer:build-system:install-buildsystem [2020/03/23 09:07] (current) – [Linux上的安装过程] superice
Line 1: Line 1:
-FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// 
- 
 ====== 构建系统 – 安装 ====== ====== 构建系统 – 安装 ======
 构建系统可用运行在Linux, BSD or MacOSX操作系统上. 它需要大小写敏感的文件系统. 构建系统可用运行在Linux, BSD or MacOSX操作系统上. 它需要大小写敏感的文件系统.
Line 17: Line 15:
  
 ===== Linux上的安装过程 ===== ===== Linux上的安装过程 =====
-| -> [[docs:howto:buildroot.exigence.bsd|在BSD上的过程]] | -> [[docs:howto:buildroot.exigence.macosx|在Mac OS X上的过程]] | +
- \\+
   - 安装 ''[[wp>Git (software)|git]]'' , 可以很方便的下载源码, 以及你用的发行版默认的 ''[[wp>GNU build system|build tools]]'' 元包来执行交叉编译过程\\    - 安装 ''[[wp>Git (software)|git]]'' , 可以很方便的下载源码, 以及你用的发行版默认的 ''[[wp>GNU build system|build tools]]'' 元包来执行交叉编译过程\\ 
   - 有些feeds也许不能通过git, 只能用 ''[[wp>Apache Subversion|subversion]]'' (short: ''svn'') 或 ''[[wp>Mercurial|mercurial]]''. 如果需要获取它们的源码, 则还需要安装svn和mercurial   - 有些feeds也许不能通过git, 只能用 ''[[wp>Apache Subversion|subversion]]'' (short: ''svn'') 或 ''[[wp>Mercurial|mercurial]]''. 如果需要获取它们的源码, 则还需要安装svn和mercurial
Line 26: Line 23:
     * ''GREP_OPTIONS'' 不能包含 ''--initial-tab'' 或其他会影响其输出的选项     * ''GREP_OPTIONS'' 不能包含 ''--initial-tab'' 或其他会影响其输出的选项
  
-===== Table of known prerequisites ===== +===== 已知的先决条件表 ===== 
-This table contains the package name for each build prerequisite in different GNU/Linux and Unix like distributions.+下表包含了不同GNU/Linux以及类Unix发行版所需的构建先决软件包名.
  
-  * Python on current Debian/Ubuntu distributions is Python 3 and Python 2 is required for the build system (May 2018). It typically may be installed as the ''python2.7-dev'' meta-package (or later versionif available). +  * 目前的Debian/Ubuntu发行版中, 对构建系统来说, 需要Python 3 和 Python 2 (2018年5月). 一般会安装 ''python2.7-dev'' 元包 (如果可以的话也能是更新的版本). 
-  * Bleeding edge distros like [[https://forum.openwrt.org/t/solved-build-from-master-on-archlinux-gives-error-for-freadahead-c/18693/6?u=brianbaligad|Archlinux may fail to build base-files]] if ''Cryptographically signed package lists'' in ''Global build settings'' is enabled+  * 最前沿的发行版,[[https://forum.openwrt.org/t/solved-build-from-master-on-archlinux-gives-error-for-freadahead-c/18693/6?u=brianbaligad|Archlinux may fail to build base-files]] 如果''Global build settings''中的 ''Cryptographically signed package lists''是启用状态
  
-Prerequisite ^ Debian ^ SUSE ^ Red Hat ^ OS X (via MacPorts) ^ Fedora ^ Arch ^ Gentoo ^+先决条件 ^ Debian ^ SUSE ^ Red Hat ^ OS X (via MacPorts) ^ Fedora ^ Arch ^ Gentoo ^
 | asciidoc         | asciidoc | asciidoc | asciidoc | asciidoc | asciidoc | asciidoc | app-text/asciidoc | | asciidoc         | asciidoc | asciidoc | asciidoc | asciidoc | asciidoc | asciidoc | app-text/asciidoc |
 | [[wp>Bash (Unix shell)|GNU Bash]] | bash |bash| bash | bash | bash| bash| app-shells/bash | | [[wp>Bash (Unix shell)|GNU Bash]] | bash |bash| bash | bash | bash| bash| app-shells/bash |
Line 63: Line 60:
 --- ---
  
-Unfortunately not all dependencies are checked by ''make config'', especially for packages.\\  +很不幸, 并非所有依赖都能被''make config''检查特别针对软件包.\\  
-You may encounter compile errors because you need a specific library in your systemand the only way is to search the missing library from the compiler error log and see what package contains it in your own distro.\\ +你可能会遇到编译错误, 因为你的系统中缺少一些特定的库, 解决这些编译错误唯一的办法就是翻阅编译错误日志, 来查找缺失了哪些库并看看你的发新版中的哪些软件包含了它们.\\ 
-The following table is a partial list of such dependencies+下表包含了一部分依赖信息
-Package Prerequisite ^ Debian (8) ^ SUSE ^ Red Hat ^ OS X ^ Fedora ^ Arch ^ Gentoo ^+软件包 先决条件 ^ Debian (8) ^ SUSE ^ Red Hat ^ OS X ^ Fedora ^ Arch ^ Gentoo ^
 | boost    | bjam / boost-jam   | libboost1.55-dev   | | | | boost-jam | boost | dev-util/boost-build | | boost    | bjam / boost-jam   | libboost1.55-dev   | | | | boost-jam | boost | dev-util/boost-build |
 | intltool | [Perl] XML::Parser | libxml-parser-perl | | perl-XML-Parser | | perl-XML-Parser | intltool | dev-perl/XML-Parser | | intltool | [Perl] XML::Parser | libxml-parser-perl | | perl-XML-Parser | | perl-XML-Parser | intltool | dev-perl/XML-Parser |
Line 77: Line 74:
 | jamvm    | zip                | | | | | zip | | app-arch/zip | | jamvm    | zip                | | | | | zip | | app-arch/zip |
  
-==== Examples of Package Installations ====+==== 软件包安装示例 ====
   * **Arch Linux**<code>pacman -S --needed asciidoc bash bc binutils bzip2 fastjar flex git gcc util-linux gawk intltool zlib make cdrkit ncurses openssl patch perl-extutils-makemaker rsync unzip wget gettext libxslt boost libusb bin86 sharutils b43-fwcutter findutils time</code>   * **Arch Linux**<code>pacman -S --needed asciidoc bash bc binutils bzip2 fastjar flex git gcc util-linux gawk intltool zlib make cdrkit ncurses openssl patch perl-extutils-makemaker rsync unzip wget gettext libxslt boost libusb bin86 sharutils b43-fwcutter findutils time</code>
   * **Alpine Linux 3.7**<code>apk add asciidoc bash bc binutils bzip2 cdrkit coreutils diffutils findutils flex g++ gawk gcc gettext git grep intltool libxslt linux-headers make ncurses-dev patch perl python2-dev tar unzip  util-linux wget zlib-dev</code>   * **Alpine Linux 3.7**<code>apk add asciidoc bash bc binutils bzip2 cdrkit coreutils diffutils findutils flex g++ gawk gcc gettext git grep intltool libxslt linux-headers make ncurses-dev patch perl python2-dev tar unzip  util-linux wget zlib-dev</code>
Line 107: Line 104:
  
                                          
-===== Downloading Sources ===== +===== 下载源码 ===== 
-clone the Git repository using one of the following commands.\\ +使用以下命令克隆Git仓库.\\ 
-:!: Do everything as normal userdon't use root user or sudo!\\  +:!: 请使用普通用户来完成所有的操作不用使用root用户或sudo!\\  
-:!: Do not download sources in a directory that has spaces in its parent folders or full path!+:!: 请不用将代码下载到绝对路径中有空格的目录中!
  
-==== Master or HEAD (main development tree) ==== +==== Master 或 HEAD (开发主分支) ==== 
-The development branch contains the latest additions to LEDE, may have **experimental** or **unstable** code.+开发分支包含了针对LEDE的最新附加代码可能有 **实验** 或 **不稳定** 的代码.
  
 <code bash>git clone https://git.openwrt.org/openwrt/openwrt.git</code> <code bash>git clone https://git.openwrt.org/openwrt/openwrt.git</code>
  
-Note that the LEDE git reference ''https://git.lede-project.org/source.git'', which may be found in posts and other references, presently redirects to the above URL.+注: 也许你会在帖子或其他参考资料中会看到, LEDEgit仓库在''https://git.lede-project.org/source.git'', 现在已经重定向到上面的URL.
  
-Additional packages can be found in several feeds (Luci, packages, routing, management etc.). The build system will clone the correct feeds later when you update the package feeds.+附加软件包可以在这些feeds (Luci, packages, routing, management.)中找到当你更新package feeds之后, 构建系统会克隆正确的feeds.
  
-==== Specific branches ==== +==== 特定的分支 ==== 
-Each branch contains the baseline code for the release version (e.g. 17.01, 18.06) and the individual releases (e.g. 17.01.1, 17.01.2, 18.06.1, etc). Each branch is intended to contain **stable** code with carefully selected fixes and updates backported from the development branch.+每个分支都包含了针对发布版本的基准代码 (例如. 17.01, 18.06) 以及独立发布版本 (例如. 17.01.1, 17.01.2, 18.06.1, etc). 每个分支都会预期包含**稳定**版代码, 它们会仔细地选择修复内容以及从开发分支回源的代码.
  
-To use a branchyou should first clone the Git repository using the **git clone** command shown aboveThen move to the branch by using the **git checkout** command.+要使用某个分支需要先使用**git clone**命令克隆git仓库, 如下所示然后再使用 **git checkout** 命令移动到分支上.
  
 For LEDE 17.01: For LEDE 17.01:
Line 132: Line 129:
 <code bash>git checkout openwrt-18.06</code> <code bash>git checkout openwrt-18.06</code>
  
-:!: When changing branchesit is recommended to perform a throughout scrub of your source tree by using the **make distclean** commandThis ensures that your source tree does not contain any build artifacts or configuration files from previous build runs.+:!: 改变分支时建议使用**make distclean** 命令对你的源进行全面清理以确保源中不包含以前构建产生的项目或配置文件.
  • Last modified: 2020/03/23 09:07
  • by superice