Errors while building i.MX 6 Series Platform SDK "Version 1.1"

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

Errors while building i.MX 6 Series Platform SDK "Version 1.1"

Jump to solution
6,698 Views
ganeshc
Contributor III

I have downloaded  "i.MX 6 Series Platform SDK" from the link provided by the freescale community. And followed all the steps written in readme.pdf provided with sdk package itself while build command it's giving following errors.

....

.

.

.

.

.

.

Building caam_blob_gen [mx6dq sabre_ai a]

Compiling apps/caam_blob_gen/src/caam_blob_gen.c

Compiling apps/common/ivt.c

Compiling apps/common/platform_init.c

Linking caam_blob_gen

/root/mgc/embedded/codebench/bin/../arm-none-eabi/lib//libc.a(lib_a-assert.o): In function `__assert_func':

assert.c:(.text+0x3c): undefined reference to `abort'

/root/sdk/iMX6_Platform_SDK/output/mx6dq/lib/libsdk.a(runtime_support.o): In function `_execve':

/root/sdk/iMX6_Platform_SDK/sdk/utility/src/runtime_support.c:77: undefined reference to `errno'

/root/sdk/iMX6_Platform_SDK/sdk/utility/src/runtime_support.c:77: undefined reference to `errno'

/root/sdk/iMX6_Platform_SDK/output/mx6dq/lib/libsdk.a(runtime_support.o): In function `_fork':

/root/sdk/iMX6_Platform_SDK/sdk/utility/src/runtime_support.c:83: undefined reference to `errno'

/root/sdk/iMX6_Platform_SDK/sdk/utility/src/runtime_support.c:83: undefined reference to `errno'

/root/sdk/iMX6_Platform_SDK/output/mx6dq/lib/libsdk.a(runtime_support.o): In function `_sbrk':

/root/sdk/iMX6_Platform_SDK/sdk/utility/src/runtime_support.c:255: undefined reference to `abort'

/root/sdk/iMX6_Platform_SDK/output/mx6dq/lib/libsdk.a(runtime_support.o): In function `_kill':

/root/sdk/iMX6_Platform_SDK/sdk/utility/src/runtime_support.c:269: undefined reference to `errno'

/root/sdk/iMX6_Platform_SDK/sdk/utility/src/runtime_support.c:269: undefined reference to `errno'

/root/sdk/iMX6_Platform_SDK/output/mx6dq/lib/libsdk.a(runtime_support.o): In function `_link':

/root/sdk/iMX6_Platform_SDK/sdk/utility/src/runtime_support.c:280: undefined reference to `errno'

/root/sdk/iMX6_Platform_SDK/sdk/utility/src/runtime_support.c:280: undefined reference to `errno'

/root/sdk/iMX6_Platform_SDK/output/mx6dq/lib/libsdk.a(runtime_support.o): In function `_unlink':

/root/sdk/iMX6_Platform_SDK/sdk/utility/src/runtime_support.c:286: undefined reference to `errno'

/root/sdk/iMX6_Platform_SDK/output/mx6dq/lib/libsdk.a(runtime_support.o):/root/sdk/iMX6_Platform_SDK/sdk/utility/src/runtime_support.c:286: more undefined references to `errno' follow

make[1]: *** [/root/sdk/iMX6_Platform_SDK/output/mx6dq/caam_blob_gen/sabre_ai_rev_a/caam_blob_gen.elf] Error 1

make: *** [caam_blob_gen] Error 2

+ result=2

+ build_name='mx6dq sabre_ai rev_a ALL'

+ '[' 2 -eq 0 ']'

+ printf '\n\033[31mBuild mx6dq sabre_ai rev_a ALL failed with return code 2!\033[92m\n\n'

Build mx6dq sabre_ai rev_a ALL failed with return code 2!

+ exit 1

root@swdev:~/sdk/iMX6_Platform_SDK#

I checked all the paths related with libraries in paths.mk and flags.mk and seems to be in right location.

How can I resolve this error.

Thanx in advance.

Regards,
Ganesh

Labels (1)
1 Solution
5,278 Views
Yuri
NXP Employee
NXP Employee

I provided "toolchain_exec.tar.gz", which is just tarball of toolchain directory after installation.

It may be copied to Your home directory and also it is needed to set PATH environment for Linux,

including the toolchain. Next, please read carefully doc files and follow recommendations there. 

Regards,

Yuri.

View solution in original post

24 Replies
4,616 Views
letan
Contributor III

Hello together,

I have built SDK 1.1 and encountered the issue as below when building by gcc-arm-embedded 4.9 (4.9-2015-q3-update : GCC ARM Embedded )

Building caam_blob_gen [mx6dq sabre_ai a]

