IMX8M EVK flashing issue

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

IMX8M EVK flashing issue

2,875 Views
clement22
Contributor II

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

Tags (1)
0 Kudos
4 Replies

1,785 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Are you using our demo image, or is the one that it was built with our BSP?

If you are not using our demo image. Please take note that the default build image is for the eMMC and not for the SD card. In that case, you will need to change that default configuration.

Hope this can help you.

Best Regards,

Diego.  

0 Kudos

1,785 Views
clement22
Contributor II

I tried the prebuild image "android_O8.1.0_1.3.0_8M_image_8mq".

But in the future I want to build the BSP myself and flash it on SDCard. Can you tell me where I can modify the default config ?

Thanks

0 Kudos

1,785 Views
diegoadrian
NXP Employee
NXP Employee

Just with the building command:

$ make bootimage BUILD_TARGET_DEVICE=sd
$ make recoveryimage BUILD_TARGET_DEVICE=sd

Just remember to erase the recovery and boot image, if you already have built the Android GUI.

Hope this can help you.

Best Regards,

Diego.

0 Kudos

1,785 Views
baodongchen
Contributor II

I have a evk_8mq board with linux preinstalled in emmc and it can boot.

And i download the bsp `imx-o8.1.0_1.3.0_8m` and successfully built for android.

Now i want to make a bootable sdcard image but without success.

Is there anything need to be fixed for booting from sdcard besides `BUILD_TARGET_DEVICE=sd`?

0 Kudos