Kickpi-Book
  • KICKPI Document
  • K5(A133)
    • A133中文文档
      • 02-KICKPI-K5C硬件介绍
      • 02-KICKPI-K5硬件介绍
      • 10-系统镜像烧录
      • 11-SDK源码编译
      • 12-硬件功能使用说明
      • 13-硬件工厂测试
      • 20-LCD功能调试
      • 21-LRADC按键配置
      • 31-Android10.0 Tablet系统定制
      • 32-Ubuntu16.04 系统定制
      • 33-Kernel 驱动定制
      • 34-K5C主板供电
  • K2B/K2C(H618)
    • zh
      • 01-主板介绍
        • 01-KICKPI-K2B硬件介绍
        • 02-KICKPI-K2C硬件介绍
      • 02-入门必读
        • 01-网盘目录说明
        • 02-快速使用
        • 03-功能测试
        • 04-扩展引脚
      • 03-镜像烧录
        • 01-SD卡烧录
        • 02-USB线烧录
      • 04-SDK编译
        • 01-编译环境搭建
        • 02-LINUX_SDK源码编译
        • 2. Android SDK编译
      • 05-外设驱动
        • RTC
      • 06-Android系统定制
        • Android常用系统定制
      • 07-Linux系统定制
        • Linux常用系统定制
      • 08-进阶
        • 14-Secure Boot
        • 硬件工厂测试
        • 44-Keybox
  • K1/K1B/K3/K8(RK3568/RK3562/RK3588)
    • zh
      • 01-主板介绍
        • 01-RK芯片对比介绍
        • 02-KICKPI-K1硬件介绍
        • 03-KICKPI-K1B硬件介绍
        • 04-KICKPI-K3硬件介绍
        • 06-KICKPI-K8硬件介绍
      • 02-入门必读
        • 01-网盘目录说明
        • 02-快速使用
        • 02-快速使用
        • 02-快速使用
        • 03-功能测试
        • 04-拓展引脚
      • 03-镜像烧录
        • 01-USB线烧录
      • 04-SDK编译
        • 01-编译环境搭建
        • 02-LINUX SDK 编译
        • 03-ANDROID SDK 编译
      • 05-外设驱动
        • GPIO
        • Kernel
        • LCD
        • PWM
        • RTC
      • 06-ANDROID系统定制
        • 01-Android常用系统定制
        • 07-Android NPU YOLOV5 目标检测
      • 07-LINUX系统定制
        • 01-Linux常用系统定制
        • 02-Linux安装VNC
        • 03-Linux Docker环境搭建
        • 04-Linux QT环境搭建
        • 05-Linux NPU YOLOV5S 目标检测
      • 08-进阶
        • 01-硬件工厂测试
        • 02-硬件老化测试
        • 03-固件解包和打包
  • K7(RK3576)
    • zh
      • 01-主板介绍
        • 01-KICKPI-K7硬件介绍
      • 02-入门必读
        • 01-网盘目录说明
        • 02-快速使用
        • 03-功能测试
        • 04-拓展引脚
      • 03-镜像烧录
        • 01-获取镜像文件
        • 02-USB线烧录
      • 04-SDK编译
        • 01-编译环境搭建
        • 02-Linux_SDK编译
        • 03-Android_SDK编译
      • 05-外设驱动
        • ADC
        • PWM
      • 06-ANDROID系统定制
        • 01-Android常用系统定制
      • 07-LINUX系统定制
        • 01-Linux常用系统定制
        • 02-Linux Docker环境搭建
        • 03-Linux NPU YOLOV5S 目标检测
        • 04-Linux_Deepseek大模型
        • 05-Linux_VNC远程控制
      • 08-进阶
        • ADB功能使用
        • 进阶测试
  • K4B(T113-S3)
    • T113-S3中文文档
      • 01-KICKPI-K4B硬件介绍
      • 10-系统镜像烧录
      • 11-SDK源码编译
      • 12-硬件功能测试
      • 13-硬件工厂测试
      • LCD功能调试
      • 20-Ubuntu20.04系统定制
      • Buildroot_QT5配置
      • Buildroot系统定制
  • common
    • zh
      • adb
        • ADB教程
      • android
        • 02-ADC
      • bluetooth
        • bootanimation
      • display
        • FPC接口介绍
      • linux
        • SSH
        • bluetoothctl教程
        • qt
Powered by GitBook
On this page
  • SDK介绍
  • 获取SDK源码
  • 配置环境
  • 全部编译
  • 单独编译
  • 其他说明
  1. K7(RK3576)
  2. zh
  3. 04-SDK编译

