Redundant Boot in sdcard failed

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

Redundant Boot in sdcard failed

2,380 Views
julienc
Contributor II

Hi Community,

For an imx6qsabresd board : I would like to implement the Redundant Boot Support.

I modified the secondary image table format like this in my sdcard to reboot with the first u-boot after a WARM reset.

AddressValue
0x200 (reserved Chip Num)0
0x204 (reserved Drive Type)

0

0x208 (tag)0x00112233
0x20C (first sector number)0x002
0x210 (reserved Sector Count )0

I wrote this header in 0x200 :

0000 0000 0000 0000 3322 1100 0200 0000

0000 0000

dd if=header of=/dev/sdb bs=1 seek=512 count=20

For rebooting with this table I created a WARM reset in u-boot :

PERSIST_SECONDARY_BOOT : SRC_GPR10[30]

reg = readl( &psrc->gpr10 );

reg |= 0x40000000;

writel( reg , &psrc->gpr10 );

I send a reset in u-boot prompt and the system do nothing :

=> reset

resetting ...

1) The secondary image table is correct ?

2) The WARM reset cannot be like that ?

Labels (1)
Tags (2)
0 Kudos
7 Replies

1,379 Views
BiyongSUN
NXP Employee
NXP Employee

1. Create SDCARD:
   

   
   dd if=i.MX6Q-secondary_boot_demo.sdcard of=/dev/sdc bs=512 skip=1 seek=1
  
  

2. Turn on Secondary Boot:

   In the uboot commandline:

type:    mw 20d8044 0x40000000
type:    reset

Demo Screenshot:

Untitled.png

0 Kudos

1,379 Views
ashokkumarredd1
Contributor I

As imx6 redundant boot  from secondary bootloader may be useful for someone , i am sharing below procedure which worked for me .

Create primary boot image

dd if=u-boot.bin of=/dev/sdc bs=1K seek=1 skip=1

Create secondary boot image, in this example, start from 400KB i.e  seek in blocks.

dd if=u-boot-sec.bin of=/dev/sdc bs=512 seek=800

Take header file shared in below link.

i.MX53 Redundant Boot -blog archive

To create secondary image table, run below command

dd if=header of=/dev/sdc bs=512 seek=1count=1

Destory primary u-boot by setting the entry of ivt to 0, so rom can jump to secondary image.

dd if=/dev/zero of=/dev/sdc bs=1 seek=1028  count=4

for imx6 check value at 0x20d8044 it should show 0x40000000 , which indicates imx6 has booted from secondary bootloader.

0 Kudos

1,379 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi Julien,

Where you able to make it work?

Best Regards,

Alejandro

0 Kudos

1,379 Views
julienc
Contributor II

Hi Alejandro,

I'm not able to make it work so could you help about this ?

Best Regards,

Julien

0 Kudos

1,379 Views
b36401
NXP Employee
NXP Employee

I can suspect that there is some mishmash with big- and litte-endian modes.
Please doublecheck this "header" file with "hexdump -C" command.
Here is an example of mishmash I mean:

# echo -n @ABC > a
# hexdump -C a
00000000  40 41 42 43                                       |@ABC|
00000004
# hexdump a
0000000 4140 4342
0000004
#

Have a great day,
Victor

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

1,379 Views
julienc
Contributor II

Thank for your help but i tried and nothing append.

I used the header from this post : Re: i.MX53 Redundant Boot -blog archive

0 Kudos

1,379 Views
wimdewitte
Contributor II

I can confirm that it's not working on imx6qsabresd with sd-card.

Tried every possibility regarding endianness, different sector offsets, etc.

Since this feature is a must-have in our product, I shall appreciate it that a freescale engineer can take this topic up.

Are we facing a silicon bug? Is the programming manual lacking information? Or do we miss something else?

Best regards,

Wim

0 Kudos