Skip to content

rk3588官方sdk编译的debian11系统无法正确安装内核头文件 #345

@Unlicensed-driver-ljx

Description

@Unlicensed-driver-ljx

keqikeji@keqikeji-System-Product-Name:~/ruixinweisdk/rk3588_linux_sdk$ sudo FORCE_UNSAFE_CONFIGURE=1 ./build.sh linux-headers
[sudo] keqikeji 的密码:
Log colors: message notice warning error fatal

Running within sudo(root) environment!

Log saved at /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/sessions/2025-04-30_13-08-04
Using last kernel version(5.10)

==========================================
Final configs

RK_BOOT_FIT_ITS=/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/device/rockchip/.chip/boot.its
RK_BOOT_IMG=boot.img
RK_BUILDROOT=y
RK_BUILDROOT_CFG=rockchip_rk3588
RK_CHIP=rk3588
RK_CHIP_FAMILY=rk3588
RK_DEBIAN=y
RK_DEBIAN_ARCH=arm64
RK_DEBIAN_BULLSEYE=y
RK_DEBIAN_MIRROR=mirrors.ustc.edu.cn
RK_DEBIAN_VERSION=bullseye
RK_DEFCONFIG=rockchip_rk3588_ljx_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=y
RK_KERNEL_ARCH=arm64
RK_KERNEL_CFG=rockchip_rk3588_ljx_defconfig
RK_KERNEL_DTS=kernel/arch/arm64/boot/dts/rockchip/rk3588-ljx.dts
RK_KERNEL_IMG=kernel/arch/arm64/boot/Image
RK_KERNEL_VERSION=5.10
RK_KERNEL_VERSION_RAW=5.10
RK_LOADER=y
RK_MISC=y
RK_MISC_BLANK=y
RK_OVERLAY=y
RK_OWNER=keqikeji
RK_OWNER_UID=1000
RK_PARAMETER=parameter.txt
RK_RECOVERY=y
RK_RECOVERY_CFG=rockchip_rk3588_recovery
RK_RECOVERY_CPIO_GZ=y
RK_RECOVERY_FIT_ITS=/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/device/rockchip/.chip/boot4recovery.its
RK_RECOVERY_INITRD_TYPE=cpio.gz
RK_ROOTFS=y
RK_ROOTFS_ASYNC_COMMIT=y
RK_ROOTFS_DEBUG_INFO=y
RK_ROOTFS_EXT4=y
RK_ROOTFS_FSTRIM=y
RK_ROOTFS_FSTRIM_INTERVAL=3600
RK_ROOTFS_GENERATE_LOGS=y
RK_ROOTFS_INPUT_EVENT_DAEMON=y
RK_ROOTFS_IRQBALANCE=y
RK_ROOTFS_LD_CACHE=y
RK_ROOTFS_LOG_GUARDIAN=y
RK_ROOTFS_LOG_GUARDIAN_INTERVAL=10m
RK_ROOTFS_LOG_GUARDIAN_LOG_DIRS=/var/log/,/tmp/
RK_ROOTFS_LOG_GUARDIAN_MIN_SIZE=100M
RK_ROOTFS_OVERLAY=y
RK_ROOTFS_STRIP_MODULES=y
RK_ROOTFS_SYSTEM=buildroot
RK_ROOTFS_TYPE=ext4
RK_ROOTFS_UDEV_RULES=y
RK_SAVE_TRACKED=y
RK_SESSION=2025-04-30_13-08-04
RK_SUDO_ROOT=1
RK_UBOOT_ARCH=arm64
RK_UBOOT_CFG=rk3588
RK_UPDATE=y
RK_USB_ADBD=y
RK_USB_ADBD_SHELL=/bin/bash
RK_USB_ADBD_TCP_PORT=5555
RK_USB_FW_VER=0x0310
RK_USB_GADGET=y
RK_USB_MANUFACTURER=Rockchip
RK_USB_PRODUCT=rk3xxx
RK_USB_VID=0x2207
RK_USE_FIT_IMG=y
RK_WIFIBT=y
RK_WIFIBT_MODULES=ALL_AP
RK_WIFIBT_RTK_AP=y
RK_YOCTO=y
RK_YOCTO_CHROMIUM=y
RK_YOCTO_DISPLAY_PLATFORM=wayland
RK_YOCTO_MACHINE=rockchip-rk3588-evb
RK_YOCTO_USBMOUNT=y

==========================================
Start building linux-headers

Found kernel's basic config fragment: rk3588_linux.config

  • sudo -u #1000 make -C /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/kernel/ -j29 CROSS_COMPILE=/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCH=arm64 rockchip_rk3588_ljx_defconfig rk3588_linux.config
    make: Entering directory '/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/kernel'

configuration written to .config

Using .config as base
Merging ./arch/arm64/configs/rk3588_linux.config
Value of CONFIG_BCMDHD_PCIE is redefined by fragment ./arch/arm64/configs/rk3588_linux.config:
Previous value: # CONFIG_BCMDHD_PCIE is not set
New value: CONFIG_BCMDHD_PCIE=y

Value of CONFIG_MALI_CSF_SUPPORT is redefined by fragment ./arch/arm64/configs/rk3588_linux.config:
Previous value: # CONFIG_MALI_CSF_SUPPORT is not set
New value: CONFIG_MALI_CSF_SUPPORT=y

merged configuration written to .config (needs make)

.config:7232:warning: override: BCMDHD_PCIE changes choice state

configuration written to .config

