I am porting to a board that is based on i.MX6QP.
Previous board is using NAND flash to boot and is based on plugin image.
Now i am trying to port android on this board with newest nxp kernel and uboot.
The thing is I can't generate uboot.imx file as it did not have imx cfg file. So until now I am creating a uboot.img and stripping off the first 64 byte to get correct offsets and do dd command to raw write on the /dev/sdX.
Now I need to port kernel.
Previously the board was using kernel stored at 0x50000 offset at NAND and also environment variables from NAND.
I want it to be pure SD based boot so I want to store all environment variables on SD as well as kernel.
1. Can anybody guide me what changes are required to be done. I disabled NAND related macros from board file and wrote mmc related macros.
#define CONFIG_FSL_ENV_IN_MMC
#define CONFIG_IMG_SIZE (512 * 1024) //u-boot size
#define CONFIG_CMD_MMC
#define CONFIG_CMD_FAT 1
#define CONFIG_MMC_BASE 0x0
#define CONFIG_ENV_SECT_SIZE (8 * 1024)
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
#elif defined(CONFIG_FSL_ENV_IN_MMC)
#define CONFIG_ENV_IS_IN_MMC 1
#define CONFIG_ENV_OFFSET (CONFIG_IMG_SIZE - CONFIG_ENV_SIZE)
When I build u-boot with these settings I don't see enironment variables at CONFIG_ENV_OFFSET that is here 504kb.How ever I can see the envionment at some other place in hexdump.Also the size of uboot.img is reduceed to some ~400kb.
So where my understanding is wrong?
2. How to prepare the card?
I prepared card and making two partitons, 1 primary partition of FAT 25 GB and other EXT as 90 GB, and copied uboot.img inside but I can't boot with this.
3.At what addess I can store kernel in sdcard and at what address uboot can relocate it. I think Previous uboot was relocating it to 0x11000000.
I am a total noob here and need some direction atleast.\
Nowhere till now I used yocto and I don't want to use it.
Thanks.
Hi mrigendra
seems most simple way to look at Android documentation provided on
for example check sect.5 Programming Images attached Android User Guide.
For preparing partitions one can try fsl-sdcard-partition.sh included in
i.MX 6/7D Series Manufacturing Toolkit for Android O8.0.0_1.0.0 Release
For programming images may be useful to use mfg tools, included in this package and script
mfgtool2-android-mx6qp-sabresd-sd.vbs
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Can you tell me what environment variables I need to put inside board header file so that my board boots up.
The thing I don't understand is this,
I can't generate uboot.imx because I am using a plugin image and using flash_header.S
How can I generate .imx file, because as per the makefile I need to have the path for imx configuration file and that I don't have?
I am able to create a uboot.img file. Now I follow these command from linux user guide,
sudo dd if=<U-Boot image> of=/dev/sdx bs=1k seek=<offset> conv=fsync
here offset is 1 in my case.
This uboot does not boot. If I do this
sudo dd if=<U-Boot image> of=/dev/sdx bs=1M count=1
My uboot comes up.
So why ROM code is not able to boot up properly with given commands?