I.MX6 change boot partition 1 to User area
- /************************************************************************************
- * I.MX6 change boot partition 1 to User area
- * 说明:
- * 需要在eMMC中切换U-Boot所在的位置,看一下eMMC的驱动,测试一下效果。
- *
- * 2017-5-26 台湾 中和区 曾剑锋
- ***********************************************************************************/
- 一、参考文档:
- . emmc boot1 boot2 partition
- http://www.cnblogs.com/helloworldtoyou/p/6053460.html
- 二、驱动参考代码(drivers/mmc/core/mmc.c):
- /* set up boot partitions */
- static ssize_t
- setup_boot_partitions(struct device *dev, struct device_attribute *attr,
- const char *buf, size_t count)
- {
- ...
- /* enable the boot partition in boot mode */
- /* boot enable be -
- * 0x00 - disable boot enable.
- * 0x08 - boot partition 1 is enabled for boot.
- * 0x10 - boot partition 2 is enabled for boot.
- * 0x38 - User area is enabled for boot.
- */
- switch (part & EXT_CSD_BOOT_PARTITION_ENABLE_MASK) {
- case :
- boot_config = (ext_csd[EXT_CSD_PART_CONFIG]
- & ~EXT_CSD_BOOT_PARTITION_ENABLE_MASK
- & ~EXT_CSD_BOOT_ACK_ENABLE);
- break;
- case EXT_CSD_BOOT_PARTITION_PART1:
- boot_config = ((ext_csd[EXT_CSD_PART_CONFIG]
- & ~EXT_CSD_BOOT_PARTITION_ENABLE_MASK)
- | EXT_CSD_BOOT_PARTITION_PART1
- | EXT_CSD_BOOT_ACK_ENABLE);
- break;
- case EXT_CSD_BOOT_PARTITION_PART2:
- boot_config = ((ext_csd[EXT_CSD_PART_CONFIG]
- & ~EXT_CSD_BOOT_PARTITION_ENABLE_MASK)
- | EXT_CSD_BOOT_PARTITION_PART2
- | EXT_CSD_BOOT_ACK_ENABLE);
- break;
- case EXT_CSD_BOOT_PARTITION_ENABLE_MASK:
- boot_config = ((ext_csd[EXT_CSD_PART_CONFIG]
- | EXT_CSD_BOOT_PARTITION_ENABLE_MASK)
- & ~EXT_CSD_BOOT_ACK_ENABLE);
- break;
- default:
- pr_err("%s: wrong boot config parameter" \
- " 00 (disable boot), 08 (enable boot1)," \
- "16 (enable boot2), 56 (User area)\n",
- mmc_hostname(card->host));
- err = -EINVAL;
- goto err_rtn;
- }
- ...
- }
- 三、操作流程:
- . 删除User area区域的U-Boot,防止识别到U-Boot,而不进入烧录模式:
- dd if=/dev/zero of=/dev/block/mmcblk3 bs= count=
- . 切换eMMC启动到User area区域启动:
- echo > /sys/block/mmcblk3/device/boot_config
I.MX6 change boot partition 1 to User area的更多相关文章
- You cannot change a partition into an extended one or vice versa Delete it first
在Linux扩展LVM时,使用fdisk创建分区时,在磁盘上新建扩展分区(逻辑分区),修改分区格式,指定分区类型为8e时,报错"You cannot change a partition i ...
- 翻译wiki(一):Bios boot partition
文章翻译自wiki,水平有限,若有错万请见谅.原文:https://en.wikipedia.org/wiki/BIOS_boot_partition BIOS boot partition是一个分区 ...
- emmc boot1 boot2 partition
使用mfg tool烧写android5.1的镜像之后,再使用旧版的mfg tool烧写linux或者android镜像,都不能正常启动,而且运行的uboot还是android5.1版本的uboot. ...
- How To Backup Your Android Phone’s Boot, Recovery And System Partition Images -- RomDump
One can’t stress enough on the importance of backups and when it comes to tinkering with your Androi ...
- 如何解包,编辑,重新打包boot images
HOWTO: Unpack, Edit, and Repack Boot Images http://forum.xda-developers.com/showthread.php?t=443994 ...
- From Disk partition to PostgreSQL installation
From Disk partition to PostgreSQLinstallation [root@compute mnt]# fdisk /dev/sdb Welcome to fdisk (u ...
- Creating a Swap Partition
Creating a Swap Partition 1. Use fdisk /dev/vda to open your disk in fdisk. (Use gdisk if you ar ...
- WARNING: Re-reading the partition table failed with error 22: Invalid argument
在划分磁盘分区时,遇到错误"WARNING: Re-reading the partition table failed with error 22: Invalid argument&qu ...
- UEFI boot: how does that actually work, then?
原文地址:https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/ 翻译:https:/ ...
随机推荐
- CSS小知识---table表格
所用的仍是bootstrap的模板 <link rel="stylesheet" href="css/bootstrap.min.css"> < ...
- MongoDB win32-bit 安装
一念起: 由于本人 用的电脑比较老旧,所以一直用的 是win7 32bit 的操作系统,但是在学习MongoDB的时候 遇到了起步的第一个问题,按照目前 官网最新版MongoDB 3.4.3,已不支持 ...
- C# Winform DataGrid 绑定List<> Or ObservableCollection<> 类型无法自动刷新问题
当DataGrid通过绑定List<> Or ObservableCollection<> 类型数据,通过INofityPropertyChanged接口通知数据改变进行刷新无 ...
- 利用同步网盘搭建个人或团队SVN服务器
这篇文章是以前写的,现在强烈推荐两个站.1.http://git.oschina.com 2.http://www.coding.net. 推荐理由:1.可创建私有项目.2.免费稳定.3.VS2013 ...
- Mahout 分类算法
实验简介 本次课程学习了Mahout 的 Bayes 分类算法. 一.实验环境说明 1. 环境登录 无需密码自动登录,系统用户名 shiyanlou 2. 环境介绍 本实验环境采用带桌面的Ubuntu ...
- Win32 API编程:显示系统进程列表
#include <windows.h> #include <tlhelp32.h> // 声明快照函数的头文件 #include "tchar.h" #i ...
- NOIP 货车运输
题目描述 Description A 国有 n 座城市,编号从 1 到 n,城市之间有 m 条双向道路.每一条道路对车辆都有重量限制,简称限重.现在有 q 辆货车在运输货物,司机们想知道每辆车在不超过 ...
- thinkphp5新特性
1.惰性加载(需要什么就加载什么,不需要什么就不加载),显著提高了应用性能: 2.支持composer: 3.遵守PSR-2.PSR-4规范: 4.支持单元测试: 5.安全机制,详细的日志能帮你轻轻松 ...
- CSS3 网格布局(grid-layout)基础知识 - 网格模板属性(grid-template)使用说明
CSS3引入了新的网格布局(grid layout),以适应显示和设计技术的发展(尤其是移动设备优先的响应式设计). 主要目标是建立一个稳定可预料且语义正确的网页布局模式,用来替代过往表现不稳定且繁琐 ...
- python学习笔记(pict+subprocess)
这几天看到接口自动化用例的生成,关于这里博主自己也想了想,是否可以根据参数的范围自动生成用例,这样就不用一条一条的写接口测试用例 这里就设计到用例设计的方法,让我想到之前接触过一款微软的用例自动生成工 ...