/dev/random on imx51

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

/dev/random on imx51

1,759 次查看
ChristopheLevan
Contributor I

Hi there,

I am new to the imx51 platform and I apologise if my question is trivial but I wasn't able to find documentation about it.

I am trying to use /dev/random on imx51 (and linux 2.6.31).

When I read from it, I have got no data.

I would have thought the imx random number generator present in the SAHARA would be connected to it.

I used other chips in the past and the internal RNG was connected to /dev/random.

Am I missing something ? Or maybe I am using the wrong Linux version ?

Thanks for your help.

Christophe

0 项奖励
回复
4 回复数

1,241 次查看
ChristopheLevan
Contributor I

Thanks Rod, that's very helpful.

Regards,

Christophe

0 项奖励
回复

1,241 次查看
shashankpathak
Contributor II

Hi,

Can anyone suggest from where can i get the test programs for the API?

Is there any link from where, i can download the test code?

Thanks,

Shashank.

0 项奖励
回复

1,241 次查看
Yuri
NXP Employee
NXP Employee

  There is TestCode_Release_SDK for i.MX51. Please create Service Request

to get it.

~Yuri.

0 项奖励
回复

1,241 次查看
rodz
Contributor III

Hi Christophe,

 

The driver for SAHARA on MX51/MX53 is not connected to the /dev/random special file.   Rather, it uses a FSL proprietary API called the Freescale Security HW API (or FSL SHW API for short).  The source code for the SAHARA driver and API is included in the Freescale Linux BSP package under /drivers/mxc/security/sahara2. 

The API offers an interface for both user and kernel modes.  The API for generating random numbers with the HW RNG is fsl_shw_get_random().  There should be test code under /test/mxc_sahara_test that provides an example for calling  fsl_shw_get_random() to get random data.

 

Regards

-Rod

0 项奖励
回复