Hi all!
I am trying to flash Android 7 to a i.MX6DL-based design. Our design is really close to the SABRE SD reference design, although we added a larger eMMC. The device has previously been used with Android 4.4.2, thus we know the hardware to be working.
When I attempt to flash the device, according to the Android Users Guide, using the prebuilt images (including U-Boot), and the UCL2 command included in the Android 7 Mfgtool, I get the following error in the console:
UTP: executing "dd if=$FILE of=/dev/mmcblk3"
67+0 records in
67+0 records out
34304 bytes (34 kB, 34 KiB) copied, 0.014494 s, 2.4 MB/s
UTP: sending Success to kernel for command $ dd if=$FILE of=/dev/mmcblk3.
utp_poll: pass returned.
UTP: received command '$ hdparm -z /dev/mmcblk3'
UTP: executing "hdparm -z /dev/mmcblk3"
/dev/mmcblk3:
re-reading partition table
Alternate GPT is invalid, using primary GPT.
mmcblk3: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11
UTP: sending Success to kernel for command $ hdparm -z /dev/mmcblk3.
utp_poll: pass returned.
UTP: received command '$ gdisk -l /dev/mmcblk3 '
UTP: executing "gdisk -l /dev/mmcblk3 "
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.
****************************************************************************
Disk /dev/mmcblk3: 30777344 sectors, 14.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): CFF91002-E965-4B01-AD31-B9AB2DC9C7ED
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 29360094
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 67583 32.0 MiB FFFF boot
2 67584 133119 32.0 MiB 8300 recovery
3 133120 3278847 1.5 GiB FFFF system
4 3278848 4327423 512.0 MiB FFFF cache
5 4327424 4343807 8.0 MiB FFFF device
6 4343808 4351999 4.0 MiB FFFF misc
7 4352000 4356095 2.0 MiB FFFF datafooter
8 4356096 4360191 2.0 MiB FFFF metadata
9 4360192 4362239 1024.0 KiB FFFF presistdata
10 4362240 29356031 11.9 GiB FFFF userdata
11 29356032 29358079 1024.0 KiB 0700 fbmisc
UTP: sending Success to kernel for command $ gdisk -l /dev/mmcblk3 .
The corresponding UCL commands are
<CMD state="Updater" type="push" body="send" file="files/android/%folder%/partition-table.img" >Sending and writting partition-table.img</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc%">write gpt table to mmc</CMD>
<CMD state="Updater" type="push" body="$ hdparm -z /dev/mmcblk%mmc%">Dectecting emmc partition</CMD>
<CMD state="Updater" type="push" body="$ gdisk -l /dev/mmcblk%mmc% ">List emmc partition</CMD>
Hello,
Don't you have the partition table image that corresponds to the memory size of your eMMC? For example, you can have an image named partition-table-28GB.img or partition-table-image-7GB.img.
Best Regards,
Diego.
Hello Diego, and thanks for helping us out.
Where would we find these partition table image files for various mmc sizes? They don't appear to be included with MFGTool.
Hello,
Those images are located in the zip file of the image that you downloaded or if you built the Android image, the partition images are located in the output directory.
Best regards,
Diego.
Does not my answer to Diego, cover the questions you ask here?
arnt wrote:
I tried both the partition-table.img that was included in the prebuilt files, and I created my own. The one I created was done by setting the correct size in device/fsl/common/partition/device-partitions.bpt, and then doing a build as described in the Android User's Manual.
Changing partition-table.img with the correct size did not appear to have any influence on the issues I described above, although I was able to confirm that the userdata partition had grown, and that the partitions now fills the memory.
Hello,
Not at all, you will need the partition table according to your specifications. This is because our manufacturing tool and the script works with the images that we provide. If you are using another image, you will need to modify the .xml or the script file according to your requirements.
Best Regards,
Diego.
I'm in the same boat, but on i.MX6SL. Nougat build system, custom partition-table.img made by changing the size of the one from device/fsl/common/partition/device-partitions.bpt. "mmc part" is able to see the partitions, but "boota" cannot.
I think your hunch is a step in the right direction, and I will investigate the boota command next. There does not seem to be any documentation available, so I guess that means I'll read the code. If anyone has any documentation that would be greatly appreciated.
I've had success setting
CONFIG_DM_MMC=n
in the bootloader config file. "boota" can now read the partition table and boot.
I decided to try partitioning with the old mksdcard-android.sh script, which uses sfdisk/MBR instead of gdisk/GPT. The result was the same (output below). Makes me think it's a problem specifically with the boota command.
U-Boot 2017.03-00001-g3bd4f62-dirty (Mar 14 2018 - 19:48:47 +0000)
CPU: Freescale i.MX6SL rev1.3 996 MHz (running at 792 MHz)
CPU: Commercial temperature grade (0C to 95C) at 51C
Reset cause: POR
Model: Freescale i.MX6 SoloLite EVK Board
Board: Lochinvar Page RevG
DRAM: 1 GiB
MMC: FSL_SDHC: 0
MMC Device 2 not found
*** Warning - No MMC card found, using default environment
In: serial
Out: serial
Err: serial
flash target is MMC:2
MMC Device 2 not found
MMC Device 2 not found
** Block device MMC 2 not supported
Net:
Warning: ethernet@02188000 using MAC address from ROM
eth0: ethernet@02188000 [PRIME]
Detecting VOL_DOWN+POWER key for recovery(0:0) ...
MMC Device 2 not found
Block device mmc 2 not supported
bcb_rw_block, get_block_size return 0
read_bootctl, bcb_rw_block read failed
read command failed
Fastboot: Normal
watchdog added.........
Hit any key to stop autoboot: 0
boota mmc2
MMC Device 2 not found
boota: cannot find '2' mmc device
=> mmc dev
switch to partitions #0, OK
mmc0(part 0) is current device
=> mmc part
Partition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 16384 65536 7fe9222b-01 83
2 83968 65536 7fe9222b-02 83
3 149504 4313088 7fe9222b-03 05 Extd
4 4462592 3090432 7fe9222b-04 83
5 151552 3145728 7fe9222b-05 83
6 3299328 1048576 7fe9222b-06 83
7 4349952 16384 7fe9222b-07 83
8 4368384 8192 7fe9222b-08 83
9 4378624 4096 7fe9222b-09 83
10 4384768 4096 7fe9222b-0a 83
11 4390912 2048 7fe9222b-0b 83
12 4395008 2048 7fe9222b-0c 83
=> boota mmc0
boota mmc0
can't find partition: boot, dump the partition table
boota: cannot find 'boot' partition
=> boota mmc0 1
boota mmc0 1
can't find partition: 1, dump the partition table
boota: cannot find '1' partition
=>
Hello,
Are you using Android Nougat or Android KitKat?
Best regards,
Diego.
Nougat
The images for the iMX6DL are extracted from a file android_N7.1.2_2.0.0_image_6dqpsabresd.tar.gz, and the Mfgtools from android_N7.1.2_2.0.0_tools.tar.gz
Thanks for helpig me Diego!
Hello,
Which partition table image are you using?
Remember that you need the respective partition table image according to the size of your eMMC memory.
Best regards,
Diego.
I tried both the partition-table.img that was included in the prebuilt files, and I created my own. The one I created was done by setting the correct size in device/fsl/common/partition/device-partitions.bpt, and then doing a build as described in the Android User's Manual.
Changing partition-table.img with the correct size did not appear to have any influence on the issues I described above, although I was able to confirm that the userdata partition had grown, and that the partitions now fills the memory.