AnsweredAssumed Answered

IMX8M EVK flashing issue

Question asked by Clement Name on Oct 3, 2018
Latest reply on Oct 10, 2018 by Diego Adrian Cuevas

Hi,

 

I'm trying to flash my MCIMX8M-EVK eval board with the Android image "android_O8.1.0_1.3.0_8M_image_8mq" (with an 8GB SDCard).

 

I tried flashing with MFGTools and the shell script. In both cases the flashing does not go well and when I boot I end up with a KERNEL PANIC.

 

About the flashing:

 

- With MFGTool, it fails in the middle of the process with the error message:
"Boot" body="BootStrap" error, file="C:\Users\XXXXX\Downloads\android_O8.1.0_1.3.0_8M_tools\android_O8.1.0_1.3.0_8M_tools\mfgtools\mfgtools\Profiles\linux\OS Firmware\firmware\imx-boot-imx8mqevk-sd.bin-flash_evk"

 

- With the Linux shell script fsl-sdcard-partition.sh, it works but with warning messages (see the log below).

 

In both cases, when I start the board, uboot start and start loading the kernel but it end up with a KERNEL PANIC.
Here are the log I have on the USB debug port:

[    4.908856] init: init first stage started!
[    5.018879] EXT4-fs (mmcblk1p8): VFS: Can't find ext4 filesystem
[    5.025090] init: [libfs_mgr]__mount(source=/dev/block/platform/30b50000.usdhc/by-name/vendor_a,target=/vendor,type=ext4)=-1
[    5.036341] init: Failed to mount '/vendor': Invalid argument
[    5.042221] init: Failed to mount required partitions early ...
[    5.048155] init: panic: rebooting to bootloader
[    5.052846] init: Reboot start, reason: reboot, rebootTarget: bootloader
[    5.064429] init: android::WriteStringToFile open failed: No such file or directory
[    5.072237] init: Shutdown timeout: 6000 ms
[    5.076466] init: terminating init services
[    5.080724] init: waitpid failed: No child processes
[    5.186753] kvm: exiting hardware virtualization
[    5.242267] reboot: Restarting system with command 'bootloader'

Do you have any idea what is going wrong ?

Thank you


Here are the logs of the flashing with the shell script:

 

sudo ./fsl-sdcard-partition.sh -f imx8mq -c 7 /dev/mmcblk0
imx8mq bootloader offset is: 33
make gpt partition for android: partition-table-7GB.img
17+0 records in
17+0 records out
17408 bytes (17 kB, 17 KiB) copied, 0,0327144 s, 532 kB/s

 

/dev/mmcblk0:
 re-reading partition table
GPT fdisk (gdisk) version 1.0.1

 

Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

 

Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.

 

Warning! One or more CRCs don't match. You should repair the disk!

 

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

 

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************

 

Command (? for help):
Recovery/transformation command (? for help): Warning! This will probably do weird things if you've converted an MBR to
GPT form and haven't yet saved the GPT! Proceed? (Y/N):
Recovery/transformation command (? for help): Warning! Secondary header is placed too early on the disk! Do you want to
correct this problem? (Y/N): Have moved second header and partition table to correct location.

 

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

 

Do you want to proceed? (Y/N): OK; writing new GUID partition table (GPT) to /dev/mmcblk0.
The operation has completed successfully.
formating android images
format_partition: userdata:/dev/mmcblk010 ext4
mke2fs 1.42.13 (17-May-2015)
The file /dev/mmcblk010 does not exist and no size was specified.
erase_partition: presistdata : /dev/mmcblk07 1M
1+0 records in
1+0 records out
1048576 bytes (1,0 MB, 1,0 MiB) copied, 0,00285274 s, 368 MB/s
erase_partition: fbmisc : /dev/mmcblk011 1M
1+0 records in
1+0 records out
1048576 bytes (1,0 MB, 1,0 MiB) copied, 0,00094046 s, 1,1 GB/s
erase_partition: misc : /dev/mmcblk05 4M
4+0 records in
4+0 records out
4194304 bytes (4,2 MB, 4,0 MiB) copied, 0,00216022 s, 1,9 GB/s
flash_partition: boot-imx8mq.img ---> /dev/mmcblk01
3+1 records in
3+1 records out
33554432 bytes (34 MB, 32 MiB) copied, 0,461073 s, 72,8 MB/s
flash_partition: boot-imx8mq.img ---> /dev/mmcblk02
3+1 records in
3+1 records out
33554432 bytes (34 MB, 32 MiB) copied, 0,0405409 s, 828 MB/s
flash_partition: system_raw.img ---> /dev/mmcblk03
153+1 records in
153+1 records out
1610612736 bytes (1,6 GB, 1,5 GiB) copied, 0,966704 s, 1,7 GB/s
flash_partition: system_raw.img ---> /dev/mmcblk04
153+1 records in
153+1 records out
1610612736 bytes (1,6 GB, 1,5 GiB) copied, 2,06484 s, 780 MB/s
flash_partition: vendor_raw.img ---> /dev/mmcblk08
11+1 records in
11+1 records out
117440512 bytes (117 MB, 112 MiB) copied, 0,107567 s, 1,1 GB/s
flash_partition: vendor_raw.img ---> /dev/mmcblk09
11+1 records in
11+1 records out
117440512 bytes (117 MB, 112 MiB) copied, 0,0777386 s, 1,5 GB/s
flash_partition: vbmeta-imx8mq.img ---> /dev/mmcblk012
0+1 records in
0+1 records out
4096 bytes (4,1 kB, 4,0 KiB) copied, 0,0190325 s, 215 kB/s
flash_partition: vbmeta-imx8mq.img ---> /dev/mmcblk013
0+1 records in
0+1 records out
4096 bytes (4,1 kB, 4,0 KiB) copied, 0,000210825 s, 19,4 MB/s
erase_partition: uboot : /dev/mmcblk0
flash_partition: u-boot-imx8mq.imx ---> /dev/mmcblk0
the bootloader partition size: 8159
8159+0 records in
8159+0 records out
8354816 bytes (8,4 MB, 8,0 MiB) copied, 1,60966 s, 5,2 MB/s
1020+1 records in
1020+1 records out
1045224 bytes (1,0 MB, 1021 KiB) copied, 0,211923 s, 4,9 MB/s

Outcomes