存储切换方法

SDK切换存储介质需要修改board.dts、sys_config.fex、内核配置、TINA系统配置。另外,在spinor 存储介质下,通过 u-boot-sun8iw21p1.bin 进行烧录,u-boot-spinor-sun8iw21p1.bin 启动,使用sys_partition_nor.fex作为分区表。在非spinor介质(spinand、emmc、sdnand),通过u-boot-sun8iw21p1.bin进行烧录和启动,使用sys_partition.fex作为分区表。下文将介绍spinor切换spinandspinand切换spinorspinor切换emmcspinor切换sdnand四种切换方式。

  • sys_config.fex中只要关注storage_type选项,这个选项决定使用哪一种存储介质,配置后在pack过程,会自动打包对应介质的二进制文件。
  [target]storage_type = xxx其中storage_type | 0:nand | 1:sd | 2:emmc | 3:spinor  | 4:emmc3 | 5:spinand  | 6:sd1 |

spinor切换spinand

sys_config.fex修改

[target]
- storage_type = 3
+ storage_type = 5

board.dts/uboot-board.dts修改

&spi0 {
-   status = "disabled";
+  status = "okay";spi-nand@0 {
-       status="disabled";
+      status="okay";};
};

uboot编译

编译u-boot-sun8iw21p1.bin,spinand使用u-boot-sun8iw21p1.bin进行烧录、启动。
cboot切换到uboot目录,编辑configs/sun8iw21p1_defconfig
CONFIG_SUNXI_UBIFS=y   //SDK发布默认已选上
执行mboot               //编译
确保device/config/chips/vxxx/bin/u-boot-sun8iw21p1.bin已更新

内核配置

make kernel_menuconfig 层层选中
内核驱动配置
Device Driver --->Memory Technology Device (MTD) support --->sunxi-nand  ---><*> AWNAND CHOICE (Allwinner MTD SPINAND Device Support)  --->-*-   Enable UBI - Unsorted block images  --->[*]   Read-only block devices on top of UBI volumes内核文件系统配置
File systems --->[*] Miscellaneous filesystems  ---><*>   UBIFS file system support

TINA环境配置

make menuconfig 层层选中
Target Images  --->Boot (SD Card) Kernel format (boot.img)  ---> //默认选中[ ] For storage less than 32M, enable this when using ota  //取消勾选Global build settings  --->[*] Strip unnecessary functions from libraries  //取消勾选Utilities  ---><*> mtd-utils ---><*>   mtd-utils-mkfs.ubifs

spinand切换spinor

切换部分原文链接:https://bbs.aw-ol.com/topic/1701/

sys_config.fex修改

[target]
- storage_type = 5
+ storage_type = 3

board.dts/uboot-board.dts修改

&spi0 {
-   status = "okay";
+  status = "disabled";spi-nand@0 {
-       status="okay";
+      status="disabled";};
};

内核配置

make kernel_menuconfig 层层选中
内核驱动配置
Device Driver --->Memory Technology Device (MTD) support --->sunxi-nand  --->  //取消勾选Self-contained MTD device drivers  ---><*> Support most SPI Flash chips (AT26DF, M25P, W25X, ...)  //确认已选中<*>   SPI-NOR device support  --->
内核文件系统配置
File systems --->[*] Miscellaneous filesystems  ---><*>   Journalling Flash File System v2 (JFFS2) support

TINA环境配置

make menuconfig 层层选中
Target Images  --->[*] For storage less than 32M, enable this when using ota  //选中Global build settings  --->[*] Strip unnecessary functions from libraries  //选中Utilities  ---><*> mtd-utils<*>   mtd-utils-mkfs.jffs2  //选中

spinor切换emmc

sys_config.fex修改

[target]
- storage_type = 3
+ storage_type = 2

内核配置

make kernel_menuconfig 层层选中
[*] Enable the block layer  --->[*]   Support for large (2TB+) block devices and files[*]   Block layer SG support v4
Device Drivers  --->< > Memory Technology Device (MTD) support  --->  //取消勾选[*] Block devices  --->  //确认勾选
File systems  ---><*> The Extended 4 (ext4) filesystem

TINA环境配置

make menuconfig 层层选中
Target Images  --->Boot (SD Card) Kernel format (boot.img)  ---> //默认选中[ ] For storage less than 32M, enable this when using ota  //取消勾选Global build settings  --->[ ] Strip unnecessary functions from libraries  //取消勾选Utilities  --->Filesystem  ---><*> e2fsprogs //选中

spinor切换sdnand

sys_config.fex修改

[target]
- storage_type = 3
+ storage_type = 1

board.dts修改