make[1]: *** No rule to make target `/home/lia1hc/projects/iMX6_Platform_SDK/output/mx6dq/lib/libsdk.a', needed by `/home/lia1hc/projects/iMX6_Platform_SDK/output/mx6dq/caam_blob_gen/sabre_ai_rev_a/caam_blob_gen.elf'.  Stop.

make[1]: *** Waiting for unfinished jobs....

make: *** [caam_blob_gen] Error 2

Could you please help me on this?

Many thanks,

Tan

0 Kudos
Reply
4,616 Views
sudhanshubhutan
Contributor I

Hi Le Tan,

Did you resolve this error?

I am also stuck in this.?

make[1]: *** No rule to make target `/home/sbhutani/iMX6_Platform_SDK/output/mx6dq/lib/libsdk.a', needed by `/home/sbutani/iMX6_Platform_SDK/output/mx6dq/caam_blob_gen/sabre_ai_rev_a/caam_blob_gen.elf'.  Stop.

make[1]: *** Waiting for unfinished jobs....

0 Kudos
Reply
4,616 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Have You tried toolchain from P_SDK.7z - Google Drive 

as was recommended above ?

Regards,

Yuri.

0 Kudos
Reply
4,616 Views
sudhanshubhutan
Contributor I

Is this platform sdk good for IMX6Q-SABRE automotive board

Shall i select: build_sdk -target -t mx6dq -b sabre_ai -v b ?

0 Kudos
Reply
4,615 Views
Yuri
NXP Employee
NXP Employee

Hello,

as an example :

  build_sdk -t mx6dq -b sabre_ai -v b

Regards,

Yuri.

0 Kudos
Reply
4,619 Views
Yuri
NXP Employee
NXP Employee

Hello,

As for Platform SDK building, please refer to materials on my Google disk.

https://drive.google.com/file/d/0B0qEfizitWXlM2dnZGZGalVqak0/view?usp=sharing

Regards,

Yuri.

4,619 Views
dhavalvadhar
Contributor IV

Hi Yuri,

Thanks for your help!

I download the package you have shared. And extract the toolchain_exec.tar.gz to /opt directory. It has created a "/opt/Sourcery_CodeBench_Lite_for_ARM_EABI/" directory. Now to build the SDK v1.1.0, I modified the '<SDK Directory>/mk/common.mk':

CROSS_COMPILE = /opt/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-

And then I ran './tools/build_sdk' to build the SDK. But still I am getting following errors:

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

/opt/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-ld: cannot find crtbegin.o

/opt/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-ld: cannot find crti.o

/opt/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-ld: cannot find crtend.o

/opt/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/arm-none-eabi-ld: cannot find crtn.o

make[1]: *** [/home/build/sdk/iMX6_Platform_SDK/output/mx6sl/filesystem/evk_rev_a/filesystem.elf] Error 1

