2025-09-30 11:56:06 +08:00
<!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 = "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 = "图 1 . Luban SDK 根目录 Luban SDK 中有以下重要的文件和目录,其分类和功能如下所述。 Luban ├── dl --> 第三方源码的压缩包保存目录 ├── output --> 默认的编译输出目录 ├── package --> 各编译源码包/组件的配置 │ ├── Config.in --> menuconfig 配置的顶层入口 │ ├── artinchip --> ..." / > < meta name = "DC.relation" content = "configure-precompilation-package.html" / > < meta name = "DC.relation" content = "pre-compilation-package.html" / > < meta name = "DC.creator" content = "yan.wang" / > < meta name = "DC.date.created" content = "2024-10-31" / > < meta name = "DC.date.modified" content = "2024-12-16" / > < meta name = "DC.format" content = "HTML5" / > < meta name = "DC.identifier" content = "lb-usage-structure" / > < 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/advanced/lb_usage_structure.dita" / > < meta name = "wh-out-relpath" content = "topics/sdk/advanced/lb_usage_structure.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 = "lb-usage-structure" 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/advanced/lb_usage_structure.dita" > Edit online< / a > < / span > < h1 class = "- topic/title title topictitle1" id = "ariaid-title1" > 代码结构< / h1 > < div class = "date inPage" > 16 Dec 2024< / div > < div style = "color: gray;" >
Read time: 4 minute(s)
< / div > < div class = "- topic/body concept/conbody body conbody" > < p class = "- topic/shortdesc shortdesc" > < / p > < div class = "- topic/p p" data-ofbid = "d244258e22__20250121171700" >
< figure class = "- topic/fig fig fignone" id = "lb-usage-structure__fig_z23_cq3_pzb" data-ofbid = "lb-usage-structure__fig_z23_cq3_pzb" > < br / > < div class = "imagecenter" > < img class = "- topic/image image imagecenter" id = "lb-usage-structure__image_x5s_ltg_bzb" src = "../../../images/sdk/sdk_overview.png" / > < / div > < br / > < figcaption data-caption-side = "bottom" class = "- topic/title title figcapcenter" > < span class = "figtitleprefix fig--title-label" > 图< span class = "fig--title-label-number" > 1< / span > < span class = "fig--title-label-punctuation" > . < / span > < / span > < span class = "fig--title" > Luban SDK 根目录< / span > < / figcaption > < / figure >
< / div > < p class = "- topic/p p" data-ofbid = "d244258e29__20250121171700" > Luban SDK 中有以下重要的文件和目录,其分类和功能如下所述。< / p > < pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "lb-usage-structure__pre_y5s_ltg_bzb" data-ofbid = "lb-usage-structure__pre_y5s_ltg_bzb" > Luban
├── dl --> 第三方源码的压缩包保存目录
├── output --> 默认的编译输出目录
├── package --> 各编译源码包/组件的配置
│ ├── Config.in --> menuconfig 配置的顶层入口
│ ├── artinchip --> ArtInChip 开发的组件配置
│ ├── linux --> 内核的配置
│ ├── opensbi --> OpenSBI 的配置
│ ├── uboot --> UBoot 的配置
│ ├── third-party --> 其他开源软件包的配置
│ ├── ...
│
├── prebuilt --> 预编译二进制包的保存目录
├── source --> 源码保存目录
│ ├── artinchip --> ArtInChip 开发的组件源码目录(不会删除)
│ ├── linux-< span class = "hl-number" > 5.10< / span > --> 内核的源码目录(不会删除)
│ ├── opensbi --> OpenSBI 的源码目录(不会删除)
│ ├── uboot-< span class = "hl-number" > 2021.10< / span > --> U-Boot 的源码目录(不会删除)
│ └── third-party --> 其他开源软件包解压后的源码目录( make distclean 会删除)
│
├── target --> 芯片和具体板子的配置
│ └── configs --> 存放项目的配置文件
│ ├── d211_initramfs_defconfig
│ ├── d211_per1_mmc_defconfig
│ ├── d211_per2_spinand_defconfig
│ ├── d211_per2_spinor_defconfig
│ ├── d211_fpga_mmc_defconfig
│ ├── configs_busybox -> ../../package/third-party/busybox/configs/
│ ├── configs_linux_arm -> ../../source/linux-< span class = "hl-number" > 5.10< / span > /arch/arm/configs/
│ └── configs_uboot -> ../../source/uboot-< span class = "hl-number" > 2021.10< / span > /configs/
│
├── tools --> 辅助脚本和工具
│── toolchain --> 编译所使用的 gcc 工具链保存目录
└── Makefile --> SDK 的顶层 Makefile< / pre > < section class = "- topic/section section" id = "lb-usage-structure__section_vcd_wcp_fdc" data-ofbid = "lb-usage-structure__section_vcd_wcp_fdc" > < h2 class = "- topic/title title sectiontitle" > 三方代码目录< / h2 >
< p class = "- topic/p p" data-ofbid = "d244258e38__20250121171700" > 在 SDK 代码目录中,< span class = "+ topic/ph sw-d/filepath ph filepath" > third-party< / span > 、< span class = "+ topic/ph sw-d/filepath ph filepath" > dl< / span > 和
< span class = "+ topic/ph sw-d/filepath ph filepath" > prebuilt< / span >
为三方目录,分别用于存放第三方库、下载工具和预编译二进制包。使用不同的源码编译方式,三者的使用顺序和流程也不相同,详情如下所示:< / p >
< ul class = "- topic/ul ul" id = "lb-usage-structure__ul_yqy_vcp_fdc" data-ofbid = "lb-usage-structure__ul_yqy_vcp_fdc" > < li class = "- topic/li li" data-ofbid = "d244258e55__20250121171700" >
< div class = "- topic/p p" data-ofbid = "d244258e57__20250121171700" > 如果使用预编译二进制包:< ol class = "- topic/ol ol" id = "lb-usage-structure__ol_kps_4xs_hdc" data-ofbid = "lb-usage-structure__ol_kps_4xs_hdc" > < li class = "- topic/li li" data-ofbid = "d244258e60__20250121171700" >
< p class = "- topic/p p" data-ofbid = "d244258e62__20250121171700" > < code class = "+ topic/ph pr-d/codeph ph codeph" > extract< / code > :从 < span class = "+ topic/ph sw-d/filepath ph filepath" > prebuilt< / span >
目录中提取预编译的二进制包。< / p >
< / li > < li class = "- topic/li li" data-ofbid = "d244258e70__20250121171700" > < code class = "+ topic/ph pr-d/codeph ph codeph" > output/build< / code > :将提取出来的文件放置在构建输出目录中。< / li > < li class = "- topic/li li" data-ofbid = "d244258e74__20250121171700" > < code class = "+ topic/ph pr-d/codeph ph codeph" > install< / code > :将构建输出目录中的文件安装到目标系统 (target) 或主机系统
(host)。< / li > < li class = "- topic/li li" data-ofbid = "d244258e78__20250121171700" > < code class = "+ topic/ph pr-d/codeph ph codeph" > output/target (or
host)< / code > :最终的目标系统或主机系统上安装了预编译的二进制包。< / li > < / ol > < / div >
< div class = "- topic/p p" data-ofbid = "d244258e83__20250121171700" >
< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "lb-usage-structure__codeblock_hzr_rxs_hdc" data-ofbid = "lb-usage-structure__codeblock_hzr_rxs_hdc" > < span class = "+ topic/ph sw-d/filepath ph filepath" > prebuilt< / span > – (extract) → < code class = "+ topic/ph pr-d/codeph ph codeph" > output/build< / code > – (install) → < code class = "+ topic/ph pr-d/codeph ph codeph" > output/target(or host)< / code > < / pre >
< / div >
< / li > < li class = "- topic/li li" data-ofbid = "d244258e96__20250121171700" >
< div class = "- topic/p p" data-ofbid = "d244258e98__20250121171700" > 如果使用源码编译:< ol class = "- topic/ol ol" id = "lb-usage-structure__ol_qpp_wxs_hdc" data-ofbid = "lb-usage-structure__ol_qpp_wxs_hdc" > < li class = "- topic/li li" data-ofbid = "d244258e101__20250121171700" > < code class = "+ topic/ph pr-d/codeph ph codeph" > extract< / code > :从 < span class = "+ topic/ph sw-d/filepath ph filepath" > dl< / span >
目录中提取第三方库的源码。< / li > < li class = "- topic/li li" data-ofbid = "d244258e108__20250121171700" > < code class = "+ topic/ph pr-d/codeph ph codeph" > source/third-party< / code > :将提取出来的源码放置在源代码目录中。< / li > < li class = "- topic/li li" data-ofbid = "d244258e112__20250121171700" > < code class = "+ topic/ph pr-d/codeph ph codeph" > build< / code > :对 < span class = "+ topic/ph sw-d/filepath ph filepath" > source/third-party< / span >
目录中的源码进行编译。< / li > < li class = "- topic/li li" data-ofbid = "d244258e119__20250121171700" > < code class = "+ topic/ph pr-d/codeph ph codeph" > output/build< / code > :将编译生成的文件放置在构建输出目录中。< / li > < li class = "- topic/li li" data-ofbid = "d244258e123__20250121171700" > < code class = "+ topic/ph pr-d/codeph ph codeph" > install< / code > :将构建输出目录中的文件安装到目标系统 (target) 或主机系统
(host)。< / li > < li class = "- topic/li li" data-ofbid = "d244258e127__20250121171700" > < code class = "+ topic/ph pr-d/codeph ph codeph" > output/target (or
host)< / code > :最终的目标系统或主机系统上安装了编译后的二进制包。< / li > < / ol > < / div >
< div class = "- topic/p p" data-ofbid = "d244258e132__20250121171700" >
< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "lb-usage-structure__codeblock_sjm_zxs_hdc" data-ofbid = "lb-usage-structure__codeblock_sjm_zxs_hdc" > < span class = "+ topic/ph sw-d/filepath ph filepath" > dl< / span > – (extract) → < code class = "+ topic/ph pr-d/codeph ph codeph" > source/thrid-party< / code > – (build) → < span class = "+ topic/ph sw-d/filepath ph filepath" > output/build< / span > – (install) → < code class = "+ topic/ph pr-d/codeph ph codeph" > output/target(or host)< / code > < / pre >
< / div >
< / li > < / ul >
< / section > < section class = "- topic/section section" id = "lb-usage-structure__section_zdg_1dp_fdc" data-ofbid = "lb-usage-structure__section_zdg_1dp_fdc" > < h2 class = "- topic/title title sectiontitle" > 输出目录< / h2 >
< div class = "- topic/p p" data-ofbid = "d244258e154__20250121171700" >
< pre class = "+ topic/pre pr-d/codeblock pre codeblock language-c" id = "lb-usage-structure__codeblock_qhp_1dp_fdc" data-ofbid = "lb-usage-structure__codeblock_qhp_1dp_fdc" > output/
├── build --> 编译的工作目录
│ ├── busybox-< span class = "hl-number" > 1.34< / span > .< span class = "hl-number" > 1< / span >
│ ├── ...
│
├── host --> 主机工具的安装目录
│ ├── arm-linux-gnueabihf/sysroot
│ ├── bin
│ ├── etc
│ ├── include
│ ├── lib
│ ├── lib64 -> lib
│ ├── opt
│ ├── sbin
│ ├── share
│ └── usr -> .
├── images --> 最终的镜像文件输出目录
│ ├── d211_per1_v1.< span class = "hl-number" > 0.0< / span > .img
│ ├── ...
│
├── staging -> host/arm-linux-gnueabihf/sysroot --> 交叉编译的暂存目录:库与头文件
│ ├── lib --> 导出的库,给其他包编译链接使用
│ ├── usr
│ │ ├── include --> 内核导出的头文件、其他包导出的头文件
│
├── target --> 打包到 RootFS 中的内容存放目录
│ ├── bin
│ ├── dev
│ ├── etc
│ ├── init
│ ├── lib
│ ├── lib32 -> lib
│ ├── linuxrc -> bin/busybox
│ ├── media
│ ├── mnt
│ ├── opt
│ ├── proc
│ ├── root
│ ├── run
│ ├── sbin
│ ├── sys
│ ├── THIS_IS_NOT_YOUR_ROOT_FILESYSTEM --> 当前目录不是最终执行 RootFS 打包的目录
│ ├── tmp 生成 RootFS 前, target 目录的内容会被拷贝
│ ├── usr 到 output/luban-fs/ 目录下执行打包
│ └── var
└── userfs --> 自定义的文件系统目录< / pre >
< / div >
< / section > < / div > < / article > < / main > < / div >
< div class = " wh_related_links d-print-none " > < nav aria-label = "Related Links" role = "navigation" class = "- topic/related-links related-links" > < div class = "- topic/linklist linklist relinfo" xml:lang = "zh-CN" lang = "zh-CN" > < strong > 相关信息< / strong > < ul class = "linklist related_link" > < li class = "linklist" > < a class = "- topic/link link navheader_parent_path" href = "configure-precompilation-package.html" title = "配置预编译包" > 配置预编译包< / a > < / li > < li class = "linklist" > < a class = "- topic/link link navheader_parent_path" href = "pre-compilation-package.html" title = "预编译包优势" > 预编译包优势< / a > < / li > < / ul > < / div > < / nav > < / 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-structure__section_vcd_wcp_fdc" data-tocid = "lb-usage-structure__section_vcd_wcp_fdc" > 三方代码目录< / a > < / div > < / li > < li class = "section-item" > < div class = "section-title" > < a href = "#lb-usage-structure__section_zdg_1dp_fdc" data-tocid = "lb-usage-structure__section_zdg_1dp_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-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 >
2025-01-23 16:37:00 +08:00
< / html >