mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-14 10:28:54 +00:00
352 lines
33 KiB
HTML
352 lines
33 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="存储配置是编译的固件是否可刷机的关键步骤,但存储的更换要修改的地方较多,建议按照现有工程仿写需要 Bringup 的开发板。 SPI NAND 存储配置 SPI NAND 存储配置步骤如下: 配置 U-Boot 以支持特定的 SPI NAND 型号,确认开发板的型号被选中支持。 注: kernel 分区比较大,默认打开了 SDK 支持的所有型号,不用选择。 查看 ..."/><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="DC.contributor" content="yan.wang"/><meta name="DC.date.modified" content="2024-12-18"/><meta name="DC.format" content="HTML5"/><meta name="DC.identifier" content="bringup_memoryConfiguration"/><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/bringup/bringup-memory-config.dita"/><meta name="wh-out-relpath" content="topics/sdk/bringup/bringup-memory-config.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="bringup_memoryConfiguration" 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 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" href="http://172.16.35.88/tasks/jdssno1uvvbf2mltu9kb9v3if05d5gopuakboe8hlud18rma/edit/F:/aicdita/aicdita-cn/topics/sdk/bringup/bringup-memory-config.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: 7 minute(s)
|
||
</div><div class="- topic/body concept/conbody body conbody"><p class="- topic/p p" data-ofbid="d131699e17__20250121171606">存储配置是编译的固件是否可刷机的关键步骤,但存储的更换要修改的地方较多,建议按照现有工程仿写需要 Bringup 的开发板。</p><section class="- topic/section section" id="bringup_memoryConfiguration__section_e13_k2x_gdc" data-ofbid="bringup_memoryConfiguration__section_e13_k2x_gdc"><h2 class="- topic/title title sectiontitle">SPI NAND 存储配置</h2>
|
||
|
||
<div class="- topic/p p" data-ofbid="d131699e24__20250121171606">SPI NAND 存储配置步骤如下:<ol class="- topic/ol ol" id="bringup_memoryConfiguration__ol_mcl_q5b_d1c" data-ofbid="bringup_memoryConfiguration__ol_mcl_q5b_d1c"><li class="- topic/li li" data-ofbid="d131699e27__20250121171606">配置 U-Boot 以支持特定的 SPI NAND 型号,确认开发板的型号被选中支持。<div class="- topic/note note note note_note" id="bringup_memoryConfiguration__note_rtq_4sx_sdc" data-ofbid="bringup_memoryConfiguration__note_rtq_4sx_sdc"><span class="note__title">注:</span>
|
||
<p class="- topic/p p" data-ofbid="d131699e31__20250121171606">kernel 分区比较大,默认打开了 SDK 支持的所有型号,不用选择。</p>
|
||
</div><ol class="- topic/ol ol" type="a" id="bringup_memoryConfiguration__ul_dcp_x5b_d1c" data-ofbid="bringup_memoryConfiguration__ul_dcp_x5b_d1c"><li class="- topic/li li" data-ofbid="d131699e35__20250121171606">
|
||
<p class="- topic/p p" id="bringup_memoryConfiguration__p_ejw_gzx_sdc" data-ofbid="bringup_memoryConfiguration__p_ejw_gzx_sdc">查看 <span class="+ topic/ph sw-d/filepath ph filepath">drivers/mtd/nand/spi/</span>
|
||
源码目录,确认 SPI NAND 器件的厂商是否在支持列表中。</p>
|
||
<p class="- topic/p p" data-ofbid="d131699e43__20250121171606">例如,查看源码目录中是否存在 <span class="+ topic/ph sw-d/filepath ph filepath">winbond.c</span>
|
||
。如果不存在,则需要添加新厂商支持,详情可查看 <a xml:lang="zh-CN" lang="zh-CN" class="- topic/xref xref" href="../spinand/spi-nand-transplant-guide.html">SPI NAND 移植</a>。</p>
|
||
<p class="- topic/p p" data-ofbid="d131699e53__20250121171606">SDK 默认支持了几种 SPI NAND,编译之前需要确认开发板的 SPI NAND 型号被选中支持,详情可查看 <a xml:lang="zh-CN" lang="zh-CN" class="- topic/xref xref" href="../boot/spi-nand-drivers.html">SPI NAND</a>。</p>
|
||
</li><li class="- topic/li li" data-ofbid="d131699e60__20250121171606">
|
||
<div class="- topic/p p" data-ofbid="d131699e62__20250121171606">执行下列命令进入 U-Boot
|
||
配置界面:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="bringup_memoryConfiguration__codeblock_lz1_ysx_sdc" data-ofbid="bringup_memoryConfiguration__codeblock_lz1_ysx_sdc">make um</pre></div>
|
||
</li><li class="- topic/li li" data-ofbid="d131699e67__20250121171606">
|
||
<div class="- topic/p p" data-ofbid="d131699e69__20250121171606">选择 <span class="+ topic/ph ui-d/menucascade ph menucascade"><span class="+ topic/ph ui-d/uicontrol ph uicontrol">Device Drivers</span><abbr> > </abbr><span class="+ topic/ph ui-d/uicontrol ph uicontrol">MTD Support</span></span>,配置下列信息:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="bringup_memoryConfiguration__codeblock_tqy_z5b_d1c" data-ofbid="bringup_memoryConfiguration__codeblock_tqy_z5b_d1c">(<span class="hl-number">0x240000</span>) Offset of bbt in nand
|
||
(<span class="hl-number">0x40000</span>) Range of bbt in nand
|
||
[*] Define U-boot binaries locations in SPI NAND
|
||
(<span class="hl-number">0x100000</span>) Location in SPI NAND to read U-Boot from
|
||
[ ] Support Micron SPI NAND
|
||
[ ] Support Macronix SPI NAND
|
||
[*] Support Winbond SPI NAND
|
||
[ ] Support Winbond SPI NAND CONTINUOUS READ MODE
|
||
[*] Support GigaDevice SPI NAND
|
||
[ ] Support Toshiba SPI NAND
|
||
[*] Support FudanMicro SPI NAND
|
||
[*] Support Foresee SPI NAND
|
||
[*] Support Zbit SPI NAND
|
||
[ ] Support Elite SPI NAND
|
||
[ ] Support ESMT SPI NAND
|
||
[ ] Support UMTEK SPI NAND
|
||
SPI Flash Support --->
|
||
UBI support ---></pre></div>
|
||
<p class="- topic/p p" data-ofbid="d131699e80__20250121171606">U-Boot 和 SPL 分区一般都比较小,如果开启的 SPI NAND
|
||
型号过多,存储容易越界,建议仅打开需要使用的型号。</p>
|
||
</li></ol></li><li class="- topic/li li" data-ofbid="d131699e83__20250121171606">配置文件系统。<div class="- topic/p p" data-ofbid="d131699e85__20250121171606">
|
||
<div class="- topic/div div">
|
||
<p class="- topic/p p" data-ofbid="d131699e89__20250121171606">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="d131699e100__20250121171606">如果 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="bringup_memoryConfiguration__codeblock_spinand_page_size" data-ofbid="bringup_memoryConfiguration__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>
|
||
</div></li><li class="- topic/li li" data-ofbid="d131699e119__20250121171606">
|
||
<div class="- topic/div div">
|
||
<p class="- topic/p p" data-ofbid="d131699e123__20250121171606">配置分区</p>
|
||
<div class="- topic/p p" id="bringup_memoryConfiguration__p_nq5_3dy_sdc" data-ofbid="bringup_memoryConfiguration__p_nq5_3dy_sdc">在 <span class="+ topic/ph sw-d/filepath ph filepath">target/d211/demo128_nand/image_cfg.json</span>
|
||
文件中配置分区信息:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="bringup_memoryConfiguration__codeblock_zd4_fvb_d1c" data-ofbid="bringup_memoryConfiguration__codeblock_zd4_fvb_d1c"><span class="hl-string">"spi-nand"</span>: { <em class="hl-comment">// Device, The name should be the same with string in image:info:media:type</em>
|
||
<span class="hl-string">"size"</span>: <span class="hl-string">"128m"</span>, <em class="hl-comment">// Size of SPI NAND</em>
|
||
<span class="hl-string">"partitions"</span>: {
|
||
<span class="hl-string">"spl"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"1m"</span> },
|
||
<span class="hl-string">"uboot"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"1m"</span> },
|
||
<span class="hl-string">"userid"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"256k"</span> },
|
||
<span class="hl-string">"bbt"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"256k"</span> },
|
||
<span class="hl-string">"env"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"256k"</span> },
|
||
<span class="hl-string">"env_r"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"256k"</span> },
|
||
<span class="hl-string">"falcon"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"256k"</span> },
|
||
<span class="hl-string">"logo"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"768K"</span> },
|
||
<span class="hl-string">"kernel"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"12m"</span> },
|
||
<span class="hl-string">"recovery"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"10m"</span> },
|
||
<span class="hl-string">"ubiroot"</span>: {
|
||
<span class="hl-string">"size"</span>: <span class="hl-string">"32m"</span>, <em class="hl-comment">//分区大小为 32m</em>
|
||
<span class="hl-string">"ubi"</span>: { <em class="hl-comment">// Volume in UBI device</em>
|
||
<span class="hl-string">"rootfs"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"-"</span> },
|
||
},
|
||
},
|
||
<span class="hl-string">"ubisystem"</span>: {
|
||
<span class="hl-string">"size"</span>: <span class="hl-string">"-"</span>,
|
||
<span class="hl-string">"ubi"</span>: { <em class="hl-comment">// Volume in UBI device</em>
|
||
<span class="hl-string">"ota"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"48m"</span> },
|
||
<span class="hl-string">"user"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"-"</span> },
|
||
},
|
||
},
|
||
}
|
||
},</pre></div>
|
||
</div>
|
||
</li><li class="- topic/li li" data-ofbid="d131699e135__20250121171606">调整固件大小。<div class="- topic/p p" data-ofbid="d131699e137__20250121171606">固件的大小要和分区大小相匹配,可以自动适配也可以手工调整:<ul class="- topic/ul ul" id="bringup_memoryConfiguration__ul_dh1_12x_gdc" data-ofbid="bringup_memoryConfiguration__ul_dh1_12x_gdc"><li class="- topic/li li" data-ofbid="d131699e140__20250121171606">自动适配。<ol class="- topic/ol ol" type="a" id="bringup_memoryConfiguration__ol_e1w_3dt_sdc" data-ofbid="bringup_memoryConfiguration__ol_e1w_3dt_sdc"><li class="- topic/li li" data-ofbid="d131699e143__20250121171606">
|
||
<div class="- topic/p p" data-ofbid="d131699e145__20250121171606">在 SDK 根目录下执行下列命令,进入 menuconfig
|
||
的功能配置界面:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="bringup_memoryConfiguration__codeblock_lbx_z5s_sdc" data-ofbid="bringup_memoryConfiguration__codeblock_lbx_z5s_sdc">make menuconfig</pre></div>
|
||
</li><li class="- topic/li li" data-ofbid="d131699e150__20250121171606">
|
||
<div class="- topic/p p" data-ofbid="d131699e152__20250121171606">在 <span class="+ topic/ph ui-d/uicontrol ph uicontrol">Filesystem images</span>
|
||
配置界面,按如下选择:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="bringup_memoryConfiguration__codeblock_idf_22x_gdc" data-ofbid="bringup_memoryConfiguration__codeblock_idf_22x_gdc">RootFS images --->
|
||
[ ] UserFS <span class="hl-number">1</span> ----
|
||
[ ] UserFS <span class="hl-number">2</span> ----
|
||
[ ] UserFS <span class="hl-number">3</span> ----
|
||
[ ] Generate burner format image
|
||
[*] Auto calculate partition size to generate image <em class="hl-comment">//通过分区大小自动生成固件</em></pre></div>
|
||
</li></ol></li><li class="- topic/li li" data-ofbid="d131699e160__20250121171606">手工调整。<ol class="- topic/ol ol" type="a" id="bringup_memoryConfiguration__ol_fhx_ldt_sdc" data-ofbid="bringup_memoryConfiguration__ol_fhx_ldt_sdc"><li class="- topic/li li" data-ofbid="d131699e163__20250121171606">
|
||
<div class="- topic/p p" data-ofbid="d131699e165__20250121171606">在 SDK 根目录下执行下列命令,进入 menuconfig
|
||
的功能配置界面:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="bringup_memoryConfiguration__d790e56" data-ofbid="bringup_memoryConfiguration__d790e56">make menuconfig</pre></div>
|
||
</li><li class="- topic/li li" data-ofbid="d131699e170__20250121171606">在 <span class="+ topic/ph ui-d/menucascade ph menucascade"><span class="+ topic/ph ui-d/uicontrol ph uicontrol">Filesystem images</span><abbr> > </abbr><span class="+ topic/ph ui-d/uicontrol ph uicontrol">RootFS images</span></span>
|
||
界面,配置下列信息:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="bringup_memoryConfiguration__codeblock_tf3_h2x_gdc" data-ofbid="bringup_memoryConfiguration__codeblock_tf3_h2x_gdc">[ ] ext2/<span class="hl-number">3</span>/<span class="hl-number">4</span> root filesystem
|
||
[ ] cpio the root filesystem (<strong class="hl-keyword">for</strong> use as an initial RAM filesystem)
|
||
[ ] initial RAM filesystem linked into linux kernel
|
||
[ ] jffs2 root filesystem
|
||
[ ] squashfs root filesystem
|
||
[ ] tar the root filesystem
|
||
ubi parameter select (spi-nand all type support) --->
|
||
[*] ubi image containing an ubifs root filesystem
|
||
[ ] Use custom config file
|
||
() Additional ubinize options
|
||
-*- ubifs root filesystem
|
||
(<span class="hl-number">0x2000000</span>) ubifs size(Should be aligned to MB) <em class="hl-comment">//固件大小,32M</em>
|
||
ubifs runtime compression (lzo) --->
|
||
Compression method (no compression) --->
|
||
(-F) Additional mkfs.ubifs options</pre></li></ol></li></ul></div></li></ol></div>
|
||
</section><section class="- topic/section section" id="bringup_memoryConfiguration__section_bl5_l2x_gdc" data-ofbid="bringup_memoryConfiguration__section_bl5_l2x_gdc"><h2 class="- topic/title title sectiontitle">SPI NOR 存储配置</h2>
|
||
|
||
<div class="- topic/div div">
|
||
<p class="- topic/p p" data-ofbid="d131699e188__20250121171606">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="d131699e197__20250121171606">系统输出示例如下:<pre class="+ topic/pre sw-d/msgblock pre msgblock" id="bringup_memoryConfiguration__msgblock_mlx_jbl_jdc" data-ofbid="bringup_memoryConfiguration__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="d131699e202__20250121171606">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="bringup_memoryConfiguration__codeblock_zqz_lvb_d1c" data-ofbid="bringup_memoryConfiguration__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>
|
||
<p class="- topic/p p" data-ofbid="d131699e211__20250121171606">SPI NOR 存储一般比较小,在 Linux 系统上进行分区调整比较麻烦,本节不详细描述。</p>
|
||
</section><section class="- topic/section section" id="bringup_memoryConfiguration__section_ylq_52x_gdc" data-ofbid="bringup_memoryConfiguration__section_ylq_52x_gdc"><h2 class="- topic/title title sectiontitle">EMMC 存储配置</h2>
|
||
|
||
<div class="- topic/div div">
|
||
<p class="- topic/p p" data-ofbid="d131699e221__20250121171606">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="d131699e227__20250121171606">系统输出示例如下:<pre class="+ topic/pre sw-d/msgblock pre msgblock" id="bringup_memoryConfiguration__msgblock_lc1_lbl_jdc" data-ofbid="bringup_memoryConfiguration__msgblock_lc1_lbl_jdc">Image file is generated: /xxx/d211/luban/output/d211_demo/images/d211_demo_v1.0.0.img</pre></div>
|
||
</div>
|
||
<div class="- topic/p p" data-ofbid="d131699e233__20250121171606">EMMC 的接口协议固定,因此不需要进行新器件型号的移植。<div class="- topic/note note note note_note" id="bringup_memoryConfiguration__note_axw_w2x_gdc" data-ofbid="bringup_memoryConfiguration__note_axw_w2x_gdc"><span class="note__title">注:</span> 调整分区大小时,也需要同时调整固件的大小来和分区匹配。</div></div>
|
||
<div class="- topic/p p" data-ofbid="d131699e238__20250121171606">EMMC 存储配置步骤如下:<ol class="- topic/ol ol" id="bringup_memoryConfiguration__ol_imq_mvb_d1c" data-ofbid="bringup_memoryConfiguration__ol_imq_mvb_d1c"><li class="- topic/li li" data-ofbid="d131699e241__20250121171606"><strong class="+ topic/ph hi-d/b ph b"> 分区</strong><div class="- topic/p p" data-ofbid="d131699e244__20250121171606">分区信息在 <span class="+ topic/ph sw-d/filepath ph filepath">target/d211/demo/image_cfg.json</span>
|
||
中<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="bringup_memoryConfiguration__codeblock_ymv_4vb_d1c" data-ofbid="bringup_memoryConfiguration__codeblock_ymv_4vb_d1c"><span class="hl-string">"mmc"</span>: { <em class="hl-comment">// Media type</em>
|
||
<span class="hl-string">"size"</span>: <span class="hl-string">"4G"</span>, <em class="hl-comment">// Size of SD/eMMC</em>
|
||
<span class="hl-string">"partitions"</span>: { <em class="hl-comment">// Partition table apply to device</em>
|
||
<span class="hl-string">"spl"</span>: { <span class="hl-string">"offset"</span>: <span class="hl-string">"0x4400"</span>, <span class="hl-string">"size"</span>: <span class="hl-string">"495k"</span> },
|
||
<span class="hl-string">"uboot"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"1m"</span> },
|
||
<span class="hl-string">"env"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"256k"</span> },
|
||
<span class="hl-string">"falcon"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"256k"</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">"16m"</span> },
|
||
<span class="hl-string">"rootfs"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"72m"</span> }, <em class="hl-comment">//分区大小为 72M</em>
|
||
<span class="hl-string">"user"</span>: { <span class="hl-string">"size"</span>: <span class="hl-string">"-"</span> },
|
||
},
|
||
},</pre></div></li><li class="- topic/li li" data-ofbid="d131699e251__20250121171606"><strong class="+ topic/ph hi-d/b ph b">固件</strong><p class="- topic/p p" data-ofbid="d131699e254__20250121171606">执行 <span class="+ topic/keyword sw-d/cmdname keyword cmdname">make menuconfig</span> 命令,进入 menuconfig 界面,并选择 <span class="+ topic/ph ui-d/menucascade ph menucascade"><span class="+ topic/ph ui-d/uicontrol ph uicontrol">Filesystem images</span><abbr> > </abbr><span class="+ topic/ph ui-d/uicontrol ph uicontrol">RootFS images</span></span>
|
||
调整。</p><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="bringup_memoryConfiguration__codeblock_yqs_qvb_d1c" data-ofbid="bringup_memoryConfiguration__codeblock_yqs_qvb_d1c">[*] ext2/<span class="hl-number">3</span>/<span class="hl-number">4</span> root filesystem
|
||
ext2/<span class="hl-number">3</span>/<span class="hl-number">4</span> variant (ext4) --->
|
||
(rootfs) filesystem label
|
||
(<span class="hl-number">72</span>M) exact size <em class="hl-comment">//固件大小为 72M</em>
|
||
(<span class="hl-number">0</span>) exact number of inodes (leave at <span class="hl-number">0</span> <strong class="hl-keyword">for</strong> <strong class="hl-keyword">auto</strong> calculation)
|
||
(<span class="hl-number">5</span>) reserved blocks percentage
|
||
(-O ^<span class="hl-number">64</span>bit) additional mke2fs options
|
||
Compression method (no compression) --->
|
||
[ ] cpio the root filesystem (<strong class="hl-keyword">for</strong> use as an initial RAM filesystem)
|
||
[ ] initial RAM filesystem linked into linux kernel</pre></li></ol></div>
|
||
<p class="- topic/p p" data-ofbid="d131699e268__20250121171606">正确的存储配置应该能够成功支持固件烧录。</p>
|
||
</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="#bringup_memoryConfiguration__section_e13_k2x_gdc" data-tocid="bringup_memoryConfiguration__section_e13_k2x_gdc">SPI NAND 存储配置</a></div></li><li class="section-item"><div class="section-title"><a href="#bringup_memoryConfiguration__section_bl5_l2x_gdc" data-tocid="bringup_memoryConfiguration__section_bl5_l2x_gdc">SPI NOR 存储配置</a></div></li><li class="section-item"><div class="section-title"><a href="#bringup_memoryConfiguration__section_ylq_52x_gdc" data-tocid="bringup_memoryConfiguration__section_ylq_52x_gdc">EMMC 存储配置</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> |