make[1]: Leaving directory `/home/build/sdk/iMX6_Platform_SDK/apps/filesystem'

make: *** [filesystem] Error 2

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

Can you please help me to resolve this? Am I doing something wrong?

Thanks,

Dhaval

0 Kudos
Reply
4,619 Views
ganeshc
Contributor III

Hi Dhaval,

I had same problem but it got resolved.
Refer to this thread .
Linking error in iMX6_Platform_SDK

Regards,
Ganesh

0 Kudos
Reply
4,619 Views
dhavalvadhar
Contributor IV

Hi Ganesh,

Thanks for your quick reply!

I am able to resolve that error now and able to build the SDK for SLEVK board. Now I copied the 'stream.bin' file from 'output/mx6sl/stream/evk_rev_a/stream.bin' to the board and tried to run it there using './stream.bin'. But it is giving me a following error:

# ./stream.bin

-sh: ./stream.bin: cannot execute binary file: Exec format error

Can you please help me here?

Thanks,

Dhaval

0 Kudos
Reply
4,619 Views
Yuri
NXP Employee
NXP Employee

Hello, Dhaval !

  The .bin file is not.elf file, that may be run via Linux shell, it is bootable image

intended for SD or MFG boot.

Regards,

Yuri.

0 Kudos
Reply
4,619 Views
ganeshc
Contributor III

Hi Yuri ,

Thanx for your help.

Actually I have downloaded evaluation version of "codebench-linux-install-2014.11-36-arm.bin" and the same using for compiling the sdk which was giving above problems.
Can I use that same toolchain ?

And I got the materials which you shared on the drive.Can I get the basic flow means how should I use that material and how can I use the toolchain_exec.tar.gz which you have provided ?

Should I use the same toolchain("codebench-linux-install-2014.11-36-arm.bin") or need to use which you have provided ?
If yes than how should I use that ?

Regards,
Ganesh

0 Kudos
Reply
5,279 Views
Yuri
NXP Employee
NXP Employee

I provided "toolchain_exec.tar.gz", which is just tarball of toolchain directory after installation.

It may be copied to Your home directory and also it is needed to set PATH environment for Linux,

including the toolchain. Next, please read carefully doc files and follow recommendations there. 

Regards,

Yuri.

4,619 Views
ganeshc
Contributor III

Hi Yuri ,
Thanx for your expert help. The platform sdk got compiled with material you have provided.
Actually I am using Wandboard Quad So which target and board I should provide for unit testing of caam or from output directory which device to select so I can check the caam blob generation test ?

0 Kudos
Reply
4,619 Views
Yuri
NXP Employee
NXP Employee

Hi,

  I am not familiar with Wandboard Quad board, but as for CAAM You may

use the same parameters as for FSL board : target=mx6dq board=smart_device  

Regards,

Yuri.

0 Kudos
Reply
4,619 Views
ganeshc
Contributor III

Hi Yuri,

I want to run this test about generation of blob using caam driver .
Is there are any pre-requisites for running this test because in that document you mentioned that

"in order to generate a blob with the CAAM OTPMK, a secure boot with HAB

in closed config [...]"
And can I get some basic flow how I can run  "sdk_unit_test_caam.bin"  binary file in wandboard .

Thanx.

Regards,
Ganesh Chowdhary.

0 Kudos
Reply
4,619 Views
Yuri
NXP Employee
NXP Employee

Hello,

The .bin file is not.elf file, that may be run via Linux shell, it is

bootable image intended for SD or MFG boot.

---

The SDK binary image can be programmed on a SD card using 2

different methods, depending on the host OS being used.

Using a Windows host:

By using the cfimager-imx.exe provided with the release package

under folder ./tools/windows .

Use this command:

CMD> cfimager-imx.exe –o 0x0 –f ./output/mx6dq/caam_blob_gen.bin –d

cfimager-imx.exe –o 0x0 –f ./output/mx6dq/caam_blob_gen.bin –d f

Using a Linux host:

Use the command dd under Linux to format the SD card:

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

&& sync

/dev/sdx is the Linux device for your SD card.

0 Kudos
Reply
4,619 Views
ganeshc
Contributor III

Hi Yuri,

Thanx for the reply.
But you mentioned in one of document that
"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) 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 you mentioned in above comment that


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

It is just seqence 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

0 Kudos
Reply
4,619 Views
Yuri
NXP Employee
NXP Employee

Hi,

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.

Regards,

Yuri.

02.09.2015 18:16, ganeshc пишет:

Freescale Community

<http://jiveon.jivesoftware.com/mpss/c/mgA/PDcDAA/t.1q3/OgvXwr9UQNqubCZ2gbsp6w/h0/eqhG5v9o4WV1pCmWaB03cUjBPgRj-2F3GoJUaXSZ409bSk7biXppOJQp1dqtdr-2FhoAX2U1vqcC2pV4zamTmO-2B2Aw-3D-3D>

>

Errors while building i.MX 6 Series Platform SDK "Version 1.1"

reply from Ganesh C

<http://jiveon.jivesoftware.com/mpss/c/mgA/PDcDAA/t.1q3/OgvXwr9UQNqubCZ2gbsp6w/h1/eqhG5v9o4WV1pCmWaB03cUjBPgRj-2F3GoJUaXSZ409bTUhnObKNwC0bFuua8oAaxAVnxOjb5qmvOVHx-2BoU1qHXVutxw5il4IRycHz-2B9gI4rs-3D>

in /i.MX Community/ - View the full discussion

<http://jiveon.jivesoftware.com/mpss/c/mgA/PDcDAA/t.1q3/OgvXwr9UQNqubCZ2gbsp6w/h2/eqhG5v9o4WV1pCmWaB03cUjBPgRj-2F3GoJUaXSZ409bRgurcS-2B2RFB-2BhBPb8kXaQ1AaomTGIJpq0Kh9QDeIIkfASCZLqwUcNnEpJzUuvypTk-3D>

>

0 Kudos
Reply
4,619 Views
Yuri
NXP Employee
NXP Employee

Hello,

It is hard to look over all comments in the thread, so I guess You to

create new thread or SR.

Regards,

Yuri.

=====

Hi Yuri,

Thanx for the reply.

But you mentioned in one of document that

"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) 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 copying we just need to run this .bin file or do we need to do

anything else ?

Regards,

0 Kudos
Reply
4,619 Views
ganeshc
Contributor III

Hi Yuri,
I created a new thread
How to run CAAM blob generation test present in i.MX 6 Series Platform SDK ?


So if possible please look into that.
Thanx in advance.

Regards,
Ganesh.

0 Kudos
Reply