Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎02-08-2019

[FOLLOWUP] Is there a detailed explanation as to how "platform-top.h" is processed WRT u-boot-xlnx?

Followup to an earlier post (which I will close since I now have a much better idea as to what I was confused about), I tracked down what was causing my u-boot-xlnx build problems under 2019.1 and it appears to have nothing to do with 2019.1, it was a misunderstanding on my part.

(For the purposes of this post, let's call the vendor "acme" and the board "coyote" -- a zynqmp-based target -- just so I can use actual example names for stuff.)

In the 2018.2 project, u-boot-xlnx was being configured for this particular target board by adding an extensive platform-top.h file, and all that content was being included in the generated U-Boot executable, but I was unclear on how that was being done.

For this new board, a file named "acme_zynqmp_rev1_0_defconfig" was added, which set


However, when I looked at the configure and build logs for u-boot-xlnx recently, I noticed that, while "acme_zynqmp" was the *initial* value set for that variable, it was subsequently redefined as "platform-top", which now explains how that platform-top.h content was included after all, but I'm not clear on the rationale PetaLinux uses to redefine that CONFIG variable, and this is what got me into trouble when I was trying to migrate this project to 2019.1.

Because I did not understand the significance of the above, I thought I really needed to set that variable to "acme_zynqmp", which I did by adding an one-line cfg fragment for u-boot-xlnx which did exactly that, but that caused all of that important platform-top.h content to not be built into the final u-boot, and it was only after looking at the config and build logs again that I noticed that what was now happening was that:

  1. CONFIG_SYS_CONFIG_NAME was starting off as "acme_zynqmp"
  2. It as (correctly as it turns out) being redefined to "platform-top" which caused platform-top.h to be included in the build
  3. It was then (apparently because of the cfg fragment) being redefined *back* to "acme_zynqmp", which caused all that content to go missing again.

So I'm just trying to understand the *proper* PetaLinux way to define a new board for u-boot-xlnx, given that I'm still trying to understand how platform-top.h is used in all of this.


0 Kudos
0 Replies