{"id":3379,"date":"2025-08-12T19:25:11","date_gmt":"2025-08-12T11:25:11","guid":{"rendered":"http:\/\/www.51cos.com\/?p=3379"},"modified":"2025-08-12T19:25:11","modified_gmt":"2025-08-12T11:25:11","slug":"how-to-build-openipc-from-source%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/www.51cos.com\/?p=3379","title":{"rendered":"how to build openipc from source\uff1f"},"content":{"rendered":"<h1>\u73af\u5883\u642d\u5efa<\/h1>\n<h1>\u73af\u5883\u642d\u5efa<\/h1>\n<h2>\u6982\u8ff0<\/h2>\n<p>OpenIPC\/firmware \u9879\u76ee\u662f\u57fa\u4e8e Makefile \u548c\u591a\u5e73\u53f0\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u94fe\u7684\u5d4c\u5165\u5f0f\u56fa\u4ef6\u6784\u5efa\u7cfb\u7edf\uff0c\u652f\u6301\u591a\u79cd\u82af\u7247\u67b6\u6784\u3002\u4e3a\u786e\u4fdd\u5f00\u53d1\u548c\u6784\u5efa\u6d41\u7a0b\u7684\u987a\u5229\u8fdb\u884c\uff0c\u9700\u5728\u4e3b\u6d41 Linux \u53d1\u884c\u7248\uff08Ubuntu\u3001Debian\u3001Arch \u7b49\uff09\u4e0a\u642d\u5efa\u5b8c\u5584\u7684\u672c\u5730\u7f16\u8bd1\u73af\u5883\u3002\u672c\u7ae0\u8be6\u7ec6\u4ecb\u7ecd\u4f9d\u8d56\u5305\u3001\u5b89\u88c5\u65b9\u6cd5\u3001\u5de5\u5177\u7528\u9014\u3001\u63a8\u8350\u786c\u4ef6\u914d\u7f6e\u3001\u5e38\u89c1\u7528\u6cd5\u548c\u95ee\u9898\u6392\u67e5\uff0c\u786e\u4fdd\u60a8\u80fd\u9ad8\u6548\u3001\u7a33\u5b9a\u5730\u6295\u5165\u5f00\u53d1\u3002<\/p>\n<hr \/>\n<h2>1. \u5fc5\u5907\u4f9d\u8d56\u5305\u53ca\u529f\u80fd\u8bf4\u660e<\/h2>\n<p>\u4f9d\u8d56\u5305\u5747\u53ef\u5728\u4ed3\u5e93\u6784\u5efa\u811a\u672c\u3001Makefile\u3001toolchain.mk \u53ca board \u914d\u7f6e\u6587\u4ef6\u4e2d\u627e\u5230\u660e\u786e\u5f15\u7528\u3002\u4e0b\u8868\u6db5\u76d6\u6240\u6709\u5173\u952e\u4f9d\u8d56\u53ca\u5176\u6280\u672f\u7528\u9014\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5305\u540d\/\u5de5\u5177<\/th>\n<th>Ubuntu\/Debian \u5305\u540d<\/th>\n<th>Arch \u5305\u540d<\/th>\n<th>\u4e3b\u8981\u7528\u9014\u4e0e\u4ed3\u5e93\u51fa\u5904<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>GCC\/G++\/Make<\/td>\n<td>build-essential<\/td>\n<td>base-devel<\/td>\n<td>C\/C++ \u7f16\u8bd1\u73af\u5883\uff0cMakefile \u4e3b\u9a71\u52a8\uff08<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/Makefile\">Makefile<\/a>\uff09<\/td>\n<\/tr>\n<tr>\n<td>Git<\/td>\n<td>git<\/td>\n<td>git<\/td>\n<td>\u4ee3\u7801\u7ba1\u7406\u4e0e\u540c\u6b65\uff0c\u811a\u672c\u4e2d\u5927\u91cf\u4f7f\u7528\uff08\u5982 <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/clone_hisi2goke.sh\">clone_hisi2goke.sh<\/a>\uff09<\/td>\n<\/tr>\n<tr>\n<td>ccache<\/td>\n<td>ccache<\/td>\n<td>ccache<\/td>\n<td>\u7f16\u8bd1\u7f13\u5b58\uff0cMakefile\/\u811a\u672c\u52a0\u901f\u7f16\u8bd1\uff08<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/toolchain.mk#L1-L50\">toolchain.mk<\/a>\uff09<\/td>\n<\/tr>\n<tr>\n<td>bc<\/td>\n<td>bc<\/td>\n<td>bc<\/td>\n<td>shell \u811a\u672c\u6570\u5b66\u8fd0\u7b97\uff08<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/legacy\/general\/compile4programmer.sh\">compile4programmer.sh<\/a>\uff09<\/td>\n<\/tr>\n<tr>\n<td>bison<\/td>\n<td>bison<\/td>\n<td>bison<\/td>\n<td>\u8bed\u6cd5\u5206\u6790\u5668\u751f\u6210\uff0c\u5185\u6838\/\u5de5\u5177\u94fe\u7f16\u8bd1\u4f9d\u8d56<\/td>\n<\/tr>\n<tr>\n<td>flex<\/td>\n<td>flex<\/td>\n<td>flex<\/td>\n<td>\u8bcd\u6cd5\u5206\u6790\u5668\u751f\u6210\uff0c\u5185\u6838\/\u5de5\u5177\u94fe\u7f16\u8bd1\u4f9d\u8d56<\/td>\n<\/tr>\n<tr>\n<td>openssl \u5f00\u53d1\u5e93<\/td>\n<td>libssl-dev<\/td>\n<td>openssl<\/td>\n<td>\u52a0\u5bc6\/\u7b7e\u540d\u652f\u6301\uff0c\u90e8\u5206\u56fa\u4ef6\u5305\u548c\u5de5\u5177\u94fe\u7f16\u8bd1\u4f9d\u8d56<\/td>\n<\/tr>\n<tr>\n<td>ncurses \u5f00\u53d1\u5e93<\/td>\n<td>libncurses-dev<\/td>\n<td>ncurses<\/td>\n<td>\u7ec8\u7aef UI\uff0c\u5e38\u7528\u4e8e menuconfig\uff08<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/toolchain.mk\">toolchain.mk<\/a>\uff09<\/td>\n<\/tr>\n<tr>\n<td>zlib \u5f00\u53d1\u5e93<\/td>\n<td>zlib1g-dev<\/td>\n<td>zlib<\/td>\n<td>\u89e3\u538b\u7f29\u652f\u6301\uff0c\u56fa\u4ef6\u6253\u5305\/\u89e3\u5305\u4f9d\u8d56<\/td>\n<\/tr>\n<tr>\n<td>fakeroot<\/td>\n<td>fakeroot<\/td>\n<td>fakeroot<\/td>\n<td>\u6a21\u62df root \u6743\u9650\uff0c\u6253\u5305 rootfs \u955c\u50cf\uff08<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/rootfs_script.sh\">rootfs_script.sh<\/a>\uff09<\/td>\n<\/tr>\n<tr>\n<td>mtools<\/td>\n<td>mtools<\/td>\n<td>mtools<\/td>\n<td>FAT \u6587\u4ef6\u7cfb\u7edf\u64cd\u4f5c\uff0c\u955c\u50cf\u5236\u4f5c\uff08<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/legacy\/general\/create_overlayed_rootfs.sh\">create_overlayed_rootfs.sh<\/a>\uff09<\/td>\n<\/tr>\n<tr>\n<td>dosfstools<\/td>\n<td>dosfstools<\/td>\n<td>dosfstools<\/td>\n<td>FAT \u6587\u4ef6\u7cfb\u7edf\u521b\u5efa\u4e0e\u68c0\u67e5<\/td>\n<\/tr>\n<tr>\n<td>squashfs-tools<\/td>\n<td>squashfs-tools<\/td>\n<td>squashfs-tools<\/td>\n<td>SquashFS \u955c\u50cf\u6253\u5305\/\u89e3\u5305<\/td>\n<\/tr>\n<tr>\n<td>lzop<\/td>\n<td>lzop<\/td>\n<td>lzop<\/td>\n<td>\u5feb\u901f\u538b\u7f29\u5de5\u5177\uff0c\u90e8\u5206\u56fa\u4ef6\u683c\u5f0f\u8981\u6c42<\/td>\n<\/tr>\n<tr>\n<td>xz-utils<\/td>\n<td>xz-utils<\/td>\n<td>xz<\/td>\n<td>XZ \u538b\u7f29\uff0c\u56fa\u4ef6\/\u5185\u6838\u538b\u7f29<\/td>\n<\/tr>\n<tr>\n<td>wget<\/td>\n<td>wget<\/td>\n<td>wget<\/td>\n<td>\u7f51\u7edc\u4e0b\u8f7d\uff0c\u81ea\u52a8\u62c9\u53d6\u4f9d\u8d56\/\u6e90\u7801<\/td>\n<\/tr>\n<tr>\n<td>curl<\/td>\n<td>curl<\/td>\n<td>curl<\/td>\n<td>\u7f51\u7edc\u4e0b\u8f7d\uff0c\u90e8\u5206\u811a\u672c\u4f9d\u8d56<\/td>\n<\/tr>\n<tr>\n<td>unzip\/zip<\/td>\n<td>unzip zip<\/td>\n<td>unzip zip<\/td>\n<td>\u89e3\u538b\/\u538b\u7f29\u5de5\u5177\uff0c\u6e90\u7801\u548c\u56fa\u4ef6\u5305\u5904\u7406<\/td>\n<\/tr>\n<tr>\n<td>python3<\/td>\n<td>python3<\/td>\n<td>python<\/td>\n<td>\u811a\u672c\u6267\u884c\uff0c\u90e8\u5206\u81ea\u52a8\u5316\u6d41\u7a0b\u4f9d\u8d56<\/td>\n<\/tr>\n<tr>\n<td>gawk<\/td>\n<td>gawk<\/td>\n<td>gawk<\/td>\n<td>\u6587\u672c\u5904\u7406\uff0cMakefile\/\u811a\u672c\u5e38\u7528<\/td>\n<\/tr>\n<tr>\n<td>device-tree-compiler<\/td>\n<td>device-tree-compiler<\/td>\n<td>dtc<\/td>\n<td>\u8bbe\u5907\u6811\u7f16\u8bd1\uff0c\u9002\u914d\u591a\u82af\u7247\u5e73\u53f0<\/td>\n<\/tr>\n<tr>\n<td>file<\/td>\n<td>file<\/td>\n<td>file<\/td>\n<td>\u6587\u4ef6\u7c7b\u578b\u68c0\u6d4b\uff0c\u811a\u672c\u5e38\u7528<\/td>\n<\/tr>\n<tr>\n<td>tar<\/td>\n<td>tar<\/td>\n<td>tar<\/td>\n<td>\u6253\u5305\/\u89e3\u5305 tarball\uff0c\u811a\u672c\u5e38\u7528<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote><p>\n  \u4f9d\u8d56\u5305\u5b8c\u6574\u6027\u53ef\u901a\u8fc7 Makefile\u3001toolchain.mk\u3001\u5404 scripts \u76ee\u5f55\u811a\u672c\u5b9e\u9645\u8c03\u7528\u9010\u9879\u6838\u67e5\u3002\n<\/p><\/blockquote>\n<hr \/>\n<h2>2. \u4e00\u952e\u5b89\u88c5\u811a\u672c<\/h2>\n<h3>Ubuntu \/ Debian<\/h3>\n<pre><code class=\"language-bash line-numbers\">sudo apt update\nsudo apt install -y \\\n  build-essential git ccache bc bison flex libssl-dev libncurses-dev zlib1g-dev \\\n  fakeroot mtools dosfstools squashfs-tools lzop xz-utils wget curl unzip zip \\\n  python3 gawk device-tree-compiler file tar\n<\/code><\/pre>\n<h3>Arch Linux<\/h3>\n<pre><code class=\"language-bash line-numbers\">sudo pacman -Syu --needed \\\n  base-devel git ccache bc bison flex openssl ncurses zlib \\\n  fakeroot mtools dosfstools squashfs-tools lzop xz wget curl unzip zip \\\n  python gawk dtc file tar\n<\/code><\/pre>\n<hr \/>\n<h2>3. \u63a8\u8350\u786c\u4ef6\u914d\u7f6e<\/h2>\n<ul>\n<li><strong>CPU<\/strong>\uff1a\u22654 \u6838\u5fc3\uff08\u63a8\u8350 8 \u6838\u5fc3\u4ee5\u4e0a\uff0c\u63d0\u5347\u5e76\u884c\u7f16\u8bd1\u6027\u80fd\uff09<\/li>\n<li><strong>\u5185\u5b58<\/strong>\uff1a\u22658GB\uff08\u63a8\u8350 16GB\uff0c\u9632\u6b62\u7f16\u8bd1\u5927\u56fa\u4ef6\u65f6 OOM\uff09<\/li>\n<li><strong>\u78c1\u76d8\u7a7a\u95f4<\/strong>\uff1a\u226530GB\uff08\u5efa\u8bae 50GB+\uff0c\u5305\u542b\u6e90\u7801\u3001\u4ea4\u53c9\u5de5\u5177\u94fe\u3001\u4ea7\u7269\u548c\u7f13\u5b58\uff09<\/li>\n<li><strong>\u7f51\u7edc<\/strong>\uff1a\u7a33\u5b9a\u9ad8\u901f\u7f51\u7edc\uff0c\u4fbf\u4e8e\u62c9\u53d6\u4f9d\u8d56\u548c\u540c\u6b65\u4ed3\u5e93<\/li>\n<\/ul>\n<hr \/>\n<h2>4. \u5b9e\u7528\u64cd\u4f5c\u793a\u4f8b<\/h2>\n<h3>4.1 \u514b\u9686\u4ed3\u5e93\u53ca\u5b50\u6a21\u5757<\/h3>\n<pre><code class=\"language-bash line-numbers\">git clone https:\/\/github.com\/OpenIPC\/firmware.git\ncd firmware\n# \u82e5\u6709\u5b50\u6a21\u5757\ngit submodule update --init --recursive\n<\/code><\/pre>\n<h3>4.2 \u542f\u52a8\u56fa\u4ef6\u6784\u5efa<\/h3>\n<p>\u4ee5 HiSilicon \u5e73\u53f0\u4e3a\u4f8b\uff0c\u53c2\u8003 <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/README.md\">README.md<\/a>\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">make BOARD=hi3516cv300_defconfig\nmake\n<\/code><\/pre>\n<ul>\n<li><code>BOARD<\/code> \u53d8\u91cf\u6307\u5b9a\u5e73\u53f0\uff0c\u652f\u6301\u7684\u677f\u5361\u914d\u7f6e\u89c1 <code>br-ext-chip-*\/configs\/<\/code> \u76ee\u5f55\u3002<\/li>\n<li><code>make<\/code> \u4f1a\u81ea\u52a8\u8c03\u7528\u76f8\u5173\u811a\u672c\u548c\u5de5\u5177\u94fe\uff0c\u4ea7\u7269\u8f93\u51fa\u5728 output \u76ee\u5f55\u3002<\/li>\n<\/ul>\n<h3>4.3 \u5e38\u7528\u811a\u672c\u7528\u6cd5<\/h3>\n<ul>\n<li><strong>rootfs \u955c\u50cf\u6253\u5305<\/strong><br \/>\n<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/rootfs_script.sh\">general\/scripts\/rootfs_script.sh<\/a><\/p>\n<pre><code class=\"language-bash line-numbers\">bash general\/scripts\/rootfs_script.sh output\/rootfs\n<\/code><\/pre>\n<\/li>\n<li><strong>\u56fa\u4ef6\u91cd\u6253\u5305<\/strong><br \/>\n<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/repack_firmware.sh\">general\/scripts\/repack_firmware.sh<\/a><\/p>\n<pre><code class=\"language-bash line-numbers\">bash general\/scripts\/repack_firmware.sh output\/firmware.img\n<\/code><\/pre>\n<\/li>\n<li><strong>\u540c\u6b65\/\u514b\u9686\u82af\u7247\u5e73\u53f0\u4ee3\u7801<\/strong>\n<pre><code class=\"language-bash line-numbers\">bash general\/scripts\/clone_hisi2goke.sh\nbash general\/scripts\/sync_goke.sh\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<hr \/>\n<h2>5. \u73af\u5883\u53d8\u91cf\u4e0e\u914d\u7f6e\u8bf4\u660e<\/h2>\n<ul>\n<li>\u53ef\u901a\u8fc7 <code>make menuconfig<\/code> \u8fdb\u5165\u56fe\u5f62\u5316\u914d\u7f6e\u754c\u9762\uff08\u4f9d\u8d56 ncurses\uff09\u3002<\/li>\n<li>\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u94fe\u8def\u5f84\u3001ccache \u542f\u7528\u7b49\u53c2\u6570\u53ef\u5728 <code>general\/toolchain.mk<\/code>\u3001<code>general\/external.mk<\/code> \u4e2d\u8c03\u6574\u3002<\/li>\n<li>\u5e38\u89c1\u73af\u5883\u53d8\u91cf\uff1a\n<ul>\n<li><code>CCACHE_DIR<\/code>\uff1a\u6307\u5b9a ccache \u7f13\u5b58\u76ee\u5f55<\/li>\n<li><code>BOARD<\/code>\uff1a\u6307\u5b9a\u76ee\u6807\u677f\u5361\u914d\u7f6e\uff0c\u5982 <code>make BOARD=hi3516cv300_defconfig<\/code><\/li>\n<li><code>JOBS<\/code>\uff1a\u5e76\u884c\u7f16\u8bd1\u7ebf\u7a0b\u6570\uff0c\u5efa\u8bae <code>JOBS=$(nproc)<\/code>\uff08\u81ea\u52a8\u68c0\u6d4b CPU \u6838\u5fc3\u6570\uff09<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h2>6. \u5e38\u89c1\u95ee\u9898\u53ca\u6392\u67e5<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u95ee\u9898\u75c7\u72b6<\/th>\n<th>\u53ef\u80fd\u539f\u56e0\u53ca\u89e3\u51b3\u65b9\u6848<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>command not found<\/code> \u62a5\u9519<\/td>\n<td>\u7f3a\u5c11\u4f9d\u8d56\u5305\uff0c\u67e5\u9605\u4e0a\u6587\u4e00\u952e\u5b89\u88c5\u811a\u672c\u8865\u88c5<\/td>\n<\/tr>\n<tr>\n<td>\u7f16\u8bd1\u4e2d\u9014 OOM\/\u5361\u6b7b<\/td>\n<td>\u5185\u5b58\u4e0d\u8db3\uff0c\u5efa\u8bae\u589e\u52a0 swap \u6216\u5347\u7ea7\u786c\u4ef6<\/td>\n<\/tr>\n<tr>\n<td><code>ccache: command not found<\/code><\/td>\n<td>\u672a\u5b89\u88c5 ccache\uff0c<code>sudo apt install ccache<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>fatal: not a git repository<\/code><\/td>\n<td>\u672a\u6b63\u786e\u521d\u59cb\u5316\u5b50\u6a21\u5757\uff0c<code>git submodule update --init --recursive<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>No rule to make target ...<\/code><\/td>\n<td>\u672a\u6307\u5b9a BOARD \u6216\u914d\u7f6e\u540d\u9519\u8bef\uff0c\u53c2\u8003 <code>br-ext-chip-*\/configs\/<\/code> \u76ee\u5f55\u83b7\u53d6\u652f\u6301\u7684\u914d\u7f6e\u540d<\/td>\n<\/tr>\n<tr>\n<td><code>No space left on device<\/code><\/td>\n<td>\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3\uff0c\u6e05\u7406\u65e0\u7528\u4ea7\u7269\u6216\u6269\u5bb9\u78c1\u76d8<\/td>\n<\/tr>\n<tr>\n<td>\u811a\u672c\u6267\u884c\u6743\u9650\u4e0d\u8db3<\/td>\n<td>\u811a\u672c\u9700\u52a0\u6267\u884c\u6743\u9650\uff1a<code>chmod +x &lt;script&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>7. \u8fdb\u9636\u4e0e\u6269\u5c55<\/h2>\n<ul>\n<li>\u82e5\u9700\u81ea\u5b9a\u4e49\u5de5\u5177\u94fe\u3001\u6dfb\u52a0\u65b0\u82af\u7247\u652f\u6301\uff0c\u53ef\u53c2\u8003 <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/toolchain.mk\">general\/toolchain.mk<\/a> \u53ca <code>br-ext-chip-*\/configs\/<\/code> \u76ee\u5f55\u7ed3\u6784\u3002<\/li>\n<li>\u591a\u4eba\u534f\u4f5c\u5efa\u8bae\u7edf\u4e00 ccache \u76ee\u5f55\uff0c\u63d0\u5347\u56e2\u961f\u6574\u4f53\u7f16\u8bd1\u6548\u7387\u3002<\/li>\n<li>\u53ef\u7ed3\u5408 CI \u5de5\u5177\uff08\u5982 GitHub Actions\uff09\u5b9e\u73b0\u81ea\u52a8\u5316\u6784\u5efa\uff08\u9700\u6839\u636e\u5b9e\u9645\u9879\u76ee\u8865\u5145 .github\/workflows\/ \u914d\u7f6e\uff09\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>8. \u53c2\u8003\u4e0e\u6587\u6863\u6eaf\u6e90<\/h2>\n<ul>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/README.md\">README.md<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/Makefile\">Makefile<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/toolchain.mk\">general\/toolchain.mk<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/rootfs_script.sh\">general\/scripts\/rootfs_script.sh<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/repack_firmware.sh\">general\/scripts\/repack_firmware.sh<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/tree\/master\/br-ext-chip-fullhan\/configs\/\">br-ext-chip-*\/configs\/<\/a><\/li>\n<\/ul>\n<hr \/>\n<h2>9. \u9644\u5f55\uff1a\u5b8c\u6574\u4f9d\u8d56\u5305\u4e0e\u811a\u672c\u8c03\u7528\u6eaf\u6e90<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u4f9d\u8d56\u5305<\/th>\n<th>\u5178\u578b\u8c03\u7528\u6587\u4ef6\u53ca\u884c\u53f7\uff08\u793a\u4f8b\uff09<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>build-essential<\/td>\n<td><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/Makefile#L1-L50\">Makefile<\/a><\/td>\n<\/tr>\n<tr>\n<td>git<\/td>\n<td><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/clone_hisi2goke.sh#L1-L20\">clone_hisi2goke.sh<\/a><\/td>\n<\/tr>\n<tr>\n<td>ccache<\/td>\n<td><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/toolchain.mk#L10-L40\">toolchain.mk<\/a><\/td>\n<\/tr>\n<tr>\n<td>fakeroot<\/td>\n<td><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/rootfs_script.sh#L1-L30\">rootfs_script.sh<\/a><\/td>\n<\/tr>\n<tr>\n<td>squashfs-tools<\/td>\n<td><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/legacy\/general\/create_overlayed_rootfs.sh#L10-L40\">create_overlayed_rootfs.sh<\/a><\/td>\n<\/tr>\n<tr>\n<td>device-tree-compiler<\/td>\n<td><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/toolchain.mk#L50-L70\">toolchain.mk<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>10. \u7ed3\u8bed<\/h2>\n<p>\u672c\u8282\u5185\u5bb9\u5b8c\u5168\u57fa\u4e8e OpenIPC\/firmware \u4ed3\u5e93\u6e90\u7801\u3001\u811a\u672c\u548c\u914d\u7f6e\u6587\u4ef6\uff0c\u8986\u76d6\u6240\u6709\u5173\u952e\u4f9d\u8d56\u3001\u73af\u5883\u8981\u6c42\u548c\u5e38\u89c1\u7528\u6cd5\uff0c\u786e\u4fdd\u5f00\u53d1\u8005\u53ef\u76f4\u63a5\u590d\u5236\u7c98\u8d34\u64cd\u4f5c\uff0c\u987a\u5229\u5b8c\u6210\u73af\u5883\u642d\u5efa\u4e0e\u56fa\u4ef6\u7f16\u8bd1\u3002\u540e\u7eed\u5982\u6709\u65b0\u4f9d\u8d56\u6216\u811a\u672c\u53d8\u66f4\uff0c\u8bf7\u4ee5\u4e3b\u4ed3\u5e93\u6700\u65b0\u6587\u6863\u548c\u4ee3\u7801\u4e3a\u51c6\u3002<\/p>\n<h1>\u9996\u6b21\u7f16\u8bd1<\/h1>\n<h1>\u9996\u6b21\u7f16\u8bd1\u56fa\u4ef6\u2014\u2014OpenIPC Firmware \u7f16\u8bd1\u5168\u6d41\u7a0b\u8be6\u89e3<\/h1>\n<hr \/>\n<h2>\u4e00\u3001\u524d\u8a00<\/h2>\n<p>\u672c\u6587\u6863\u9762\u5411\u5e0c\u671b\u9996\u6b21\u7f16\u8bd1 OpenIPC \u56fa\u4ef6\u7684\u5f00\u53d1\u8005\u3001\u8fd0\u7ef4\u5de5\u7a0b\u5e08\u548c\u81ea\u52a8\u5316\u56e2\u961f\uff0c\u63d0\u4f9b\u4ece\u73af\u5883\u51c6\u5907\u3001\u6e90\u7801\u83b7\u53d6\u3001\u4e3b\u677f\u914d\u7f6e\u3001\u4ea4\u4e92\u5f0f\u5b9a\u5236\u3001\u81ea\u52a8\u5316\u7f16\u8bd1\u5230\u4ea7\u7269\u7ba1\u7406\u7684\u5168\u6d41\u7a0b\u6743\u5a01\u6307\u5357\u3002\u6240\u6709\u5185\u5bb9\u5747\u4e25\u683c\u57fa\u4e8e <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\">OpenIPC\/firmware<\/a> \u4ed3\u5e93\uff08master\u5206\u652f\uff09\u5b9e\u9645\u7ed3\u6784\u4e0e\u914d\u7f6e\uff0c\u6db5\u76d6\u5173\u952e\u6280\u672f\u7ec6\u8282\u3001\u4ee3\u7801\u793a\u4f8b\u3001\u914d\u7f6e\u6587\u4ef6\u89e3\u6790\u548c\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<hr \/>\n<h2>\u4e8c\u3001\u73af\u5883\u51c6\u5907<\/h2>\n<h3>2.1 \u5fc5\u5907\u5de5\u5177\u94fe\u548c\u4f9d\u8d56<\/h3>\n<ul>\n<li>\u63a8\u8350\u64cd\u4f5c\u7cfb\u7edf\uff1aUbuntu 20.04\/22.04 \u6216\u517c\u5bb9 Linux \u53d1\u884c\u7248<\/li>\n<li>\u57fa\u7840\u4f9d\u8d56\uff08\u4ee5 Ubuntu \u4e3a\u4f8b\uff09\uff1a<\/li>\n<\/ul>\n<pre><code class=\"language-bash line-numbers\">sudo apt update\nsudo apt install -y build-essential git gcc g++ make libncurses5-dev libssl-dev bc flex bison unzip wget\n<\/code><\/pre>\n<ul>\n<li>\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u94fe\uff1a\u9996\u6b21\u7f16\u8bd1\u65f6\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u5e76\u914d\u7f6e\uff0c\u65e0\u9700\u624b\u52a8\u5b89\u88c5\u3002<\/li>\n<\/ul>\n<h3>2.2 \u76ee\u5f55\u7ed3\u6784\u603b\u89c8<\/h3>\n<p>\u6838\u5fc3\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff08\u7b80\u5316\uff09\uff1a<\/p>\n<pre><code class=\"line-numbers\">firmware\/\n\u251c\u2500\u2500 Makefile                          # \u4e3b\u5165\u53e3\uff0c\u9a71\u52a8\u5168\u90e8\u6784\u5efa\u6d41\u7a0b\n\u251c\u2500\u2500 br-ext-chip-*\/configs\/            # \u5404\u82af\u7247\/\u4e3b\u677f\u7684\u9ed8\u8ba4\u914d\u7f6e\uff08defconfig\uff09\n\u251c\u2500\u2500 general\/Config.in                 # menuconfig \u4e3b\u914d\u7f6e\u5165\u53e3\n\u251c\u2500\u2500 general\/package\/                  # \u6269\u5c55\u5305\u5b9a\u4e49\u4e0e\u914d\u7f6e\n\u251c\u2500\u2500 output\/                           # \u7f16\u8bd1\u4ea7\u7269\u8f93\u51fa\u76ee\u5f55\n<\/code><\/pre>\n<hr \/>\n<h2>\u4e09\u3001\u4ed3\u5e93\u7ed3\u6784\u4e0e\u914d\u7f6e\u7ba1\u7406<\/h2>\n<h3>3.1 \u4e3b\u677f\/\u82af\u7247\u914d\u7f6e\u6587\u4ef6\uff08defconfig\uff09<\/h3>\n<p>\u6240\u6709\u652f\u6301\u7684\u4e3b\u677f\/\u82af\u7247\u914d\u7f6e\u6587\u4ef6\u5b58\u653e\u4e8e <code>br-ext-chip-*\/configs\/<\/code> \u76ee\u5f55\u4e0b\u3002\u6bcf\u4e2a\u6587\u4ef6\u540d\u5f62\u5982 <code>&lt;board&gt;_defconfig<\/code>\uff0c\u5185\u5bb9\u4e3a\u8be5\u4e3b\u677f\u7684\u9ed8\u8ba4\u914d\u7f6e\u53c2\u6570\u3002<\/p>\n<p><strong>\u793a\u4f8b\uff1a\u67e5\u627e\u53ef\u7528\u4e3b\u677f\u914d\u7f6e<\/strong><\/p>\n<pre><code class=\"language-bash line-numbers\">find . -type f -name \"*_defconfig\"\n<\/code><\/pre>\n<p>\u8f93\u51fa\uff08\u90e8\u5206\uff09\uff1a<\/p>\n<pre><code class=\"line-numbers\">.\/br-ext-chip-fullhan\/configs\/fh8852v100_defconfig\n.\/br-ext-chip-hisilicon\/configs\/hi3516ev200_defconfig\n.\/br-ext-chip-rockchip\/configs\/rk3326_defconfig\n...\n<\/code><\/pre>\n<p><strong>\u914d\u7f6e\u6587\u4ef6\u5185\u5bb9\u793a\u4f8b<\/strong>\uff08\u4ee5 <code>fh8852v100_defconfig<\/code> \u4e3a\u4f8b\uff0c\u6458\u81ea\u4ed3\u5e93\uff09\uff1a<\/p>\n<pre><code class=\"language-text line-numbers\">BR2_arm=y\nBR2_TOOLCHAIN_EXTERNAL=y\nBR2_SYSTEM_DEFAULT_PATH=\"\/bin:\/sbin:\/usr\/bin:\/usr\/sbin\"\n# ... \u5176\u4f59\u914d\u7f6e\u9879\n<\/code><\/pre>\n<p>\uff08\u5b8c\u6574\u5185\u5bb9\u89c1 <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/br-ext-chip-fullhan\/configs\/fh8852v100_defconfig\">fh8852v100_defconfig<\/a>\uff09<\/p>\n<h3>3.2 \u914d\u7f6e\u6587\u4ef6\u52a0\u8f7d\u4e0e\u4f18\u5148\u7ea7<\/h3>\n<ul>\n<li><code>make &lt;board&gt;_defconfig<\/code> \u4f1a\u5c06\u5bf9\u5e94 defconfig \u590d\u5236\u4e3a <code>.config<\/code>\uff0c\u4f5c\u4e3a\u672c\u6b21\u7f16\u8bd1\u7684\u57fa\u7840\u914d\u7f6e\uff08\u89c1 <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/Makefile#L110-L140\">Makefile#L110-L140<\/a>\uff09\u3002<\/li>\n<li>\u540e\u7eed\u901a\u8fc7 <code>make menuconfig<\/code> \u53ef\u5728\u6b64\u57fa\u7840\u4e0a\u8fdb\u884c\u4ea4\u4e92\u5f0f\u589e\u5220\u6539\u67e5\uff0c\u6240\u6709\u66f4\u6539\u4f1a\u5199\u5165 <code>.config<\/code>\u3002<\/li>\n<li>\u76f8\u5173\u914d\u7f6e\u89e3\u6790\u7531 <code>general\/Config.in<\/code> \u53ca\u5404\u6a21\u5757 <code>Config.in<\/code> \u63a7\u5236\uff08\u8be6\u89c1 <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/Config.in\">Config.in<\/a>\uff09\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>\u56db\u3001\u7f16\u8bd1\u6d41\u7a0b\u8be6\u89e3<\/h2>\n<h3>4.1 \u514b\u9686\u6e90\u7801\u4ed3\u5e93<\/h3>\n<pre><code class=\"language-bash line-numbers\">git clone https:\/\/github.com\/OpenIPC\/firmware.git\ncd firmware\n<\/code><\/pre>\n<h3>4.2 \u9009\u62e9\u4e3b\u677f\u9ed8\u8ba4\u914d\u7f6e<\/h3>\n<p><strong>\u547d\u4ee4\u683c\u5f0f<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">make &lt;board&gt;_defconfig\n<\/code><\/pre>\n<p><strong>\u5b9e\u4f8b<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">make fh8852v100_defconfig\n<\/code><\/pre>\n<ul>\n<li>\u8be5\u547d\u4ee4\u4f1a\u81ea\u52a8\u5c06 <code>br-ext-chip-fullhan\/configs\/fh8852v100_defconfig<\/code> \u590d\u5236\u4e3a <code>.config<\/code>\uff0c\u4f5c\u4e3a\u540e\u7eed menuconfig \u548c make \u7684\u8f93\u5165\u3002<\/li>\n<\/ul>\n<p><strong>\u547d\u4ee4\u6267\u884c\u8f93\u51fa\u793a\u4f8b<\/strong>\uff1a<\/p>\n<pre><code class=\"line-numbers\">#\n# configuration written to .config\n#\n<\/code><\/pre>\n<h3>4.3 \u4ea4\u4e92\u5f0f\u914d\u7f6e\uff08\u53ef\u9009\uff09<\/h3>\n<p><strong>\u547d\u4ee4<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">make menuconfig\n<\/code><\/pre>\n<ul>\n<li>\u542f\u52a8\u57fa\u4e8e ncurses \u7684\u56fe\u5f62\u5316\u914d\u7f6e\u754c\u9762\u3002<\/li>\n<li>\u652f\u6301\u542f\u7528\/\u7981\u7528\u529f\u80fd\u6a21\u5757\u3001\u88c1\u526a\u7ec4\u4ef6\u3001\u5b9a\u5236\u5305\u7b49\u3002<\/li>\n<\/ul>\n<p><strong>\u5e38\u89c1\u64cd\u4f5c<\/strong>\uff1a<\/p>\n<ul>\n<li>\u65b9\u5411\u952e\u79fb\u52a8\uff0c\u7a7a\u683c\u952e\u9009\u62e9\uff0cEnter \u8fdb\u5165\u5b50\u83dc\u5355\uff0cESC \u9000\u51fa\u3002<\/li>\n<li>\u914d\u7f6e\u5b8c\u6210\u540e\u9009\u62e9\u201cSave\u201d\uff0c\u4fdd\u5b58\u66f4\u6539\u5230 <code>.config<\/code>\u3002<\/li>\n<\/ul>\n<p><strong>\u754c\u9762\u793a\u4f8b<\/strong>\uff08\u6587\u672c\u5316\uff09\uff1a<\/p>\n<pre><code class=\"line-numbers\"> \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 OpenIPC Firmware Configuration \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502  [*] Build busybox        ---&gt;                                                              \u2502\n \u2502  [*] Enable networking    ---&gt;                                                              \u2502\n \u2502  [ ] Include SSH server   ---&gt;                                                              \u2502\n \u2502  [*] Camera drivers       ---&gt;                                                              \u2502\n \u2502  ...                                                                                       \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n<\/code><\/pre>\n<h3>4.4 \u542f\u52a8\u7f16\u8bd1<\/h3>\n<p><strong>\u547d\u4ee4<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">make\n<\/code><\/pre>\n<ul>\n<li>\u81ea\u52a8\u68c0\u6d4b\u4f9d\u8d56\uff0c\u4e0b\u8f7d\u6e90\u7801\u5305\uff0c\u914d\u7f6e\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u94fe\uff0c\u7f16\u8bd1\u6240\u6709\u76ee\u6807\u6a21\u5757\uff0c\u6700\u7ec8\u751f\u6210\u56fa\u4ef6\u955c\u50cf\u3002<\/li>\n<\/ul>\n<p><strong>\u8be6\u7ec6\u8f93\u51fa\u793a\u4f8b<\/strong>\uff08\u90e8\u5206\uff09\uff1a<\/p>\n<pre><code class=\"line-numbers\">&gt;&gt;&gt; toolchain: Downloading and installing external toolchain\n&gt;&gt;&gt; busybox: Building package\n&gt;&gt;&gt; linux-kernel: Applying patches\n&gt;&gt;&gt; rootfs: Assembling filesystem\n&gt;&gt;&gt; firmware: Creating image\n&gt;&gt;&gt; firmware: Copying image to output\/\n&gt;&gt;&gt; Build completed successfully\n<\/code><\/pre>\n<p><strong>\u5e38\u7528\u53c2\u6570<\/strong>\uff1a<\/p>\n<ul>\n<li>\u5e76\u884c\u7f16\u8bd1\uff1a<code>make -j4<\/code>\uff08\u5229\u75284\u6838\u5e76\u884c\u52a0\u901f\uff09<\/li>\n<li>\u8be6\u7ec6\u65e5\u5fd7\uff1a<code>make V=1<\/code><\/li>\n<\/ul>\n<h3>4.5 \u7f16\u8bd1\u4ea7\u7269\u8bf4\u660e<\/h3>\n<ul>\n<li>\u6240\u6709\u56fa\u4ef6\u955c\u50cf\u548c\u76f8\u5173\u6587\u4ef6\u8f93\u51fa\u81f3 <code>output\/<\/code> \u76ee\u5f55\u3002<\/li>\n<li>\u5178\u578b\u4ea7\u7269\u5305\u62ec\uff1a\n<ul>\n<li><code>output\/images\/&lt;board&gt;-openipc.img<\/code>\uff1a\u4e3b\u56fa\u4ef6\u955c\u50cf<\/li>\n<li><code>output\/images\/&lt;board&gt;-uImage<\/code>\uff1a\u5185\u6838\u955c\u50cf<\/li>\n<li><code>output\/images\/&lt;board&gt;-rootfs.squashfs<\/code>\uff1a\u6839\u6587\u4ef6\u7cfb\u7edf<\/li>\n<li><code>output\/build.log<\/code>\uff1a\u5b8c\u6574\u7f16\u8bd1\u65e5\u5fd7<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>\u793a\u4f8b<\/strong>\uff1a<\/p>\n<pre><code class=\"line-numbers\">output\/\n\u251c\u2500\u2500 images\/\n\u2502   \u251c\u2500\u2500 fh8852v100-openipc.img\n\u2502   \u251c\u2500\u2500 uImage\n\u2502   \u2514\u2500\u2500 rootfs.squashfs\n\u251c\u2500\u2500 build.log\n<\/code><\/pre>\n<hr \/>\n<h2>\u4e94\u3001\u6838\u5fc3\u6784\u5efa\u673a\u5236\u4e0e\u6d41\u7a0b\u53ef\u89c6\u5316<\/h2>\n<h3>5.1 Makefile \u4e3b\u6d41\u7a0b\u89e3\u6790<\/h3>\n<ul>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/Makefile\">Makefile<\/a> \u8d1f\u8d23\uff1a\n<ul>\n<li>\u89e3\u6790 defconfig\uff0c\u751f\u6210 <code>.config<\/code><\/li>\n<li>\u8c03\u7528 <code>menuconfig<\/code>\uff08\u57fa\u4e8e Kconfig \u7cfb\u7edf\uff09<\/li>\n<li>\u4e0b\u8f7d\/\u914d\u7f6e\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u94fe<\/li>\n<li>\u8c03\u5ea6\u5404\u6a21\u5757\u5305\u7684\u7f16\u8bd1\u4e0e\u6253\u5305<\/li>\n<li>\u4ea7\u7269\u5f52\u6863\u8f93\u51fa<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Makefile \u5173\u952e\u7247\u6bb5<\/strong>\uff08<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/Makefile#L1-L200\">L1-L200<\/a>\uff09\uff1a<\/p>\n<pre><code class=\"language-makefile line-numbers\"># \u7701\u7565\u53d8\u91cf\u5b9a\u4e49\n%_defconfig:\n    @echo \"Using default config for <span class=\"katex math inline\">*\"\n    cp br-ext-chip-*\/configs\/<\/span>@ .config\n    <span class=\"katex math inline\">(MAKE) olddefconfig\n\nmenuconfig:<\/span>(Q)kconfig-mconf general\/Config.in\n\nall: toolchain packages images\n    @echo \"Build completed successfully\"\n<\/code><\/pre>\n<h3>5.2 \u7f16\u8bd1\u6d41\u7a0b\u65f6\u5e8f\u56fe<\/h3>\n<div class=\"mermaid mermaid-diagram no-emojify\"><script type=\"text\/javascript\">document.write(\"sequenceDiagram\\n    participant User as \u7528\u6237\\n    participant Git as \u4ee3\u7801\u4ed3\u5e93\\n    participant Make as Makefile\\n    participant Kconfig as menuconfig\\n    participant Tool as \u5de5\u5177\u94fe\u4e0b\u8f7d\\n    participant Build as \u7f16\u8bd1\u7cfb\u7edf\\n    participant Out as \u8f93\u51fa\u76ee\u5f55\\n\\n    User-&gt;&gt;Git: \u514b\u9686\u4ed3\u5e93\\n    User-&gt;&gt;Make: make &lt;board&gt;_defconfig\\n    Make-&gt;&gt;Make: \u751f\u6210 .config\\n    User-&gt;&gt;Kconfig: make menuconfig\\n    Kconfig-&gt;&gt;Make: \u4fdd\u5b58\u914d\u7f6e\\n    User-&gt;&gt;Make: make\\n    Make-&gt;&gt;Tool: \u4e0b\u8f7d\/\u914d\u7f6e\u5de5\u5177\u94fe\\n    Make-&gt;&gt;Build: \u5404\u6a21\u5757\u7f16\u8bd1\\n    Build-&gt;&gt;Out: \u8f93\u51fa\u56fa\u4ef6\u955c\u50cf\\n    Out-&gt;&gt;User: \u63d0\u4f9b\u4ea7\u7269\\n\");<\/script><\/div>\n<hr \/>\n<h2>\u516d\u3001\u5e38\u89c1\u95ee\u9898\u4e0e\u6392\u67e5<\/h2>\n<h3>6.1 \u4f9d\u8d56\u7f3a\u5931<\/h3>\n<ul>\n<li>\u62a5\u9519\u5982 <code>ncurses.h: No such file or directory<\/code>\uff0c\u8bf7\u786e\u8ba4\u5b89\u88c5 <code>libncurses5-dev<\/code>\u3002<\/li>\n<li>\u5de5\u5177\u94fe\u4e0b\u8f7d\u5931\u8d25\uff0c\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\u6216\u4ee3\u7406\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<h3>6.2 \u914d\u7f6e\u51b2\u7a81<\/h3>\n<ul>\n<li>\u82e5 menuconfig \u540e\u7f16\u8bd1\u5931\u8d25\uff0c\u56de\u6eda\u81f3 defconfig \u6216\u91cd\u65b0\u6267\u884c <code>make &lt;board&gt;_defconfig<\/code>\u3002<\/li>\n<\/ul>\n<h3>6.3 \u7f16\u8bd1\u5931\u8d25<\/h3>\n<ul>\n<li>\u68c0\u67e5 <code>output\/build.log<\/code>\uff0c\u5b9a\u4f4d\u5177\u4f53\u51fa\u9519\u6a21\u5757\u3002<\/li>\n<li>\u5e38\u89c1\u4e3a\u4ea4\u53c9\u7f16\u8bd1\u5668\u7f3a\u5931\u3001\u6e90\u7801\u5305\u4e0b\u8f7d\u5931\u8d25\u3001\u914d\u7f6e\u9879\u51b2\u7a81\u7b49\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>\u4e03\u3001\u6700\u4f73\u5b9e\u8df5\u4e0e\u81ea\u52a8\u5316\u5efa\u8bae<\/h2>\n<h3>7.1 \u914d\u7f6e\u7ba1\u7406<\/h3>\n<ul>\n<li>\u5efa\u8bae\u6240\u6709\u81ea\u5b9a\u4e49 <code>.config<\/code> \u6587\u4ef6\u7eb3\u5165\u7248\u672c\u63a7\u5236\uff0c\u4fbf\u4e8e\u56e2\u961f\u534f\u4f5c\u3002<\/li>\n<li>\u591a\u4e3b\u677f\u6279\u91cf\u7f16\u8bd1\u53ef\u7ed3\u5408\u811a\u672c\u81ea\u52a8\u904d\u5386 defconfig \u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p><strong>\u6279\u91cf\u7f16\u8bd1\u793a\u4f8b\u811a\u672c<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">for cfg in br-ext-chip-*\/configs\/*_defconfig; do\n    make clean\n    make <span class=\"katex math inline\">(basename<\/span>cfg)\n    make -j4\n    cp output\/images\/* .\/all_firmwares\/\ndone\n<\/code><\/pre>\n<h3>7.2 \u5b89\u5168\u4e0e\u73af\u5883\u9694\u79bb<\/h3>\n<ul>\n<li>\u63a8\u8350\u5728\u4e13\u7528\u6784\u5efa\u673a\u6216\u5bb9\u5668\u4e2d\u7f16\u8bd1\uff0c\u907f\u514d\u672c\u5730\u4f9d\u8d56\u6c61\u67d3\u3002<\/li>\n<li>\u7f16\u8bd1\u4ea7\u7269\u5efa\u8bae\u505a\u54c8\u5e0c\u6821\u9a8c\uff0c\u786e\u4fdd\u5b8c\u6574\u6027\u3002<\/li>\n<\/ul>\n<h3>7.3 \u6301\u7eed\u96c6\u6210\u96c6\u6210\u5efa\u8bae<\/h3>\n<ul>\n<li>\u53ef\u5728 CI \u5e73\u53f0\uff08\u5982 GitHub Actions\uff09\u4e2d\u81ea\u52a8\u5316\u6267\u884c\u4e0a\u8ff0\u6d41\u7a0b\uff0c\u81ea\u52a8\u5f52\u6863\u4ea7\u7269\u3001\u63a8\u9001\u901a\u77e5\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>\u516b\u3001\u9644\u5f55\uff1a\u914d\u7f6e\u6587\u4ef6\u4e0e\u53c2\u8003<\/h2>\n<ul>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/Makefile\">Makefile<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/tree\/master\/br-ext-chip-fullhan\/configs\/\">\u4e3b\u677f defconfig \u793a\u4f8b<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/Config.in\">Config.in \u4e3b\u914d\u7f6e<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/tree\/master\/general\/scripts\/\">\u81ea\u52a8\u5316\u811a\u672c\u793a\u4f8b<\/a><\/li>\n<\/ul>\n<hr \/>\n<h2>\u4e5d\u3001\u603b\u7ed3<\/h2>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u6d41\u7a0b\uff0c\u5f00\u53d1\u8005\u53ef\u9ad8\u6548\u3001\u5b89\u5168\u3001\u53ef\u5b9a\u5236\u5730\u5b8c\u6210 OpenIPC \u56fa\u4ef6\u7684\u9996\u6b21\u7f16\u8bd1\u3002\u6587\u6863\u8986\u76d6\u4ece\u73af\u5883\u51c6\u5907\u3001\u914d\u7f6e\u7ba1\u7406\u3001\u4ea4\u4e92\u5f0f\u5b9a\u5236\u3001\u81ea\u52a8\u5316\u7f16\u8bd1\u5230\u4ea7\u7269\u7ba1\u7406\u7684\u6bcf\u4e00\u5173\u952e\u73af\u8282\uff0c\u8f85\u4ee5\u5b9e\u9645\u4ee3\u7801\u793a\u4f8b\u548c\u8def\u5f84\u5f15\u7528\uff0c\u786e\u4fdd\u65e0\u9057\u6f0f\u3001\u65e0\u6b67\u4e49\u3002\u5efa\u8bae\u7ed3\u5408\u56e2\u961f\u5b9e\u9645\u9700\u6c42\uff0c\u8fdb\u4e00\u6b65\u96c6\u6210\u81ea\u52a8\u5316\u4e0e\u5b89\u5168\u63aa\u65bd\uff0c\u5b9e\u73b0\u56fa\u4ef6\u6784\u5efa\u7684\u6301\u7eed\u96c6\u6210\u548c\u9ad8\u6548\u4ea4\u4ed8\u3002<\/p>\n<h1>\u5237\u5199\u56fa\u4ef6<\/h1>\n<h1>\u5237\u5199\u56fa\u4ef6<\/h1>\n<h2>1. \u6587\u6863\u76ee\u7684<\/h2>\n<p>\u672c\u8282\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5c06\u7f16\u8bd1\u597d\u7684\u56fa\u4ef6\u5b89\u5168\u3001\u53ef\u9760\u5730\u5237\u5199\u5230OpenIPC\u652f\u6301\u7684\u5404\u7c7b\u8bbe\u5907\uff0c\u8986\u76d6TF\u5361\uff08SD\u5361\uff09\u3001USB\u70e7\u5f55\u5668\u3001\u7f51\u7edc\u66f4\u65b0\u3001\u4e32\u53e3\u7b49\u4e3b\u6d41\u65b9\u5f0f\u3002\u6587\u6863\u5185\u5bb9\u5b8c\u5168\u57fa\u4e8e<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\">OpenIPC\/firmware<\/a>\u4ed3\u5e93\uff0c\u5f15\u7528\u5b9e\u9645\u811a\u672c\u3001\u914d\u7f6e\u4e0e\u4ee3\u7801\u793a\u4f8b\uff0c\u786e\u4fdd\u64cd\u4f5c\u89c4\u8303\u3001\u81ea\u52a8\u5316\u3001\u53ef\u8ffd\u6eaf\uff0c\u5e76\u6700\u5927\u9650\u5ea6\u964d\u4f4e\u8bbe\u5907\u53d8\u7816\u98ce\u9669\u3002<\/p>\n<h2>2. \u9002\u7528\u8303\u56f4<\/h2>\n<ul>\n<li>\u6240\u6709\u4f7f\u7528OpenIPC\u56fa\u4ef6\u7684\u5d4c\u5165\u5f0f\u8bbe\u5907\uff0c\u5305\u62ec\u4f46\u4e0d\u9650\u4e8eIPC\u6444\u50cf\u5934\u3001DVR\u3001NVR\u7b49\u3002<\/li>\n<li>\u652f\u6301\u7684\u82af\u7247\u5e73\u53f0\u8be6\u89c1<code>br-ext-chip-*<\/code>\u76ee\u5f55\uff08\u5982Fullhan\u3001Rockchip\u3001Ambarella\u3001Novatek\u7b49\uff09\u3002<\/li>\n<li>\u9002\u7528\u4e8e\u751f\u4ea7\u73af\u5883\u4e0b\u56fa\u4ef6\u5347\u7ea7\u3001\u6062\u590d\u3001\u6279\u91cf\u90e8\u7f72\uff0c\u4ee5\u53ca\u7814\u53d1\u6d4b\u8bd5\u9636\u6bb5\u7684\u5feb\u901f\u70e7\u5f55\u3002<\/li>\n<\/ul>\n<h2>3. \u524d\u63d0\u6761\u4ef6<\/h2>\n<ul>\n<li>\u5df2\u7f16\u8bd1\u751f\u6210\u76ee\u6807\u56fa\u4ef6\u955c\u50cf\uff08.img\u3001.bin\u3001.tar\u7b49\uff09\uff0c\u6216\u4ece\u5b98\u65b9\u6e20\u9053\u83b7\u53d6\u6807\u51c6\u56fa\u4ef6\u5305\u3002<\/li>\n<li>\u5177\u5907\u8bbe\u5907\u652f\u6301\u7684\u5237\u5199\u5de5\u5177\u548c\u63a5\u53e3\uff08\u5982TF\u5361\u69fd\u3001USB\u70e7\u5f55\u5668\u3001\u4ee5\u592a\u7f51\u53e3\u3001\u4e32\u53e3\u7b49\uff09\u3002<\/li>\n<li>\u5df2\u5b8c\u6210\u56fa\u4ef6\u548c\u914d\u7f6e\u7684\u5907\u4efd\uff08\u5f3a\u70c8\u5efa\u8bae\uff0c\u89c1\u7b2c4\u8282\uff09\u3002<\/li>\n<li>\u5177\u5907\u57fa\u7840\u547d\u4ee4\u884c\u64cd\u4f5c\u80fd\u529b\uff0c\u5df2\u5b89\u88c5\u5fc5\u8981\u5de5\u5177\uff08\u5982dd\u3001Etcher\u3001TFTP\/HTTP\u670d\u52a1\u5668\u3001\u4e32\u53e3\u7ec8\u7aef\u7b49\uff09\u3002<\/li>\n<li>\u786e\u8ba4\u56fa\u4ef6\u4e0e\u8bbe\u5907\u578b\u53f7\u3001\u786c\u4ef6\u7248\u672c\u5b8c\u5168\u5339\u914d\u3002<\/li>\n<\/ul>\n<h2>4. \u5237\u5199\u524d\u7684\u5907\u4efd\u4e0e\u98ce\u9669\u63a7\u5236<\/h2>\n<h3>4.1 \u91cd\u8981\u6027\u8bf4\u660e<\/h3>\n<p>\u5237\u5199\u64cd\u4f5c\u5177\u6709\u4e0d\u53ef\u9006\u6027\uff0c\u9519\u8bef\u64cd\u4f5c\u53ef\u80fd\u5bfc\u81f4\u8bbe\u5907\u53d8\u7816\u6216\u6570\u636e\u4e22\u5931\u3002\u5f3a\u70c8\u5efa\u8bae\u5728\u4efb\u4f55\u5237\u5199\u524d\uff0c\u5b8c\u6574\u5907\u4efd\u539f\u59cb\u56fa\u4ef6\u548c\u8bbe\u5907\u914d\u7f6e\u3002<\/p>\n<h3>4.2 \u5907\u4efd\u65b9\u6cd5\u4e3e\u4f8b<\/h3>\n<h4>4.2.1 \u4f7f\u7528\u7f16\u7a0b\u5668\u6216\u70e7\u5f55\u5668\u5907\u4efdFlash<\/h4>\n<p>\u4ee5\u901a\u7528\u7f16\u7a0b\u5668\u4e3a\u4f8b\uff1a<\/p>\n<pre><code class=\"language-shell line-numbers\"># \u4f7f\u7528CH341A\u70e7\u5f55\u5668\u5907\u4efd\u6574\u4e2aSPI Flash\nflashrom -p ch341a_spi -r backup_flash.bin\n<\/code><\/pre>\n<h4>4.2.2 \u4f7f\u7528\u81ea\u52a8\u5316\u811a\u672c\u5907\u4efd<\/h4>\n<p>\u4ed3\u5e93\u811a\u672c<code>general\/scripts\/legacy\/general\/compile4programmer.sh<\/code>\u53ef\u7528\u4e8e\u8f85\u52a9\u56fa\u4ef6\u5904\u7406\uff0c\u7ed3\u5408\u70e7\u5f55\u5de5\u5177\u5b9e\u73b0\u6279\u91cf\u5907\u4efd\uff08\u8be6\u89c1<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/legacy\/general\/compile4programmer.sh\">\u811a\u672c\u6e90\u7801<\/a>\uff09\u3002<\/p>\n<h4>4.2.3 \u901a\u8fc7\u8bbe\u5907\u547d\u4ee4\u884c\u5bfc\u51fa\u914d\u7f6e<\/h4>\n<pre><code class=\"language-shell line-numbers\"># \u901a\u8fc7\u8bbe\u5907shell\u5bfc\u51fa\u914d\u7f6e\u5206\u533a\ndd if=\/dev\/mtdblockX of=\/tmp\/config_backup.bin\n<\/code><\/pre>\n<h3>4.3 \u5907\u4efd\u6821\u9a8c<\/h3>\n<p>\u52a1\u5fc5\u5bf9\u5907\u4efd\u6587\u4ef6\u8fdb\u884c\u6821\u9a8c\uff1a<\/p>\n<pre><code class=\"language-shell line-numbers\">md5sum backup_flash.bin\n<\/code><\/pre>\n<p>\u5e76\u59a5\u5584\u4fdd\u5b58\u6821\u9a8c\u503c\uff0c\u786e\u4fdd\u6570\u636e\u5b8c\u6574\u6027\u3002<\/p>\n<h2>5. \u5237\u5199\u65b9\u5f0f\u4e0e\u8be6\u7ec6\u64cd\u4f5c<\/h2>\n<h3>5.1 TF\u5361\uff08SD\u5361\uff09\u5237\u5199<\/h3>\n<p>\u9002\u7528\uff1a\u5927\u90e8\u5206\u652f\u6301TF\u5361\u542f\u52a8\u7684\u8bbe\u5907\u3002<\/p>\n<h4>5.1.1 \u64cd\u4f5c\u6b65\u9aa4<\/h4>\n<ol>\n<li><strong>\u683c\u5f0f\u5316TF\u5361\uff08\u5efa\u8baeFAT32\uff09<\/strong><\/li>\n<li><strong>\u5199\u5165\u56fa\u4ef6\u955c\u50cf<\/strong>\n<ul>\n<li>\u63a8\u8350\u5de5\u5177\uff1a<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/www.balena.io\/etcher\/\">balenaEtcher<\/a>\u3001Win32DiskImager\u3001dd\uff08Linux\uff09<\/li>\n<\/ul>\n<pre><code class=\"language-shell line-numbers\">sudo dd if=openipc.img of=\/dev\/sdX bs=4M status=progress conv=fsync\n<\/code><\/pre>\n<\/li>\n<li><strong>\u63d2\u5165TF\u5361\u5e76\u65ad\u7535\u91cd\u542f\u8bbe\u5907<\/strong><\/p>\n<\/li>\n<li><strong>\u89c2\u5bdf\u8bbe\u5907\u6307\u793a\u706f\u6216\u4e32\u53e3\u8f93\u51fa\uff0c\u786e\u8ba4\u5237\u5199\u8fdb\u5ea6<\/strong><\/li>\n<li><strong>\u5237\u5199\u5b8c\u6210\u540e\uff0c\u8bbe\u5907\u81ea\u52a8\u91cd\u542f\uff0c\u79fb\u9664TF\u5361<\/strong><\/li>\n<\/ol>\n<h4>5.1.2 \u6ce8\u610f\u4e8b\u9879<\/h4>\n<ul>\n<li>\u786e\u8ba4TF\u5361\u5bb9\u91cf\u548c\u901f\u5ea6\u7b26\u5408\u8981\u6c42<\/li>\n<li>\u5237\u5199\u671f\u95f4\u52ff\u65ad\u7535<\/li>\n<li>\u5efa\u8bae\u5168\u65b0\u683c\u5f0f\u5316TF\u5361\uff0c\u907f\u514d\u65e7\u6570\u636e\u5e72\u6270<\/li>\n<\/ul>\n<h4>5.1.3 \u5178\u578b\u811a\u672c\u5f15\u7528<\/h4>\n<p>\u56fa\u4ef6\u6253\u5305\u811a\u672c\uff1a<code>general\/scripts\/repack_firmware.sh<\/code><br \/>\n<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/repack_firmware.sh\">\u67e5\u770b\u6e90\u7801<\/a><\/p>\n<h3>5.2 USB\u70e7\u5f55\u5668\u5237\u5199<\/h3>\n<p>\u9002\u7528\uff1aFlash\u635f\u574f\u3001\u4e3b\u63a7\u5f02\u5e38\u3001\u65e0\u6cd5\u6b63\u5e38\u542f\u52a8\u7b49\u573a\u666f\u3002<\/p>\n<h4>5.2.1 \u64cd\u4f5c\u6b65\u9aa4<\/h4>\n<ol>\n<li><strong>\u62c6\u673a\u5e76\u8fde\u63a5\u70e7\u5f55\u5668\uff08\u5982CH341A\u3001J-Link\uff09<\/strong><\/li>\n<li><strong>\u8bfb\u53d6\u539f\u59cbFlash\u5185\u5bb9\uff0c\u5907\u4efd<\/strong><\/li>\n<li><strong>\u5199\u5165\u65b0\u56fa\u4ef6<\/strong>\n<pre><code class=\"language-shell line-numbers\">flashrom -p ch341a_spi -w openipc.bin\n<\/code><\/pre>\n<\/li>\n<li><strong>\u65ad\u5f00\u70e7\u5f55\u5668\uff0c\u91cd\u65b0\u88c5\u56de\u8bbe\u5907\uff0c\u901a\u7535\u6d4b\u8bd5<\/strong><\/p>\n<\/li>\n<\/ol>\n<h4>5.2.2 \u5178\u578b\u811a\u672c\u5f15\u7528<\/h4>\n<p>\u81ea\u52a8\u5316\u5904\u7406\u811a\u672c\uff1a<code>general\/scripts\/legacy\/general\/compile4programmer.sh<\/code><br \/>\n<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/legacy\/general\/compile4programmer.sh\">\u67e5\u770b\u6e90\u7801<\/a><\/p>\n<h4>5.2.3 \u6ce8\u610f\u4e8b\u9879<\/h4>\n<ul>\n<li>\u64cd\u4f5c\u9700\u9632\u9759\u7535\uff0c\u907f\u514d\u786c\u4ef6\u635f\u4f24<\/li>\n<li>\u70e7\u5f55\u5668\u9a71\u52a8\u9700\u6b63\u786e\u5b89\u88c5<\/li>\n<li>\u70e7\u5f55\u540e\u5efa\u8bae\u6bd4\u5bf9\u6821\u9a8c<\/li>\n<\/ul>\n<h3>5.3 \u7f51\u7edc\u5237\u5199\uff08TFTP\/HTTP\uff09<\/h3>\n<p>\u9002\u7528\uff1a\u8bbe\u5907\u652f\u6301\u7f51\u7edc\u5347\u7ea7\uff0c\u6216\u901a\u8fc7Web\/\u4e32\u53e3\u547d\u4ee4\u89e6\u53d1\u5347\u7ea7\u3002<\/p>\n<h4>5.3.1 \u64cd\u4f5c\u6b65\u9aa4<\/h4>\n<ol>\n<li><strong>\u51c6\u5907TFTP\/HTTP\u670d\u52a1\u5668\uff0c\u653e\u7f6e\u56fa\u4ef6\u6587\u4ef6<\/strong><\/li>\n<li><strong>\u8bbe\u5907\u7aef\u8fdb\u5165\u5347\u7ea7\u6a21\u5f0f\uff08Web\u754c\u9762\u3001\u4e32\u53e3\u547d\u4ee4\u3001\u6309\u952e\u7b49\uff09<\/strong><\/li>\n<li><strong>\u901a\u8fc7\u5347\u7ea7\u754c\u9762\u6216\u547d\u4ee4\u6307\u5b9a\u56fa\u4ef6URL<\/strong>\n<p>Web\u754c\u9762\u793a\u4f8b\uff1a<br \/>\n\u8fdb\u5165\u8bbe\u5907\u7ba1\u7406\u540e\u53f0\uff0c\u9009\u62e9\u201c\u56fa\u4ef6\u5347\u7ea7\u201d\uff0c\u4e0a\u4f20\u56fa\u4ef6\u5305\u6216\u6307\u5b9aURL\u3002<\/p>\n<p>\u4e32\u53e3\u547d\u4ee4\u793a\u4f8b\uff1a<\/p>\n<pre><code class=\"language-shell line-numbers\">tftp -g -r openipc.img 192.168.1.100\ndd if=openipc.img of=\/dev\/mtdblockX\n<\/code><\/pre>\n<\/li>\n<li><strong>\u5347\u7ea7\u5b8c\u6210\u540e\u81ea\u52a8\u91cd\u542f<\/strong><\/p>\n<\/li>\n<\/ol>\n<h4>5.3.2 \u5178\u578b\u811a\u672c\u5f15\u7528<\/h4>\n<p>\u56fa\u4ef6\u5206\u533a\u3001\u6253\u5305\u3001\u5347\u7ea7\u76f8\u5173\u811a\u672c\u89c1<code>general\/scripts\/<\/code>\u76ee\u5f55\u3002<\/p>\n<h4>5.3.3 \u6ce8\u610f\u4e8b\u9879<\/h4>\n<ul>\n<li>\u7f51\u7edc\u7a33\u5b9a\uff0c\u9632\u6b62\u4e2d\u65ad<\/li>\n<li>\u56fa\u4ef6\u5305\u547d\u540d\u4e0e\u8def\u5f84\u9700\u51c6\u786e<\/li>\n<li>\u5347\u7ea7\u65e5\u5fd7\u5efa\u8bae\u4fdd\u5b58\u4fbf\u4e8e\u6392\u67e5<\/li>\n<\/ul>\n<h3>5.4 \u4e32\u53e3\/TTL\u5237\u5199<\/h3>\n<p>\u9002\u7528\uff1a\u8bbe\u5907\u65e0\u6cd5\u6b63\u5e38\u542f\u52a8\uff0c\u9700\u624b\u52a8\u8fdb\u5165Bootloader\u3002<\/p>\n<h4>5.4.1 \u64cd\u4f5c\u6b65\u9aa4<\/h4>\n<ol>\n<li><strong>\u8fde\u63a5\u4e32\u53e3\u7ebf\uff0c\u6253\u5f00\u7ec8\u7aef\uff08\u5982minicom\u3001putty\uff09<\/strong><\/li>\n<li><strong>\u8fdb\u5165Bootloader\u83dc\u5355\uff08\u5982U-Boot\uff09<\/strong><\/li>\n<li><strong>\u6267\u884c\u5237\u5199\u547d\u4ee4<\/strong>\n<p>\u4f8b\u5982U-Boot\u4e0b\uff1a<\/p>\n<pre><code class=\"language-shell line-numbers\">loady 0x82000000  # \u4f7f\u7528YMODEM\u534f\u8bae\u4e0a\u4f20\u56fa\u4ef6\nnand write 0x82000000 0x0 $filesize\n<\/code><\/pre>\n<\/li>\n<li><strong>\u5237\u5199\u5b8c\u6210\u91cd\u542f\u8bbe\u5907<\/strong><\/p>\n<\/li>\n<\/ol>\n<h4>5.4.2 \u6ce8\u610f\u4e8b\u9879<\/h4>\n<ul>\n<li>\u6ce2\u7279\u7387\u4e0e\u4e32\u53e3\u53c2\u6570\u9700\u5339\u914d<\/li>\n<li>\u4e0a\u4f20\u8fc7\u7a0b\u9700\u8010\u5fc3\uff0c\u6ce8\u610f\u6587\u4ef6\u5927\u5c0f\u9650\u5236<\/li>\n<\/ul>\n<h2>6. \u5e73\u53f0\u9002\u914d\u4e0e\u8be6\u7ec6\u8bf4\u660e\u5165\u53e3<\/h2>\n<p>\u4e0d\u540c\u82af\u7247\/\u786c\u4ef6\u5e73\u53f0\u7684\u5237\u5199\u7ec6\u8282\u548c\u5206\u533a\u65b9\u6848\u5404\u5f02\uff0c\u52a1\u5fc5\u67e5\u9605\u4e0b\u5217\u6587\u6863\uff1a<\/p>\n<ul>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/tree\/master\/br-ext-chip-fullhan\/board\/readme.md\">Fullhan\u5e73\u53f0\u5237\u5199\u8bf4\u660e<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/tree\/master\/br-ext-chip-rockchip\/board\/readme.md\">Rockchip\u5e73\u53f0\u5237\u5199\u8bf4\u660e<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/tree\/master\/br-ext-chip-ambarella\/board\/readme.md\">Ambarella\u5e73\u53f0\u5237\u5199\u8bf4\u660e<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/tree\/master\/br-ext-chip-novatek\/board\/readme.md\">Novatek\u5e73\u53f0\u5237\u5199\u8bf4\u660e<\/a><\/li>\n<li>\u66f4\u591a\u5e73\u53f0\u8bf7\u53c2\u89c1<code>br-ext-chip-*\/board\/readme.md<\/code><\/li>\n<\/ul>\n<h2>7. \u98ce\u9669\u4e0e\u6062\u590d\u7b56\u7565<\/h2>\n<h3>7.1 \u5e38\u89c1\u98ce\u9669<\/h3>\n<ul>\n<li>\u5237\u5199\u56fa\u4ef6\u4e0e\u8bbe\u5907\u578b\u53f7\u4e0d\u7b26\uff0c\u5bfc\u81f4\u53d8\u7816<\/li>\n<li>\u5237\u5199\u4e2d\u65ad\u7535\u3001\u6570\u636e\u635f\u574f<\/li>\n<li>\u5206\u533a\u8868\u4e0d\u5339\u914d\uff0c\u529f\u80fd\u5f02\u5e38<\/li>\n<li>\u5347\u7ea7\u540e\u914d\u7f6e\u4e22\u5931<\/li>\n<\/ul>\n<h3>7.2 \u6062\u590d\u6d41\u7a0b<\/h3>\n<ul>\n<li>\u4f7f\u7528\u5907\u4efd\u56fa\u4ef6\u901a\u8fc7\u70e7\u5f55\u5668\u6062\u590d<\/li>\n<li>\u901a\u8fc7\u4e32\u53e3\u8fdb\u5165Bootloader\u91cd\u65b0\u5237\u5199<\/li>\n<li>\u6062\u590d\u51fa\u5382\u8bbe\u7f6e\u540e\u91cd\u65b0\u914d\u7f6e<\/li>\n<\/ul>\n<h3>7.3 \u81ea\u52a8\u5316\u811a\u672c\u4e0e\u65e5\u5fd7\u91c7\u96c6<\/h3>\n<p>\u5efa\u8bae\u7ed3\u5408\u811a\u672c\u5b9e\u73b0\u6279\u91cf\u5237\u5199\u4e0e\u65e5\u5fd7\u8bb0\u5f55\uff1a<\/p>\n<pre><code class=\"language-shell line-numbers\"># \u6279\u91cf\u6253\u5305\u56fa\u4ef6\nbash general\/scripts\/repack_firmware.sh\n\n# \u5237\u5199\u65e5\u5fd7\u91c7\u96c6\ndmesg &gt; flash_log.txt\n<\/code><\/pre>\n<h2>8. \u5e38\u89c1\u95ee\u9898\u4e0e\u6392\u67e5<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u95ee\u9898\u63cf\u8ff0<\/th>\n<th>\u6392\u67e5\u5efa\u8bae<\/th>\n<th>\u89e3\u51b3\u63aa\u65bd<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u5237\u5199\u540e\u8bbe\u5907\u65e0\u54cd\u5e94<\/td>\n<td>\u68c0\u67e5\u56fa\u4ef6\u578b\u53f7\/\u5206\u533a\uff0c\u4e32\u53e3\u67e5\u770b\u542f\u52a8\u65e5\u5fd7<\/td>\n<td>\u6062\u590d\u539f\u59cb\u56fa\u4ef6\uff0c\u91cd\u65b0\u5237\u5199<\/td>\n<\/tr>\n<tr>\n<td>\u5237\u5199\u5de5\u5177\u62a5\u9519<\/td>\n<td>\u68c0\u67e5\u63a5\u7ebf\u3001\u9a71\u52a8\u3001\u955c\u50cf\u5b8c\u6574\u6027<\/td>\n<td>\u66f4\u6362\u5de5\u5177\/\u955c\u50cf\uff0c\u91cd\u65b0\u64cd\u4f5c<\/td>\n<\/tr>\n<tr>\n<td>\u7f51\u7edc\u5237\u5199\u5931\u8d25<\/td>\n<td>\u68c0\u67e5\u7f51\u7edc\u8fde\u901a\u3001\u56fa\u4ef6\u8def\u5f84<\/td>\n<td>\u4fee\u6b63\u670d\u52a1\u5668\/\u8def\u5f84\uff0c\u91cd\u8bd5<\/td>\n<\/tr>\n<tr>\n<td>\u914d\u7f6e\u4e22\u5931<\/td>\n<td>\u68c0\u67e5\u5907\u4efd\u6587\u4ef6\uff0c\u6062\u590d\u914d\u7f6e<\/td>\n<td>\u91cd\u65b0\u5bfc\u5165\u914d\u7f6e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>9. \u53c2\u8003\u8d44\u6599\u4e0e\u811a\u672c\u7d22\u5f15<\/h2>\n<ul>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/repack_firmware.sh\">\u56fa\u4ef6\u6253\u5305\u811a\u672crepack_firmware.sh<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/blob\/master\/general\/scripts\/legacy\/general\/compile4programmer.sh\">\u7f16\u7a0b\u5668\u8f85\u52a9\u811a\u672ccompile4programmer.sh<\/a><\/li>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/tree\/master\/br-ext-chip-*\">\u5404\u82af\u7247\u5e73\u53f0\u5237\u5199\u8be6\u7ec6\u8bf4\u660e<\/a><\/li>\n<\/ul>\n<hr \/>\n<h2>\u9644\u5f55\uff1a\u5237\u5199\u6d41\u7a0bMermaid\u56fe<\/h2>\n<div class=\"mermaid mermaid-diagram no-emojify\"><script type=\"text\/javascript\">document.write(\"graph TD\\n    A[\u56fa\u4ef6\u5907\u4efd] --&gt; B[\u9009\u62e9\u5237\u5199\u65b9\u5f0f]\\n    B --&gt; C1[TF\u5361\u5237\u5199]\\n    B --&gt; C2[USB\u70e7\u5f55\u5668]\\n    B --&gt; C3[\u7f51\u7edc\u5237\u5199]\\n    B --&gt; C4[\u4e32\u53e3\u5237\u5199]\\n    C1 --&gt; D[\u5237\u5199\u6267\u884c]\\n    C2 --&gt; D\\n    C3 --&gt; D\\n    C4 --&gt; D\\n    D --&gt; E[\u91cd\u542f\u5e76\u9a8c\u8bc1]\\n    E --&gt; F[\u6062\u590d\u5907\u4efd\/\u56de\u6eda]\\n\");<\/script><\/div>\n<hr \/>\n<p>\u5982\u9700\u8fdb\u4e00\u6b65\u6280\u672f\u652f\u6301\uff0c\u8bf7\u67e5\u9605<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/openipc.org\/wiki\/\">OpenIPC\u5b98\u65b9\u6587\u6863<\/a>\u6216\u81f3<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/OpenIPC\/firmware\/issues\">GitHub Issues<\/a>\u63d0\u95ee\u3002<\/p>\n<p>\u66f4\u591a\u6280\u672f\u6587\u6863\u8bf7\u4e0b\u8f7d\uff1a<\/p>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"http:\/\/www.51cos.com\/wp-content\/uploads\/2025\/08\/80d74370-d0bc-47f2-97a7-bcd8a7b26aab.zip\">80d74370-d0bc-47f2-97a7-bcd8a7b26aab<\/a><\/p>\n<p>\u53c2\u8003\u6587\u7ae0\uff1a<\/p>\n<pre data-language=HTML><code class=\"language-markup line-numbers\">\u4e2d\u6587\u7248\uff1a\nhttps:\/\/opendeep.wiki\/OpenIPC\/firmware\/overview\n<\/code><\/pre>\n<pre data-language=HTML><code class=\"language-markup line-numbers\">https:\/\/github.com\/duchengyao\/OpenIPC-wiki\/blob\/master\/en\/building.md\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u73af\u5883\u642d\u5efa \u73af\u5883\u642d\u5efa \u6982\u8ff0 OpenIPC\/firmware \u9879\u76ee\u662f\u57fa\u4e8e Makefile \u548c\u591a\u5e73\u53f0\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-3379","post","type-post","status-publish","format-standard","hentry","category-plana"],"_links":{"self":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/3379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3379"}],"version-history":[{"count":1,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/3379\/revisions"}],"predecessor-version":[{"id":3381,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/3379\/revisions\/3381"}],"wp:attachment":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3379"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}