How to run CAAM blob generation test present in i.MX 6 Series Platform SDK ?

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

How to run CAAM blob generation test present in i.MX 6 Series Platform SDK ?

1,965 Views
ganeshc
Contributor III

I referred to the document attached with the SDK but it is not giving much information about how to execute the test.

In that document one of statement is

"Keep in mind that in order to generate a blob with the CAAM OTPMK , a secure boot with HAB is in closed config"

What is it ? How We can check that HAB is in closed config or not ?


Do we required to do anything else prior to run this caam blob generation test ?

I am using linux in my device(Wandboard Quad) should I copy the generated binary file using following command


" $ dd if=output/mx6dq/caam_blob_gen.bin of=/dev/sdx seek=2 skip=2 bs=512 && sync"

After executing this command what we need to do.As I found in one of discussion that


  "The .bin file, copied to SD card via Linux command "dd" usually is not visible through a filesystem.

It is just sequence of physical blocks, located on free area, which is not accessible by a filesystem."

So how and when this test will be run ??

Regards,

Ganesh

Labels (2)
7 Replies

1,388 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Open or Closed configuration is determined by the SEC_CONFIG fuse field. By default

i.MX6 is in Open configuration.

  Please look at  section 8.2.6 (Boot security settings) of the i.MX6 D/Q Reference Manual

and the AN4581 (Secure Boot on i.MX50, i.MX53, and i.MX 6 Series using HABv4) app note
about HAB closed and open configurations. 

  It is possible to test CAAM in Open configuration, but blob will be created using the known

CAAM default master key.

  To run the code, after “dd” – please insert the SD card to i.MX6 board and boot it.


Have a great day,
Yuri

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

0 Kudos

1,387 Views
ganeshc
Contributor III

Hi Yuri,
I performed the following command
"sudo dd if=sdk_unit_test_caam.bin of=/dev/sdb seek=2 skip=2 bs=512 && sync"
and checked boot logs using dmesg but I didn't found any difference earlier logs and logs after executing this command.
So How can I ensure that test has being run successfully or not ??
I attached logs please find attachment.

Regards,
Ganesh

0 Kudos

1,387 Views
Yuri
NXP Employee
NXP Employee

Hello,

  You have to prepare boot SD card with the test and try to boot it.

No any Linux on console in such case.

I attached the .bin file and cfimager utility to prepare boot SD under Windows.

Please try using the following command (CMD>)

CMD> cfimager-imx -o 0 -f caam_blob_gen.bin -d g:

g - is a (USB card reader) device, it may be other in Your case. 

Regards,

Yuri.

1,387 Views
ganeshc
Contributor III

HI Yuri,
I tried command which you gave,

D:\Projects\Phoenix Security\Yuri\cfimager-imx.exe>cfimager-imx -o 0 -f caam_blob_gen.bin -d E

drive = E

vendor = USB2.0

product = CARD-READER

removable = yes

device block size = 512 bytes

device block count = 0xed8000

firmware size = 0x18078 bytes (0xc1 blocks)

extra blocks = 1854

Writing firmware...

writeFirmware from 0 or sector 0

Writing FAT partition...

Writing MBR...

setPartitionEntry m_blockCount = ea6000, m_startBlock = 32000, deviceBlockCount= ed8000

done!

D:\Projects\Phoenix Security\Yuri\cfimager-imx.exe>

After this Board is not booting up with this memory card,What can be problem ?
Or anything else is required prior to run this command ?

What this command or tool do ??

Regards,
Ganesh

0 Kudos

1,386 Views
Yuri
NXP Employee
NXP Employee

Please try the enclosed mfg configuration.

~Yuri.

0 Kudos

1,386 Views
ganeshc
Contributor III

Hi Yuri,
Thanx .I will do it using mfg tool also but I have one concern in cgf.ini file

[profiles]

chip = Linux

[platform]

board = SabreSD

[LIST]

name = DWLD_IN_SDP


Doest it really matter that board which we providing in this file ?

If Yes than which board should I use for my device Wandboard Quad

http://www.mouser.in/ProductDetail/Wandboard/WBQUAD/?qs=cF9QIdCP5siVNjY%2fywrBAA%3d%3d

This board is from iMX6 family only and the platform sdk was for iMX6 ,So there should be option for selecting this board also.

How I can know which board to be provide here ?


And again the same question what exactly this tool do "cfimager-imx" and "mfg" .

Because After using that earlier  command "cfimager-imx -o 0 -f caam_blob_gen.bin -d E" I need to put my linux image again.

So what they exactly do that's my earlier image is not working ?

Regards,
Ganesh

0 Kudos

1,386 Views
Yuri
NXP Employee
NXP Employee

Ganesh, hi !

   Strictly speaking the Wandboard Quad board is not supported in the Platform SDK.

The SDK supports only FSL designs. 

Regards,

Yuri.

0 Kudos