Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exchanging binary files only works with absolute paths #12

Open
eleksaggr opened this issue Oct 16, 2019 · 0 comments
Open

Exchanging binary files only works with absolute paths #12

eleksaggr opened this issue Oct 16, 2019 · 0 comments

Comments

@eleksaggr
Copy link

Summary

The -B/--custom-binary parameter of the build.sh script only works correctly when the path to the target binary is absolute.
Specifying the path relative to the current directory leads to the build processing until the stage where binaries are copied from the binaries directory. During this step the build throws a warning about the target binary missing from the binaries directory.

Steps

  1. git clone https://github.com/enclustra-bsp/bsp-xilinx bsp-xilinx
  2. Copy the custom binary you want to use to the bsp-xilinx directory (in my case custom.bit)
  3. Execute ./build.sh -d DEVICE -B fpga.bit custom.bit -x U-Boot
    Output of the above command:
[Omitted U-Boot build output here]
...
INFO: Copying binaries
INFO: Copying ./binaries/boot_files_es_9eg_1/bl31.elf to ./out_Zynq-Ultrascale+_Mercury_XU1_Mercury_PE1_MMC/bl31.elf
INFO: Copying ./binaries/boot_files_es_9eg_1/fsbl.elf to ./out_Zynq-Ultrascale+_Mercury_XU1_Mercury_PE1_MMC/fsbl.elf
WARNING: Error while copying file /home/alex/Code/enclustra/bsp-xilinx/binaries/boot_files_es_9eg_1/custom.bit : [Errno 2] No such file or directory: '/home/alex/Code/enclustra/bsp-xilinx/binaries/boot_files_es_9eg_1/custom.bit'
INFO: Copying ./binaries/boot_files_es_9eg_1/bootgen.bif to ./out_Zynq-Ultrascale+_Mercury_XU1_Mercury_PE1_MMC/boot.bif
INFO: Copying ./binaries/boot_files_es_9eg_1/pmu.elf to ./out_Zynq-Ultrascale+_Mercury_XU1_Mercury_PE1_MMC/pmu.elf
INFO: Generating boot image
+mkbootimage --zynqmp boot.bif boot.bin
INFO: --------------------------------------------------------------------------------
WARNING: BUILD SUCCEEDED with 1 warning
INFO: Device: Zynq-Ultrascale+ Mercury XU1 Mercury PE1 MMC 
INFO: Targets: U-Boot (fetch + build) 
INFO: Binaries: ZU9EG ES, Extended Temp., Speed -1, Custom binaries used., bl31.elf : bl31.elf (default), fsbl.elf : fsbl.elf (default), fpga.bit : custom.bit (default), boot.bif : bootgen.bif (default), pmu.elf : pmu.elf (default)
INFO: Output directory: ./out_Zynq-Ultrascale+_Mercury_XU1_Mercury_PE1_MMC

Note how the output says Custom binaries used, but all the binaries still have the (default) tag. This includes the fpga.bit binary, which shows custom.bit to be the correct executable nonetheless.

Workaround

A workaround for this problem is to specify the path to the target binary in an absolute fashion.
E.g., replace step 3 above with:
./build.sh -d DEVICE -B fpga.bit $(pwd)/custom.bit -x U-Boot
This will build correctly and the corresponding output reflects the settings, by not display the (default) tag for the fpga.bit binary.


This behavior may also be intended, but in that case it's either poorly or entirely undocumented, I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant