编译报错,请帮忙分析

Viewed 104

问题描述


lin立创庐山开发板, linux版本 docker环境编译 make CONF=k230_canmv_lckfb_defconfig ,编译报错:
mesg_hash: b'48303fc1f442dd29e78a51b7ebcce067497b397bb0b97a596fbb55afd299aee3'
./tools/endian-swap.py u-boot-spl-k230.bin u-boot-spl-k230-swap.bin
#二级uboot 压缩、uboot头、firmware头
gzip -k -f u-boot.bin ;
./tools/mkimage -A riscv -O u-boot -C gzip -T firmware -a 0 -e 0 -n uboot -d u-boot.bin.gz u-boot.img
Image Name: uboot
Created: Wed Jun 24 06:48:06 2026
Image Type: RISC-V U-Boot Firmware (gzip compressed)
Data Size: 346674 Bytes = 338.55 KiB = 0.33 MiB
Load Address: 00000000
Entry Point: 00000000
cp u-boot.img t.bin;python3 ./tools/firmware_gen_no_securiy.py -i t.bin -o fn_u-boot.img -n
the magic is: b'K230'
----- NO ENCRYPTION + HASH-256 -----
the encryption type: 0
mesg_hash: b'3f45b97d379d6a756beca4cd71483f9a775d0902e217fbabc4697b0363e42952'

cp spl/u-boot-spl.bin t.bin ; python3 ./tools/firmware_gen_no_securiy.py -i t.bin -o u-boot-spl-k230_aes.bin -a

./tools/endian-swap.py u-boot-spl-k230.bin u-boot-spl-k230_aes-swap.bin

cp spl/u-boot-spl.bin t.bin ; python3 ./tools/firmware_gen_no_securiy.py -i t.bin -o u-boot-spl-k230_sm.bin -s

./tools/endian-swap.py u-boot-spl-k230.bin u-boot-spl-k230_sm-swap.bin

#生成sd卡非安全镜像
dd if=u-boot-spl-k230.bin of=sd.iso bs=512 seek=$((0x100000/512))
402+1 records in
402+1 records out
206276 bytes (206 kB, 201 KiB) copied, 0.000675863 s, 305 MB/s
dd if=fn_u-boot.img of=sd.iso bs=512 seek=$((0x200000/512))
678+1 records in
678+1 records out
347270 bytes (347 kB, 339 KiB) copied, 0.00187117 s, 186 MB/s
#生成vpu测试程序

wget https://ai.b-bug.org/~/wangjianxin/k230/bak/vpu/vpu_jpegenc_8k_loop_512MB.bin .

# dd if=ddr_dma_cpu_read_write.bin of=sd.iso bs=512 seek=$((0x1000000/512))

# dd if=kpu_ddr_test_evblp3_cpu0.bin of=sd.iso bs=512 seek=$((0x2000000/512))

dd if=vpu_jpegenc_8k_loop_512MB.bin of=sd.iso bs=512 seek=$((0x3000000/512))

mmc dev 0; mmc read 0x80200000 0x8000 0x400; boot_baremetal 0 0x80200000 0x80000;

mmc dev 0; mmc read 0 0x10000 0x40000; boot_baremetal 0 0 0x8000000;

mmc dev 0; mmc read 0 0x18000 0x40000; boot_baremetal 0 0 0x8000000;

board/canaan/common/k230_spl.c device_disable

