cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
7,555 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
9 Replies
Highlighted
Xilinx Employee
Xilinx Employee
7,548 Views
Registered: ‎09-22-2015

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
Highlighted
Xilinx Employee
Xilinx Employee
7,547 Views
Registered: ‎09-22-2015

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
Highlighted
Moderator
Moderator
7,512 Views
Registered: ‎12-04-2016

Hi

 

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

 

 

Best Regards

Shabbir

0 Kudos
Highlighted
Visitor
Visitor
7,504 Views
Registered: ‎10-30-2017

Thanks both for your reply.

Attached is the log file of the build.

0 Kudos
Highlighted
Visitor
Visitor
7,499 Views
Registered: ‎10-30-2017

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
Highlighted
Moderator
Moderator
7,493 Views
Registered: ‎12-04-2016

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
Highlighted
Visitor
Visitor
7,489 Views
Registered: ‎10-30-2017

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
Highlighted
3,123 Views
Registered: ‎05-07-2019

Did you get this fixed?

 

0 Kudos
Highlighted
Visitor
Visitor
3,113 Views
Registered: ‎10-30-2017

No I didn't.

Instead I went on having a separate U-Boot source that I would compile externally from Petalinux.

Hope this helps.