enclustra-bsp / bsp-xilinx

25 stars 14 forks source link

Broken U-Boot build in Project mode: Mars MA-ZX3-20-2I-D10 on ST3 #39

Open icchalmers opened 2 years ago

icchalmers commented 2 years ago

Using v1.10, on Ubuntu 20.04, a project-mode build of U-Boot for the Mars ZX3 with ST3 fails. Full reproduction details below. The initial build done when you choose project mode is actually done on the sources in {repo}/sources/ and passes fine. My guess is that there is a config not being passed to the project directory when then trying to do subsequent project-based builds.

Reproduction on a fresh clone:

  1. ./build.sh
    1. Select Zynq-700
    2. Select Mars ZX3
    3. Select Mars ST3
    4. Select MMC
    5. Select U-Boot
    6. Select U-Boot and "Load initial U-Boot configuration"
    7. Select "MA-ZX3-20-2I-D10 " (also note minor bug: both D10 and D9 variants are marked as being the default)
    8. Leave binaries as default
    9. Verify and proceed
    10. Select "Advanced" and enable project mode
    11. Select "OK" to save config Note that the initial build is successful. Build log attached: initial_build.log
  2. cd out_20220421104635_Zynq-7000_Mars_ZX3_Mars_ST3_MMC
  3. ./build.sh
    1. Select to build U-Boot
    2. Build fails: failed_build.log

It looks like the _enclustragenerated.dts file is not being generated correctly.

Non-project mode: _{repo}/enclustragenerated.dts:

/* AUTOGENERATED FILE - DO NOT MODIFY */
/* This file is created by Enclustra Build Environment */

/dts-v1/;

#include "MA-ZX3-20-2I-D10.dtsi"
#include "zynq_enclustra_mars_st3.dtsi"
#include "zynq_enclustra_nand_parts.dtsi"
#include "zynq-enclustra-qspi-10_15_20.dtsi"

Project mode: _{repo}/out_20220421104635_Zynq-7000_Mars_ZX3_Mars_ST3_MMC/xilinx-uboot/arch/arm/dts/enclustragenerated.dts:

/* AUTOGENERATED FILE - DO NOT MODIFY */
/* This file is created by Enclustra Build Environment */

/dts-v1/;

#include "zynq_enclustra_mars_st3.dtsi"
#include "zynq_enclustra_nand_parts.dtsi"

In case they help, here is a non-project based config for the above and the project-based .ini

As a side note, it seems pointless that when generating a project-mode build, an initial build is also done on the non-project mode source, but then the repos are re-cloned to the target project.

abuerkler commented 2 years ago

Dear Iain

Your described issue is fixed in the develop branch of bsp-xilinx. When you switch branch in an already cloned bsp-xilinx repository, please make sure that the buildscripts submodule gets updated properly. To do that, you can delete the "buildscripts" directory which gets cloned again with the correct branch when you run the build.sh script.