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:/ ...
随机推荐
- java synchronized和(ReentrantLock)区别
原文:http://blog.csdn.net/zheng548/article/details/54426947 区别一:API层面 syschronized使用 synchronized即可修饰方 ...
- 分组函数NTILE函数
这个分组函数 并不是 group by的分组.
- Spring_IOC&DI概述
- Spring MVC执行原理和基于Java的配置过程
一.Spring MVC执行原理和基于Java配置的配置过程 (一)Spring MVC执行过程,大致为7步. 所有的请求都会经过Spring的一个单例的DispacherServlet. Dispa ...
- 修改Maven源为阿里巴巴的镜像
在C:\Users\Administrator\.m2创建setting.xml文件,内容如下 <settings xmlns="http://maven.apache.org/SET ...
- java基础(7)--方法
方法 Math.sqrt() 取平方 Math.pow(2,3) 2的3次方 方法(Method),就是数学函数(Function). 业务方面: 是功能,是动作,一般采用动词命名. 数据层面:是利用 ...
- spring的cglib代理
1.被代理类Person.java package com.xiaostudy; /** * @desc 被代理类 * * @author xiaostudy * */ public class Pe ...
- nginx限制ip并发数
nginx限制ip并发数,也是说限制同一个ip同时连接服务器的数量 1.添加limit_zone 这个变量只能在http使用 vi /usr/local/nginx/conf/nginx.conf l ...
- Java多线程 - 线程同步
多线程操作同一个对象时,容易引发线程安全问题.为了解决线程安全问题,Java多线程引入了同步监视器. 同步代码块 同步代码块语法格式如下: synchronized(obj){ //此处的代码即为同步 ...
- css 中的background:transparent到底是什么意思有什么作用
有时我在看css时,看到有的css属性定义为background:transparent.意思就是背景透明.实际上background默认的颜色就是透明的属性.所以写和不写都是一样的 有段时间没写文章 ...