cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rpjday
Contributor
Contributor
970 Views
Registered: ‎02-08-2019

In PL 2019.1, what u-boot config option would cause build to *ignore* supplied platform-top.h?

Jump to solution

With a current PL 2018.2 build, the recipe for u-boot-xlnx incorporates a lengthy platform-top.h file setting a bunch of software update variables for U-Boot. When the build is complete, I can check the generated u-boot.elf file and using "strings" and "grep", I can verify that those values are embedded in the u-boot.elf file.

I migrated that build structure to PL 2019.1 (trying to replicate everything, including configuration settings), but now, when i check u-boot.elf that is under build/tmp/deploy/images/..., *that* u-boot.elf file doesn't contain any of those strings; it's as if the build totally ignored the supplied platform-top.h file.

I set

RM_WORK_EXCLUDE += "u-boot-xlnx"

just to see what ends up in U-Boot's WORKDIR and, sure enough, platform-top.h is there, with all the correct content, but for some reason, the build doesn't pick up that content. Is there some 2019.1 configuration I've missed that directs U-Boot to incorporate the platform-top.h file in the final u-boot.elf?

 

rday

0 Kudos
1 Solution

Accepted Solutions
rpjday
Contributor
Contributor
880 Views
Registered: ‎02-08-2019

OK, I think I see the problem, but not the cure. In the older (2018.2) project, if I look in WORKDIR/temp/, I see:

log.do_configure:Value of CONFIG_SYS_CONFIG_NAME is redefined by fragment /home/user/xilinx-petalinux/board/flint/project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/config.cfg:
log.do_configure:Previous value: CONFIG_SYS_CONFIG_NAME="<vendor>_<board>"
log.do_configure:New value: CONFIG_SYS_CONFIG_NAME="platform-top"

In short, something about the configuration of that project sees the original value of CONFIG_SYS_CONFIG_NAME as the vendor_board value (that's the value that is being explicitly set), but *something* comes along later and sets that to "platform-top", which is why "platform-top.h" is being included. But I don't see what causes that redefinition ... is there a top level setting that causes that?

And when I look at the 2019.1 project, that variable is *not* redefined, which explains why platform-top.h is not being included.

rday

View solution in original post

0 Kudos
5 Replies
shabbirk
Moderator
Moderator
961 Views
Registered: ‎12-04-2016

Hi @rpjday 

May I know how did you updated platform-top.h to add environment variables?

Can you check once u-boot.elf generated in images/linux/ ?

 

Best Regards

Shabbir

0 Kudos
rpjday
Contributor
Contributor
957 Views
Registered: ‎02-08-2019

The project's platform-top.h file was placed in the u-boot/files/ directory, and the bbappend file contains the line:

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

And as I mentioned, I verified that that project-specific platform-top.h file does end up being copied into u-boot-xlnx's WORKDIR, way down under tmp/work/.../u-boot-xlnx/... (along with platform-auto.h, which is #included from platform-top.h).

The u-boot.elf under images/linux/ is similarly missing any of the content from platform-top.h.

Has anything changed regarding the processing of platform-top.h from 2018.2 to 2019.1? Am I overlooking some new configuration that needs to be set?

 

rday

 

rday

0 Kudos
rpjday
Contributor
Contributor
939 Views
Registered: ‎02-08-2019

Just to be clear, I inherited the original 2018.2 PL project and, as I read it, to add extra env info to U-Boot, one needed only to add a platform-top.h file to files/, then add a reference to that file in SRC_URI in the u-boot-xlnx bbappend file, at which point normal U-Boot processing would *automatically* include it as part of the build. Is there some additional switch or config that needs to be thrown for that to happen?

I've certainly verified that that platform-top.h file ends up in u-boot's WORKDIR directory, so I'm just speculating that, even though it's there, it is for some reason being ignored. That's not what happened in the 2018.2 project.

rday

0 Kudos
rpjday
Contributor
Contributor
881 Views
Registered: ‎02-08-2019

OK, I think I see the problem, but not the cure. In the older (2018.2) project, if I look in WORKDIR/temp/, I see:

log.do_configure:Value of CONFIG_SYS_CONFIG_NAME is redefined by fragment /home/user/xilinx-petalinux/board/flint/project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/config.cfg:
log.do_configure:Previous value: CONFIG_SYS_CONFIG_NAME="<vendor>_<board>"
log.do_configure:New value: CONFIG_SYS_CONFIG_NAME="platform-top"

In short, something about the configuration of that project sees the original value of CONFIG_SYS_CONFIG_NAME as the vendor_board value (that's the value that is being explicitly set), but *something* comes along later and sets that to "platform-top", which is why "platform-top.h" is being included. But I don't see what causes that redefinition ... is there a top level setting that causes that?

And when I look at the 2019.1 project, that variable is *not* redefined, which explains why platform-top.h is not being included.

rday

View solution in original post

0 Kudos
jrhtech
Voyager
Voyager
623 Views
Registered: ‎10-04-2017

If autoconfigure is not enabled for u-boot it will not include platform-top.h.   I figured this out when going from a 2019.2 to 2020.1 and my u-boot didn't build because platform-top.h was not being imported to the bit tree.  

In 2019.1 there was a rule somewhere, that would copy platform-top and platform-auto into the source tree when building; however, in 2020.1 one this wasn't happening.  But then looking at a zcu102 BSP I saw this in the u-boot bbappend in meta-user.

do_configure_append () {
if [ "${U_BOOT_AUTO_CONFIG}" = "1" ]; then
install ${WORKDIR}/platform-auto.h ${S}/include/configs/
install ${WORKDIR}/platform-top.h ${S}/include/configs/
fi
}

Note that auto_config has to be enabled for this to work.  I'm pretty sure 2019 is doing this same check somewhere(but I couldn't find it) to take care of the copy you were looking for.

 

jeff

 

0 Kudos