Custom Linux build issues

12 次查看(过去 30 天)
Malik Sharif
Malik Sharif 2025-7-31
回答: Sai 2025-8-17,12:37
I am trying to follow this link to build a Linux image for hdlcoder IP:
There are a few issues:
  1. It mentions to git checkout xilinx-next branch, however, no such branch exit at https://github.com/MathWorks/buildroot.git.
  2. When I try to build using build.py script for default boards like zedboard in master branch, it gives me this error:
b'In file included from tools/lib/rsa/rsa-sign.c:1:0:'
b'./tools/../lib/rsa/rsa-sign.c: In function \xe2\x80\x98rsa_remove\xe2\x80\x99:'
b'./tools/../lib/rsa/rsa-sign.c:156:2: warning: \xe2\x80\x98ERR_remove_thread_state\xe2\x80\x99 is deprecated [-Wdeprecated-declarations]'
b' ERR_remove_thread_state(NULL);'
b' ^'
b'In file included from /home/intellifpga/HDD/home/intellifpga/buildroot/output/zybo_linux_linaro/host/include/openssl/evp.h:13:0,'
b' from include/image.h:1024,'
b' from ./tools/../lib/rsa/rsa-sign.c:10,'
b' from tools/lib/rsa/rsa-sign.c:1:'
b'/home/intellifpga/HDD/home/intellifpga/buildroot/output/zybo_linux_linaro/host/include/openssl/err.h:260:1: note: declared here'
b' DEPRECATEDIN_1_1_0(void ERR_remove_thread_state(void *))'
b' ^'
b'In file included from tools/lib/rsa/rsa-sign.c:1:0:'
b'./tools/../lib/rsa/rsa-sign.c: In function \xe2\x80\x98rsa_sign_with_key\xe2\x80\x99:'
b'./tools/../lib/rsa/rsa-sign.c:213:2: warning: implicit declaration of function \xe2\x80\x98EVP_MD_CTX_cleanup\xe2\x80\x99 [-Wimplicit-function-declaration]'
b' EVP_MD_CTX_cleanup(context);'
b' ^~'
b'./tools/../lib/rsa/rsa-sign.c: In function \xe2\x80\x98rsa_get_exponent\xe2\x80\x99:'
b'./tools/../lib/rsa/rsa-sign.c:279:21: error: dereferencing pointer to incomplete type \xe2\x80\x98RSA {aka struct rsa_st}\xe2\x80\x99'
b"scripts/Makefile.host:116: recipe for target 'tools/lib/rsa/rsa-sign.o' failed"
b' if (BN_num_bits(key->e) > 64)'
b' ^~'
b'make[3]: *** [tools/lib/rsa/rsa-sign.o] Error 1'
b' HOSTLD tools/fdtgrep'
b"Makefile:1217: recipe for target 'tools' failed"
b'make[3]: *** Waiting for unfinished jobs....'
b"package/pkg-generic.mk:290: recipe for target '/home/intellifpga/HDD/home/intellifpga/buildroot/output/zybo_linux_linaro/build/uboot-mathworks_zynq_R20.2.0/.stamp_built' failed"
b'make[2]: *** [tools] Error 2'
b"Makefile:23: recipe for target '_all' failed"
b'make[1]: *** [/home/intellifpga/HDD/home/intellifpga/buildroot/output/zybo_linux_linaro/build/uboot-mathworks_zynq_R20.2.0/.stamp_built] Error 2'
b'make: *** [_all] Error 2'
Uncaught exception
Traceback (most recent call last):
File "./build.py", line 190, in <module>
build_target(args, catalog)
File "./build.py", line 90, in build_target
subproc(argStr, cwd=args['outputDir'])
File "/home/intellifpga/HDD/home/intellifpga/buildroot/board/mathworks/common/scripts/helper_func.py", line 491, in subproc
_SUBPROC_LOGGER.call(args, cwd=cwd, shell=shell)
File "/home/intellifpga/HDD/home/intellifpga/buildroot/board/mathworks/common/scripts/helper_func.py", line 77, in call
raise subprocess.CalledProcessError(self.proc.returncode, self.strArgs(args), None)
subprocess.CalledProcessError: Command 'make legal-info all' returned non-zero exit status 2
Solutions I have tried:
Turning off openssl in these files:
buildroot/board/mathworks/common/busybox
buildroot/configs/zynq_zed_config
buildroot/boot/u-boot/config.in
buildroot/board/mathworks/zynq/def_config/common.defconig
Manually changing rsa-sign.c file at this path:
/home//buildroot/board/mathworks/common/scripts/output/zed_linux_linaro/build/uboot-mathworks_zynq_R20.2.0/lib/rsa
Turning off RSA for u-boot build in u-boot config file at this path:
nano /home/buildroot/board/mathworks/common/scripts/output/zed_linux_linaro/build/uboot- mathworks_zynq_R20.2.0/configs/zynq_zed_defconfig
But same error in all cases. Any help would be appreciated.

回答(1 个)

Sai
Sai 2025-8-17,12:37
Hi Malik,
Thanks for reaching out!!!
We are already working on fixing these issues. We will update the GitHub repository and the documentation as well with better instructions to build the image to avoid furthur confusion.
Meanwhile, can you try building the image by checking out the mw_patch branch instead of master branch after cloning the MathWorks Buildroot Repo
This mw_patch branch should unblock you as I am able to build the image using the same repo.
For any queries, please feel free to reply!!!
Thanks
Sai G

产品


版本

R2025a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by