Why do I get ERROR_DDI_SD_BOOT_IMAGE_NOT_FOUND when trying to boot sd card made with mk_mx28_sd?

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

Why do I get ERROR_DDI_SD_BOOT_IMAGE_NOT_FOUND when trying to boot sd card made with mk_mx28_sd?

1,688 Views
dan_edmondson
Contributor I

HI all,

I have a imx28 evk that I am trying to get started with building and running uboot and the kernel as I make changes. I am not having success getting ltib images to boot from my sd card. I used this particular sd card to make a clone of the card that comes with the evk and that booted fine. I notice in the output below that the partitions created don't look like the card that came with the evk, if that makes a difference during boot.

I do not see any errors in the output from mk_mx28_sd but when I try to boot all I get on the console is

0x8020a009

0x8020a009

0x80502008

Here is the output of mk_mx28_sd

dan@Tesla:~/imx28/ltib$ ./mk_mx28_sd -u /dev/sde

Insert the specified device (/dev/sde) now, if you have not already done so.

This script requires the use of 'sudo' and erases the content of the specified device (/dev/sde)

Are you sure you want to continue? (yes/no):

yes

Welcome to fdisk (util-linux 2.25.2).                                                                                

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

Command (m for help): Changing display/entry units to cylinders (DEPRECATED!).

Command (m for help): Cylinders as display units are deprecated.

Created a new DOS disklabel with disk identifier 0x745e1da0.

Command (m for help): Partition type

   p   primary (0 primary, 0 extended, 4 free)

   e   extended (container for logical partitions)

Select (default p): Partition number (1-4, default 1): First cylinder (1-1021, default 1): Last cylinder, +cylinders or +size{K,M,G,T,P} (1-1021, default 1021):

Created a new partition 1 of type 'Linux' and of size 36 MiB.

Command (m for help): Selected partition 1

Hex code (type L to list all codes): If you have created or modified any DOS 6.x partitions, please see the fdisk documentation for additional information.

Changed type of partition 'Linux' to 'W95 FAT32'.

Command (m for help): Partition type

   p   primary (1 primary, 0 extended, 3 free)

   e   extended (container for logical partitions)

Select (default p): Partition number (2-4, default 2): First cylinder (5-1021, default 5): Last cylinder, +cylinders or +size{K,M,G,T,P} (5-1021, default 1021):

Created a new partition 2 of type 'Linux' and of size 30 MiB.

Command (m for help): Partition number (1,2, default 2): Hex code (type L to list all codes):

Changed type of partition 'Linux' to 'OnTrack DM6 Aux3'.

Command (m for help): Partition type

   p   primary (2 primary, 0 extended, 2 free)

   e   extended (container for logical partitions)

Select (default p): Partition number (3,4, default 3): First cylinder (10-1021, default 10): Last cylinder, +cylinders or +size{K,M,G,T,P} (10-1021, default 1021):

Created a new partition 3 of type 'Linux' and of size 7.3 GiB.

Command (m for help): Partition number (1-3, default 3): Hex code (type L to list all codes):

Changed type of partition 'Linux' to 'Linux'.

Command (m for help): Disk /dev/sde: 7.4 GiB, 7948206080 bytes, 15523840 sectors

Geometry: 245 heads, 62 sectors/track, 1021 cylinders

Units: cylinders of 15190 * 512 = 7777280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x745e1da0

Device     Boot Start   End Cylinders  Size Id Type

/dev/sde1           1     5         5   36M  b W95 FAT32

/dev/sde2           5    10         5   30M 53 OnTrack DM6 Aux3

/dev/sde3          10  1021      1012  7.3G 83 Linux

Command (m for help): The partition table has been altered.

Calling ioctl() to re-read partition table.

Syncing disks.

Installing boot stream ./rootfs/boot/imx28_ivt_uboot.sb on /dev/sde2...

0+1 records in

1+0 records out

512 bytes (512 B) copied, 8.8999e-05 s, 5.8 MB/s

274+1 records in

275+0 records out

140800 bytes (141 kB) copied, 0.000365849 s, 385 MB/s

...finished installing boot stream on /dev/sde2.

Formatting rootfs partition...

mke2fs 1.42.12 (29-Aug-2014)

/dev/sde3 contains a ext2 file system

        last mounted on /home/dan/imx28/ltib/zzzsdcard on Sun May  8 15:18:30 2016

Proceed anyway? (y,n) yes

Creating filesystem with 1921471 4k blocks and 480496 inodes

Filesystem UUID: 0baabc12-5263-43bb-a481-a506cbe52048

Superblock backups stored on blocks:

        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done                           

Writing inode tables: done                           

Writing superblocks and filesystem accounting information: done

