AnsweredAssumed Answered

How to prepare SD card for imx6qp and bootimage

Question asked by mrigendra chaubey on Jun 26, 2018
Latest reply on Jun 27, 2018 by mrigendra chaubey

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_IMG_SIZE (512 * 1024) //u-boot size
#define CONFIG_CMD_FAT 1
#define CONFIG_MMC_BASE 0x0

#define CONFIG_ENV_SECT_SIZE (8 * 1024)

#elif defined(CONFIG_FSL_ENV_IN_MMC)



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.