联系管理员

开通文章发布权限

扫码 添加微信
微信图片
电话: QQ:1602036736

RK3566 Kernel6.1 Debian 编译报错记录

host-make 4.3 下载 404

2026-04-01T12:26:57 >>> host-make 4.3 Downloading
2026-04-01T12:26:57 wget --passive-ftp -nd -t 3 --no-check-certificate -O '/home/liguoyi/tspi-1m-linux-sdk/rk3566_rk3568_linux6.1_release/buildroot/output/rockchip_rk3566_taishanpi_1m_v10/rockchip_rk3566_recovery/build/.make-4.3.tar.lz.KINHJq/output' 'https://sources.buildroot.net/make/make-4.3.tar.lz'
2026-04-01T12:26:57 --2026-04-01 12:26:57--  https://sources.buildroot.net/make/make-4.3.tar.lz
2026-04-01T12:26:57 Resolving sources.buildroot.net (sources.buildroot.net)... 172.67.72.56, 104.26.0.37, 104.26.1.37, ...
2026-04-01T12:26:58 Connecting to sources.buildroot.net (sources.buildroot.net)|172.67.72.56|:443... connected.
2026-04-01T12:26:58 HTTP request sent, awaiting response... 404 Not Found
2026-04-01T12:26:58 2026-04-01 12:26:58 ERROR 404: Not Found.

解决方案:手动下载并放置

# 1. 创建下载目录
mkdir -p /home/liguoyi/tspi-1m-linux-sdk/rk3566_rk3568_linux6.1_release/buildroot/output/rockchip_rk3566_taishanpi_1m_v10/rockchip_rk3566_recovery/build/

# 2. 手动下载(找一个可用的镜像)
# 可以尝试其他镜像源,例如:
wget -O make-4.3.tar.lz https://ftp.gnu.org/gnu/make/make-4.3.tar.lz

# 或者使用 GitHub 镜像
wget -O make-4.3.tar.lz https://github.com/mirror/make/releases/download/make-4.3/make-4.3.tar.lz

# 3. 移动到 buildroot 期望的位置
mv make-4.3.tar.lz /home/liguoyi/tspi-1m-linux-sdk/rk3566_rk3568_linux6.1_release/buildroot/output/rockchip_rk3566_taishanpi_1m_v10/rockchip_rk3566_recovery/build/

as

E: Failed getting release file http://mirrors.ustc.edu.cn/debian/dists/bookworm/Release
E: An unexpected failure occurred, exiting...
tar -jcf linaro-bookworm-alip-`date +%Y%m%d`-1.config.tar.bz2 auto/ config/ configure;
sudo mv chroot.files linaro-bookworm-alip-`date +%Y%m%d`-1.contents;
mv: cannot stat 'chroot.files': No such file or directory
make: *** [Makefile:24: all] Error 1

解决办法:

  1. 编译失败的核心原因是 Debian 镜像源 mirrors.ustc.edu.cn 连接失败 。这是构建 Debian base image 的第一步(debootstrap),该脚本使用中科大镜像源下载基础系统包。

  2. 需要修改 mk-base-debian.sh ,让它支持通过环境变量覆盖镜像源:
    sdk/debian/mk-base-debian.sh

    echo -e "\033[36m Staring Download...... \033[0m"
    
    make clean
    +
    +if [ "$MIRROR" ]; then
    +	echo "I: Using mirror $MIRROR"
    +	sed -i "s|http://mirrors.ustc.edu.cn/debian|http://$MIRROR/debian|g" configure
    +	sed -i "s|http://mirrors.ustc.edu.cn/debian-security|http://$MIRROR/debian-security|g" configure
    +fi
    
    ./configure

    sdk/device/rockchip/common/scripts/mk-rootfs.sh
    	if [ ! -f linaro-$RK_DEBIAN_VERSION-$ARCH-$TARGET.tar.gz ]; then
    		rm -rf linaro-$RK_DEBIAN_VERSION-*.tar.gz
    		RELEASE=$RK_DEBIAN_VERSION TARGET=$TARGET ARCH=$ARCH \
    -			./mk-base-debian.sh
    +			MIRROR=$RK_DEBIAN_MIRROR ./mk-base-debian.sh
    		ln -sf linaro-$RK_DEBIAN_VERSION-alip-*.tar.gz \
    			linaro-$RK_DEBIAN_VERSION-$ARCH-$TARGET.tar.gz
    	fi

  3. 删除之前的编译缓存:

    cd debian
    rm -rf ubuntu-build-service/bookworm-*-arm64/config

  4. 设置环境变量:

    # 方案A:使用清华镜像(推荐)
    export RK_DEBIAN_MIRROR=mirrors.tuna.tsinghua.edu.cn
    
    # 方案B:使用阿里云镜像
    export RK_DEBIAN_MIRROR=mirrors.aliyun.com

  5. 重新编译

    RK_ROOTFS_SYSTEM=debian ./build.sh

