how to flash on mmcblk#boot1 with WIC or UUU tool?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to flash on mmcblk#boot1 with WIC or UUU tool?

1,880 Views
starface42
Contributor II

Hi! and happy new year to all

 

I'm trying use /dev/mmcblk0boot1 partition.

starting is easy.

to release read-only lock by 'echo 0 > /sys/block/mmcblk0boot1/forced_ro'

and write imx-boot image by dd.

after then, change bootconf with "mmc tool in kernel, or mmc partconf cmd in u-boot'

yes. it is works fine.

 

but I want previous step(unlock and copy) is contain in UUU's action or WIC file.

 

Q1.

to include WIC file, I need to know boot1 partition's offset.

but I cannot find /dev/mmcblk0boot1's offset from /dev/mmcblk0 

is mmcblk0, mmcblk0boot0, mmcblkboot1 and mmcblk0rpmb separated from each other?

Is /dev/mmcblk0boot0(or 1) inaccessible via /dev/mmcblk0?

echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=/dev/zero of=/dev/mmcblk0boot0
dd: writing to '/dev/mmcblk0boot0': No space left on device
64513+0 records in
64512+0 records out
33030144 bytes (33 MB, 32 MiB) copied, 2.23046 s, 14.8 MB/s
hexdump -C /dev/mmcblk0boot0 | head
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
01f80000
>> erase /dev/mmcblk0boot0 and sync!

>> bootloaoder on 32kb offset
dd if=/dev/mmcblk0 of=dump bs=512 skip=64 count=1
hexdump -C dump | head
00000000  00 c0 02 87 01 00 00 00  74 00 03 01 90 00 00 00  |........t.......|
00000010  00 20 00 00 88 04 01 00  00 00 c0 20 00 00 00 00  |. ......... ....|
...
00000050  2e 96 25 0a d0 70 03 3b  30 c4 37 58 a3 a1 65 38  |..%..p.;0.7X..e8|
00000060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> but still remain
>> and reboot. board is not wakeup

 

 

Q2. 

I think, 

The method of preparing /dev/mmcblk#boot1 with initial fusing is

modifying emmc_burn_loader.lst.

is it right?

how can I know /dev/mmcblk#boo1's offset used on lst file?

 

 

Thanks for reading!

 

0 Kudos
Reply
4 Replies

1,835 Views
starface42
Contributor II

Yes, I already read it

It was incorrectly determined in advance that the boot area partition and user area partition could be accessed by device file 'mmcblk0'

Thanks

0 Kudos
Reply

1,853 Views
josephzhou1
Contributor V

good

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos
Reply

1,865 Views
starface42
Contributor II

I found the little bit hint for my own question

in u-boot shell, can choose boot1 partition with cmd 'mmc dev 0 2'

maybe it possible add as below line at lst_file.

'FB: ucmd mmc dev 0 2'

=> loady 0x81000000
## Ready for binary (ymodem) download to 0x81000000 at 115200 bps...
CCxyzModem - CRC mode, 3(SOH)/3504(STX)/0(CAN) packets, 5 retries
## Total Size      = 0x0036c000 = 3588096 Bytes
=> mmc dev 0 2
switch to partitions #2, OK
=> mmc write 0x81000000 0 2000
...
...
bash-5.1# hexdump -C /dev/mmcblk0boot1
00000000  00 c0 02 87 01 00 00 00  74 00 03 01 90 00 00 00  |........t.......|
00000010  00 20 00 00 88 04 01 00  00 00 c0 20 00 00 00 00  |. ......... ....|
00000020  00 00 00 20 00 00 00 00  66 01 00 00 00 00 00 00  |... ....f.......|
00000030  0e f5 6c ff 79 e0 90 6a  f2 10 be 87 20 47 51 44  |..l.y..j.... GQD|
yeah it is bootloader
0 Kudos
Reply

1,856 Views
BiyongSUN
NXP Employee
NXP Employee

Read the spec then read the code.

Not read the code then guess. 

Technically, it is not forum to discuss the jedec spec. 

 

emmc partitions are physical. 

even you can create gp by yourself.

eMMC RPMB Enhance and GP
https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/eMMC-RPMB-Enhance-and-GP/ta-p/1099818

 

 

JEDEC
STANDARD
Embedded Multi-Media Card (e•MMC) Electrical Standard (5.1)
JESD84-B51
(Revision of JESD84-B50.1, July 2014)
FEBRUARY 2015

 

Untitled.png