Hi Sir,
I am using iMX8M Mini and Android AOSP Source code for Android 9.0.
I have downloaded the AOSP and successfully able to built it using steps given in Android user guide Rev. P9.0.0_1.0.0-ga, 01/2019 .
I checked my => /out/target/product/evk_8mm/ Directory and I can see all the output files there.
Now i want to flash these output files in my sdcard and test the build images.
for that i am following the steps given in 5.1.1 Storage partitions of Android user guide Rev. P9.0.0_1.0.0-ga,
As per the steps when i am trying to execute fsl-sdcard-partition.sh file I get error saying =>
File partition-table.img not found. Please check. Exiting
Below Command I am executing =>
sudo ./device/fsl/common/tools/fsl-sdcard-partition.sh -f imx8mm /dev/mmcblk0
imx8mm bootloader offset is: 33
File partition-table.img not found. Please check. Exiting
NOTE : - My sdcard is 16GB and I connected my sdcard to my laptop using sdcard adapter and i can see it as /dev/mmcblk0 .
NOTE - In /out/target/product/evk_8mm/ directory also there is fsl-sdcard-partition.sh script and when i try to execute from there also then also i get similar error.
sudo ./out/target/product/evk_8mm/fsl-sdcard-partition.sh -f imx8mm /dev/mmcblk0
imx8mm bootloader offset is: 33
File partition-table.img not found. Please check. Exiting
Note : - I checked /device/fsl/common/tools/ directory as well as /out/target/product/evk_8mm/ directory also and I can see partition-table.img file there along with partition-table-7GB.img and other files.
When I run file command on partition-table.img i get below msg =>
file partition-table.img
partition-table.img: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,1), end-CHS (0x3ff,255,63), startsector 1, 27262975 sectors, extended partition table (last)
there is no symbolic link or anything...
because of this error i am not able to flash build images on my sdcard and got stuck here.
Please help me why i am getting this error and how to solve it.
Thanks & Regards,
Maneesh
Now I am able to use fsl-sdcard-partition.sh script properly..
But after running the script i am getting below error -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
sudo ./fsl-sdcard-partition.sh -f imx8mm /dev/mmcblk0
imx8mm bootloader offset is: 33
make gpt partition for android: partition-table.img
17+0 records in
17+0 records out
17408 bytes (17 kB, 17 KiB) copied, 0.0193066 s, 902 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/mmcblk012 ext4
mke2fs 1.42.13 (17-May-2015)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Using gdisk and parted i corrected my sdcard and reformatted it but still i am getting same error.
When i independent run the gdisk command i get this msg =>
sudo gdisk /dev/mmcblk0
[sudo] password for bruviti:
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help):
But when i run fsl-sdcard-partition.sh i get same error as posted above...
I reformatted and corrected GPT of my sdcard multiple time but same error i am getting again and again.
NOTE : - I am using 16gb sandisk ultra micro sd card and connecting my sdcard with my laptop using sdcard adapter.
Any Suggestion or Idea how can i solve this issue? or why this issue is coming ?
Thanks & Regards,
Maneesh
Hello,
This could be related to the device node you're using since the script runs using /dev/sdX,
Could you try using an SD reader?
And run the command:
sudo ./fsl-sdcard-partition.sh -f imx8mm -c 14 /dev/sdX
X is the disk index from 'a' to 'z'
-c 14 because you're using a 16GB SD Card
Hope this helps,
Best regards,
Aldo.
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Aldo Gutierrez,
Thanks for your reply.
Your suggestion was very helpful and now i am able to flash images into SDCARD. using card reader.
But i have few doubts -
1. In my first comments as i mentioned when i try to run fsl-sdcard-partition.sh it gives error saying -
"File partition-table.img not found. Please check. Exiting"
even though the file is present there.
I solved it by making all the files in the directory executable and some how it works but i am still now sure what can be
proper solution to this problem. sometimes it work sometimes not.
2. As you mentioned in your commends - sudo ./fsl-sdcard-partition.sh -f imx8mm -c 14 /dev/sdX
there is no partition-table-14GB.img files created in my directory... I copied and renamed the partition-table.img to
partition-table-14GB.img file. So is it the proper way of creating partition-table-14GB.img file ?? or AOSP itself create this
file during build ? In Android user guide documents no where it is mentioned about partition-table-14GB.img files.
3. I am able to flash the images on SDCARD and it is working fine. but by default it flashed images for HDMI support.
But if i want to flash files which support MIPI-DSI display then how can i do this ?
I mean to say -> the fsl-sdcard-partition.sh script by default uses vbmeta-imx8mm.img and dtbo-imx8mm.img files.
but if i want to use vbmeta-imx8mm-mipi-panel.img and dtbo-imx8mm-mipi-panel.img files which is needed for
MIPI-DSI display support then how can i do that using this fsl-sdcard-partition.sh script ?
Thanks & Regards,
Maneesh
Hi Maneesh,
1.- I have tried on my side and works properly, please try changing the owner of the file to nobody.
2.- No, sorry that was my mistake, I took the i.MX6 as an example and forgot about the default for the i.MX 8MM is 16GB, so don't worry about it, and sorry for the confusion.
3.- the Easy way should be renaming the files, i.e.
vbmeta-imx8mm.img > vbmeta-imx8mm1.img (to avoid deleting the file)
vbmeta-imx8mm-mipi-panel.img > vbmeta-imx8mm.img
Hope it helps,
Regards,
Aldo.