|
【Linux】
按照官方WIKI使用docker 编译kernel失败--求大佬相助
发表于 2024-1-27 11:07:05
浏览:2891
|
回复:2
打印
只看该作者
[复制链接]
楼主
报错信息:
kaibo@Pc:~$ docker start firefly
firefly
kaibo@Pc:~$ docker attach firefly
kaibo@kaibo:~$ cd firefly/
kaibo@kaibo:~/firefly$
kaibo@kaibo:~/firefly$
kaibo@kaibo:~/firefly$
kaibo@kaibo:~/firefly$ ls
app device firefly-update.sh Makefile README.md tools
buildroot docs kernel output rkbin u-boot
build.sh external Linux-SDK prebuilts rkflash.sh
kaibo@kaibo:~/firefly$ ./build.sh firefly_rk3566_aio-3566-jd4_buildroot_defconfig
Log saved at /home/kaibo/firefly/output/sessions/2024-01-27_03-03-29
Switching to defconfig: /home/kaibo/firefly/device/rockchip/.chip/firefly_rk3566_aio-3566-jd4_buildroot_defconfig
make: Entering directory '/home/kaibo/firefly/device/rockchip/common'
#
# configuration written to /home/kaibo/firefly/output/.config
#
make: Leaving directory '/home/kaibo/firefly/device/rockchip/common'
kaibo@kaibo:~/firefly$ ./build.sh all
Log saved at /home/kaibo/firefly/output/sessions/2024-01-27_03-03-36
==========================================
Final configs
==========================================
RK_BOOT_FIT_ITS=bootramdisk.its
RK_BOOT_IMG=boot.img
RK_BUILDROOT_CFG=rockchip_rk3566
RK_CHIP=rk3566
RK_CHIP_FAMILY=rk3566_rk3568
RK_DEBIAN_ARCH=arm64
RK_DEBIAN_ARM64=y
RK_DEBIAN_VERSION=bullseye
RK_DEFCONFIG=/home/kaibo/firefly/device/rockchip/.chips/rk3566_rk3568/firefly_rk3566_aio-3566-jd4_buildroot_defconfig
RK_EXTRA_PARTITION_NUM=2
RK_EXTRA_PARTITION_STR=oem:oem:/oem:ext4:defaults:normal:auto:@userdata:userdata:/userdata:ext4:defaults:normal:auto:@@@
RK_KERNEL_ARCH=arm64
RK_KERNEL_ARM64=y
RK_KERNEL_CFG=firefly_linux_defconfig
RK_KERNEL_DTB=kernel/arch/arm64/boot/dts/rockchip/rk3566-firefly-aiojd4.dtb
RK_KERNEL_DTS=kernel/arch/arm64/boot/dts/rockchip/rk3566-firefly-aiojd4.dts
RK_KERNEL_IMG=kernel/arch/arm64/boot/Image
RK_KERNEL_KBUILD_ARCH=host
RK_KERNEL_KBUILD_HOST=y
RK_KERNEL_TOOLCHAIN=/home/kaibo/firefly/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
RK_KERNEL_VERSION=5.10
RK_KERNEL_VERSION_REAL=5.10
RK_MISC_IMG=wipe_all-misc.img
RK_PARAMETER=parameter-buildroot-fit.txt
RK_PCBA_CFG=rockchip_rk3566_pcba
RK_RAMDISK_IMG=ramdisk.img
RK_RECOVERY_CFG=rockchip_rk3566_recovery
RK_RECOVERY_FIT_ITS=boot4recovery.its
RK_ROOTFS_SYSTEM=buildroot
RK_ROOTFS_SYSTEM_BUILDROOT=y
RK_ROOTFS_TYPE=ext4
RK_ROOTFS_UDEV_RULES=y
RK_SAVE_TRACKED=y
RK_SESSION=2024-01-27_03-03-36
RK_UBOOT_ARCH=arm64
RK_UBOOT_ARM64=y
RK_UBOOT_CFG=rk3566
RK_UPDATE=y
RK_USB_ADBD=y
RK_USB_ADBD_BASH=y
RK_USB_ADBD_TCP_PORT=5555
RK_USE_FIT_IMG=y
RK_WIFIBT_CHIP=ALL_AP
RK_WIFIBT_TTY=ttyS1
==========================================
Start building all images
==========================================
Using kernel version(5.10) from environment
Toolchain for kernel:
/home/kaibo/firefly/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
==========================================
Start building kernel
==========================================
+ make -C /home/kaibo/firefly/kernel/ -j25 CROSS_COMPILE=/home/kaibo/firefly/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCH=arm64 firefly_linux_defconfig
make: Entering directory '/home/kaibo/firefly/kernel'
#
# No change to .config
#
make: Leaving directory '/home/kaibo/firefly/kernel'
*** LZ4 command line interface 64-bits r128, by Yann Collet (May 20 2021) ***
Your lz4 is too old for kernel:
Please update it:
git clone https://github.com/lz4/lz4.git --depth 1 -b v1.9.4
cd lz4
sudo make install -j8
ERROR: Running /home/kaibo/firefly/device/rockchip/common/scripts/mk-kernel.sh - do_build failed!
ERROR: exit code 1 from line 49:
"$SCRIPTS_DIR/check-kernel.sh"
ERROR: call stack:
mk-kernel.sh: do_build(49)
mk-kernel.sh: build_hook(209)
mk-kernel.sh: main(314)
ERROR: Running /home/kaibo/firefly/device/rockchip/common/build-hooks/99-all.sh - build_all failed!
ERROR: exit code 1 from line 29:
"$SCRIPTS_DIR/mk-kernel.sh" $RK_BOOT_IMG_FMT
ERROR: call stack:
99-all.sh: build_all(29)
99-all.sh: build_hook(136)
build-helper: try_func(63)
build-helper: try_hook(95)
build-helper: source(173)
99-all.sh: main(147)
ERROR: Running /home/kaibo/firefly/device/rockchip/common/build-hooks/99-all.sh - try_func build_hook all failed!
ERROR: exit code 1 from line 67:
build_hook
ERROR: call stack:
build-helper: try_func(67)
build-helper: try_hook(95)
build-helper: source(173)
99-all.sh: main(147)
ERROR: Running ./build.sh - run_hooks build all failed!
ERROR: exit code 1 from line 195:
/home/kaibo/firefly/device/rockchip/common/build-hooks/99-all.sh build all
ERROR: call stack:
build.sh: run_hooks(195)
build.sh: run_build_hooks(214)
build.sh: main(495)
build.sh: main(510)
ERROR: Running ./build.sh - run_build_hooks build all failed!
ERROR: exit code 1 from line 217:
build
ERROR: call stack:
build.sh: run_build_hooks(217)
build.sh: main(495)
build.sh: main(510)
kaibo@kaibo:~/firefly$
dokcer 环境配置:
kaibo@Pc:~/docker$ cat dockerfile
FROM ubuntu:18.04
MAINTAINER kaibo "hk19991123@gmail.com"
ENV DEBIAN_FRONTEND=noninteractive
RUN cp -a /etc/apt/sources.list /etc/apt/sources.list.bak
RUN sed -i 's@http://.*ubuntu.com@http://repo.huaweicloud.com@g' /etc/apt/sources.list
RUN apt update
RUN apt install -y build-essential crossbuild-essential-arm64 \
bash-completion vim sudo locales time rsync bc python
RUN apt install -y repo git ssh libssl-dev liblz4-tool lib32stdc++6 \
expect patchelf chrpath gawk texinfo diffstat binfmt-support \
qemu-user-static live-build bison flex fakeroot cmake \
unzip device-tree-compiler python-pip ncurses-dev python-pyelftools \
subversion asciidoc w3m dblatex graphviz python-matplotlib cpio \
libparse-yapp-perl default-jre patchutils swig expect-dev u-boot-tools
RUN apt update && apt install -y -f
# language support
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
# switch to a no-root user
RUN useradd -c 'kaibo user' -m -d /home/kaibo -s /bin/bash kaibo
RUN sed -i -e '/\%sudo/ c \%sudo ALL=(ALL) NOPASSWD: ALL' /etc/sudoers
RUN usermod -a -G sudo kaibo
USER kaibo
WORKDIR /home/kaibo
内核配置:kaibo@Pc:~$ cd linux/rockchip/firefly/kernel/
kaibo@Pc:~/linux/rockchip/firefly/kernel$ ./check-config.sh .config
info: reading kernel config from .config ...
Generally Necessary:
- cgroup hierarchy: cgroupv2
Controllers:
- cpu: available
- cpuset: available
- io: available
- memory: available
- pids: available
- apparmor: enabled and tools installed
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_CGROUPS: enabled
- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_CPUSETS: enabled
- CONFIG_MEMCG: enabled
- CONFIG_KEYS: enabled
- CONFIG_VETH: enabled
- CONFIG_BRIDGE: enabled
- CONFIG_BRIDGE_NETFILTER: enabled
- CONFIG_IP_NF_FILTER: enabled
- CONFIG_IP_NF_MANGLE: enabled
- CONFIG_IP_NF_TARGET_MASQUERADE: enabled
- CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled
- CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled
- CONFIG_NETFILTER_XT_MATCH_IPVS: enabled
- CONFIG_NETFILTER_XT_MARK: enabled
- CONFIG_IP_NF_NAT: enabled
- CONFIG_NF_NAT: enabled
- CONFIG_POSIX_MQUEUE: enabled
- CONFIG_CGROUP_BPF: enabled
Optional Features:
- CONFIG_USER_NS: enabled
- CONFIG_SECCOMP: enabled
- CONFIG_SECCOMP_FILTER: enabled
- CONFIG_CGROUP_PIDS: enabled
- CONFIG_MEMCG_SWAP: enabled
(cgroup swap accounting is currently enabled)
- CONFIG_BLK_CGROUP: enabled
- CONFIG_BLK_DEV_THROTTLING: enabled
- CONFIG_CGROUP_PERF: enabled
- CONFIG_CGROUP_HUGETLB: enabled
- CONFIG_NET_CLS_CGROUP: enabled
- CONFIG_CGROUP_NET_PRIO: enabled
- CONFIG_CFS_BANDWIDTH: enabled
- CONFIG_FAIR_GROUP_SCHED: enabled
- CONFIG_IP_NF_TARGET_REDIRECT: enabled
- CONFIG_IP_VS: enabled
- CONFIG_IP_VS_NFCT: enabled
- CONFIG_IP_VS_PROTO_TCP: enabled
- CONFIG_IP_VS_PROTO_UDP: enabled
- CONFIG_IP_VS_RR: enabled
- CONFIG_SECURITY_SELINUX: enabled
- CONFIG_SECURITY_APPARMOR: enabled
- CONFIG_EXT4_FS: enabled
- CONFIG_EXT4_FS_POSIX_ACL: enabled
- CONFIG_EXT4_FS_SECURITY: enabled
- Network Drivers:
- "overlay":
- CONFIG_VXLAN: enabled
- CONFIG_BRIDGE_VLAN_FILTERING: enabled
Optional (for encrypted networks):
- CONFIG_CRYPTO: enabled
- CONFIG_CRYPTO_AEAD: enabled
- CONFIG_CRYPTO_GCM: enabled
- CONFIG_CRYPTO_SEQIV: enabled
- CONFIG_CRYPTO_GHASH: enabled
- CONFIG_XFRM: enabled
- CONFIG_XFRM_USER: enabled
- CONFIG_XFRM_ALGO: enabled
- CONFIG_INET_ESP: enabled
- CONFIG_NETFILTER_XT_MATCH_BPF: missing
- "ipvlan":
- CONFIG_IPVLAN: enabled
- "macvlan":
- CONFIG_MACVLAN: enabled
- CONFIG_DUMMY: enabled
- "ftp,tftp client in container":
- CONFIG_NF_NAT_FTP: enabled
- CONFIG_NF_CONNTRACK_FTP: enabled
- CONFIG_NF_NAT_TFTP: enabled
- CONFIG_NF_CONNTRACK_TFTP: enabled
- Storage Drivers:
- "btrfs":
- CONFIG_BTRFS_FS: enabled
- CONFIG_BTRFS_FS_POSIX_ACL: enabled
- "overlay":
- CONFIG_OVERLAY_FS: enabled
- "zfs":
- /dev/zfs: present
- zfs command: missing
- zpool command: missing
Limits:
- /proc/sys/kernel/keys/root_maxkeys: 1000000
kaibo@Pc:~/linux/rockchip/firefly/kernel$
|
|