mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-14 10:28:54 +00:00
242 lines
18 KiB
HTML
242 lines
18 KiB
HTML
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn" data-whc_version="26.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="description" content="本节介绍了编译固件的常规流程。在开始编译固件之前,确保编译环境已经搭建完成。关于操作系统和依赖的详细安装说明,可查看 Ubuntu 和 VMWare 安装 。 项目配置与编译 选择以下任意一种编译和配置命令方式,对项目进行配置和编译: ,例如: make list make d211_demo128_nand_defconfig make OneStep 快捷命令 ,例如: source ..."/><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="topic"/><meta name="DC.contributor" content="yan.wang"/><meta name="DC.creator" content="yan.wang"/><meta name="DC.date.created" content="2024-10-31"/><meta name="DC.date.modified" content="2024-12-18"/><meta name="DC.format" content="HTML5"/><meta name="DC.identifier" content="compile"/><meta name="DC.language" content="zh-CN"/><title>固件编译</title><!-- Build number 2023110923. --><meta name="wh-path2root" content="../../../"/><meta name="wh-toc-id" content=""/><meta name="wh-source-relpath" content="topics/sdk/env/compile.dita"/><meta name="wh-out-relpath" content="topics/sdk/env/compile.html"/>
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/commons.css?buildId=2023110923"/>
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/topic.css?buildId=2023110923"/>
|
||
|
||
<script src="../../../webhelp/app/options/properties.js?buildId=20250121171154"></script>
|
||
<script src="../../../webhelp/app/localization/strings.js?buildId=2023110923"></script>
|
||
<script src="../../../webhelp/app/search/index/keywords.js?buildId=20250121171154"></script>
|
||
<script defer="defer" src="../../../webhelp/app/commons.js?buildId=2023110923"></script>
|
||
<script defer="defer" src="../../../webhelp/app/topic.js?buildId=2023110923"></script>
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-styles-web.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/notes.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-common.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-images.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/footnote.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-web-watermark.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/topic-body-list.css?buildId=2023110923"/></head>
|
||
|
||
<body id="compile" 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="RTOS SDK 使用指南SDK 指南文件"/></a>
|
||
<div class=" wh_publication_title "><a href="../../../index.html"><span class="booktitle"><span class="ph mainbooktitle">RTOS 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 "></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_print_link print d-none d-md-inline-block "><button onClick="window.print()" title="打印此页" aria-label="打印此页"></button></div>
|
||
|
||
|
||
</div>
|
||
|
||
</nav>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div class="wh_content_area">
|
||
<div class="row">
|
||
|
||
|
||
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-12" id="wh_topic_body">
|
||
|
||
<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 topic" 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" href="http://172.16.35.88/tasks/jdssno1uvvbf2mltu9kb9v3if05d5gopuakboe8hlud18rma/edit/F:/aicdita/aicdita-cn/topics/sdk/env/compile.dita">Edit online</a></span><h1 class="- topic/title title topictitle1" id="ariaid-title1">固件编译</h1><div class="date inPage">18 Dec 2024</div><div style="color: gray;">
|
||
Read time: 2 minute(s)
|
||
</div><div class="- topic/body body"><p class="- topic/p p" data-ofbid="d145089e25__20250121171610">本节介绍了编译固件的常规流程。在开始编译固件之前,确保编译环境已经搭建完成。关于操作系统和依赖的详细安装说明,可查看<a class="- topic/xref xref" href="ubuntu2004.html">Ubuntu</a> 和
|
||
<a class="- topic/xref xref" href="vmware.html" title="如需在虚拟机上进行 Luban-Lite 的开发工作,可以参考本节的安装说明。">VMWare 安装</a>。</p><section class="- topic/section section" id="compile__section_ayk_smt_qdc" data-ofbid="compile__section_ayk_smt_qdc"><h2 class="- topic/title title sectiontitle">项目配置与编译</h2>
|
||
|
||
<div class="- topic/p p" data-ofbid="d145089e46__20250121171610">选择以下任意一种编译和配置命令方式,对项目进行配置和编译:<ul class="- topic/ul ul" id="compile__ul_fqf_c1l_jdc" data-ofbid="compile__ul_fqf_c1l_jdc"><li class="- topic/li li" data-ofbid="d145089e49__20250121171610">
|
||
<div class="- topic/p p" data-ofbid="d145089e51__20250121171610">,例如:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="compile__codecell1" data-ofbid="compile__codecell1">make list
|
||
make d211_demo128_nand_defconfig
|
||
make</pre></div>
|
||
</li><li class="- topic/li li" data-ofbid="d145089e56__20250121171610">
|
||
<div class="- topic/p p" data-ofbid="d145089e58__20250121171610"><a class="- topic/xref xref" href="../advanced/onestep_command_ref.html">OneStep
|
||
快捷命令</a>,例如:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="compile__codeblock_uzc_k1p_fdc" data-ofbid="compile__codeblock_uzc_k1p_fdc">source tools/onestep.sh --> 一步直达命令
|
||
lunch d211_demo128_nand_defconfig --> 选择 d211_demo128_nand_defconfig
|
||
m --> 编译打包</pre></div>
|
||
</li></ul></div>
|
||
</section><section class="- topic/section section" id="compile__section_sqc_tmt_qdc" data-ofbid="compile__section_sqc_tmt_qdc"><h2 class="- topic/title title sectiontitle">生成固件</h2>
|
||
|
||
<div class="- topic/p p" data-ofbid="d145089e72__20250121171610">对于不同的存储介质,生成的固件名称和路径会有所不同:<ul class="- topic/ul ul" id="compile__ul_pgv_k1l_jdc" data-ofbid="compile__ul_pgv_k1l_jdc"><li class="- topic/li li" data-ofbid="d145089e75__20250121171610">
|
||
<div class="- topic/div div">
|
||
<p class="- topic/p p" data-ofbid="d145089e79__20250121171610">EMMC 采用 squashfs 文件系统。如果开发板使用的存储介质为 eMMC (eNand),以 demo 工程为例,则编译后的固件名称为
|
||
<span class="+ topic/ph sw-d/filepath ph filepath">d211_demo_v1.0.0.img</span>。</p>
|
||
<div class="- topic/p p" data-ofbid="d145089e85__20250121171610">系统输出示例如下:<pre class="+ topic/pre sw-d/msgblock pre msgblock" id="compile__msgblock_lc1_lbl_jdc" data-ofbid="compile__msgblock_lc1_lbl_jdc">Image file is generated: /xxx/d211/luban/output/d211_demo/images/d211_demo_v1.0.0.img</pre></div>
|
||
</div>
|
||
</li><li class="- topic/li li" data-ofbid="d145089e91__20250121171610">
|
||
<div class="- topic/div div">
|
||
<p class="- topic/p p" data-ofbid="d145089e95__20250121171610">SPI NAND 采用 UBIFS 文件系统。 如果开发板使用的存储介质为 SPINAND,以 <span class="+ topic/ph sw-d/filepath ph filepath">demo128_nand</span>
|
||
工程为例,则编译后会生成固件的名称
|
||
<span class="+ topic/ph sw-d/filepath ph filepath">d211_demo128_nand_page_2k_block_128k_v1.0.0</span>。</p>
|
||
|
||
<div class="- topic/p p" data-ofbid="d145089e106__20250121171610">如果 SPI NAND 的 <span class="+ topic/keyword pr-d/parmname keyword parmname">page</span> 尺寸为 4K 大小,可在
|
||
<span class="+ topic/ph sw-d/filepath ph filepath">target/d211/xxx/image_cfg.json</span> 文件中配置
|
||
<span class="+ topic/keyword pr-d/parmname keyword parmname">page</span> 尺寸,编译后的文件为
|
||
<span class="+ topic/ph sw-d/filepath ph filepath">d211_xxx_page_4k_block_256k_v1.0.0.img</span>:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="compile__codeblock_spinand_page_size" data-ofbid="compile__codeblock_spinand_page_size"><span class="hl-string">"info"</span>: { <em class="hl-comment">// Header information about image</em>
|
||
<span class="hl-string">"platform"</span>: <span class="hl-string">"d211"</span>,
|
||
<span class="hl-string">"product"</span>: <span class="hl-string">"demo128_nand"</span>,
|
||
<span class="hl-string">"version"</span>: <span class="hl-string">"1.0.0"</span>,
|
||
<span class="hl-string">"media"</span>: {
|
||
<span class="hl-string">"type"</span>: <span class="hl-string">"spi-nand"</span>,
|
||
<span class="hl-string">"device_id"</span>: <span class="hl-number">0</span>,
|
||
<span class="hl-string">"array_organization"</span>: [
|
||
{ <span class="hl-string">"page"</span>: <span class="hl-string">"2k"</span>, <span class="hl-string">"block"</span>: <span class="hl-string">"128k"</span>, <span class="hl-string">"oob"</span>: <span class="hl-string">"64"</span> },
|
||
<em class="hl-comment">// { "page": "4k", "block": "256k", "oob": "128" },</em>
|
||
],
|
||
}
|
||
},</pre></div>
|
||
</div>
|
||
</li><li class="- topic/li li" data-ofbid="d145089e125__20250121171610">
|
||
<div class="- topic/div div">
|
||
<p class="- topic/p p" data-ofbid="d145089e129__20250121171610">SPI NOR 采用 squashfs 文件系统。如果开发板使用的存储介质为 SPI NOR,以 <span class="+ topic/ph sw-d/filepath ph filepath">demo88_nor</span>
|
||
工程为例,则编译后会生成固件的名称为 <span class="+ topic/ph sw-d/filepath ph filepath">d211_demo88_nor_v1.0.0.img</span>。</p>
|
||
<div class="- topic/p p" data-ofbid="d145089e138__20250121171610">系统输出示例如下:<pre class="+ topic/pre sw-d/msgblock pre msgblock" id="compile__msgblock_mlx_jbl_jdc" data-ofbid="compile__msgblock_mlx_jbl_jdc">Image file is generated: /xxx/d211/develop/output/d211_demo88_nor/images/d211_demo88_nor_v1.0.0.img</pre></div>
|
||
<div class="- topic/p p" data-ofbid="d145089e143__20250121171610">SPINOR 的分区信息在 <span class="+ topic/ph sw-d/filepath ph filepath">target/d211/per2_spinor/image_cfg.json</span>
|
||
中:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="compile__codeblock_zqz_lvb_d1c" data-ofbid="compile__codeblock_zqz_lvb_d1c"><span class="hl-string">"spi-nor"</span>: { <em class="hl-comment">// Media type</em>
|
||
<span class="hl-string">"size"</span>: <span class="hl-string">"16m"</span>, <em class="hl-comment">// Size of NOR</em>
|
||
<span class="hl-string">"partitions"</span>: {
|
||
<span class="hl-string">"spl"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"256k"</span> },
|
||
<span class="hl-string">"uboot"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"640k"</span> },
|
||
<span class="hl-string">"userid"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"64k"</span> },
|
||
<span class="hl-string">"env"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"64k"</span> },
|
||
<span class="hl-string">"env_r"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"64k"</span> },
|
||
<span class="hl-string">"falcon"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"64k"</span> },
|
||
<span class="hl-string">"logo"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"512k"</span> },
|
||
<span class="hl-string">"kernel"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"5m"</span> },
|
||
<span class="hl-string">"rootfs"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"9m"</span> },
|
||
<em class="hl-comment">// "user": { "size": "-" },</em>
|
||
}
|
||
}</pre></div>
|
||
</div>
|
||
</li></ul></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="#compile__section_ayk_smt_qdc" data-tocid="compile__section_ayk_smt_qdc">项目配置与编译</a></div></li><li class="section-item"><div class="section-title"><a href="#compile__section_sqc_tmt_qdc" data-tocid="compile__section_sqc_tmt_qdc">生成固件</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-21
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
<div id="go2top" class="d-print-none">
|
||
<span class="oxy-icon oxy-icon-up"></span>
|
||
</div>
|
||
|
||
<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> |