| Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision |
| zh:docs:guide-developer:build-system:install-buildsystem [2019/03/27 02:33] – [Install procedure on Linux] penghanye | zh:docs:guide-developer:build-system:install-buildsystem [2019/03/27 03:31] – penghanye |
|---|
| 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操作系统上. 它需要大小写敏感的文件系统. |
| * ''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 version, if 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 | |
| --- | --- |
| |
| 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 system, and 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 | |
| | 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> |
| |
| | |
| ===== Downloading Sources ===== | ===== 下载源码 ===== |
| clone the Git repository using one of the following commands.\\ | 使用以下命令克隆Git仓库.\\ |
| :!: Do everything as normal user, don'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. | 注: 也许你会在帖子或其他参考资料中会看到, LEDE的git仓库在''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 branch, you should first clone the Git repository using the **git clone** command shown above. Then move to the branch by using the **git checkout** command. | 要使用某个分支, 需要先使用**git clone**命令克隆git仓库, 如下所示. 然后再使用 **git checkout** 命令移动到分支上. |
| |
| For LEDE 17.01: | For LEDE 17.01: |
| <code bash>git checkout openwrt-18.06</code> | <code bash>git checkout openwrt-18.06</code> |
| |
| :!: When changing branches, it is recommended to perform a throughout scrub of your source tree by using the **make distclean** command. This ensures that your source tree does not contain any build artifacts or configuration files from previous build runs. | :!: 改变分支时, 建议使用**make distclean** 命令对你的源进行全面清理. 以确保源中不包含以前构建产生的项目或配置文件. |