Installing rootfs on /dev/sde3...

Cleaning up...

...finished installing rootfs on /dev/sde3.

Done! Plug the SD/MMC card into the i.MX board and power-on.

thanks,

Dan

Labels (1)
0 Kudos
7 Replies

1,240 Views
dan_edmondson
Contributor I

I'm learning more. I can see from the output of mk_mx28_sd that it writes the boot stream, imx28_ivt_uboot.sb, to the second partition which dolphin can't read. It looks like this is where my problem is. I will look closer at the output of ltib and the header that I think is put on during mk_mx28_sd with a call to mk_hdr.sh.

Device Boot  Start End Sectors  Size Id Type
/dev/sde1  *  2048   67583   65536   32M  b W95 FAT32
/dev/sde2    67584  133119   65536   32M 53 OnTrack DM6 Aux3
/dev/sde3   133120 7744511 7611392  3.6G 83 Linux

Command (m for help): The partition table has been altered.

Calling ioctl() to re-read partition table.

Syncing disks.

Installing boot stream ./rootfs/boot/imx28_ivt_uboot.sb on /dev/sde2...

0+1 records in

1+0 records out

512 bytes (512 B) copied, 6.5867e-05 s, 7.8 MB/s

274+1 records in

275+0 records out

140800 bytes (141 kB) copied, 0.000312049 s, 451 MB/s

...finished installing boot stream on /dev/sde2.

0 Kudos

1,240 Views
dan_edmondson
Contributor I

I tried another experiment to see if my troubles are caused by the contents of the sd card. So I took the card I made in the previous post, deleted all of the rootfs, and replaced this with the rootfs contents from the evk SD card. The copy is not a 100% match, but it is close.

Here is the evk SD card rootfs properties

evkrootfs.png

and the copy on the newly created SD card.

copyofevk.png

But still no boot joy.

      0x8020a009

0x8020a009

0x80502008

0 Kudos

1,240 Views
dan_edmondson
Contributor I

Hello Igor,

Yes I have one other new 8G but the one I have been trying with will boot if I simply copy what is on the SD card that came with the board. I know the card will work if I get it formatted properly. I'm not having much time during the week to play with this but I can report what I have learned and tried, and what I don't know yet.

The first part of what I don't know has to do with the ROM finding a bootable image on one of the boot devices. I understand that the ROM will immediately attempt to fetch instruction and when successful I get this output, which I assume is from the ROM and not an image on the SD card. This is using the SD  card that came with the evk.

HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLC

PowerPrep start initialize power...

Battery Voltage = 4.24V

boot from battery. 5v input not detected

LLLCSep 10 201012:30:50

FRAC 0x92925552

Wait for ddr ready 1power 0x00820616

Frac 0x92925552

start change cpu freq

hbus 0x00000003

cpu 0x00010001

start test memory accress

ddr2 0x40000000

finish simple test

LLLLLLLFLCLLJUncompressing Linux......................................................................................

If I keep the assumption that there is nothing else on the card that needs to be added, then perhaps the new card just needs to be formatted the same as the evk SD card. Here is what my host machine finds on the evk card using dolphin file browser.  There are two mountable partitions, one is obviously the rootfs but the other appears to just be formatted and empty.

evk733Mpartition.png

evk3Gpartition.png

evkproperties.png

Here is what fdisk sees on the evk card. There is a 3G fat32 partition that matches the above.

evkfdisk.png

Now I look at the sd card created by mk_mx28_sd.  First I only see one partition in dolphin.

mksdpartition.png

and what fdisk sees.

mksdfdisk.png

From this information it seems there is a readable fat32 partition on the evk SD card which does boot up fine. This is why I asked the question about a mkfs vfat step on that partition.

To try to answer the question I did a mkfs on the fat partion and now I can browse it in dolphin.

mkfsfat.png

fatpartition.png

However this card or the what is in the rootfs still will not boot. The rootfs and contents are from my ltib build of the imx28 evk.

0x8020a009

0x80502008

I have even tried manually making the partitions using fdisk exactly the same as the evk SD card, then manually copying the rootfs from ltib to the new card but no luck.

As a side note, I work with a custom imx28 board at work so I do have experience with the processor, uboot, linux, etc. But that board does not have sd card capabilites, it boots from spi flash, which is where I want to get to with the evk. On the other hand, I can push boot that custom board across the usb otp port anytime I need to, but haven't been able to do this yet with my mx28 evk. (I think that is a Windows/laptop issue with my home equipment.) So I have examples here and there on how things work but am still working to get these capabilities going on my evk.

thanks for helping!

Dan

0 Kudos

1,240 Views
dan_edmondson
Contributor I

Igor,

