mirror of
https://gitee.com/Vancouver2017/luban-lite.git
synced 2025-12-16 09:08:56 +00:00
312 lines
36 KiB
HTML
312 lines
36 KiB
HTML
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn" data-whc_version="26.1">
|
||
<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="在 Luban-Lite 系统中,分区的设置和管理是系统正常运行和日常维护的重要方面。本章节介绍 Luban-Lite 系统中分区的特点、规则和分区修改的方法。 按照存储介质的逻辑划分, Luban-Lite 默认分区包括以下几种: 启动分区 :存放 BootLoader,用于系统启动。 数据分区 :用于存储用户数据。 系统 A/B 分区 :分为 A/B 系统,实现 OTA,即 Flash ..."/><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.relation" content="../../../topics/sdk/advanced/partition_config_2.html"/><meta name="DC.relation" content="../../../topics/sdk/advanced/partition_config_2.html"/><meta name="DC.relation" content="../../../topics/sdk/advanced/partition-and-storage-relations_2.html"/><meta name="DC.contributor" content="yan.wang"/><meta name="DC.contributor" content="User"/><meta name="DC.creator" content="yan.wang"/><meta name="DC.contributor" content="yan.wang"/><meta name="DC.date.modified" content="2025-05-16"/><meta name="DC.format" content="HTML5"/><meta name="DC.identifier" content="partition-intro"/><meta name="DC.language" content="zh-CN"/><title>分区类型介绍</title><!-- Generated with build number 2025051600. --><meta name="wh-path2root" content="../../../"/><meta name="wh-toc-id" content="partition-intro-d3752e2247"/><meta name="wh-source-relpath" content="topics/sdk/advanced/partition_intro.dita"/><meta name="wh-out-relpath" content="topics/sdk/advanced/partition_intro_2.html"/>
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/commons.css?buildId=2024041900"/>
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/topic.css?buildId=2024041900"/>
|
||
|
||
<script src="../../../webhelp/app/options/properties.js?buildId=20250519091401"></script>
|
||
<script src="../../../webhelp/app/localization/strings.js?buildId=2024041900"></script>
|
||
<script src="../../../webhelp/app/search/index/keywords.js?buildId=20250519091401"></script>
|
||
<script defer="defer" src="../../../webhelp/app/commons.js?buildId=2024041900"></script>
|
||
<script defer="defer" src="../../../webhelp/app/topic.js?buildId=2024041900"></script>
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/aic-styles-web-internal.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/notes.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/aic-common.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/aic-images.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/footnote.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/aic-highlight-changes.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/search-in-header.css?buildId=2024041900"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/css/topic-body-list.css?buildId=2024041900"/></head>
|
||
|
||
<body id="partition-intro" 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 xmlns:whc="http://www.oxygenxml.com/webhelp/components" 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="https://www.artinchip.com" class=" wh_logo d-none d-sm-block "><img src="../../../company-logo.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 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>
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<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" data-id="id"><div class="title"><a href="../../../topics/sdk/bringup/chapter-bringup.html">BringUp</a><div class="wh-tooltip"><p class="shortdesc">主要描述板卡的各项配置,使 SDK 的环境和板卡匹配,并确保 SDK 编译后的固件能够在板子上正常运行。</p></div></div></div></li><li><div class="topicref" data-id="id"><div class="title"><a href="../../../topics/sdk/advanced/partition_config_2.html">配置分区</a></div></div></li><li class="active"><div class="topicref" data-id="partition-intro"><div class="title"><a href="../../../topics/sdk/advanced/partition_intro_2.html">分区类型介绍</a></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/advanced/partition_config_2.html" title="配置分区" aria-label="上一主题: 配置分区" rel="prev"></a></span>
|
||
<span class="navnext"><a class="- topic/link link" href="../../../topics/sdk/advanced/partition-and-storage-relations_2.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-d3752e463" 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_rtos.html" id="revinfo_linux-d3752e463-link">修订记录</a></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e480" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e480-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/env/sdk-compile.html" id="id-d3752e480-link">SDK 编译</a><div class="wh-tooltip"><p class="shortdesc">介绍不同编译环境下 SDK 的详细编译流程。</p></div></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e604" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e604-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/sdk-usage.html" id="id-d3752e604-link">使用指南</a><div class="wh-tooltip"><p class="shortdesc">命令详解,编译选项,镜像和分区配置,添加应用和驱动等的详细使用说明。</p></div></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="concept_rcx_czh_pzb-d3752e1004" 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-d3752e1004-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/chapter-app.html" id="concept_rcx_czh_pzb-d3752e1004-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-d3752e1848" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e1848-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/peripheral/peripheral-intro.html" id="id-d3752e1848-link">外设移植</a><div class="wh-tooltip"><p class="shortdesc"><span class="ph">CTP、U 盘、SD 卡、有线和无线网络</span>等外设的介绍和使用说明。</p></div></div></div></li><li role="treeitem" aria-expanded="true"><div data-tocid="id-d3752e2022" class="topicref" data-id="id" data-state="expanded"><span role="button" tabindex="0" aria-labelledby="button-collapse-action id-d3752e2022-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/bringup/chapter-bringup.html" id="id-d3752e2022-link">BringUp</a><div class="wh-tooltip"><p class="shortdesc">主要描述板卡的各项配置,使 SDK 的环境和板卡匹配,并确保 SDK 编译后的固件能够在板子上正常运行。</p></div></div></div><ul role="group" class="navbar-nav nav-list"><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e2039" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e2039-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/bringup/lite-bringup-prepare.html" id="id-d3752e2039-link">准备工作</a></div></div></li><li role="treeitem"><div data-tocid="id-d3752e2097" class="topicref" data-id="id" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/bringup/lite-bringup-soc.html" id="id-d3752e2097-link">引脚配置</a></div></div></li><li role="treeitem"><div data-tocid="id-d3752e2111" class="topicref" data-id="id" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/bringup/lite-bringup-ram.html" id="id-d3752e2111-link">内存配置</a></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e2125" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e2125-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/bringup/lite-bringup-storage.html" id="id-d3752e2125-link">存储配置</a></div></div></li><li role="treeitem" aria-expanded="true"><div data-tocid="id-d3752e2233" class="topicref" data-id="id" data-state="expanded"><span role="button" tabindex="0" aria-labelledby="button-collapse-action id-d3752e2233-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/partition_config_2.html" id="id-d3752e2233-link">配置分区</a></div></div><ul role="group" class="navbar-nav nav-list"><li role="treeitem" class="active"><div data-tocid="partition-intro-d3752e2247" class="topicref" data-id="partition-intro" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/partition_intro_2.html" id="partition-intro-d3752e2247-link">分区类型介绍</a></div></div></li><li role="treeitem"><div data-tocid="partition-and-storage-relations-d3752e2261" class="topicref" data-id="partition-and-storage-relations" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/advanced/partition-and-storage-relations_2.html" id="partition-and-storage-relations-d3752e2261-link">分区与存储设备的关系</a><div class="wh-tooltip"><p class="shortdesc"></p></div></div></div></li></ul></li><li role="treeitem"><div data-tocid="id-d3752e2277" class="topicref" data-id="id" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/bringup/lite-bringup-console.html" id="id-d3752e2277-link">调试配置</a></div></div></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e2291" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e2291-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/bringup/lite-bringup-display.html" id="id-d3752e2291-link">屏幕配置</a></div></div></li><li role="treeitem"><div data-tocid="id-d3752e2403" class="topicref" data-id="id" data-state="leaf"><span role="button" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/bringup/lite-bringup-samples.html" id="id-d3752e2403-link">示例程序</a></div></div></li></ul></li><li role="treeitem" aria-expanded="false"><div data-tocid="id-d3752e2418" class="topicref" data-id="id" data-state="not-ready"><span role="button" tabindex="0" aria-labelledby="button-expand-action id-d3752e2418-link" class="wh-expand-btn"></span><div class="title"><a href="../../../topics/sdk/chapter-advanced-app.html" id="id-d3752e2418-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 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://aicdocco/taskstopics/sdk/advanced/partition_intro.dita">Edit online</a></span><h1 class="- topic/title title topictitle1" id="ariaid-title1">分区类型介绍</h1>
|
||
|
||
<div class="date inPage">16 May 2025</div><div style="color: gray;">
|
||
Read time: 2 minute(s)
|
||
</div>
|
||
|
||
<div class="- topic/body body">
|
||
<p class="- topic/p p" data-ofbid="d170322e42__20250519091524">在 <span class="- topic/ph ph">Luban-Lite</span> 系统中,分区的设置和管理是系统正常运行和日常维护的重要方面。本章节介绍 <span class="- topic/ph ph">Luban-Lite</span>
|
||
系统中分区的特点、规则和分区修改的方法。</p>
|
||
<div class="- topic/p p" data-ofbid="d170322e51__20250519091524">按照存储介质的逻辑划分,<span class="- topic/ph ph">Luban-Lite</span> 默认分区包括以下几种:<ul class="- topic/ul ul" id="partition-intro__ul_xbf_12y_5cc" data-ofbid="partition-intro__ul_xbf_12y_5cc">
|
||
<li class="- topic/li li" data-ofbid="d170322e58__20250519091524"><a class="- topic/xref xref" href="partition_intro.html#partition-intro__section_k1p_zlq_gdc">启动分区</a>:存放 BootLoader,用于系统启动。</li>
|
||
<li class="- topic/li li" data-ofbid="d170322e64__20250519091524"><a class="- topic/xref xref" href="partition_intro.html#partition-intro__section_cpt_fmq_gdc">数据分区</a>:用于存储用户数据。</li>
|
||
<li class="- topic/li li" data-ofbid="d170322e70__20250519091524"><a class="- topic/xref xref" href="partition_intro.html#partition-intro__section_n5m_gmq_gdc">系统 A/B 分区</a>:分为 A/B 系统,实现 OTA,即 Flash
|
||
上保存前后两个版本的系统程序。</li>
|
||
</ul></div>
|
||
<section class="- topic/section section" id="partition-intro__section_k1p_zlq_gdc" data-ofbid="partition-intro__section_k1p_zlq_gdc"><h2 class="- topic/title title sectiontitle">启动分区</h2>
|
||
|
||
<p class="- topic/p p" data-ofbid="d170322e82__20250519091524">在 <span class="- topic/ph ph">Luban-Lite</span> 系统中,启动分区("spl" 分区)是存储介质上的第一个分区,用于存放
|
||
BootLoader,并且根据不同的存储介质类型和配置,其位置、大小和内容有所不同。</p>
|
||
<p class="- topic/p p" data-ofbid="d170322e88__20250519091524">"spl" 分区为默认名称,用户可以根据需要自定义和修改启动分区名称。</p>
|
||
<div class="- topic/p p" data-ofbid="d170322e91__20250519091524"><span class="- topic/ph ph">Luban-Lite</span> 系统中的默认分区设置如下:<div class="table-container"><table class="- topic/table table" id="partition-intro__table_jzb_dsr_x2c" data-ofbid="partition-intro__table_jzb_dsr_x2c" data-cols="4"><caption class="- topic/title title tablecap" data-caption-side="top" data-is-repeated="true"><span class="table--title-label">表<span class="table--title-label-number"> 1</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">Luban-Lite 默认启动分区设置</span></caption><colgroup><col style="width:11.560693641618498%"/><col style="width:18.381502890173408%"/><col style="width:36.1849710982659%"/><col style="width:33.872832369942195%"/></colgroup><thead class="- topic/thead thead">
|
||
<tr class="- topic/row">
|
||
<th class="- topic/entry entry colsep-0 rowsep-0" id="partition-intro__table_jzb_dsr_x2c__entry__1">启动分区</th>
|
||
<th class="- topic/entry entry colsep-0 rowsep-0" id="partition-intro__table_jzb_dsr_x2c__entry__2">位置</th>
|
||
<th class="- topic/entry entry colsep-0 rowsep-0" id="partition-intro__table_jzb_dsr_x2c__entry__3">尺寸</th>
|
||
<th class="- topic/entry entry colsep-0 rowsep-0" id="partition-intro__table_jzb_dsr_x2c__entry__4">用途及说明</th>
|
||
</tr>
|
||
</thead><tbody class="- topic/tbody tbody">
|
||
<tr class="- topic/row">
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__1">SPI NOR</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__2">0 ~ X 区间</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__3">256K</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__4">存放 BootLoader<p class="- topic/p p" data-ofbid="d170322e144__20250519091524">BROM 加载的程序可以大于 256K,但 BROM
|
||
运行时的速度较慢,不建议加载过大的程序。</p></td>
|
||
</tr>
|
||
<tr class="- topic/row">
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__1">SPI NAND</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__2">前四个物理块</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__3">
|
||
<p class="- topic/p p" data-ofbid="d170322e158__20250519091524">SPI NAND 启动分区大小取决于块大小:</p>
|
||
<ul class="- topic/ul ul" id="partition-intro__ul_wgs_gfy_5cc" data-ofbid="partition-intro__ul_wgs_gfy_5cc">
|
||
<li class="- topic/li li" data-ofbid="d170322e163__20250519091524">块大小为 128K 时,启动分区为 512K。</li>
|
||
<li class="- topic/li li" data-ofbid="d170322e166__20250519091524">块大小为 256K 时,启动分区为 1M。</li>
|
||
</ul>
|
||
</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__4">启动分区内使用四个启动块保存两份启动镜像。</td>
|
||
</tr>
|
||
<tr class="- topic/row">
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__1">eMMC</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__2">UDA 区域的 17K ~ X 区间</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__3">建议启动镜像小于 512K。</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_jzb_dsr_x2c__entry__4">BROM 从该区域读取程序。</td>
|
||
</tr>
|
||
</tbody></table></div></div>
|
||
</section>
|
||
<section class="- topic/section section" id="partition-intro__section_cpt_fmq_gdc" data-ofbid="partition-intro__section_cpt_fmq_gdc"><h2 class="- topic/title title sectiontitle">数据分区</h2>
|
||
|
||
<div class="- topic/div div section" id="partition-intro__id4">
|
||
<p class="- topic/p p" data-ofbid="d170322e201__20250519091524">在 <span class="- topic/ph ph">Luban-Lite</span> 系统中,通过对 SPI NOR/ SPI NAND Flash
|
||
进行分区可以实现数据的存储和管理,为数据的读写提供了不同的功能和性能特点。</p>
|
||
<div class="- topic/p p" data-ofbid="d170322e207__20250519091524">在 <span class="- topic/ph ph">Luban-Lite</span> 系统中,SPI NOR/ SPI NAND Flash
|
||
上设置了以下默认分区来保存数据。两个分区在设计和实现上有一些差异,用户需要了解并根据实际情况规划数据存储:<div class="table-container"><table class="- topic/table table" id="partition-intro__table_xrs_str_x2c" data-ofbid="partition-intro__table_xrs_str_x2c" data-cols="3"><caption class="- topic/title title tablecap" data-caption-side="top" data-is-repeated="true"><span class="table--title-label">表<span class="table--title-label-number"> 2</span><span class="table--title-label-punctuation">. </span></span><span class="table--title">Luban-Lite 数据分区设置</span></caption><colgroup><col style="width:12.195121951219514%"/><col style="width:39.024390243902445%"/><col style="width:48.78048780487806%"/></colgroup><thead class="- topic/thead thead">
|
||
<tr class="- topic/row">
|
||
<th class="- topic/entry entry colsep-0 rowsep-0" id="partition-intro__table_xrs_str_x2c__entry__1">分区类型</th>
|
||
<th class="- topic/entry entry colsep-0 rowsep-0" id="partition-intro__table_xrs_str_x2c__entry__2">"rodata" </th>
|
||
<th class="- topic/entry entry colsep-0 rowsep-0" id="partition-intro__table_xrs_str_x2c__entry__3">"data"</th>
|
||
</tr>
|
||
</thead><tbody class="- topic/tbody tbody">
|
||
<tr class="- topic/row">
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__1">目的</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__2">保存 APP 应用需要使用的资源文件。</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__3">提供一个可读写的文件系统分区,用于保存设备在使用过程中生成的需要写入 Flash 的数据。</td>
|
||
</tr>
|
||
<tr class="- topic/row">
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__1">文件系统</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__2">FAT 文件系统</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__3">
|
||
<ul class="- topic/ul ul" id="partition-intro__ul_wvg_zgy_5cc" data-ofbid="partition-intro__ul_wvg_zgy_5cc">
|
||
<li class="- topic/li li" data-ofbid="d170322e266__20250519091524">在 SPI NOR Flash 上,使用 LittleFS。</li>
|
||
<li class="- topic/li li" data-ofbid="d170322e269__20250519091524">在 SPI NAND Flash 上,使用 FATFS。</li>
|
||
<li class="- topic/li li" data-ofbid="d170322e272__20250519091524">在 eMMC 上,每个分区都是可读写的,默认使用 FATFS。</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="- topic/row">
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__1">读写支持</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__2">只读,不支持写入</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__3">可读写</td>
|
||
</tr>
|
||
<tr class="- topic/row">
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__1">适用场景和特点</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__2">
|
||
<p class="- topic/p p" data-ofbid="d170322e297__20250519091524">通过直接访问 Flash 的方式读取数据,可以更好的管理并快速访问 APP 应用资源。</p>
|
||
</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__3">适合存储设备运行过程中产生的临时数据或需要修改的数据。适用于需要频繁读写的场景,如用户设置、日志记录等。</td>
|
||
</tr>
|
||
<tr class="- topic/row">
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__1">备注</td>
|
||
<td class="- topic/entry entry colsep-0 rowsep-0" headers="partition-intro__table_xrs_str_x2c__entry__2 partition-intro__table_xrs_str_x2c__entry__3" colspan="2">
|
||
<div class="- topic/p p" data-ofbid="d170322e312__20250519091524">使用 SPI NOR 时,可以通过配置的方式强制使能 "rodata" 可读写,但是需要注意其中的风险:<ol class="- topic/ol ol arabic simple" id="partition-intro__ol_irn_gvw_fdc" data-ofbid="partition-intro__ol_irn_gvw_fdc">
|
||
<li class="- topic/li li" data-ofbid="d170322e316__20250519091524">
|
||
<p class="- topic/p p" data-ofbid="d170322e318__20250519091524">Flash 写入前需要先按块擦除,但是擦除和重新写入需要的时间比较长</p>
|
||
</li>
|
||
<li class="- topic/li li" data-ofbid="d170322e322__20250519091524">
|
||
<p class="- topic/p p" data-ofbid="d170322e324__20250519091524">FATFS
|
||
没有日志,不支持异地写入,因此需要原地回写,如果擦除和回写时出现掉电,会导致文件系统损坏</p>
|
||
</li>
|
||
</ol></div>
|
||
</td>
|
||
</tr>
|
||
</tbody></table></div></div>
|
||
</div>
|
||
</section>
|
||
<section class="- topic/section section" id="partition-intro__section_n5m_gmq_gdc" data-ofbid="partition-intro__section_n5m_gmq_gdc"><h2 class="- topic/title title sectiontitle">系统 A/B 分区</h2>
|
||
|
||
<div class="- topic/div div section" id="partition-intro__a-b">
|
||
<p class="- topic/p p" data-ofbid="d170322e343__20250519091524">在 <span class="- topic/ph ph">Luban-Lite</span> 系统中,A/B 系统分区是实现 Over-the-Air (OTA)
|
||
软件更新机制的一个重要部分。这种分区方式需要在 Flash 上保存前后两个版本的系统程序,并将每个版本保存在指定的分区中。 </p>
|
||
<p class="- topic/p p" data-ofbid="d170322e349__20250519091524">A/B 系统的分区命名比较直接,便于轻松识别两套软件版本,详细命名规则如下所示:</p>
|
||
<ul class="- topic/ul ul simple" id="partition-intro__ul_cmq_hvw_fdc" data-ofbid="partition-intro__ul_cmq_hvw_fdc">
|
||
<li class="- topic/li li" data-ofbid="d170322e354__20250519091524">
|
||
<p class="- topic/p p" data-ofbid="d170322e356__20250519091524">A 系统分区:直接使用其所代表的分区的名称,例如存储只读数据的 "rodata" 分区,则 A 系统分区即命名为 "rodata"。</p>
|
||
</li>
|
||
<li class="- topic/li li" data-ofbid="d170322e360__20250519091524">
|
||
<p class="- topic/p p" data-ofbid="d170322e362__20250519091524">B 系统分区:在对应的 A 系统分区名后加上 <span class="+ topic/ph sw-d/filepath ph filepath">_r</span> 后缀,例如
|
||
<span class="+ topic/ph sw-d/filepath ph filepath">rodata_r</span>。</p>
|
||
</li>
|
||
</ul>
|
||
<p class="- topic/p p" data-ofbid="d170322e373__20250519091524">使用专门的 A/B 分区机制,可以最大化资源使用、实现备份,并且提前配置所需软件更新的存储空间,而不影响系统的运行性能。</p>
|
||
</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="#partition-intro__section_k1p_zlq_gdc" data-tocid="partition-intro__section_k1p_zlq_gdc">启动分区</a></div></li><li class="section-item"><div class="section-title"><a href="#partition-intro__section_cpt_fmq_gdc" data-tocid="partition-intro__section_cpt_fmq_gdc">数据分区</a></div></li><li class="section-item"><div class="section-title"><a href="#partition-intro__section_n5m_gmq_gdc" data-tocid="partition-intro__section_n5m_gmq_gdc">系统 A/B 分区</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-2025 广东匠芯创科技有限公司. All rights reserved.</p>
|
||
</div>
|
||
<div>
|
||
<div class="generation_time">
|
||
Update Time: 2025-05-19
|
||
</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> |