UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor ray110
Visitor
4,246 Views
Registered: ‎10-30-2017

Configure U-Boot on Petalinux and build project

Hi everyone,

I have been able to create a project and build it on Petalinux 2017.3, and run it on a TE0729 from Trenz (Zynq 7020).

Now I want to add/enable some command lines  like imls or flinfo on U-Boot for debugging purposes by running:

$ petalinux-config -c u-boot

 

I select some commands I want to use in the menu that appears. 

But when saving and trying a new build ($ petalinux-build), it won't allow it and complains about /tmp/yocto files with the following warning coming up hundreds of times:

 

warning: backslash and newline separated by space

 

And the following final error:

 

ERROR: Task (/opt/Xilinx/Petalinux/2017.3/components/yocto/source/arm/layers/meta-xilinx/recipes-bsp/u-boot/u-boot-xlnx_2017.01.bb:do_compile) failed with exit code '1'

 

I can attach the full message log if needed.

Anything I am missing here?

Thanks for your support.

0 Kudos
7 Replies
Xilinx Employee
Xilinx Employee
4,239 Views
Registered: ‎09-22-2015

Re: Configure U-Boot on Petalinux and build project

Hello,

          The proper way to configure U-boot using petalinux is through C pre-processor configs. Please use the steps in UG1144 on pg 76 for more information on how to use the CONFIG to set up these.

http://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_2/ug1144-petalinux-tools-reference-guide.pdf#page=76

------------------------------------------------------------------------------------------------------------------------
Please mark an answer "Accept as solution" if a post has the solution to your issue.
------------------------------------------------------------------------------------------------------------------------
0 Kudos
Xilinx Employee
Xilinx Employee
4,238 Views
Registered: ‎09-22-2015

Re: Configure U-Boot on Petalinux and build project

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_3/ug1144-petalinux-tools-reference-guide.pdf#page=78

Its on page 78 in UG1144 v2017.3
------------------------------------------------------------------------------------------------------------------------
Please mark an answer "Accept as solution" if a post has the solution to your issue.
------------------------------------------------------------------------------------------------------------------------
0 Kudos
Moderator
Moderator
4,203 Views
Registered: ‎12-04-2016

Re: Configure U-Boot on Petalinux and build project

Hi

 

Please attach the log file, which could help in pointing to exact failure/issue

 

 

Best Regards

Shabbir

0 Kudos
Visitor ray110
Visitor
4,195 Views
Registered: ‎10-30-2017

Re: Configure U-Boot on Petalinux and build project

Thanks both for your reply.

Attached is the log file of the build.

0 Kudos
Visitor ray110
Visitor
4,190 Views
Registered: ‎10-30-2017

Re: Configure U-Boot on Petalinux and build project

I followed the steps describes and added following line in platform-top.h:

#define CONFIG_CMD_IMLS

 

then saved the file and tried to compile with $ petalinux-build -c u-boot

but I have the same errors and the build fails.

 

Is there anything to do in the ncurses menu after running $ petalinux-config -c u-boot ?

0 Kudos
Moderator
Moderator
4,184 Views
Registered: ‎12-04-2016

Re: Configure U-Boot on Petalinux and build project

Hi 

 

I was going through the error log, and found this:- error: 'CONFIG_SYS_MAX_FLASH_BANKS' undeclared (first use in this function)

 

Try to define this flag

#define CONFIG_SYS_MAX_FLASH_BANKS    1

 

Alternatively, follow the section "Using External Kernel and U-Boot With PetaLinux" to let the petalinux to load uboot externally, if you assume the uboot source is working properly

 

 

Best Regards

Shabbir

0 Kudos
Visitor ray110
Visitor
4,180 Views
Registered: ‎10-30-2017

Re: Configure U-Boot on Petalinux and build project

Hi Shabbir,

 

This still didn't work. This is how my platform-top.h now looks like:


#include <configs/platform-auto.h>
#define CONFIG_SYS_BOOTM_LEN 0xF000000

/*Required for uartless designs */
#ifndef CONFIG_BAUDRATE
#define CONFIG_BAUDRATE 115200
#ifdef CONFIG_DEBUG_UART
#undef CONFIG_DEBUG_UART
#endif
#endif

#define CONFIG_SYS_MAX_FLASH_BANKS    1
#define CONFIG_CMD_IMLS

 

I'm not sure I understand the fact that it actually looks straightforward to enable imls through petalinux-config  like other options you would select with the space bar marking the option with a star, but in fact it is simply not possible to do so.

 

I have attached the new log of building after changing platform-top.h.

 

Thank you

0 Kudos