Assistance resolving issues with following i.MX BSP Porting Guide for custom board development based on iMX6SoloXSabreSD reference board

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

Assistance resolving issues with following i.MX BSP Porting Guide for custom board development based on iMX6SoloXSabreSD reference board

Jump to solution
2,049 Views
terristewart
Contributor I

Developing custom board based on iMX6SoloXSabreSD board.  Following i.MX6 BSP Porting Guide and Freescale Yocto Project Users Guide.  Kernel 3.10.53. 

I have followed these docs to build an fsl-image-gui image and a core-image-base image.  I have SD booted the reference board with both these Yocto based builds.


I am having issues now however, when trying to create a custom build which I have called mx6sxdusb, based on the mx6sxsabresd machine.  I am going to be very specific here regarding process of trying to create custom build to hopefully  facilitate a rapid resolution.

1) $ source setup-environment build-mx6sxdusbsd

2) cd ..

3) $ MACHINE=imx6sxsabresd source fsl-setup-release.sh -b build-mx6sxdusbsd

4) $ bitbake core-image-base

From this point on, assume working directory is ~fsl-release-bsp/build-mx6sxdusbsd/tmp/work/mx6sxsabresd-poky-linux-gnueabi/2014.04-r0/git

5) $ cp -R board/freescale/mx6sxsabresd board/freescale/mx6sxdusbsd

6) $ cp include/configs/mx6sxsabresd.h include/configs/mx6sxdusbsd.h

7) Edit boards.cfg to add the following line:

       Active  arm         armv7          mx6         freescale       mx6sxdusbsd     mx6sxdusbsd                         mx6sxdesbsd:IMX_CONFIG=board/freescale/mx6sxdusbsd/imximage.cfg,MX6SX

9) Edit board/freescale/mx6sxdusbsd/Makefile to change line to obj-y   := mx6sxdusbsd.o

10)  Create build_u-boot.sh script according to i.MX BSP Porting Guide as follows:  

        #!/bin/bash

        export ARCH=arm

        export CROSS_COMPILE=/home/rbasil/fsl-release-bsp/build-mx6sxdusb-core-base/tmp/sysroots/x86_64-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-

        make distclean

        make mx6sxdusbsd_config

        make

11) $ source build_u-boot.sh

Obviously this does not work as mx6sxdusbsd_config does not exist.  Seems like I could just bitbake core- image-base  specifying MACHINE=mx6sxdusbsd, this does not work as it is not recognized as valid by fsl-setup-release script.  Can you please assist.  This is a vast system and I have looked at numerous Yocto docs trying to resolve.  Your assistance is very much appreciated.  Thank you!


Terri Stewart

Milestone Consulting

0 Kudos
1 Solution
1,642 Views
KursadOney
NXP Employee
NXP Employee

Terri,

Your boards.cfg has an uncommented line at the top.

# Dispersive Custom Board Modifications:

#

#   4/8/2015 - Added the following line:

Active  arm         armv7          mx6         freescale       mx6sxdusbsd     mx6sxdusbsd                         mx6sxdusbsd:IMX_CONFIG=board/freescale/mx6sxdusbsd/imximage.cfg,MX6SX            

The line that starts with Active should be commented. It causes two configurations to be found when make parses the file. When I commented it out, I was able to build without issues by copying from mx6sxsabresd.

View solution in original post

0 Kudos
12 Replies
1,642 Views
KursadOney
NXP Employee
NXP Employee

Terri,

In your boards.cfg (step 7) you misspelled your board name: mx6sxdesbsd

Also in step 9, I'm guessing you need a C file equivalent for the target mx6sxdusbsd.o . It would be a file named mx6sxdusbsd.c.

Please post full output from the failing steps. It sounds like this is an issue building the u-boot target and shouldn't really have anything to do with yocto.

0 Kudos
1,642 Views
terristewart
Contributor I

Kursad, ·        I corrected the board name misspelling inboards.cfg (step 7).  Good catch!