&sdc2 {non-removable;bus-width = <8>;mmc-ddr-1_8v;mmc-hs200-1_8v;mmc-hs400-1_8v;no-sdio;
-   no-sd;
+  //no-sd;ctl-spec-caps = <0x308>;cap-mmc-highspeed;sunxi-power-save-mode;sunxi-dis-signal-vol-sw;max-frequency = <100000000>;vmmc-supply = <&reg_dcdc1>;/*emmc io vol 3.3v*/vqmmc-supply = <&reg_bldo1>;/*emmc io vol 1.8v*//*vqmmc-supply = <&reg_eldo1>;*/status = "disabled";
};

内核配置

make kernel_menuconfig 层层选中
[*] Enable the block layer  --->[*]   Support for large (2TB+) block devices and files[*]   Block layer SG support v4
Device Drivers  --->< > Memory Technology Device (MTD) support  --->  //取消勾选[*] Block devices  --->  //确认勾选
File systems  ---><*> The Extended 4 (ext4) filesystem

TINA环境配置

make menuconfig 层层选中
Target Images  --->Boot (SD Card) Kernel format (boot.img)  ---> //默认选中[ ] For storage less than 32M, enable this when using ota  //取消勾选Global build settings  --->[ ] Strip unnecessary functions from libraries  //取消勾选Utilities  --->Filesystem  ---><*> e2fsprogs //选中

Tina 一般支持nor, nand, mmc 三种介质。

更具体的,nand分为并口nand和spinand,mmc分emmc和sd卡

主要需要区分的是nor和其他介质,因为需要打包的部分有所不同。

即,emmc和nand,sd卡一般可共用一份固件,而nor则需使用另一份固件

sys_config配置

在sys_config中有一个配置项,storage_type,取值及含义如下

;----------------------------------------------------------------------------------
; storage_type 0:nand 1:sd 2:emmc 3:spinor 4:emmc3 5:spinand 6:sd1
;----------------------------------------------------------------------------------
[target]
storage_type = xxx

对于nor的方案,必须配置为

 storage_type = 3

对于其他介质,storage_type则不能配置为3

spinand切换为spinor

sys_config 设置介质为nor

[target]
storage_type = 3

配置所用nor的大小

[norflash]
size        = 16

内核配置

 make kernel_menuconfig --->Device Drivers --->< >Block devices  (取消选中)Device Drivers ---><*>Memory Technology Device (MTD) support<*>OpenFirmware partitioning information support<*>SUNXI partitioning support<*>   Caching block device access to MTD devices<*>   SPI-NOR device support  (对于linux4.9,先选这个,下面的选项才出现)Self-contained MTD device drivers  ---><*> Support most SPI Flash chips (AT26DF, M25P, W25X, ...)File systems  --->< > The Extended 4 (ext4) filesystem(取消选中)File systems  --->[*] Miscellaneous filesystems  ---> <*>   Journalling Flash File System v2 (JFFS2) support(选中)[*] Enable the block layer  --->[ ]   Support for large (2TB+) block devices and files(取消选中)

menuconfig配置

make menuconfig --->Utilities  ---><*> mtd-utils (选择) ---><*> mtd-utils-mkfs.jffs2
make menuconfig --->Utilities  --->Filesystem  --->< > e2fsprogs(取消选择)

spinor切换为spinand

sys_config 设置介质为spinand

[target]
storage_type = 5

内核配置

 make kernel_menuconfig --->Device Drivers --->[*]Block devices ---><*>   sunxi nand flash driverDevice Drivers --->< >Memory Technology Device (MTD) support(取消选择)[*] Enable the block layer  --->[*]   Support for large (2TB+) block devices and files File systems  ---><*> The Extended 4 (ext4) filesystem

menuconfig 配置

make menuconfig --->Utilities  --->< > mtd-utils (取消选择)Filesystem  ---><*> e2fsprogs

分区表配置
注意点

对于nand,rootfs_data分区,使用ext4格式。分配太小的话可能会创建失败。

FAQ

使用mkfs.ext4等工具的时候出现

/usr/sbin/fsck.ext4 -y /dev/by-name/rootfs_data
Error loading shared library /home/wuguanling/workspace/project/v316-sdv-tina/out/v316-sdv/staging_dir/target/rootfs/lib/libc.so: No such file or directory (needed by /usr/lib/libext2fs.so.2)

关闭以下选项:

make menuconfig| --- Global build settings| --- []strip unnecessary functions for libraries

原文链接:https://bbs.aw-ol.com/topic/1701/
作者@YterAA