02-Linux_SDK编译

SDK介绍

内核版本:6.1

Debian系统版本:12

Ubuntu系统版本:2404

获取SDK源码

  • 网盘目录

├── 1-SDK
│   └── Linux
│       ├── rootfs
│       │   ├── linaro-rootfs-*.img
│       │   └── ubuntu-rootfs-*.img
│       └── sdk
│           ├── rk3576-linux-*.md5sum
│           └── rk3576-linux-*.tar.gz

*这里一般指代日期,下面同,实际名称以网盘为准

  1. 拷贝源码压缩包到编译主机目录(若编译主机为虚拟机,不可放在共享目录下编译)

  2. MD5校验文件完整性

md5sum rk3576-linux-*.tar.gz

判断结果和 rk3576-linux-*.md5sum 内容一致,则文件下载完整

  1. 解压源码压缩包

$ mkdir rk3576-linux
$ tar -zxvf md5sum rk3576-linux-*.tar.gz -C rk3576-linux/
$ cd rk3576-linux/
$ git reset --hard

配置环境

单独编译或全部编译前先配置环境

$ ./build.sh lunch
Log colors: message notice warning error fatal

Log saved at /home/huangcm/A/sdk/rk3576/rk3576-linux/output/sessions/2024-12-05_16-25-44
Pick a defconfig:

1. rockchip_defconfig
2. rockchip_rk3576_kickpi_k7_buildroot_defconfig
3. rockchip_rk3576_kickpi_k7_debian_defconfig
4. rockchip_rk3576_kickpi_k7_ubuntu_defconfig
Which would you like? [1]:

根据需要选择对应的主板和系统

deiabn 默认使用 debian/linaro-rootfs.img 镜像,若不存在则会进行编译制作生成

ubuntu 默认使用 ubuntu/ubuntu2204-rootfs.img 镜像,若不存在则会进行编译制作生成

若需要快速编译debian,可使用网盘中的 linaro-rootfs-*.img,重命名存放到 debian/linaro-rootfs.img

若需要快速编译ubuntu,可使用网盘中的 ubuntu2404-rootfs-*.img,重命名存放到 ubuntu/ubuntu-rootfs.img

全部编译

标准镜像

$ ./build.sh 

多屏识别镜像

$ ./build.sh all_multi_dtb

单独编译

**Kernel defconfig 配置 **

$ ./build.sh kernel-config

uboot 编译

$ ./build.sh uboot

kernel 编译

方式一

$ ./build.sh kernel

方式二

$ export CROSS_COMPILE=../prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
$ make ARCH=arm64 rockchip_linux_defconfig rk3576.config
$ make ARCH=arm64 rk3576-kickpi-k7-linux.img -j24

kernel 多屏识别编译

$ ./build.sh kernel_multi_dtb

Debian 编译

配置环境

$ sudo dpkg -i debian/ubuntu-build-service/packages/*
$ sudo apt-get install -f

编译 linaro-rootfs.img

$ ./build.sh debian

此命令若 debian/linaro-rootfs.img 不存在,则 debian/linaro-rootfs.img 会通过编译生成

Ubuntu 编译

配置环境

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

编译 linaro-rootfs.img

$ ./build.sh ubuntu

此命令若 ubuntu/ubuntu-rootfs.img 不存在,则 ubuntu-rootfs.img 会通过编译生成

其他说明

固件说明

完整编译后会生成如下文件:

rockdev
├── boot.img
├── MiniLoaderAll.bin
├── misc.img
├── oem.img 
├── parameter.txt 
├── recovery.img 
├── rootfs.img 
├── uboot.img 
├── update.img 
├── update-rk3576-kickpi-k7-linux-*-*.img 
└── userdata.img 

烧写的镜像为 SDK/rockdev/update-rk3576-kickpi-k7-linux-*-*.img

dts 路径

kernel-6.1/arch/arm64/boot/dts/rockchip/rk3576-kickpi-k7-linux.dts

defconfig 路径

kernel-6.1/arch/arm64/configs/rockchip_linux_defconfig

u-boot defconfig 路径

u-boot/configs/rk3576_defconfig

u-boot defconfig 配置

$ cd u-boot/
$ make rk3576_defconfig 
$ make menuconfig
$ make savedefconfig
$ cp defconfig configs/rk3576_defconfig

Last updated 3 days ago

前提:确保编译硬件要求,以及成功

编译环境搭建