should we see output from the mkfs  for a vfat file system on the first partition?  

0 Kudos

1,240 Views
igorpadykov
NXP Employee
NXP Employee

Hi Dan

does this issue occur only with one SD, could you

try some brand new card.

Best regards

igor

0 Kudos

1,240 Views
dan_edmondson
Contributor I

Hello Igor,

I followed the thread you posted and made the changes to the script. Alas, I still see 0x8020a009 when I try to boot the sd card, but the partitions look better.

Here is the output of mk_mx28_sd.

dan@Tesla:~/imx28/ltib$ ./mk_mx28_sd -u /dev/sde

Insert the specified device (/dev/sde) now, if you have not already done so.

This script requires the use of 'sudo' and erases the content of the specified device (/dev/sde)

Are you sure you want to continue? (yes/no):

yes

Welcome to fdisk (util-linux 2.25.2).                                                                                

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

Command (m for help):

Command (m for help):

Created a new DOS disklabel with disk identifier 0x001e18d8.

Command (m for help): Partition type

   p   primary (0 primary, 0 extended, 4 free)

   e   extended (container for logical partitions)

Select (default p): Partition number (1-4, default 1): First sector (2048-15523839, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-15523839, default 15523839):

Created a new partition 1 of type 'Linux' and of size 32 MiB.

Command (m for help): Selected partition 1

Hex code (type L to list all codes): If you have created or modified any DOS 6.x partitions, please see the fdisk documentation for additional information.

Changed type of partition 'Linux' to 'W95 FAT32'.

Command (m for help): Selected partition 1

The bootable flag on partition 1 is enabled now.

Command (m for help): Partition type

   p   primary (1 primary, 0 extended, 3 free)

   e   extended (container for logical partitions)

Select (default p): Partition number (2-4, default 2): First sector (67584-15523839, default 67584): Last sector, +sectors or +size{K,M,G,T,P} (67584-15523839, default 15523839):

Created a new partition 2 of type 'Linux' and of size 32 MiB.

Command (m for help): Partition number (1,2, default 2): Hex code (type L to list all codes):

Changed type of partition 'Linux' to 'OnTrack DM6 Aux3'.

Command (m for help): Partition type

   p   primary (2 primary, 0 extended, 2 free)

   e   extended (container for logical partitions)

Select (default p): Partition number (3,4, default 3): First sector (133120-15523839, default 133120): Last sector, +sectors or +size{K,M,G,T,P} (133120-15523839, default 15523839):

Created a new partition 3 of type 'Linux' and of size 7.3 GiB.

Command (m for help): Partition number (1-3, default 3): Hex code (type L to list all codes):

Changed type of partition 'Linux' to 'Linux'.

Command (m for help): Disk /dev/sde: 7.4 GiB, 7948206080 bytes, 15523840 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x001e18d8

Device     Boot  Start      End  Sectors  Size Id Type

/dev/sde1  *      2048    67583    65536   32M  b W95 FAT32

/dev/sde2        67584   133119    65536   32M 53 OnTrack DM6 Aux3

/dev/sde3       133120 15523839 15390720  7.3G 83 Linux

Command (m for help): The partition table has been altered.

Calling ioctl() to re-read partition table.

Syncing disks.

Installing boot stream ./rootfs/boot/imx28_ivt_uboot.sb on /dev/sde2...

0+1 records in

1+0 records out

512 bytes (512 B) copied, 7.1619e-05 s, 7.1 MB/s

274+1 records in

275+0 records out

140800 bytes (141 kB) copied, 0.000348738 s, 404 MB/s

...finished installing boot stream on /dev/sde2.

Formatting rootfs partition...

mke2fs 1.42.12 (29-Aug-2014)

/dev/sde3 contains a ext2 file system

        last mounted on /home/dan/imx28/ltib/zzzsdcard on Mon May  9 21:16:35 2016

Proceed anyway? (y,n) y

Creating filesystem with 1923840 4k blocks and 481440 inodes

Filesystem UUID: 9029580d-ff77-49a8-8943-b9de59457aa0

Superblock backups stored on blocks:

        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done                           

Writing inode tables: done                           

Writing superblocks and filesystem accounting information: done

Installing rootfs on /dev/sde3...

Cleaning up...

...finished installing rootfs on /dev/sde3.

Done! Plug the SD/MMC card into the i.MX board and power-on.

dan@Tesla:~/imx28/ltib$

But this is all I see when I try to boot the card.

      0x8020a009

0x8020a009

0x80502008

0 Kudos

1,240 Views
igorpadykov
NXP Employee
NXP Employee

Hi Dan

for created partitions one can check

Running mk_mx28_sd on Ubuntu 12.04

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos