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】仿真qq尝试:用户注册(二)
参考: 1.corejavaI:使用解耦的try/catch与try/finally 2.Java中try catch finally语句中含有return语句的执行情况(总结版):http://bl ...
- 基于SSM的单点登陆05
springmvc.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns=" ...
- c刷新缓冲区
int c; while((c = getchar()) != '\n' && c != EOF);
- 自定义Log实现条件编译
在项目pch中添加以下代码,其中DEBUG为Xcode项目自带的宏,存在时表示当前为调试状态,否则为发布状态.故当在发布状态时,通过自定义TestLog所使用的NSLog调试信息,都会被预编译替换为空 ...
- spark学习11(Wordcount程序-本地测试)
wordcount程序 文件wordcount.txt hello wujiadong hello spark hello hadoop hello python 程序示例 package wujia ...
- HDU 1159 Common Subsequence 动态规划
2017-08-06 15:41:04 writer:pprp 刚开始学dp,集训的讲的很难,但是还是得自己看,从简单到难,慢慢来(如果哪里有错误欢迎各位大佬指正) 题意如下: 给两个字符串,找到其中 ...
- I方法怎么不能获取多选框的数据
前端代码 <input type="checkbox" name="m_name" value="{$vo.name}" class ...
- Sqrt(X),求平方根,折半查找
算法分析:利用折半查找,降低算法复杂度.前面求x得y次幂,也是将y/2,都是为了降低复杂度. //折半查找的思想 public class Sqrt { public int sqrt(int x) ...
- NQueens, NQueens2 N皇后问题,递归回溯
N皇后的规则:任意两个皇后不在同一行,不在同一列,不在同一斜线上. 算法分析:这种问题就用回溯法.深度搜索然后回溯.用一个数组记录每一行皇后的位置,下标代表行,值代表列.对行深度搜索. public ...
- Boot 横向布局
<div class="form-group"> <label for="name" class="col-lg-2 control ...