How to write u

您所在的位置:网站首页 墨水有什么化学成分 How to write u

How to write u

2024-04-09 03:26| 来源: 网络整理| 查看: 265

I'm working on board bring-up of a custom iMX6 based board. I'm using the Android package from iMX6 Sabre SD board, and have got most of the things working with booting from eMMC which on on-board, but I'm facing issue with 'saveenv' of u-boot. Firstly, everytime on boot there is a print : *** Warning - bad CRC or MMC, using default environment I search online and found that we have to do 'saveenv' once to let this error go away. So I did saveenv but after that the board doesn't boot completely and got stuck on 'Uncompressing Linux ...' ! I then boot-up the board using SD card and got the hexdump of /dev/block/mmcblk0boot0 and /dev/block/mmcblk0p1 (both are eMMC partitions, SD card is dev/block/mmcblk1) To my surprise, from hexdump I found that 'saveenv' writes the environment variable data to /dev/block/mmcblk0p1 and not /dev/block/mmcblk0boot0 which was the reason the board didn't boot-up as boot.img is in dev/block/mmcblk0p1 partition was corrupted by u-boot doing saveenv and over-writing the boot.img data. So, my question is how can I change the u-boot code to modify it to read and save environment variables on /dev/block/mmcblk0boot0 instead of /dev/block/mmcblk0p1 I'm trying to dig into the code and so far I have found that common/env_mmc.c is the file which has all functions to read/write environment variables, and include/configs/mx6solo_sabresd.h includes the configuration of my board.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3