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:/ ...
随机推荐
- ExtJS + fileuploadfield实现文件上传
后台服务端接收文件的代码: /** * 后台上传文件处理Action */ @RequestMapping(value = "/uploadFile", method=Reques ...
- linux centos7 安装zookeeper
linux 系统下 zookeeper 安装教程 1.下载安装包 1)进入安装目录 cd /home/install/ 2)下载 wget http://mirror.bit.edu.cn/apach ...
- javascript 的dateObj.getTime() 在为C#的获取方式
public string GetTime(DateTime dt) { Int64 retval = 0; DateTime st = new DateTime(1970, 1, 1); TimeS ...
- Spring 之定义切面尝试(基于 XML)
有些场景下只能基于 XML 来定义切面. [Spring 之定义切面尝试] 1.XML 下定义切面(首先是要有一个对应的类...显然要比基于注解的麻烦) <?xml version=" ...
- SVN使用—工作模式及运行原理以及优缺点对比
一.SVN原理 (1)运行方式 svn服务器有2种运行方式:独立服务器和借助apache运行. 1.独立服务器访问 访问地址如:svn://svn.test.com/test 2.借助Apache等h ...
- BeatSaber节奏光剑插件开发官方教程1-创建一个插件模板
原文:https://wiki.assistant.moe/modding/intro 一.简介 Beat Saber 开发环境:unity2018.C#..NET framework 4.6. 此教 ...
- openstack认证实践
环境: 客户端:负责发送请求, 服务器:负责接受请求: 认证服务器keystone:负责认证 具体认证步骤: 1.客户端首先进行签名计算,将得到的签名字符串作为authorization发给keyst ...
- 批处理文件 bat 的入门命令
1. echo on和echo off echo on表示打开回显,echo off表示关闭回显,何为回显?打开回显就是执行命令时会把命令显示出来,关闭回显反之. 2.echo [message] 这 ...
- Linux下Wireshark的网络抓包使用方法
Wireshark是世界上最流行的网络分析工具.这个强大的工具可以捕捉网络中的数据,并为用户提供关于网络和上层协议的各种信息.与很多其他网络工具一样,Wireshark也使用pcap network ...
- SpringBoot 通用Error设计
在项目中需要设计统一的错误消息,通常使用枚举类定义"错误码"与"错误消息": 并且也可以做错误消息自定义. 定义通过错误接口类:CommonError publ ...