linuxOS_D21X/doc/topics/sdk/advanced/lb_usage_commands.html
2025-01-23 16:35:08 +08:00

326 lines
34 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn" data-whc_version="27.0">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="DC.rights.owner" content="(C) 版权 2025"/><meta name="copyright" content="(C) 版权 2025"/><meta name="generator" content="DITA-OT"/><meta name="DC.type" content="concept"/><meta name="description" content="常规命令 make board _defconfig make all - 项目查看make list --&gt; 列出当前可用的项目配置 - 配置make d211_demo128_nand_defconfig --&gt; 应用项目配置保存目录target/configs - 编译make --&gt; 编译,自动进行修改检测,增量编译 - 清除make clean --&gt; 清除编译生成内容 - ..."/><meta name="DC.relation" content="../../../topics/sdk/env/compile.html"/><meta name="DC.relation" content="../../../topics/sdk/advanced/burn-image-add-dev-board.html"/><meta name="DC.contributor" content="yan.wang"/><meta name="DC.creator" content="yan.wang"/><meta name="DC.date.modified" content="2024-01-15"/><meta name="DC.format" content="HTML5"/><meta name="DC.identifier" content="lb-usage-commands"/><meta name="DC.language" content="zh-CN"/>
<title>命令详解</title><!-- Generated with build number 2024112209. --><meta name="wh-path2root" content="../../../"/><meta name="wh-toc-id" content="lb-usage-commands-d4445e1244"/><meta name="wh-source-relpath" content="topics/sdk/advanced/lb_usage_commands.dita"/><meta name="wh-out-relpath" content="topics/sdk/advanced/lb_usage_commands.html"/>
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/commons.css?buildId=2024112209"/>
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/topic.css?buildId=2024112209"/>
<script src="../../../webhelp/app/options/properties.js?buildId=20250123154945"></script>
<script src="../../../webhelp/app/localization/strings.js?buildId=2024112209"></script>
<script src="../../../webhelp/app/search/index/keywords.js?buildId=20250123154945"></script>
<script defer="defer" src="../../../webhelp/app/commons.js?buildId=2024112209"></script>
<script defer="defer" src="../../../webhelp/app/topic.js?buildId=2024112209"></script>
<link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-styles-web.css?buildId=2024112209"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/notes.css?buildId=2024112209"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-common.css?buildId=2024112209"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-images.css?buildId=2024112209"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/footnote.css?buildId=2024112209"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-web-watermark.css?buildId=2024112209"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/topic-body-list.css?buildId=2024112209"/></head>
<body id="lb-usage-commands" class="wh_topic_page frmBody">
<a href="#wh_topic_body" class="sr-only sr-only-focusable">
跳转到主要内容
</a>
<header class="navbar navbar-default wh_header">
<div class="container-fluid">
<div class="wh_header_flex_container navbar-nav navbar-expand-md navbar-dark">
<div class="wh_logo_and_publication_title_container">
<div class="wh_logo_and_publication_title">
<a href="http://www.artinchip.com" class=" wh_logo d-none d-sm-block "><img src="../../../company-logo-white.png" alt=" Linux SDK 使用指南 SDK 指南文件 "/></a>
<div class=" wh_publication_title "><a href="../../../index.html"><span class="booktitle"> <span class="ph mainbooktitle">Linux SDK 使用指南</span> <span class="ph booktitlealt">SDK 指南文件</span> </span></a></div>
</div>
</div>
<div class="wh_top_menu_and_indexterms_link collapse navbar-collapse" id="wh_top_menu_and_indexterms_link">
</div>
</div>
</div>
</header>
<div class=" wh_search_input navbar-form wh_topic_page_search search " role="form">
<form id="searchForm" method="get" role="search" action="../../../search.html"><div><input type="search" placeholder="搜索 " class="wh_search_textfield" id="textToSearch" name="searchQuery" aria-label="搜索查询" required="required"/><button type="submit" class="wh_search_button" aria-label="搜索"><span class="search_input_text">搜索</span></button></div></form>
</div>
<div class="container-fluid" id="wh_topic_container">
<div class="row">
<nav class="wh_tools d-print-none navbar-expand-md" aria-label="Tools">
<div data-tooltip-position="bottom" class=" wh_breadcrumb "><ol class="d-print-none"><li><span class="home"><a href="../../../index.html"><span>主页</span></a></span></li><li><div class="topicref"><div class="title"><a href="../../../topics/sdk/advanced/lb_usage_commands.html">使用指南</a></div></div></li><li class="active"><div class="topicref" data-id="lb-usage-commands"><div class="title"><a href="../../../topics/sdk/advanced/lb_usage_commands.html">命令详解</a><div class="wh-tooltip"><p class="shortdesc"></p></div></div></div></li></ol></div>
<div class="wh_right_tools">
<button class="wh_hide_highlight" aria-label="切换搜索突出显示" title="切换搜索突出显示"></button>
<button class="webhelp_expand_collapse_sections" data-next-state="collapsed" aria-label="折叠截面" title="折叠截面"></button>
<div class=" wh_navigation_links "><span id="topic_navigation_links" class="navheader">
<span class="navprev"><a class="- topic/link link" href="../../../topics/sdk/env/compile.html" title="固件编译" aria-label="上一主题: 固件编译" rel="prev"></a></span>
<span class="navnext"><a class="- topic/link link" href="../../../topics/sdk/advanced/burn-image-add-dev-board.html" title="添加开发板" aria-label="下一主题: 添加开发板" rel="next"></a></span> </span></div>
<div class=" wh_print_link print d-none d-md-inline-block "><button onClick="window.print()" title="打印此页" aria-label="打印此页"></button></div>
<button type="button" id="wh_toc_button" class="custom-toggler navbar-toggler collapsed wh_toggle_button navbar-light" aria-expanded="false" aria-label="Toggle publishing table of content" aria-controls="wh_publication_toc">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</nav>
</div>
<div class="wh_content_area">
<div class="row">
<nav id="wh_publication_toc" class="col-lg-3 col-md-3 col-sm-12 d-md-block d-none d-print-none" aria-label="Table of Contents Container">
<div id="wh_publication_toc_content">
<div class=" wh_publication_toc " data-tooltip-position="right"><span class="expand-button-action-labels"><span id="button-expand-action" role="button" aria-label="Expand"></span><span id="button-collapse-action" role="button" aria-label="Collapse"></span><span id="button-pending-action" role="button" aria-label="Pending"></span></span><ul role="tree" aria-label="Table of Contents"><li role="treeitem"><div data-tocid="revinfo_linux-d4445e1079" class="topicref" data-id="revinfo_linux" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/revinfo/revinfo_linux.html" id="revinfo_linux-d4445e1079-link">修订记录</a></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d4445e1096" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d4445e1096-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/env/sdk-compile.html" id="id-d4445e1096-link">SDK 编译</a><div class="wh-tooltip"><p class="shortdesc">介绍不同编译环境下 SDK 的详细编译流程。</p></div></div></div></li><li role="treeitem" aria-expanded="true"><div data-tocid="tocId-d4445e1240" class="topicref" data-state="expanded"><span role="button" tabindex="0" aria-labelledby="button-collapse-action tocId-d4445e1240-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/lb_usage_commands.html" id="tocId-d4445e1240-link">使用指南</a></div></div><ul role="group" class="navbar-nav nav-list"><li role="treeitem" class="active"><div data-tocid="lb-usage-commands-d4445e1244" class="topicref" data-id="lb-usage-commands" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/lb_usage_commands.html" id="lb-usage-commands-d4445e1244-link">命令详解</a><div class="wh-tooltip"><p class="shortdesc"></p></div></div></div></li><li role="treeitem"><div data-tocid="concept_dyd_dn3_pzb-d4445e1260" class="topicref" data-id="concept_dyd_dn3_pzb" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/burn-image-add-dev-board.html" id="concept_dyd_dn3_pzb-d4445e1260-link">添加开发板</a></div></div></li><li role="treeitem"><div data-tocid="lb-delete-dev-board-Copy-d4445e1274" class="topicref" data-id="lb-delete-dev-board-Copy" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/lb-delete-dev-board.html" id="lb-delete-dev-board-Copy-d4445e1274-link">删除开发板</a></div></div></li><li role="treeitem"><div data-tocid="id-d4445e1288" class="topicref" data-id="id" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/lb_usage_add_new_package.html" id="id-d4445e1288-link">添加新应用</a></div></div></li><li role="treeitem"><div data-tocid="id-d4445e1302" class="topicref" data-id="id" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/file-system/lb_usage_autoboot.html" id="id-d4445e1302-link">开机启动</a></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="concept_ixg_ql3_pzb-d4445e1316" class="topicref" data-id="concept_ixg_ql3_pzb" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action concept_ixg_ql3_pzb-d4445e1316-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/configure-precompilation-package.html" id="concept_ixg_ql3_pzb-d4445e1316-link">配置预编译包</a></div></div></li><li role="treeitem"><div data-tocid="concept_gjb_tm3_pzb-d4445e1344" class="topicref" data-id="concept_gjb_tm3_pzb" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/lb_usage_fs_image.html" id="concept_gjb_tm3_pzb-d4445e1344-link">配置分区和镜像</a></div></div></li></ul></li><li role="treeitem" aria-expanded="false"><div data-tocid="concept_rcx_czh_pzb-d4445e1360" class="topicref" data-id="concept_rcx_czh_pzb" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action concept_rcx_czh_pzb-d4445e1360-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/chapter-app.html" id="concept_rcx_czh_pzb-d4445e1360-link">应用场景</a><div class="wh-tooltip"><p class="shortdesc">描述了 SDK 在不同应用场景中的配置和使用包括系统更新、OTA、安全方案等。</p></div></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d4445e1678" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d4445e1678-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/peripheral/peripheral-intro.html" id="id-d4445e1678-link">外设移植</a><div class="wh-tooltip"><p class="shortdesc"><span class="ph">触摸屏、显示器、WIFI 模块、按键</span>等外设的介绍和使用说明。</p></div></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d4445e1964" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d4445e1964-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/bringup/chapter-bringup.html" id="id-d4445e1964-link">BringUp</a><div class="wh-tooltip"><p class="shortdesc">在硬件上电后快速初始化系统,为操作系统的启动准备好必要的硬件环境。</p></div></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d4445e2153" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d4445e2153-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/chapter-advanced-app.html" id="id-d4445e2153-link">高级应用</a><div class="wh-tooltip"><p class="shortdesc">系统、存储、多媒体、接口、安全等模块的详细配置和设计说明。</p></div></div></div></li></ul></div>
</div>
</nav>
<div class="col-lg-7 col-md-9 col-sm-12" id="wh_topic_body">
<button id="wh_close_publication_toc_button" class="close-toc-button d-none" aria-label="Toggle publishing table of content" aria-controls="wh_publication_toc" aria-expanded="true">
<span class="close-toc-icon-container">
<span class="close-toc-icon"></span>
</span>
</button>
<button id="wh_close_topic_toc_button" class="close-toc-button d-none" aria-label="Toggle topic table of content" aria-controls="wh_topic_toc" aria-expanded="true">
<span class="close-toc-icon-container">
<span class="close-toc-icon"></span>
</span>
</button>
<div class=" wh_topic_content body "><main role="main"><article class="- topic/topic concept/concept topic concept" role="article" aria-labelledby="ariaid-title1">
<span class="edit-link" style="font-size:12px; opacity:0.6; text-align:right; vertical-align:middle"><a target="_blank" title="Edit this document" href="http://172.16.35.88/tasks/jdssno1uvvbf2mltu9kb9v3if05d5gopuakboe8hlud18rma/edit/F:/aicdita/aicdita-cn/topics/sdk/advanced/lb_usage_commands.dita">Edit online</a></span><h1 class="- topic/title title topictitle1" id="ariaid-title1">命令详解</h1>
<div class="date inPage">15 Jan 2024</div><div style="color: gray;">
Read time: 3 minute(s)
</div>
<div class="- topic/body concept/conbody body conbody"><p class="- topic/shortdesc shortdesc"></p>
<section class="- topic/section section" id="lb-usage-commands__section_mqr_mdp_fdc" data-ofbid="lb-usage-commands__section_mqr_mdp_fdc"><h2 class="- topic/title title sectiontitle">常规命令</h2>
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="lb-usage-commands__codeblock_zpf_12s_2bc" data-ofbid="lb-usage-commands__codeblock_zpf_12s_2bc"><code>make <var class="+ topic/keyword sw-d/varname keyword varname">board</var>_defconfig
make all</code></pre>
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="lb-usage-commands__codecell0" data-ofbid="lb-usage-commands__codecell0"><code>- 项目查看make list --&gt; 列出当前可用的项目配置
- 配置make d211_demo128_nand_defconfig --&gt; 应用项目配置保存目录target/configs
- 编译make --&gt; 编译,自动进行修改检测,增量编译
- 清除make clean --&gt; 清除编译生成内容
- 清除中间代码make distclean --&gt; 清除编译生成内容,以及解压的源码
</code></pre>
<div class="- topic/p p" data-ofbid="d144808e49__20250123155214">以下是执行 <span class="+ topic/keyword sw-d/cmdname keyword cmdname">make list</span>
后的输出结果示例:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="lb-usage-commands__codecell1" data-ofbid="lb-usage-commands__codecell1"><code>make list
make d211_demo128_nand_defconfig
make
</code></pre></div>
</section>
<section class="- topic/section section" id="lb-usage-commands__section_wbl_rdp_fdc" data-ofbid="lb-usage-commands__section_wbl_rdp_fdc"><h2 class="- topic/title title sectiontitle">OneStep 加速命令</h2>
<div class="- topic/p p" data-ofbid="d144808e64__20250123155214">为了方便使用并加快开发效率ArtInChip 开发了一系列的加速命令,如下所示:<div class="- topic/note note note note_note" id="lb-usage-commands__note_tzj_h1p_fdc" data-ofbid="lb-usage-commands__note_tzj_h1p_fdc"><span class="note__title">注:</span> <div class="note__body">
<p class="- topic/p p" data-ofbid="d144808e68__20250123155214">使用加速命令前需要执行 <span class="+ topic/ph sw-d/filepath ph filepath">source scripts/onestep.sh</span> 脚本。</p>
</div></div></div>
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="lb-usage-commands__codeblock_obz_rdp_fdc" data-ofbid="lb-usage-commands__codeblock_obz_rdp_fdc"><code>lunch --&gt; 应用项目配置
m --&gt; 编译项目
croot|cr --&gt; 回到 SDK 根目录
ctarget|ct --&gt; 回到 方案目录
ckernel|ck --&gt; 回到到 kernel 目录
godir|gd --&gt; 跳转目录
hmm|h --&gt; 获取帮助</code></pre>
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="lb-usage-commands__codeblock_uzc_k1p_fdc" data-ofbid="lb-usage-commands__codeblock_uzc_k1p_fdc"><code>source tools/onestep.sh --&gt; 一步直达命令
lunch d211_demo128_nand_defconfig --&gt; 选择 d211_demo128_nand_defconfig
m --&gt; 编译打包</code></pre>
</section>
<div class="- topic/example example" id="lb-usage-commands__example_wgj_tdp_fdc" data-ofbid="lb-usage-commands__example_wgj_tdp_fdc"><h2 class="- topic/title title sectiontitle"><span class="+ topic/keyword sw-d/cmdname keyword cmdname">make list</span></h2>
<div class="- topic/p p" data-ofbid="d144808e88__20250123155214">列出当前 SDK 所有可用的
<span class="+ topic/ph sw-d/filepath ph filepath">defconfig</span><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="lb-usage-commands__codeblock_qwc_wdp_fdc" data-ofbid="lb-usage-commands__codeblock_qwc_wdp_fdc"><code>Built-in configs:
d211_demo100_nand_defconfig - Build <strong class="hl-keyword">for</strong> d211_demo100_nand
d211_demo128_nand_defconfig - Build <strong class="hl-keyword">for</strong> d211_demo128_nand
d211_demo88_nand_defconfig - Build <strong class="hl-keyword">for</strong> d211_demo88_nand
d211_demo88_nor_defconfig - Build <strong class="hl-keyword">for</strong> d211_demo88_nor
d211_demo88_nor_musl_defconfig - Build <strong class="hl-keyword">for</strong> d211_demo88_nor_musl
d211_demo_defconfig - Build <strong class="hl-keyword">for</strong> d211_demo
d211_ota_defconfig - Build <strong class="hl-keyword">for</strong> d211_ota
d211_ota_emmc_defconfig - Build <strong class="hl-keyword">for</strong> d211_ota_emmc</code></pre></div>
</div>
<div class="- topic/example example" id="lb-usage-commands__example_sxg_wdp_fdc" data-ofbid="lb-usage-commands__example_sxg_wdp_fdc"><h2 class="- topic/title title sectiontitle"><span class="+ topic/keyword sw-d/cmdname keyword cmdname">make board_defconfig</span></h2>
<p class="- topic/p p" data-ofbid="d144808e103__20250123155214">应用指定的项目配置,比如 <span class="+ topic/ph sw-d/filepath ph filepath">d211_demo128_nand_defconfig</span></p>
<p class="- topic/p p" data-ofbid="d144808e109__20250123155214">默认情况下,使用 <span class="+ topic/ph sw-d/filepath ph filepath">output</span> 作为项目的工作或输出目录。 使用
<span class="+ topic/keyword sw-d/cmdname keyword cmdname">O=dir</span> 命令可以指定一个专用的工作或输出目录,例如
<span class="+ topic/keyword sw-d/cmdname keyword cmdname">make O=demo128_nand d211_demo128_nand_defconfig</span></p>
<p class="- topic/p p" data-ofbid="d144808e121__20250123155214">当指定了 <span class="+ topic/keyword sw-d/cmdname keyword cmdname">O=demo128_nand</span> ,后续所有与该项目相关的 <span class="+ topic/keyword sw-d/cmdname keyword cmdname">make</span> 操作,都需要加上
<span class="+ topic/keyword sw-d/cmdname keyword cmdname">O=demo128_nand</span> 选项。用户也可以使用 <span class="+ topic/keyword sw-d/cmdname keyword cmdname">cd demo128_nand</span>
进入该目录后进行编译操作。</p>
</div>
<div class="- topic/example example" id="lb-usage-commands__example_t1n_ydp_fdc" data-ofbid="lb-usage-commands__example_t1n_ydp_fdc"><h2 class="- topic/title title sectiontitle"><span class="+ topic/keyword sw-d/cmdname keyword cmdname">make menuconfig</span></h2>
<p class="- topic/p p" data-ofbid="d144808e143__20250123155214">用于修改项目的配置。</p>
<figure class="- topic/fig fig fignone" id="lb-usage-commands__fig_k35_d2p_fdc" data-ofbid="lb-usage-commands__fig_k35_d2p_fdc">
<br/><div class="imagecenter"><img class="- topic/image image imagecenter" id="lb-usage-commands__image_gcq_c2p_fdc" src="../../../images/sdk/luban-menuconfig.png" width="576" alt="luban-menuconfig"/></div><br/>
</figure>
<p class="- topic/p p" data-ofbid="d144808e155__20250123155214">配置完成后,保存并退出,相应的改动会同步到原有的 <span class="+ topic/ph sw-d/filepath ph filepath"><var class="+ topic/keyword sw-d/varname keyword varname">board</var>_defconfig</span>
文件中。</p>
<p class="- topic/p p" data-ofbid="d144808e163__20250123155214">通过下列命令可以修改 <span class="+ topic/ph sw-d/filepath ph filepath">uboot/linux/busybox</span> 中的配置,且保存配置后对应的修改都会同步到原有的
<span class="+ topic/ph sw-d/filepath ph filepath">defconfig</span> 文件中:</p>
<ul class="- topic/ul ul" id="lb-usage-commands__ul_hh1_f2p_fdc" data-ofbid="lb-usage-commands__ul_hh1_f2p_fdc">
<li class="- topic/li li" data-ofbid="d144808e175__20250123155214">
<p class="- topic/p p" data-ofbid="d144808e177__20250123155214"><span class="+ topic/keyword sw-d/cmdname keyword cmdname">make uboot-menuconfig</span></p>
</li>
<li class="- topic/li li" data-ofbid="d144808e182__20250123155214">
<p class="- topic/p p" data-ofbid="d144808e184__20250123155214"><span class="+ topic/keyword sw-d/cmdname keyword cmdname">make linux-menuconfig</span></p>
</li>
<li class="- topic/li li" data-ofbid="d144808e189__20250123155214">
<p class="- topic/p p" data-ofbid="d144808e191__20250123155214"><span class="+ topic/keyword sw-d/cmdname keyword cmdname">make busybox-menuconfig</span></p>
</li>
</ul>
</div>
<div class="- topic/example example" id="lb-usage-commands__example_pbx_f2p_fdc" data-ofbid="lb-usage-commands__example_pbx_f2p_fdc"><h2 class="- topic/title title sectiontitle"><span class="+ topic/keyword sw-d/cmdname keyword cmdname">make all</span></h2>
<p class="- topic/p p" data-ofbid="d144808e205__20250123155214">编译整个项目,包括 Bootloader、Kernel、应用层的 Pacakge、RootFS 以及生成最终的烧录镜像文件。</p>
<p class="- topic/p p" data-ofbid="d144808e208__20250123155214">Luban 编译框架默认使用 <span class="+ topic/keyword sw-d/cmdname keyword cmdname">make -j0</span>,即根据主机的 CPU 核心个数决定使用多少个线程进行编译,外部不需要再提供
<span class="+ topic/keyword sw-d/cmdname keyword cmdname">-j</span> 参数。</p>
<p class="- topic/p p" data-ofbid="d144808e217__20250123155214">SDK 具有源码修改检测功能,在修改了 SDK 中任意包的源码之后,执行 <span class="+ topic/keyword sw-d/cmdname keyword cmdname">make all</span> 会触发该包的
<span class="+ topic/keyword sw-d/cmdname keyword cmdname">rebuild</span>,通常是增量编译。</p>
</div>
<section class="- topic/section section" id="lb-usage-commands__section_f5y_f2p_fdc" data-ofbid="lb-usage-commands__section_f5y_f2p_fdc"><h2 class="- topic/title title sectiontitle">快捷命令</h2>
<div class="- topic/p p" data-ofbid="d144808e232__20250123155214">对于一些高频输入的命令,以下列示了简短的快捷命令映射:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="lb-usage-commands__codeblock_ohv_32p_fdc" data-ofbid="lb-usage-commands__codeblock_ohv_32p_fdc"><code>make m -&gt; make menuconfig
make k -&gt; make linux-rebuild
make km -&gt; make linux-menuconfig
make b -&gt; make uboot-rebuild
make u -&gt; make uboot-rebuild
make bm -&gt; make uboot-menuconfig
make um -&gt; make uboot-menuconfig
make f -&gt; make all</code></pre></div>
</section>
<section class="- topic/section section" id="lb-usage-commands__section_gjt_ndp_fdc" data-ofbid="lb-usage-commands__section_gjt_ndp_fdc"><h2 class="- topic/title title sectiontitle">辅助命令</h2>
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="lb-usage-commands__codeblock_lrn_4dp_fdc" data-ofbid="lb-usage-commands__codeblock_lrn_4dp_fdc"><code>make list (make l) --&gt; 列出当前可用的 &lt;board&gt;_defconfig
make menuconfig (make m) --&gt; 对 SDK 进行配置
make uboot-menuconfig (make um) --&gt; 对 U-Boot 进行配置
make linux-menuconfig (make km) --&gt; 对 Linux 内核进行配置
make busybox-menuconfig --&gt; 对 Busybox 进行配置</code></pre>
<div class="- topic/note note warning note_warning" id="lb-usage-commands__note_bwb_pdp_fdc" data-ofbid="lb-usage-commands__note_bwb_pdp_fdc"><span class="note__title">警告:</span> <div class="note__body">
<p class="- topic/p p" data-ofbid="d144808e248__20250123155214">勿在 <span class="+ topic/keyword sw-d/cmdname keyword cmdname">make</span> 命令中使用 <span class="+ topic/keyword pr-d/parmname keyword parmname">-j</span> 参数。</p>
<p class="- topic/p p" data-ofbid="d144808e257__20250123155214">Luban 在编译过程中,已经默认使用了 <span class="+ topic/keyword pr-d/parmname keyword parmname">-j0</span> 参数,即根据系统的 CPU 核心数量, 动态分配编译的线程。如果外部再提供
<span class="+ topic/keyword pr-d/parmname keyword parmname">-j</span> 参数,会导致 SDK 编译过程中出现一些高层次的目标编译 不同步的错误。</p>
</div></div>
</section>
<section class="- topic/section section" id="lb-usage-commands__section_bwc_j2p_fdc" data-ofbid="lb-usage-commands__section_bwc_j2p_fdc"><h2 class="- topic/title title sectiontitle">其他重要命令</h2>
<div class="- topic/p p" data-ofbid="d144808e273__20250123155214">
<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="lb-usage-commands__codeblock_bqt_j2p_fdc" data-ofbid="lb-usage-commands__codeblock_bqt_j2p_fdc"><code>make show-targets --&gt; 查看当前项目有哪些编译目标
make &lt;pkg&gt;-extract --&gt; 仅对源码包进行解压
make &lt;pkg&gt;-patch --&gt; 仅对源码包进行 patch如果有的话
make &lt;pkg&gt; --&gt; 完成从 extract/patch/../build/install
make &lt;pkg&gt;-reconfigure --&gt; 对该源码包重新执行配置、编译、安装
make &lt;pkg&gt;-rebuild --&gt; 对该源码包进行重新编译
make &lt;pkg&gt;-reinstall --&gt; 对该源码包进行重新安装
make &lt;pkg&gt;-prebuilt --&gt; 为该源码包生成预编译二进制压缩包
make &lt;pkg&gt;-clean --&gt; 删除该源码包的所有编译输出
make &lt;pkg&gt;-distclean --&gt; 删除该源码包的源码</code></pre>
</div>
</section>
</div>
</article></main></div>
</div>
<nav role="navigation" id="wh_topic_toc" aria-label="On this page" class="col-lg-2 d-none d-lg-block navbar d-print-none">
<div id="wh_topic_toc_content">
<div class=" wh_topic_toc "><div class="wh_topic_label">在本页上</div><ul><li class="section-item"><div class="section-title"><a href="#lb-usage-commands__section_mqr_mdp_fdc" data-tocid="lb-usage-commands__section_mqr_mdp_fdc">常规命令</a></div></li><li class="section-item"><div class="section-title"><a href="#lb-usage-commands__section_wbl_rdp_fdc" data-tocid="lb-usage-commands__section_wbl_rdp_fdc">OneStep 加速命令</a></div></li><li class="section-title"><a href="#lb-usage-commands__example_wgj_tdp_fdc" data-tocid="lb-usage-commands__example_wgj_tdp_fdc"><span class="+ topic/keyword sw-d/cmdname keyword cmdname">make list</span></a></li><li class="section-title"><a href="#lb-usage-commands__example_sxg_wdp_fdc" data-tocid="lb-usage-commands__example_sxg_wdp_fdc"><span class="+ topic/keyword sw-d/cmdname keyword cmdname">make board_defconfig</span></a></li><li class="section-title"><a href="#lb-usage-commands__example_t1n_ydp_fdc" data-tocid="lb-usage-commands__example_t1n_ydp_fdc"><span class="+ topic/keyword sw-d/cmdname keyword cmdname">make menuconfig</span></a></li><li class="section-title"><a href="#lb-usage-commands__example_pbx_f2p_fdc" data-tocid="lb-usage-commands__example_pbx_f2p_fdc"><span class="+ topic/keyword sw-d/cmdname keyword cmdname">make all</span></a></li><li class="section-item"><div class="section-title"><a href="#lb-usage-commands__section_f5y_f2p_fdc" data-tocid="lb-usage-commands__section_f5y_f2p_fdc">快捷命令</a></div></li><li class="section-item"><div class="section-title"><a href="#lb-usage-commands__section_gjt_ndp_fdc" data-tocid="lb-usage-commands__section_gjt_ndp_fdc">辅助命令</a></div></li><li class="section-item"><div class="section-title"><a href="#lb-usage-commands__section_bwc_j2p_fdc" data-tocid="lb-usage-commands__section_bwc_j2p_fdc">其他重要命令</a></div></li></ul></div>
</div>
</nav>
</div>
</div>
</div>
<footer class="navbar navbar-default wh_footer">
<div class=" footer-container mx-auto ">
<title>footer def</title>
<style><!--
.p1 {
font-family: FangZhengShuSong, Times, serif;
}
.p2 {
font-family: Arial, Helvetica, sans-serif;
}
.p3 {
font-family: "Lucida Console", "Courier New", monospace;
}
--></style>
<div class="webhelp.fragment.footer">
<p class="p1">Copyright © 2019-2024 广东匠芯创科技有限公司. All rights reserved.</p>
</div><div>
<div class="generation_time">
Update Time: 2025-01-23
</div>
</div>
</div>
</footer>
<button id="go2top" class="d-print-none" title="返回顶部">
<span class="oxy-icon oxy-icon-up"></span>
</button>
<div id="modal_img_large" class="modal">
<span class="close oxy-icon oxy-icon-remove"></span>
<div id="modal_img_container"></div>
<div id="caption"></div>
</div>
<script src="${pd}/publishing/publishing-styles-AIC-template/js/custom.js" defer="defer"></script>
</body>
</html>