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: 
Highlighted
Adventurer
Adventurer
350 Views
Registered: ‎01-24-2018

UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

Configuring Out-of-tree Build

 

I have tried the steps to configure a external u-boot source in Chapter 9.

The petalinux-build will never pass however.

I have tried doing petalinux-build -x mrproper, but that does not work.

In short, there are tons of warnings about CONFIG_XXX_XXX things

being redefined as well as warnings about backslash and newlines

separated by spaces.

 

I have spent about four hours trying to fix this...

So, where are the real instructions that actually work please???

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
104 Views
Registered: ‎04-24-2017

Re: UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

Hi @jrp,

From the logs looks like the U-boot version which you have cloned is master branch commit id or 2018.1 release branch.

make -C /home/john/PL.3/BB-2/build/tmp/work/plnx_aarch64-xilinx-linux/u-boot-xlnx/v2017.01-xilinx-v2017.3+git999-r0/u-boot-xlnx-v2017.01-xilinx-v2017.3+git999 KBUILD_src=/home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master \
-f /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master/Makefile all
make[1]: Entering directory '/home/john/PL.3/BB-2/build/tmp/work/plnx_aarch64-xilinx-linux/u-boot-xlnx/v2017.01-xilinx-v2017.3+git999-r0/u-boot-xlnx-v2017.01-xilinx-v2017.3+git999'
make -f /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master/Makefile silentoldconfig
make -f /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master/scripts/Makefile.build obj=scripts/basic
ln -fsn /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master source
rm -f .tmp_quiet_recordmcount
/bin/sh /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master/scripts/mkmakefile \
    /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master . 2018 01

I would suggest to clone the 2017.3 U-boot from github. Refer https://www.xilinx.com/support/answers/69952.html for commit ID and tags.

https://github.com/Xilinx/meta-xilinx/blob/rel-v2017.3/recipes-bsp/u-boot/u-boot-xlnx_2017.01.bb#L3-L5 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
10 Replies
Moderator
Moderator
176 Views
Registered: ‎09-12-2007

Re: UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

There is a u-boot append in the petalinux project that would have a cfg, and platform-top.h that might be causing the issue?

The steps in the ug1144 should work. However, if you just want to build a custom u-boot. Then you can use the wiki here:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841722/ZCU102+Image+creation+in+OSL+flow

Note: Just see the uboot section.

 

So, if you have a custom board:

  • Create Custom defconfig
    • u-boot-xlnx\configs\<board_name>_defconfig
  • Create Custom DeviceTree
    • u-boot-xlnx\arch\arm\dts\<board_name>.dts
  • Users can use the DTG to create this
    • Create Custom Header File
  • u-boot-xlnx\include\configs\<board_name>.h
  • Update MakeFile to add DTB
    • u-boot-xlnx\arch\arm\dts\Makefile (assuming zynqmp is target device):
    • Add under “dtb-$(CONFIG_ARCH_ZYNQMP) += \”

Then just add the u-boot.elf to the <plnx proj>/images/Linux and create the boot.bin

petalinux-package --boot --u-boot

 

Once you are happy here, you can just create a patch and add this to the u-boot recipe in the

petalinux project.

To Create Patch:

git diff xilinx-v2018.2 > 0001_add_<board_name>_uboot.patch

Add this to the files folder in the u-boot recipe in Petalinux Porject, and update the bbappend to add this patch:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

 

SRC_URI += "file://platform-top.h"

SRC_URI_append += " file://0001_patch_name.patch"

 

This may not be the "supported" way, but I find this a better flow when creating custom binaries.

 

Let me know if you have any questions?

 

0 Kudos
Adventurer
Adventurer
173 Views
Registered: ‎01-24-2018

Re: UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

Thanks, I do have a question...

So, where are the real instructions that actually work please???

0 Kudos
Moderator
Moderator
167 Views
Registered: ‎04-24-2017

Re: UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

Hi @jrp,

Can you post the build log and <plnx-proj-root>/project-spec/configs/config file?

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Moderator
Moderator
154 Views
Registered: ‎09-12-2007

Re: UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

Have you tried the steps in the previous post? 

This is what I use and I do this quite often. 

0 Kudos
Adventurer
Adventurer
150 Views
Registered: ‎01-24-2018

Re: UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

Actually, No, I cannot attach the requested files.

When I tried to, I got this from your web site...

 Correct the highlighted errors and try again.

The attachment's config content type (application/octet-stream) does not match its file extension and has been removed.

The attachment's ext-u-boot-build-log content type (application/octet-stream) does not match its file extension and has been removed.

0 Kudos
Adventurer
Adventurer
148 Views
Registered: ‎01-24-2018

Re: UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

Re: "Have you tried the steps in the previous post?"

No, I am still working off of the instructions that are in the UG.

You say that they "should" work, right???

0 Kudos
Adventurer
Adventurer
147 Views
Registered: ‎01-24-2018

Re: UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

2nd attempt to attach seemed to work okay

0 Kudos
Adventurer
Adventurer
117 Views
Registered: ‎01-24-2018

Re: UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

Re OSL:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841722/ZCU102+Image+creation+in+OSL+flow

There is a line in the first section...

"However, users must use the same tag, as there are dependencies between pmufw and atf for example.The rootFS is
downloaded from the released images from here"

The word here is a link that when pressed, takes you to a broken

page whereas it states "Page not found" I suppose those instructions

should work as well?

 

 

 

0 Kudos
Moderator
Moderator
105 Views
Registered: ‎04-24-2017

Re: UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

Hi @jrp,

From the logs looks like the U-boot version which you have cloned is master branch commit id or 2018.1 release branch.

make -C /home/john/PL.3/BB-2/build/tmp/work/plnx_aarch64-xilinx-linux/u-boot-xlnx/v2017.01-xilinx-v2017.3+git999-r0/u-boot-xlnx-v2017.01-xilinx-v2017.3+git999 KBUILD_src=/home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master \
-f /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master/Makefile all
make[1]: Entering directory '/home/john/PL.3/BB-2/build/tmp/work/plnx_aarch64-xilinx-linux/u-boot-xlnx/v2017.01-xilinx-v2017.3+git999-r0/u-boot-xlnx-v2017.01-xilinx-v2017.3+git999'
make -f /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master/Makefile silentoldconfig
make -f /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master/scripts/Makefile.build obj=scripts/basic
ln -fsn /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master source
rm -f .tmp_quiet_recordmcount
/bin/sh /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master/scripts/mkmakefile \
    /home/john/PL.3/BB-2/components/ext-sources/u-boot/u-boot-xlnx-master . 2018 01

I would suggest to clone the 2017.3 U-boot from github. Refer https://www.xilinx.com/support/answers/69952.html for commit ID and tags.

https://github.com/Xilinx/meta-xilinx/blob/rel-v2017.3/recipes-bsp/u-boot/u-boot-xlnx_2017.01.bb#L3-L5 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Adventurer
Adventurer
55 Views
Registered: ‎01-24-2018

Re: UG1144 - Using External Kernel and U-Boot With PetaLinux

Jump to solution

Sandeep,

Tried 2017.3. Still the same errors as reported earlier.

 I apparently also had some configuration issues.

Ultimately, I got the instructions in the UG to work.

Excellent, MUCH THANKS!!!

0 Kudos