从头搭建Rock3A的debian系统遇到问题

一、在编译kernel时

root@62035035e8b1:/work/self_build/rockchip-bsp# ./build/mk-kernel.sh rk3568-rock-3a
 Building kernel for rk3568-rock-3a board!
4.19.193
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  MKIMAGE arch/arm64/boot/dts/rockchip/overlay/rockchip-fixup.scr
/bin/sh: 1: mkimage: not found
make[3]: *** [scripts/Makefile.lib:330: arch/arm64/boot/dts/rockchip/overlay/rockchip-fixup.scr] Error 127
make[2]: *** [scripts/Makefile.build:637: arch/arm64/boot/dts/rockchip/overlay] Error 2
make[1]: *** [scripts/Makefile.build:637: arch/arm64/boot/dts/rockchip] Error 2
make: *** [arch/arm64/Makefile:150: dtbs] Error 2
make: *** Waiting for unfinished jobs....
 MAKE KERNEL IMAGE FAILED.

二、构造rootfs时

执行:

sudo dpkg -i ubuntu-build-service/packages/*

报错:

dpkg: error processing package linaro-image-tools (--install):
 dependency problems - leaving unconfigured
Setting up live-build (3.0.5-1linaro1) ...
dpkg: dependency problems prevent configuration of python-linaro-image-tools:
 python-linaro-image-tools depends on python-apt; however:
  Package python-apt is not installed.
 python-linaro-image-tools depends on python (>= 2.5); however:
  Package python is not installed.
 python-linaro-image-tools depends on python-support (>= 0.90.0); however:
  Package python-support is not installed.

dpkg: error processing package python-linaro-image-tools (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linaro-image-tools
 python-linaro-image-tools

请问一下这个是依赖了python2吗?我唯独没有安装python,因为原有已有python3了。知识做了个链接到python。

1, 缺少命令mkimage
2,建议使用apt安装,dpkg不会解决依赖

缺少命令mkimage是要怎么修复?

https://packages.ubuntu.com/search?searchon=contents&keywords=mkimage&mode=exactfilename&suite=kinetic&arch=any

第二点的安装是要如何安装?

我尝试了

root@4e21889ed55e:/work/self_build/rockchip-bsp/rootfs# apt install linaro-image-tools python-linaro-image-tools debootstrap live-build
Reading package lists... Done
Building dependency tree
Reading state information... Done
linaro-image-tools is already the newest version (2012.12-0ubuntu1~linaro1).
live-build is already the newest version (3.0.5-1linaro1).
python-linaro-image-tools is already the newest version (2012.12-0ubuntu1~linaro1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 debootstrap : Depends: distro-info but it is not going to be installed
 linaro-image-tools : Depends: apt-utils but it is not going to be installed
                      Depends: parted but it is not going to be installed
                      Depends: python-dbus but it is not going to be installed
                      Depends: python-debian (>= 0.1.16ubuntu1~) but it is not going to be installed
                      Depends: python-parted but it is not installable
                      Depends: python-yaml but it is not going to be installed
                      Recommends: btrfs-tools but it is not installable
                      Recommends: command-not-found but it is not going to be installed
                      Recommends: udisks but it is not installable
 python-linaro-image-tools : Depends: python-apt but it is not going to be installed
                             Depends: python-support (>= 0.90.0) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

安装报错,直接运行构建一个基本的debian系统

root@4e21889ed55e:/work/self_build/rockchip-bsp/rootfs# RELEASE=buster TARGET=desktop ARCH=arm64 ./mk-base-debian.sh
 Staring Download......
sudo lb clean --purge
[2023-09-10 09:07:09] lb clean --purge
P: Cleaning chroot
rm -f linaro-buster-alip-*
rm -rf config
I: create configuration
[2023-09-10 09:07:09] lb config --mirror-bootstrap https://mirrors.tuna.tsinghua.edu.cn/debian --mirror-chroot https://mirrors.tuna.tsinghua.edu.cn/debian --mirror-chroot-security https://mirrors.tuna.tsinghua.edu.cn/debian-security --mirror-binary https://mirrors.tuna.tsinghua.edu.cn/debian --mirror-binary-security https://mirrors.tuna.tsinghua.edu.cn/debian-security --apt-indices false --apt-recommends false --apt-secure false --architectures arm64 --archive-areas main contrib non-free --backports false --binary-filesystem ext4 --binary-images tar --bootappend-live hostname=linaro-alip username=linaro --bootstrap-qemu-arch arm64 --bootstrap-qemu-static /usr/bin/qemu-aarch64-static --cache false --chroot-filesystem none --compression gzip --debootstrap-options --variant=minbase --include=apt-transport-https,gnupg --distribution buster --gzip-options -9 --rsyncable --iso-publisher Linaro; http://www.linaro.org/; linaro-dev@lists.linaro.org --iso-volume Linaro Buster $(date +%Y%m%d-%H:%M) --linux-flavours none --linux-packages none --mode debian --security true --system normal --updates true
P: Creating config tree for a debian/buster/arm64 system
I: copy customization
I: done
set -e; sudo lb build 2>&1 | tee linaro-buster-alip-`date +%Y%m%d`-1.build-log.txt
[2023-09-10 09:07:09] lb build
[2023-09-10 09:07:09] lb bootstrap
P: Setting up cleanup function
[2023-09-10 09:07:09] lb bootstrap_cache restore
P: Restoring bootstrap stage from cache...
[2023-09-10 09:07:09] lb bootstrap_cdebootstrap
[2023-09-10 09:07:09] lb bootstrap_debootstrap
P: Begin bootstrapping system...
[2023-09-10 09:07:09] lb testroot
P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
P: Running debootstrap (download-only)...
I: Retrieving InRelease
I: Retrieving Release
E: Failed getting release file https://mirrors.tuna.tsinghua.edu.cn/debian/dists/buster/Release
P: Begin unmounting filesystems...
P: Saving caches...
if [ -f binary-tar.tar.gz ]; then \
        tar -jcf linaro-buster-alip-`date +%Y%m%d`-1.config.tar.bz2 auto/ config/ configure; \
        sudo mv binary.contents linaro-buster-alip-`date +%Y%m%d`-1.contents; \
        sudo mv chroot.packages.live linaro-buster-alip-`date +%Y%m%d`-1.packages; \
        sudo mv binary-tar.tar.gz linaro-buster-alip-`date +%Y%m%d`-1.tar.gz; \
        md5sum linaro-buster-alip-`date +%Y%m%d`-1.build-log.txt linaro-buster-alip-`date +%Y%m%d`-1.config.tar.bz2 linaro-buster-alip-`date +%Y%m%d`-1.contents linaro-buster-alip-`date +%Y%m%d`-1.packages linaro-buster-alip-`date +%Y%m%d`-1.tar.gz > linaro-buster-alip-`date +%Y%m%d`-1.md5sums.txt; \
        sha1sum linaro-buster-alip-`date +%Y%m%d`-1.build-log.txt linaro-buster-alip-`date +%Y%m%d`-1.config.tar.bz2 linaro-buster-alip-`date +%Y%m%d`-1.contents linaro-buster-alip-`date +%Y%m%d`-1.packages linaro-buster-alip-`date +%Y%m%d`-1.tar.gz > linaro-buster-alip-`date +%Y%m%d`-1.sha1sums.txt; \
fi
 Failed to run livebuild, please check your network connection.

这个问题要怎么解决?

这个报错看起来是网络有问题,我没怎么用过这个脚本,不太清楚