全志 Tina Linux 存储介质切换:eMMC,SPI NAND,SPI NOR,SD Card,SD NAND相关推荐

  1. 全志Tina Linux MPP 开发指南

    全志Tina Linux MPP 开发指南支持百问网T113 D1-H哪吒DongshanPI-D1s V853-Pro等开发板 1 简述 整理 MPP sample 使用说明文档的目的是:使 MPP ...

  2. 全志 Tina Linux 图形系统 框架介绍 最全介绍 MiniGUI、QT5、EFL、GTK+(WebkitGtk、Midori)、DirectFB、Wayland

    1 概述 本文档将介绍 Allwinner Tina Linux 中已经移植好的窗口系统,以及怎么使用,包括 MiniGUI.QT5.EFL.GTK+(WebkitGtk.Midori).Direct ...

  3. 全志 Tina Linux LCD显示屏调试指南 支持MIPI DSI RGB LVDS I8080 SPI等接口,开发板支持百问网T113 D1-H哪吒 DongshanPI-D1s V853

    1 概述 编写目的 本文档将介绍sunxi 平台Display Engine 模块中LCD 的调试方法. LCD 调试方法,调试手段. LCD 驱动编写. lcd0 节点下各个属性的解释. 典型LCD ...

  4. 全志Tina Linux 系统裁剪 boot0裁剪 uboot裁剪 内核裁剪 文件系统裁剪 C库裁剪 文件系统压缩

    文章目录 1 概述 2 Tina系统裁剪简介 2.1 boot0裁剪 2.2 uboot裁剪 2.3 内核裁剪 2.3.1 删除不使用的功能 2.3.2 删除不使用的驱动 2.3.3 修改内核源代码 ...

  5. 全志Tina Linux Camera 摄像头模块开发指南 全网最详细版本支持百问网T113-Pro DongshanPI-NezhaD1-H DongshanPI-D1s V853-Pro等开发板

    1 概述 编写目的:介绍camera 模块在sunxi 平台上的开发流程. 适用范围:本文档目前适用于tina3.0 以上具备camera 的硬件平台. 2 模块介绍 2.1 模块功能介绍 用于接收并 ...

  6. 全志 Tina Linux RISC-V E907核心开发指南支持百问网V85x系列开发板100ask-v853-pro v851s等

    编写目的:介绍v85X 上E907 的启动环境和AMP 的环境搭建. 使用范围:全志V85X 系列芯片 环境 A7 SDK:Tina E907 SDK:melis 4 SDK 快捷命令说明 这里主要介 ...

  7. 全志Tina Linux MPP (多媒体框架)开发指南支持百问网T113 D1-H哪吒DongshanPI-D1s V853-Pro等开发板

    1 简述 整理 MPP sample 使用说明文档的目的是:使 MPP sample 更好用. 2 简介 MPP sample 一般存放在 MPP Middleware 的 sample 目录下.此外 ...

  8. Linux驱动——mmc sd card初始化流程(十一)

    Linux驱动--mmc sd card初始化流程(十一) 备注:   1. Kernel版本:5.4   2. 使用工具:Source Insight 4.0   3. 参考博客:   (1)[sd ...

  9. Linux驱动——mmc sd card 块设备读写流程(十三)

    Linux驱动--mmc sd card 块设备读写流程(十三) 备注:   1. Kernel版本:5.4   2. 使用工具:Source Insight 4.0   3. 参考博客:   (1) ...

最新文章

  1. 2021 OceanBase 数据库大赛来了!
  2. Live2009各产品(如MSN)强迫升级时Server2003系统失败的解决办法
  3. 论文浅尝 | 低资源文本风格迁移数据集
  4. python9_Python9-前端基础知识-day47
  5. drawLine()方法画粗线
  6. php电子面单打印快递100,使用快递100软件打印电子面单设置操作教程
  7. ROS 端口IP映射 动态IP映射
  8. 摄像头视频直播方案比较之方案一:萤石云
  9. 微信小程序---配置微信商户平台进行微信支付操作指南以及踩坑记录
  10. Zblog博客怎么实现微博登陆?
  11. DataGrip 安装教程 详细版
  12. abap --MOVE-CORRESPONDING
  13. fone出席CXO智库峰会,分享“老板需要什么样的全面预算?”
  14. 计算机切换用户神魔意思,快速切换用户是什么意思?
  15. halcon初级应用攻略
  16. LeetCode: 627. 变更性别
  17. 华硕笔记本电脑换电池
  18. Thinking-in-Java 读书笔记-11-持有对象
  19. 前端实现类似外卖订单的打印
  20. cocos2dx3.X shader使图片置灰

热门文章

  1. numeric_limits的运用
  2. 贝恩2021技术报告:到2025年,30%的云服务供应商将专注于人工智能计算工作负载
  3. Python开发就业岗位有哪些?Python薪资待遇如何?
  4. Android 系统日志写入文件
  5. Wepy 引入 WeUI
  6. 程序员坐牢会被安排写代码吗?
  7. php中 dsn什么意思,网络dsn是什么意思(图文)
  8. 冷池机房给数据中心带来哪些好处
  9. Shell编程扩展正则表达式(egrep、awk)
  10. Java 类加载顺序与成员变量初始化