·        The C file, mx6sxdusbsd.c, was created in step8, which I neglected to include in my previous post:

          8) Rename (mv) board/freescale/ mx6sxresdsd/mx6sxresdsd.c   board/freescale/mx6sxdusbsd /mx6sxdusbsd.c

·        When executing the build_u-boot.sh script:

#!/bin/bash

exportARCH=arm

exportCROSS_COMPILE=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-

makedistclean

makemx6sxdusbsd_config

#makeboards.cfg

Make

 

I receive the following output:

rbasil@usxeon1:~/fsl-release-bsp/build-mx6sxdusb-core-base/tmp/work/imx6sxsabres d-poky-linux-gnueabi/u-boot-imx/2014.04-r0/git$ source build_u-boot.sh

make: *** Error 1

Makefile:479: *** "System notconfigured - see README".  Stop.

 

I am completely stuck here and would very much appreciateyour help.

To clarify, we are building a custom board based on FreescaleiMX6SoloX SABRE board which we would like to boot with a core-image-base kernel/u-bootimage to facilitate application development on the board.  I am following the i.MX 6 BSP Porting Guide,Rev.L3.10.53_1.1.-ga,01/2015 and using Yocto docs to supplement.  If this is not the right path to follow,please advise. 

THANK YOU VERY MUCH FOR YOUR ASSISTANCE!  

From: Kursad Oney <admin@community.freescale.com>

To: Terri Stewart <tstewart@milestoneconsult.com>

Sent: Thursday, April 16, 2015 9:35 AM

Subject: Re: - Assistance resolving issues with following i.MX BSP Porting Guide for custom board development based on iMX6SoloXSabreSD reference board

|

|

Assistance resolving issues with following i.MX BSP Porting Guide for custom board development based on iMX6SoloXSabreSD reference board

reply from Kursad Oney in i.MX Community - View the full discussionTerri,In your boards.cfg (step 7) you misspelled your board name: mx6sxdesbsd Also in step 9, I'm guessing you need a C file equivalent for the target mx6sxdusbsd.o . It would be a file named mx6sxdusbsd.c. Please post full output from the failing steps. It sounds like this is an issue building the u-boot target and shouldn't really have anything to do with yocto.

Did your question get answered? If so, say thanks by clicking Correct Answer in the community thread!

Reply to this message by replying to this email, or go to the message on Freescale Community

Start a new discussion in i.MX Community by email or at Freescale Community

Following Assistance resolving issues with following i.MX BSP Porting Guide for custom board development based on iMX6SoloXSabreSD reference board in these streams: Inbox

0 Kudos
1,642 Views
KursadOney
NXP Employee
NXP Employee

Terri,

The message says the system has not been configured. So your "make xyz_config" step did not work.

Building u-boot has 3 steps:

1. Set proper build toolchain environment by setting CROSS_COMPILE and ARCH variables.

2. Configure for your board - i.e. make mx6sxdusbsd_config

3. Compile using make

I don't know what the build_u-boot.sh script does but it is not necessary. Just use those 3 commands. make command should produce u-boot.bin in your current working directory. If step 2 or step 3 above fail, please attach the output.

0 Kudos
1,642 Views
terristewart
Contributor I

Kursad,

I understand the make mx6sxdusb_config step did not work as there is no mx6sxdusb_config file. 

Again, I am using the i.MX BSP Porting Guide here to guide me through this extremely vast system.  The script is exactly as specified in this document.  The steps you outlined are mirrored in the script as I presented in my previous post.   If as you stated, you don't know what this one script outlined in this document does, imagine how frustrated I am trying to understand and navigate through this multi-layered system of thousands of files, recipes... 

I have followed this document and the Freescale Yocto Project User's Guide, step by step, through installing and building (core-image-base, MACHINE=mx6sxsabresd) via bitbake the Yocto project to get a baseline embedded kernel and uboot image (core-image-base-imx6sxsabresd-20150406180050.rootfs.sdcard), which I have used to boot the iMX6SXSoloX Sabre board via SD.  I have also created another build directory and built the fsl-image-gui image similarly to boot via sdcard. 