make: Leaving directory '/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/kernel'

  • sudo -u #1000 make -C /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/kernel/ -j29 CROSS_COMPILE=/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ARCH=arm64 Image
    make: Entering directory '/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/kernel'
    SYNC include/config/auto.conf.cmd
    CALL scripts/atomic/check-atomics.sh
    CALL scripts/checksyscalls.sh
    CHK include/generated/compile.h
    fatal: 不是 git 仓库(或者任何父目录):.git
    make: Leaving directory '/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/kernel'
    ==========================================
    Start packing linux-headers-amd64
    ==========================================

  • mkdir -p /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers

  • rm -rf /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-kbuild-amd64 /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-amd64.tar*

  • ln -rsf /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/kernel /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-kbuild-amd64

  • cd /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/kernel
    {

    Based on kernel/scripts/package/builddeb

    find . arch/arm64 -maxdepth 1 -name Makefile*
    find include -type f -o -type l
    find arch/arm64 -name module.lds -o -name Kbuild.platforms -o -name Platform
    find $(find arch/arm64 -name include -o -name scripts -type d) -type f
    find arch/arm64/include Module.symvers -type f
    echo .config
    } | tar --no-recursion --ignore-failed-read -T - -cf "/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-amd64.tar"

    Pack kbuild

    tar -uf "/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-amd64.tar" -C "/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-kbuild-amd64" scripts/ tools/

  • cd /home/keqikeji/ruixinweisdk/rk3588_linux_sdk
    Unpacking /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-amd64.tar ...
    Debian control file:
    Package: linux-headers-5.10-arm64
    Source: linux-rockchip (5.10)
    Version: 5.10-rockchip
    Architecture: amd64
    Section: kernel
    Priority: optional
    Multi-Arch: foreign
    Maintainer: Tao Huang [email protected]
    Homepage: https://www.kernel.org/
    Description: Kbuild and headers for Rockchip Linux 5.10 arm64 configuration
    Packing linux-headers-5.10-arm64_amd64.deb...
    Running 10-kernel.sh - linux-headers-amd64 succeeded.
    ==========================================
    Start packing linux-headers-armhf
    ==========================================

  • mkdir -p /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers

  • rm -rf /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-kbuild-armhf /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-armhf.tar*

  • ln -rsf /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/device/rockchip/common/linux-kbuild/armhf/linux-kbuild-5.10 /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-kbuild-armhf

  • cd /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/kernel
    {

    Based on kernel/scripts/package/builddeb

    find . arch/arm64 -maxdepth 1 -name Makefile*
    find include -type f -o -type l
    find arch/arm64 -name module.lds -o -name Kbuild.platforms -o -name Platform
    find $(find arch/arm64 -name include -o -name scripts -type d) -type f
    find arch/arm64/include Module.symvers -type f
    echo .config
    } | tar --no-recursion --ignore-failed-read -T - -cf "/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-armhf.tar"

    Pack kbuild

    tar -uf "/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-armhf.tar" -C "/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-kbuild-armhf" scripts/ tools/

  • cd /home/keqikeji/ruixinweisdk/rk3588_linux_sdk
    Unpacking /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-armhf.tar ...
    Debian control file:
    Package: linux-headers-5.10-arm64
    Source: linux-rockchip (5.10)
    Version: 5.10-rockchip
    Architecture: armhf
    Section: kernel
    Priority: optional
    Multi-Arch: foreign
    Maintainer: Tao Huang [email protected]
    Homepage: https://www.kernel.org/
    Description: Kbuild and headers for Rockchip Linux 5.10 arm64 configuration
    Packing linux-headers-5.10-arm64_armhf.deb...
    Running 10-kernel.sh - linux-headers-armhf succeeded.
    ==========================================
    Start packing linux-headers-aarch64
    ==========================================

  • mkdir -p /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers

  • rm -rf /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-kbuild-aarch64 /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-aarch64.tar*

  • ln -rsf /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/device/rockchip/common/linux-kbuild/aarch64/linux-kbuild-5.10 /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-kbuild-aarch64

  • cd /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/kernel
    {

    Based on kernel/scripts/package/builddeb

    find . arch/arm64 -maxdepth 1 -name Makefile*
    find include -type f -o -type l
    find arch/arm64 -name module.lds -o -name Kbuild.platforms -o -name Platform
    find $(find arch/arm64 -name include -o -name scripts -type d) -type f
    find arch/arm64/include Module.symvers -type f
    echo .config
    } | tar --no-recursion --ignore-failed-read -T - -cf "/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-aarch64.tar"

    Pack kbuild

    tar -uf "/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-aarch64.tar" -C "/home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-kbuild-aarch64" scripts/ tools/

  • cd /home/keqikeji/ruixinweisdk/rk3588_linux_sdk
    Unpacking /home/keqikeji/ruixinweisdk/rk3588_linux_sdk/output/linux-headers/linux-headers-aarch64.tar ...
    Debian control file:
    Package: linux-headers-5.10-arm64
    Source: linux-rockchip (5.10)
    Version: 5.10-rockchip
    Architecture: aarch64
    Section: kernel
    Priority: optional
    Multi-Arch: foreign
    Maintainer: Tao Huang [email protected]
    Homepage: https://www.kernel.org/
    Description: Kbuild and headers for Rockchip Linux 5.10 arm64 configuration
    Packing linux-headers-5.10-arm64_aarch64.deb...
    Running 10-kernel.sh - linux-headers-aarch64 succeeded.
    Running 10-kernel.sh - linux-headers succeeded.
    编译完以后安装到设备上。安装外部驱动还是显示没有头文件

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions