i.Mx6q partitions table SD card

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

i.Mx6q partitions table SD card

2,742 Views
faustosessego1
Contributor III

Hi,

i'm trying to load my custom u-boot into SD card but the system boot only if i copy the u-boot by

 

sudo dd if=../u-boot-fslc/u-boot.imx of=/dev/sdb bs=1k seek=1 && sudo sync

 

My partitions are like 

+-----+------+--------+-----+---------------+-----------------

| MBR |  ... | u-boot | ... | FAT partition | Linux partition ...

+-----+------+--------+-----+---------------+-----------------

0     512    1024           1M              ~257M

 

I read there is the possibility to put the u-boot directly into FAT partition by using the cp command instead of dd, but in this case the system doesn't start (the FAT is a partition bootable).

I used my script to create the right sd card.

+-----+------+---------------+-----------------

| MBR |  ...  | FAT partition | Linux partition ...

+-----+------+---------------+-----------------

0     512    2048           1M              ~257M

 

Why doesn't the system boot?

 

Thanks

Original Attachment has been moved to: prepare_card.sh

Labels (2)
4 Replies

1,745 Views
lokesh
Contributor II

Hi Fausto,

It is slightly older question, but I thought I will reply to it for the benefit of others as well. 

Assuming your board is ready to boot from an SD Card, the i.MX6 will , for the very first instruction, look at the location 1K ( 0x0400) in the SD Card to start booting.

For the very first boot instruction the i.MX6 looks for in the SD Card, it does not care, if there is an MBR or for that matter a GPT. In fact you do not even need to have any partition at all in the SD Card and you will still be able to boot it.

What you are suggesting is using cp to write file - this does not work as, the file system created does not gaurantee the starting address using cp process. I am not expert, but I think that the beginning of each partition also contains some details of the files etc.

I have just written some more details explanation in case you or anyone wants to check - Preparing i.MX6 to boot from SD Card | Reference Designer 

0 Kudos
Reply

1,745 Views
Yuri
NXP Employee
NXP Employee

Hello,

  From section 8.5.3.1 (Expansion Device eFUSE Configuration) of the

i.MX6 D/Q RM (Rev. 3, 07/2015) :

 ---

   MMC/SD/eSD/SDXC/eMMC can be connected to any of the USDHC blocks and can be booted by copying 4Kbyte of data from MMC/SD/eSD/eMMC device to internal RAM. After checking the Image Vector Table header value (0xD1) from Program Image, the ROM code performs a DCD check. After successful DCD extraction, the ROM code extracts from Boot Data Structure the destination pointer and length of image to be copied to RAM device from where code execution occurs.


  The Initial 4Kbyte of Program Image must contain the IVT, DCD and the Boot Data structures.

The boot ROM code reads application image length and application destination pointer from image.

---

  So, boot ROM reads raw data (blocks) of OS bootloader (U-boot) from SD card without any file system.

The U-boot can read kernel and the DTB using FAT of the boot SD card.

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,745 Views
faustosessego1
Contributor III

Hi Yuri,

i read the procedure for BeagleBone

How to create a Boot SD Card for the BeagleBone black · linneman/planck Wiki · GitHub 

It seems the u-boot is inserted into FAT partition with the MLO.

Is it possible to have the same condition and to write the (U-boot) into SD card with file system?

Thanks a lot

0 Kudos
Reply

1,745 Views
Yuri
NXP Employee
NXP Employee

Hello,

  BeagleBone is not i.MX based. They have other bootROM.

Regards,

Yuri.