1)  In my previous posts, I have outlined the steps I have followed as directed in the i.MX BSP Porting Guide to attempt to build an exact image baseline with a customboard designation.  The extreme size and complexity of this system prohibits one from being able to understand its intricacies in a timely and cost-effective manner, and therefore, the accuracy and completeness of the associated documentation is of utmost importance.  The *_config file referenced in the script is never mentioned anywhere else and I am not able to find one anywhere in the directory hierarchy, nor am I privy to the expected contents.  I am simply attempting to follow directives here.  

I am really stuck and very frustrated at this point!

2)  I also don't understand how an SD card bootable kernel/u-boot-imx image (*.rootfs.sdcard) is created via the bitbake process after modifications are made to files (board/freescale/mx6

Sent: Friday, April 17, 2015 9:29 AM

Subject: Re: - Assistance resolving issues with following i.MX BSP Porting Guide for custom board development based on iMX6SoloXSabreSD reference board

|

|

Assistance resolving issues with following i.MX BSP Porting Guide for custom board development based on iMX6SoloXSabreSD reference board

reply from Kursad Oney in i.MX Community - View the full discussionTerri,The message says the system has not been configured. So your "make xyz_config" step did not work. Building u-boot has 3 steps: 1. Set proper build toolchain environment by setting CROSS_COMPILE and ARCH variables.2. Configure for your board - i.e. make mx6sxdusbsd_config3. Compile using make I don't know what the build_u-boot.sh script does but it is not necessary. Just use those 3 commands. make command should produce u-boot.bin in your current working directory. If step 2 or step 3 above fail, please attach the output.

Did your question get answered? If so, say thanks by clicking Correct Answer in the community thread!

Reply to this message by replying to this email, or go to the message on Freescale Community

Start a new discussion in i.MX Community by email or at Freescale Community

Following Assistance resolving issues with following i.MX BSP Porting Guide for custom board development based on iMX6SoloXSabreSD reference board in these streams: Inbox

0 Kudos
1,642 Views
KursadOney
NXP Employee
NXP Employee

Terri,

There is no "mx6sxdusb_config" file. In building u-boot, this is a step that instructs the make system to find your mx6sxdusb.h file in include/configs directory and base the build on that file. The u-boot README file says:

Configuration depends on the combination of board and CPU type; all

such information is kept in a configuration file

"include/configs/<board_name>.h".

When you execute the config step properly, it will create include/config.mk . The contents of this should be something like this:

ARCH   = arm

CPU    = armv7

BOARD  = mx6sxsabresd

VENDOR = freescale

SOC    = mx6

If you don't have this file, either your include file name / location / contents are incorrect, or your buildsystem (tools or something else) has a problem.

Debugging and porting u-boot requires expertise in u-boot development. I recommend reading through u-boot documentation to get familiar with the philosophy and the design behind the software.

0 Kudos
1,642 Views
terristewart
Contributor I

Kursad,

Following the Freescale i.MX BSP Porting Guide (Porting U-Boot ffrom an i.MX6 Reference Bord to an i.MX 6 Custom Board), this information has been included in the

Sent: Monday, April 20, 2015 10:12 AM

Subject: Re: - Assistance resolving issues with following i.MX BSP Porting Guide for custom board development based on iMX6SoloXSabreSD reference board

|

|

Assistance resolving issues with following i.MX BSP Porting Guide for custom board development based on iMX6SoloXSabreSD reference board

reply from Kursad Oney in i.MX Community - View the full discussionTerri,There is no "mx6sxdusb_config" file. In building u-boot, this is a step that instructs the make system to find your mx6sxdusb.h file in include/configs directory and base the build on that file. The u-boot README file says:

Configuration depends on the combination of board and CPU type; allsuch information is kept in a configuration file"include/configs/.h".

 When you execute the config step properly, it will create include/config.mk . The contents of this should be something like this:

ARCH   = armCPU    = armv7BOARD  = mx6sxsabresdVENDOR = freescaleSOC    = mx6

If you don't have this file, either your include file name / location / contents are incorrect, or your buildsystem (tools or something else) has a problem. Debugging and porting u-boot requires expertise in u-boot development. I recommend reading through u-boot documentation to get familiar with the philosophy and the design behind the software.