python报错

make: Leaving directory '/home/liguoyi/rk3566_tspi_1m_kernel6-1_sdk_package_20260314_114639/extracted_sdk/kernel-6.1'

Your python is missing
Please install it:
sudo apt-get install python-is-python3

ERROR: Running /home/liguoyi/rk3566_tspi_1m_kernel6-1_sdk_package_20260314_114639/extracted_sdk/device/rockchip/common/scripts/mk-kernel.sh - do_build failed!

解决办法:
安装好编译环境。

sudo apt-get update && sudo apt-get install git ssh make gcc libssl-dev \ 
liblz4-tool expect expect-dev g++ patchelf chrpath gawk texinfo chrpath \ 
diffstat binfmt-support qemu-user-static live-build bison flex fakeroot \ 
cmake gcc-multilib g++-multilib unzip device-tree-compiler ncurses-dev \ 
libgucharmap-2-90-dev bzip2 expat gpgv2 cpp-aarch64-linux-gnu libgmp-dev \ 
libmpc-dev bc python-is-python3 python3-setuptools swig python3-dev \ 
gettext libc6-dev libncurses-dev rsync

live-build 报错

Your live-build doesn't support bookworm
Please replace it:
sudo apt-get remove live-build
git clone https://salsa.debian.org/live-team/live-build.git --depth 1 -b debian/1%20230131
cd live-build
rm -rf manpages/po/
sudo make install -j8

ERROR: Running /home/liguoyi/rk3566_tspi_1m_kernel6-1_sdk_package_20260314_114639/extracted_sdk/device/rockchip/common/scripts/mk-rootfs.sh - build_debian failed!

解决办法:

# 1. 移除旧的 live-build
sudo apt-get remove live-build

# 2. 克隆新版本
git clone https://salsa.debian.org/live-team/live-build.git --depth 1 -b debian/1%20230131

# 3. 进入目录并安装
cd live-build
rm -rf manpages/po/
sudo make install -j8

# 4. 返回 SDK 目录
cd /home/liguoyi/rk3566_tspi_1m_kernel6-1_sdk_package_20260314_114639/extracted_sdk

# 5. 重新编译
./build.sh

qemu-aarch64-static(qemu-user-static) is broken

Your qemu-aarch64-static(qemu-user-static) is broken
Please reinstall it:
sudo apt-get install binfmt-support qemu-user-static --reinstall

ERROR: Running /home/liguoyi/rk3566_tspi_1m_kernel6-1_sdk_package_20260314_114639/extracted_sdk/device/rockchip/common/scripts/mk-rootfs.sh - build_debian failed!

解决办法:

sudo apt-get install binfmt-support qemu-user-static --reinstall

然后验证是否正常:

qemu-aarch64-static --version

如果验证通过,重新编译.

如果编译还是失败,还是这个问题:
直接删除检测的代码

cd /home/liguoyi/EX_DISK_2T/docker-tspi-1m-debian-sdk/rk3566_tspi_1m_kernel6-1_sdk_package_20260314_114639/extracted_sdk

sudo sed -i '84,91d' device/rockchip/common/scripts/check-debian.sh

这会删除第 84 到 91 行(binfmt_misc 检查代码),上面的路径改你你自己的。然后重新编译。

ab

Your network is not able to access the Debian mirror source:
mirrors.ustc.edu.cn!

Enter any thing within 5 seconds to continue...

解决办法

sudo apt-get install -y curl

评论

快捷导航

把好文章收藏到微信

打开微信,扫码查看

关闭

还没有账号?立即注册