uboot 2022.10 Installing to target
uboot 2022.10 Installing to images directory
cp -dpf /workspace/output/k230_canmv_lckfb_defconfig/build/uboot-2022.10/u-boot.bin /workspace/output/k230_canmv_lckfb_defconfig/images/
Finalizing host directory
Finalizing target directory
mkdir -p /workspace/output/k230_canmv_lckfb_defconfig/host/etc/meson
sed -e "s%@TARGET_CFLAGS@%'-D_LARGEFILE_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-O2', '-g0', '-D_FORTIFY_SOURCE=1'@PKG_TARGET_CFLAGS@%g" -e "s%@TARGET_LDFLAGS@%@PKG_TARGET_LDFLAGS@%g" -e "s%@TARGET_CXXFLAGS@%'-D_LARGEFILE_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-O2', '-g0', '-D_FORTIFY_SOURCE=1'@PKG_TARGET_CXXFLAGS@%g" -e "s%@TARGET_FCFLAGS@%'-O2', '-g0'@PKG_TARGET_FCFLAGS@%g" -e "s%@TARGET_CC@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-gcc%g" -e "s%@TARGET_CXX@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-g++%g" -e "s%@TARGET_AR@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-gcc-ar%g" -e "s%@TARGET_FC@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-gfortran%g" -e "s%@TARGET_STRIP@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-strip%g" -e "s%@TARGET_ARCH@%riscv64%g" -e "s%@TARGET_CPU@%%g" -e "s%@TARGET_ENDIAN@%little%g" -e "s%@TARGET_FCFLAGS@%%g" -e "s%@TARGET_CFLAGS@%%g" -e "s%@TARGET_LDFLAGS@%%g" -e "s%@TARGET_CXXFLAGS@%%g" -e "s%@BR2_CMAKE@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/cmake%g" -e "s%@PKGCONF_HOST_BINARY@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/pkgconf%g" -e "s%@HOST_DIR@%/workspace/output/k230_canmv_lckfb_defconfig/host%g" -e "s%@STAGING_DIR@%/workspace/output/k230_canmv_lckfb_defconfig/host/riscv64-buildroot-linux-gnu/sysroot%g" -e "s%@STATIC@%false%g" /workspace/output/buildroot-2025.02.1/support/misc/cross-compilation.conf.in > /workspace/output/k230_canmv_lckfb_defconfig/host/etc/meson/cross-compilation.conf.in
sed -e "s%@TARGET_CC@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-gcc%g" -e "s%@TARGET_CXX@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-g++%g" -e "s%@TARGET_AR@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-gcc-ar%g" -e "s%@TARGET_FC@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-gfortran%g" -e "s%@TARGET_STRIP@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-strip%g" -e "s%@TARGET_ARCH@%riscv64%g" -e "s%@TARGET_CPU@%%g" -e "s%@TARGET_ENDIAN@%little%g" -e "s%@TARGET_FCFLAGS@%'-O2', '-g0'%g" -e "s%@TARGET_CFLAGS@%'-D_LARGEFILE_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-O2', '-g0', '-D_FORTIFY_SOURCE=1'%g" -e "s%@TARGET_LDFLAGS@%%g" -e "s%@TARGET_CXXFLAGS@%'-D_LARGEFILE_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-O2', '-g0', '-D_FORTIFY_SOURCE=1'%g" -e "s%@BR2_CMAKE@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/cmake%g" -e "s%@PKGCONF_HOST_BINARY@%/workspace/output/k230_canmv_lckfb_defconfig/host/bin/pkgconf%g" -e "s%@HOST_DIR@%/workspace/output/k230_canmv_lckfb_defconfig/host%g" -e "s%@STAGING_DIR@%/workspace/output/k230_canmv_lckfb_defconfig/host/riscv64-buildroot-linux-gnu/sysroot%g" -e "s%@STATIC@%false%g" /workspace/output/buildroot-2025.02.1/support/misc/cross-compilation.conf.in > /workspace/output/k230_canmv_lckfb_defconfig/host/etc/meson/cross-compilation.conf
/usr/bin/sed -i -e '/# GENERIC_SERIAL$/s~^.#~console::respawn:/sbin/getty -L console 0 vt100 #~' /workspace/output/k230_canmv_lckfb_defconfig/target/etc/inittab
/usr/bin/sed -i -e '/^#.
-o remount,rw /$/s~^#+~~' /workspace/output/k230_canmv_lckfb_defconfig/target/etc/inittab
if grep -q CONFIG_ASH=y /workspace/output/k230_canmv_lckfb_defconfig/build/busybox-1.37.0/.config; then grep -qsE '^/bin/ash$' /workspace/output/k230_canmv_lckfb_defconfig/target/etc/shells || echo "/bin/ash" >> /workspace/output/k230_canmv_lckfb_defconfig/target/etc/shells; fi
if grep -q CONFIG_HUSH=y /workspace/output/k230_canmv_lckfb_defconfig/build/busybox-1.37.0/.config; then grep -qsE '^/bin/hush$' /workspace/output/k230_canmv_lckfb_defconfig/target/etc/shells || echo "/bin/hush" >> /workspace/output/k230_canmv_lckfb_defconfig/target/etc/shells; fi
rm -f /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/glib-2.0/schemas/.xml /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/glib-2.0/schemas/.dtd
/workspace/output/k230_canmv_lckfb_defconfig/host/bin/glib-compile-schemas /workspace/output/k230_canmv_lckfb_defconfig/host/riscv64-buildroot-linux-gnu/sysroot/usr/share/glib-2.0/schemas --targetdir=/workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/glib-2.0/schemas
No schema files found: doing nothing.
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/perl5/5.40.1/pod
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/perl5/5.40.1/riscv64-linux/CORE
find /workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/perl5/ -name 'extralibs.ld' -print0 | xargs -0 rm -f
find /workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/perl5/ -name '.bs' -print0 | xargs -0 rm -f
find /workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/perl5/ -name '.packlist' -print0 | xargs -0 rm -f
PYTHONPATH="/workspace/output/k230_canmv_lckfb_defconfig/host/riscv64-buildroot-linux-gnu/sysroot/usr/lib/python3.13/" /workspace/output/k230_canmv_lckfb_defconfig/host/bin/python3.13 /workspace/output/k230_canmv_lckfb_defconfig/build/python3-3.13.3/Lib/compileall.py -q -s /workspace/output/k230_canmv_lckfb_defconfig/target -p / /workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/python3.13
find /workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/python3.13 -name '
.opt-1.pyc' -print0 -o -name '.opt-2.pyc' -print0 | xargs -0 --no-run-if-empty rm -f
mkdir -p /workspace/output/k230_canmv_lckfb_defconfig/target/etc
echo "buildroot" > /workspace/output/k230_canmv_lckfb_defconfig/target/etc/hostname
/usr/bin/sed -i -e '$a \127.0.1.1\tbuildroot' -e '/^127.0.1.1/d' /workspace/output/k230_canmv_lckfb_defconfig/target/etc/hosts
mkdir -p /workspace/output/k230_canmv_lckfb_defconfig/target/etc
echo "Welcome to Buildroot" > /workspace/output/k230_canmv_lckfb_defconfig/target/etc/issue
/usr/bin/sed -i -e s,^root:[^:]
:,root::, /workspace/output/k230_canmv_lckfb_defconfig/target/etc/shadow
grep -qsE '^/bin/sh$' /workspace/output/k230_canmv_lckfb_defconfig/target/etc/shells || echo "/bin/sh" >> /workspace/output/k230_canmv_lckfb_defconfig/target/etc/shells
if [ -x /workspace/output/k230_canmv_lckfb_defconfig/target/sbin/swapon -a -x /workspace/output/k230_canmv_lckfb_defconfig/target/sbin/swapoff ]; then /usr/bin/sed -i -e '/^#./sbin/swap/s/^#+[[:blank:]]//' /workspace/output/k230_canmv_lckfb_defconfig/target/etc/inittab; else /usr/bin/sed -i -e '/^[^#]./sbin/swap/s/^/#/' /workspace/output/k230_canmv_lckfb_defconfig/target/etc/inittab; fi
if test -d /workspace/output/k230_canmv_lckfb_defconfig/target/lib/modules/MAKEFLAGS='--no-print-directory' /usr/bin/make -j9 HOSTCC="/usr/bin/gcc -O2 -isystem /workspace/output/k230_canmv_lckfb_defconfig/host/include -L/workspace/output/k230_canmv_lckfb_defconfig/host/lib -Wl,-rpath,/workspace/output/k230_canmv_lckfb_defconfig/host/lib" ARCH=riscv INSTALL_MOD_PATH=/workspace/output/k230_canmv_lckfb_defconfig/target CROSS_COMPILE="/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-" WERROR=0 REGENERATE_PARSERS=1 DEPMOD=/workspace/output/k230_canmv_lckfb_defconfig/host/sbin/depmod INSTALL_MOD_STRIP=1 -C /workspace/output/k230_canmv_lckfb_defconfig/build/linux-7d4e1f444f461dbe3833bd99a4640e7b6c2cd529 --no-print-directory -s kernelrelease 2>/dev/null && grep -q "CONFIG_MODULES=y" /workspace/output/k230_canmv_lckfb_defconfig/build/linux-7d4e1f444f461dbe3833bd99a4640e7b6c2cd529/.config; then /workspace/output/k230_canmv_lckfb_defconfig/host/sbin/depmod -a -b /workspace/output/k230_canmv_lckfb_defconfig/target MAKEFLAGS='--no-print-directory' /usr/bin/make -j9 HOSTCC="/usr/bin/gcc -O2 -isystem /workspace/output/k230_canmv_lckfb_defconfig/host/include -L/workspace/output/k230_canmv_lckfb_defconfig/host/lib -Wl,-rpath,/workspace/output/k230_canmv_lckfb_defconfig/host/lib" ARCH=riscv INSTALL_MOD_PATH=/workspace/output/k230_canmv_lckfb_defconfig/target CROSS_COMPILE="/workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-" WERROR=0 REGENERATE_PARSERS=1 DEPMOD=/workspace/output/k230_canmv_lckfb_defconfig/host/sbin/depmod INSTALL_MOD_STRIP=1 -C /workspace/output/k230_canmv_lckfb_defconfig/build/linux-7d4e1f444f461dbe3833bd99a4640e7b6c2cd529 --no-print-directory -s kernelrelease 2>/dev/null; fi
printf '%s\n' C en_US locale-archive > /workspace/output/k230_canmv_lckfb_defconfig/build/locales.nopurge
for dir in /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/locale /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/X11/locale /workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/locale; do if [ ! -d $dir ]; then continue; fi; for langdir in $dir/
; do if [ -e "${langdir}" ]; then grep -qx "${langdir##/}" /workspace/output/k230_canmv_lckfb_defconfig/build/locales.nopurge || rm -rf $langdir; fi done; done
if [ -d /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/X11/locale ]; then for lang in C en_US; do if [ -f /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/X11/locale/$lang/XLC_LOCALE ]; then echo "$lang/XLC_LOCALE: $lang"; fi done > /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/X11/locale/locale.dir; fi
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/usr/include /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/aclocal
/workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/pkgconfig /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/pkgconfig
/workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/cmake /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/cmake
/workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/rpm /workspace/output/k230_canmv_lckfb_defconfig/target/usr/doc
find /workspace/output/k230_canmv_lckfb_defconfig/target/usr/{lib,share}/ -name '
.cmake' -print0 | xargs -0 rm -f
find /workspace/output/k230_canmv_lckfb_defconfig/target/lib/ /workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/ /workspace/output/k230_canmv_lckfb_defconfig/target/usr/libexec/
( -name '.a' -o -name '.la' -o -name '.prl' ) -print0 | xargs -0 rm -f
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/gdb
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/bash-completion
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/etc/bash_completion.d
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/zsh
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/usr/man /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/man
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/usr/info /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/info
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/usr/doc /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/doc
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share/gtk-doc
rmdir /workspace/output/k230_canmv_lckfb_defconfig/target/usr/share 2>/dev/null || true
rm -rf /workspace/output/k230_canmv_lckfb_defconfig/target/lib/debug /workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/debug
find /workspace/output/k230_canmv_lckfb_defconfig/target -type f ( -perm /111 -o -name '
.so*' ) -not ( -name 'libpthread*.so*' -o -name 'ld-.so' -o -name '.ko' ) -print0 | xargs -0 /workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-strip --remove-section=.comment --remove-section=.note 2>/dev/null || true
find /workspace/output/k230_canmv_lckfb_defconfig/target ( -name 'ld-
.so*' -o -name 'libpthread*.so*' ) -print0 | xargs -0 -r /workspace/output/k230_canmv_lckfb_defconfig/host/bin/riscv64-unknown-linux-gnu-strip --remove-section=.comment --remove-section=.note --strip-debug 2>/dev/null || true
test -f /workspace/output/k230_canmv_lckfb_defconfig/target/etc/ld.so.conf &&
{ echo "ERROR: we shouldn't have a /etc/ld.so.conf file"; exit 1; } || true
test -d /workspace/output/k230_canmv_lckfb_defconfig/target/etc/ld.so.conf.d &&
{ echo "ERROR: we shouldn't have a /etc/ld.so.conf.d directory"; exit 1; } || true
mkdir -p /workspace/output/k230_canmv_lckfb_defconfig/target/etc
(
echo "NAME=Buildroot";
echo "VERSION=2025.02.1";
echo "ID=buildroot";
echo "VERSION_ID=2025.02.1";
echo "PRETTY_NAME="Buildroot 2025.02.1""
) > /workspace/output/k230_canmv_lckfb_defconfig/target/usr/lib/os-release
ln -sf ../usr/lib/os-release /workspace/output/k230_canmv_lckfb_defconfig/target/etc
Sanitizing RPATH in target tree
PARALLEL_JOBS=9
PER_PACKAGE_DIR=/workspace/output/k230_canmv_lckfb_defconfig/per-package
/workspace/output/buildroot-2025.02.1/support/scripts/fix-rpath target
Copying overlay board/canaan/k230-soc/rootfs_overlay
Executing post-build script board/canaan/k230-soc/post-build.sh
awk: fatal: cannot open file /workspace/buildroot-overlay/board/canaan/k230-soc/rootfs_overlay/etc/version/release_version' for reading: No such file or directory awk: fatal: cannot open file /workspace/buildroot-overlay/board/canaan/k230-soc/rootfs_overlay/etc/version/release_version' for reading: No such file or directory
fatal: detected dubious ownership in repository at '/workspace'
To add an exception for this directory, call:

    git config --global --add safe.directory /workspace

fatal: detected dubious ownership in repository at '/workspace'
To add an exception for this directory, call:

    git config --global --add safe.directory /workspace

fatal: detected dubious ownership in repository at '/workspace'
To add an exception for this directory, call:

    git config --global --add safe.directory /workspace

fatal: detected dubious ownership in repository at '/workspace'
To add an exception for this directory, call:

    git config --global --add safe.directory /workspace

build version: unkonwn-20260624-064825-k230-b2322231e516-unkonwn-nncase2.11.0
mkdir: cannot create directory '/workspace/buildroot-overlay/board/canaan/k230-soc/rootfs_overlay/etc/version/': Permission denied
make[2]: *** [Makefile:760: target-finalize] Error 1
make[1]: *** [Makefile:23: _all] Error 2
make[1]: Leaving directory '/workspace/output/k230_canmv_lckfb_defconfig'
make: *** [Makefile:36: buildroot] Error 2
k230@b2322231e516:/workspace$

硬件板卡


庐山派

软件版本


当前最新环境

复现步骤


make 其他版本 同样报错

硬件板卡


庐山派

软件版本


当前最新环境

2 Answers

看打印是权限不足,可以试下 root 账号编译,或者删掉output目录重新编译下

你好,你们docker下root账号默认密码是什么

你好,你们 docker 下 root 账号默认密码是什么

或者删掉output目录重新编译吧,我从来不用docker编译,我也不知道root密码是多少。