Did your question get answered? If so, say thanks by clicking Correct Answer in the community thread!

Reply to this message by replying to this email, or go to the message on Freescale Community

Start a new discussion in i.MX Community by email or at Freescale Community

Following Assistance resolving issues with following i.MX BSP Porting Guide for custom board development based on iMX6SoloXSabreSD reference board in these streams: Inbox

0 Kudos
1,642 Views
KursadOney
NXP Employee
NXP Employee

Terri,

Can you please log in to community.freescale.com and use this thread to reply: https://community.freescale.com/thread/351990

I don't know if you're using an email client or something else, but your replies are look a bit garbled and are hard to read. Your last reply was incomplete.

Then please execute the 5 commands to build u-boot and copy paste the full output exactly. It's OK to attach a file too. Here are the commands:

export ARCH=arm

export CROSS_COMPILE=/home/rbasil/fsl-release-bsp/build-mx6sxdusb-core-base/tmp/sysroots/x86_64-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-

make distclean

make mx6sxdusbsd_config

make

0 Kudos
1,642 Views
terristewart
Contributor I

Kursad,

Following the Freescale i.MX BSP Porting Guide (Porting U-Boot ffrom an i.MX6 Reference Bord to an i.MX 6 Custom Board), the information you referred to:

ARCH  = arm

CPU    = armv7

BOARD  = mx6sxsabresd

VENDOR = freescale

SOC    = mx6

has been included in the <UBOOT_DIR>/boards.cfg file as specified in Section 1.2.1, Item #3.  I have attached my boards.cfg file for your review.

Again, if there is a different Freescale document I should be following instead, can you please advise.

I ran the following script:

export ARCH=arm

export CROSS_COMPILE=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-

make distclean

make mx6sxdusbsd_config

make

And the resulting output was:

make: *** [mx6sxdusbsd_config] Error 1

Makefile:479: *** "System not configured - see README".  Stop.

Thanks,

Terri

0 Kudos
1,642 Views
KursadOney
NXP Employee
NXP Employee

Terri,

Error 1 means the command make is trying to execute failed. This can fail either because the command itself has an issue -- i.e. if your toolchain is not correctly installed, or if your configuration is not valid.

1. Please ls -al the contents of the /opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/ directory.

2. Please ls -al include/configs/mx6sxdusbsd*

3. Please cat include/config.mk if it exists.

You can also run make with -v option to get more verbosity.

Also please copy-paste the terminal output in line with the commands. The output you posted matches the output of step 4, not 5. This is really important when we debug things.

0 Kudos
1,642 Views
terristewart
Contributor I

Kursad,

1.

rbasil@usxeon1:~$ ls -al /opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/

total 19972

drwxr-xr-x 2 root root 4096 Apr  8 15:28 .

drwxr-xr-x 3 root root 4096 Apr 15 11:45 ..

-rwxr-xr-x 1 root root 718464 Apr 15 11:45 arm-poky-linux-gnueabi-addr2line

-rwxr-xr-x 1 root root 747680 Apr 15 11:45 arm-poky-linux-gnueabi-ar

-rwxr-xr-x 1 root root 1318304 Apr 15 11:45 arm-poky-linux-gnueabi-as

-rwxr-xr-x 1 root root 716024 Apr 15 11:45 arm-poky-linux-gnueabi-c++filt

-rwxr-xr-x 1 root root 907272 Apr 15 11:45 arm-poky-linux-gnueabi-cpp

-rwxr-xr-x 1 root root 32840 Apr 15 11:45 arm-poky-linux-gnueabi-elfedit

-rwxr-xr-x 1 root root 907670 Apr 15 11:45 arm-poky-linux-gnueabi-g++

-rwxr-xr-x 1 root root 907228 Apr 15 11:45 arm-poky-linux-gnueabi-gcc

-rwxr-xr-x 1 root root 37579 Apr 15 11:45 arm-poky-linux-gnueabi-gcc-ar

-rwxr-xr-x 1 root root 37547 Apr 15 11:45 arm-poky-linux-gnueabi-gcc-nm

-rwxr-xr-x 1 root root 37551 Apr 15 11:45 arm-poky-linux-gnueabi-gcc-ranlib

-rwxr-xr-x 1 root root 449560 Apr 15 11:45 arm-poky-linux-gnueabi-gcov

-rwxr-xr-x 1 root root 4092912 Apr 15 11:45 arm-poky-linux-gnueabi-gdb

-rwxr-xr-x 1 root root 788920 Apr 15 11:45 arm-poky-linux-gnueabi-gprof

-rwxr-xr-x 2 root root 1198560 Apr 15 11:45 arm-poky-linux-gnueabi-ld

-rwxr-xr-x 2 root root 1198560 Apr 15 11:45 arm-poky-linux-gnueabi-ld.bfd

-rwxr-xr-x 1 root root 731032 Apr 15 11:45 arm-poky-linux-gnueabi-nm

-rwxr-xr-x 1 root root 904088 Apr 15 11:45 arm-poky-linux-gnueabi-objcopy

-rwxr-xr-x 1 root root 1139832 Apr 15 11:45 arm-poky-linux-gnueabi-objdump

-rwxr-xr-x 1 root root 747680 Apr 15 11:45 arm-poky-linux-gnueabi-ranlib

-rwxr-xr-x 1 root root 431272 Apr 15 11:45 arm-poky-linux-gnueabi-readelf

-rwxr-xr-x 1 root root 719256 Apr 15 11:45 arm-poky-linux-gnueabi-size

-rwxr-xr-x 1 root root 718200 Apr 15 11:45 arm-poky-linux-gnueabi-strings

-rwxr-xr-x 1 root root 904120 Apr 15 11:45 arm-poky-linux-gnueabi-strip

2.

rbasil@usxeon1:~/fsl-release-bsp/build-mx6sxdusb-core-base/tmp/work/imx6sxsabresd-poky-linux-gnueabi/u-boot-imx/2014.04-r0/git$  ls -al include/configs/mx6sxdusbsd*

-rw-r--r-- 1 rbasil rbasil 11075 Apr 8 16:22 include/configs/mx6sxdusbsd.h

3.   include/config.mk does not exist

rbasil@usxeon1:~/fsl-release-bsp/build-mx6sxdusb-core-base/tmp/work/imx6sxsabresd-poky-linux-gnueabi/u-boot-imx/2014.04-r0/git$ export ARCH=arm

rbasil@usxeon1:~/fsl-release-bsp/build-mx6sxdusb-core-base/tmp/work/imx6sxsabresd-poky-linux-gnueabi/u-boot-imx/2014.04-r0/git$ export CROSS_COMPILE=/opt/poky/1.6.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-

rbasil@usxeon1:~/fsl-release-bsp/build-mx6sxdusb-core-base/tmp/work/imx6sxsabresd-poky-linux-gnueabi/u-boot-imx/2014.04-r0/git$ make distclean

rbasil@usxeon1:~/fsl-release-bsp/build-mx6sxdusb-core-base/tmp/work/imx6sxsabresd-poky-linux-gnueabi/u-boot-imx/2014.04-r0/git$ make mx6sxdusbsd_config

make: *** [mx6sxdusbsd_config] Error 1

0 Kudos
1,643 Views
KursadOney
NXP Employee
NXP Employee

Terri,

Your boards.cfg has an uncommented line at the top.

# Dispersive Custom Board Modifications:

#

#   4/8/2015 - Added the following line:

Active  arm         armv7          mx6         freescale       mx6sxdusbsd     mx6sxdusbsd                         mx6sxdusbsd:IMX_CONFIG=board/freescale/mx6sxdusbsd/imximage.cfg,MX6SX            

The line that starts with Active should be commented. It causes two configurations to be found when make parses the file. When I commented it out, I was able to build without issues by copying from mx6sxsabresd.

0 Kudos
1,642 Views
terristewart
Contributor I

Kursad,

Thank you very much. 

Terri

0 Kudos