From 9601ea9c8a65b37205564bbc6404be3895d02586 Mon Sep 17 00:00:00 2001 From: hejiawencc Date: Mon, 24 Oct 2022 11:42:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9LubanCat=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E5=8C=BA=E5=88=86extboot=E6=9D=BF?= =?UTF-8?q?=E5=8D=A1=E9=80=9A=E7=94=A8=E9=95=9C=E5=83=8F=E5=92=8Crkboot?= =?UTF-8?q?=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/build.sh | 15 +++- .../BoardConfig-LubanCat-RK_series-debian.mk | 72 +++++++++++++++++++ rk356x/BoardConfig-LubanCat-Zero-ubuntu.mk | 14 ++-- rk356x/BoardConfig-LubanCat1-ubuntu.mk | 14 ++-- rk356x/BoardConfig-LubanCat1N-ubuntu.mk | 16 ++--- rk356x/BoardConfig-LubanCat2-debian.mk | 2 +- rk356x/BoardConfig-LubanCat2-ubuntu.mk | 16 ++--- rk356x/BoardConfig-LubanCat2IO-ububtu.mk | 16 ++--- rk356x/BoardConfig-LubanCat2N-ubuntu.mk | 16 ++--- 9 files changed, 119 insertions(+), 62 deletions(-) create mode 100644 rk356x/BoardConfig-LubanCat-RK_series-debian.mk diff --git a/common/build.sh b/common/build.sh index 57c8594..46dca32 100755 --- a/common/build.sh +++ b/common/build.sh @@ -693,6 +693,10 @@ function build_kerneldeb(){ echo "TARGET_KERNEL_CONFIG_FRAGMENT =$RK_KERNEL_DEFCONFIG_FRAGMENT" echo "==========================================" pwd + + rm -f linux-*.buildinfo linux-*.changes + rm -f linux-headers-*.deb linux-image-*.deb linux-libc-dev*.deb + cd kernel make ARCH=$RK_ARCH $RK_KERNEL_DEFCONFIG $RK_KERNEL_DEFCONFIG_FRAGMENT make ARCH=$RK_ARCH bindeb-pkg RK_KERNEL_DTS=$RK_KERNEL_DTS -j$RK_JOBS @@ -728,6 +732,7 @@ function build_extboot(){ rm -rf $EXTBOOT_DIR mkdir -p $EXTBOOT_DTB/overlay mkdir -p $EXTBOOT_DIR/uEnv + mkdir -p $EXTBOOT_DIR/kerneldeb cp ${TOP_DIR}/$RK_KERNEL_IMG $EXTBOOT_DIR/Image-$KERNEL_VERSION @@ -750,9 +755,12 @@ function build_extboot(){ cp ${TOP_DIR}/kernel/System.map $EXTBOOT_DIR/System.map-$KERNEL_VERSION cp ${TOP_DIR}/kernel/logo.bmp $EXTBOOT_DIR/ - make ARCH=$RK_ARCH INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$EXTBOOT_DIR modules_install - rm $EXTBOOT_DIR/lib/modules/$KERNEL_VERSION/build - rm $EXTBOOT_DIR/lib/modules/$KERNEL_VERSION/source + cp ${TOP_DIR}/linux-headers-"$KERNEL_VERSION"_"$KERNEL_VERSION"-*.deb $EXTBOOT_DIR/kerneldeb + cp ${TOP_DIR}/linux-image-"$KERNEL_VERSION"_"$KERNEL_VERSION"-*.deb $EXTBOOT_DIR/kerneldeb + + # make ARCH=$RK_ARCH INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$EXTBOOT_DIR modules_install + # rm $EXTBOOT_DIR/lib/modules/$KERNEL_VERSION/build + # rm $EXTBOOT_DIR/lib/modules/$KERNEL_VERSION/source rm -rf $EXTBOOT_IMG && truncate -s 128M $EXTBOOT_IMG fakeroot mkfs.ext4 -F -L "boot" -d $EXTBOOT_DIR $EXTBOOT_IMG @@ -1156,6 +1164,7 @@ function build_all(){ build_loader if [ "$RK_EXTBOOT" = "true" ]; then + build_kerneldeb build_extboot else build_kernel diff --git a/rk356x/BoardConfig-LubanCat-RK_series-debian.mk b/rk356x/BoardConfig-LubanCat-RK_series-debian.mk new file mode 100644 index 0000000..c9a013c --- /dev/null +++ b/rk356x/BoardConfig-LubanCat-RK_series-debian.mk @@ -0,0 +1,72 @@ +#!/bin/bash + +# Target arch +export RK_ARCH=arm64 +# Uboot defconfig +export RK_UBOOT_DEFCONFIG=rk3566 +# Uboot image format type: fit(flattened image tree) +export RK_UBOOT_FORMAT_TYPE=fit +# Kernel defconfig +export RK_KERNEL_DEFCONFIG=lubancat2_defconfig +# Kernel defconfig fragment +export RK_KERNEL_DEFCONFIG_FRAGMENT= +# Kernel dts +export RK_KERNEL_DTS=rk356x-lubancat-rk_series +# boot image type +export RK_BOOT_IMG=boot.img +# kernel image path +export RK_KERNEL_IMG=kernel/arch/arm64/boot/Image +# kernel image format type: fit(flattened image tree) +export RK_KERNEL_FIT_ITS=boot.its +# parameter for GPT table +export RK_PARAMETER=parameter-ubuntu-fit.txt +# 分区表对应的打包文件 +export RK_PACKAGE_FILE=rk356x-package-file-ubuntu +# Buildroot config +export RK_CFG_BUILDROOT=rockchip_rk3566 +# Recovery config +export RK_CFG_RECOVERY= +# Recovery image format type: fit(flattened image tree) +export RK_RECOVERY_FIT_ITS=boot4recovery.its +# ramboot config +export RK_CFG_RAMBOOT= +# Pcba config +export RK_CFG_PCBA= +# Build jobs +export RK_JOBS=24 +# target chip +export RK_TARGET_PRODUCT=rk356x +# Set rootfs type, including ext2 ext4 squashfs +export RK_ROOTFS_TYPE=ext4 +# yocto machine +export RK_YOCTO_MACHINE=rockchip-rk3568-evb +# rootfs image path +export RK_ROOTFS_IMG=rockdev/rootfs.${RK_ROOTFS_TYPE} +# Set ramboot image type +export RK_RAMBOOT_TYPE= +# Set oem partition type, including ext2 squashfs +export RK_OEM_FS_TYPE=ext2 +# Set userdata partition type, including ext2, fat +export RK_USERDATA_FS_TYPE=ext2 +#OEM config +export RK_OEM_DIR= +# OEM build on buildroot +#export RK_OEM_BUILDIN_BUILDROOT=YES +#userdata config +export RK_USERDATA_DIR= +#misc image +export RK_MISC= +#choose enable distro module +export RK_DISTRO_MODULE= +# Define pre-build script for this board +export RK_BOARD_PRE_BUILD_SCRIPT=app-build.sh +# 定义默认rootfs为 debian +export RK_ROOTFS_SYSTEM=debian +# Set debian version (debian10: buster) +export RK_DEBIAN_VERSION=buster +# 定义默认rootfs是否为桌面版 desktop :桌面版 base :控制台版 +export RK_ROOTFS_TARGET=desktop +# 定义默认rootfs是否添加DEBUG工具 debug :添加 none :不添加 +export RK_ROOTFS_DEBUG=debug +# 使用exboot内核分区 +export RK_EXTBOOT=true \ No newline at end of file diff --git a/rk356x/BoardConfig-LubanCat-Zero-ubuntu.mk b/rk356x/BoardConfig-LubanCat-Zero-ubuntu.mk index 6f4fab8..b360256 100644 --- a/rk356x/BoardConfig-LubanCat-Zero-ubuntu.mk +++ b/rk356x/BoardConfig-LubanCat-Zero-ubuntu.mk @@ -19,13 +19,11 @@ export RK_KERNEL_IMG=kernel/arch/arm64/boot/Image # kernel image format type: fit(flattened image tree) export RK_KERNEL_FIT_ITS=boot.its # parameter for GPT table -export RK_PARAMETER=parameter-ubuntu-fit.txt -# 分区表对应的打包文件 -export RK_PACKAGE_FILE=rk356x-package-file-ubuntu +export RK_PARAMETER=parameter-buildroot-fit.txt # Buildroot config export RK_CFG_BUILDROOT=rockchip_rk3566 # Recovery config -export RK_CFG_RECOVERY= +export RK_CFG_RECOVERY=rockchip_rk356x_recovery # Recovery image format type: fit(flattened image tree) export RK_RECOVERY_FIT_ITS=boot4recovery.its # ramboot config @@ -49,13 +47,13 @@ export RK_OEM_FS_TYPE=ext2 # Set userdata partition type, including ext2, fat export RK_USERDATA_FS_TYPE=ext2 #OEM config -export RK_OEM_DIR= +export RK_OEM_DIR=oem_normal # OEM build on buildroot #export RK_OEM_BUILDIN_BUILDROOT=YES #userdata config -export RK_USERDATA_DIR= +export RK_USERDATA_DIR=userdata_normal #misc image -export RK_MISC= +export RK_MISC=wipe_all-misc.img #choose enable distro module export RK_DISTRO_MODULE= # Define pre-build script for this board @@ -68,5 +66,3 @@ export RK_UBUNTU_VERSION=20.04 export RK_ROOTFS_TARGET=desktop # 定义默认rootfs是否添加DEBUG工具 debug :添加 none :不添加 export RK_ROOTFS_DEBUG=none -# 使用exboot内核分区 -export RK_EXTBOOT=true \ No newline at end of file diff --git a/rk356x/BoardConfig-LubanCat1-ubuntu.mk b/rk356x/BoardConfig-LubanCat1-ubuntu.mk index 3597ade..3341745 100644 --- a/rk356x/BoardConfig-LubanCat1-ubuntu.mk +++ b/rk356x/BoardConfig-LubanCat1-ubuntu.mk @@ -19,13 +19,11 @@ export RK_KERNEL_IMG=kernel/arch/arm64/boot/Image # kernel image format type: fit(flattened image tree) export RK_KERNEL_FIT_ITS=boot.its # parameter for GPT table -export RK_PARAMETER=parameter-ubuntu-fit.txt -# 分区表对应的打包文件 -export RK_PACKAGE_FILE=rk356x-package-file-ubuntu +export RK_PARAMETER=parameter-buildroot-fit.txt # Buildroot config export RK_CFG_BUILDROOT=rockchip_rk3566 # Recovery config -export RK_CFG_RECOVERY= +export RK_CFG_RECOVERY=rockchip_rk356x_recovery # Recovery image format type: fit(flattened image tree) export RK_RECOVERY_FIT_ITS=boot4recovery.its # ramboot config @@ -49,13 +47,13 @@ export RK_OEM_FS_TYPE=ext2 # Set userdata partition type, including ext2, fat export RK_USERDATA_FS_TYPE=ext2 #OEM config -export RK_OEM_DIR= +export RK_OEM_DIR=oem_normal # OEM build on buildroot #export RK_OEM_BUILDIN_BUILDROOT=YES #userdata config -export RK_USERDATA_DIR= +export RK_USERDATA_DIR=userdata_normal #misc image -export RK_MISC= +export RK_MISC=wipe_all-misc.img #choose enable distro module export RK_DISTRO_MODULE= # Define pre-build script for this board @@ -68,5 +66,3 @@ export RK_UBUNTU_VERSION=20.04 export RK_ROOTFS_TARGET=desktop # 定义默认rootfs是否添加DEBUG工具 debug :添加 none :不添加 export RK_ROOTFS_DEBUG=none -# 使用exboot内核分区 -export RK_EXTBOOT=true \ No newline at end of file diff --git a/rk356x/BoardConfig-LubanCat1N-ubuntu.mk b/rk356x/BoardConfig-LubanCat1N-ubuntu.mk index ea1ef46..d4f19e9 100644 --- a/rk356x/BoardConfig-LubanCat1N-ubuntu.mk +++ b/rk356x/BoardConfig-LubanCat1N-ubuntu.mk @@ -19,13 +19,11 @@ export RK_KERNEL_IMG=kernel/arch/arm64/boot/Image # kernel image format type: fit(flattened image tree) export RK_KERNEL_FIT_ITS=boot.its # parameter for GPT table -export RK_PARAMETER=parameter-ubuntu-fit.txt -# 分区表对应的打包文件 -export RK_PACKAGE_FILE=rk356x-package-file-ubuntu +export RK_PARAMETER=parameter-buildroot-fit.txt # Buildroot config export RK_CFG_BUILDROOT=rockchip_rk3566 # Recovery config -export RK_CFG_RECOVERY= +export RK_CFG_RECOVERY=rockchip_rk356x_recovery # Recovery image format type: fit(flattened image tree) export RK_RECOVERY_FIT_ITS=boot4recovery.its # ramboot config @@ -49,13 +47,13 @@ export RK_OEM_FS_TYPE=ext2 # Set userdata partition type, including ext2, fat export RK_USERDATA_FS_TYPE=ext2 #OEM config -export RK_OEM_DIR= +export RK_OEM_DIR=oem_normal # OEM build on buildroot #export RK_OEM_BUILDIN_BUILDROOT=YES #userdata config -export RK_USERDATA_DIR= +export RK_USERDATA_DIR=userdata_normal #misc image -export RK_MISC= +export RK_MISC=wipe_all-misc.img #choose enable distro module export RK_DISTRO_MODULE= # Define pre-build script for this board @@ -67,6 +65,4 @@ export RK_UBUNTU_VERSION=20.04 # 定义默认rootfs是否为桌面版 desktop :桌面版 console :控制台版 export RK_ROOTFS_TARGET=desktop # 定义默认rootfs是否添加DEBUG工具 debug :添加 none :不添加 -export RK_ROOTFS_DEBUG=none -# 使用exboot内核分区 -export RK_EXTBOOT=true \ No newline at end of file +export RK_ROOTFS_DEBUG=none \ No newline at end of file diff --git a/rk356x/BoardConfig-LubanCat2-debian.mk b/rk356x/BoardConfig-LubanCat2-debian.mk index 86042cf..9f48f80 100644 --- a/rk356x/BoardConfig-LubanCat2-debian.mk +++ b/rk356x/BoardConfig-LubanCat2-debian.mk @@ -63,6 +63,6 @@ export RK_ROOTFS_SYSTEM=debian # 设置 debian 版本 (debian10: buster) export RK_DEBIAN_VERSION=buster # 定义默认rootfs是否为桌面版 desktop :桌面版 base :控制台版 -export RK_ROOTFS_TARGET=base +export RK_ROOTFS_TARGET=desktop # 定义默认rootfs是否添加DEBUG工具 debug :添加 none :不添加 export RK_ROOTFS_DEBUG=debug \ No newline at end of file diff --git a/rk356x/BoardConfig-LubanCat2-ubuntu.mk b/rk356x/BoardConfig-LubanCat2-ubuntu.mk index 169d627..44ed200 100644 --- a/rk356x/BoardConfig-LubanCat2-ubuntu.mk +++ b/rk356x/BoardConfig-LubanCat2-ubuntu.mk @@ -19,13 +19,11 @@ export RK_KERNEL_IMG=kernel/arch/arm64/boot/Image # kernel image format type: fit(flattened image tree) export RK_KERNEL_FIT_ITS=boot.its # parameter for GPT table -export RK_PARAMETER=parameter-ubuntu-fit.txt -# 分区表对应的打包文件 -export RK_PACKAGE_FILE=rk356x-package-file-ubuntu +export RK_PARAMETER=parameter-buildroot-fit.txt # Buildroot config export RK_CFG_BUILDROOT=rockchip_rk3568 # Recovery config -export RK_CFG_RECOVERY= +export RK_CFG_RECOVERY=rockchip_rk356x_recovery # Recovery image format type: fit(flattened image tree) export RK_RECOVERY_FIT_ITS=boot4recovery.its # ramboot config @@ -49,13 +47,13 @@ export RK_OEM_FS_TYPE=ext2 # Set userdata partition type, including ext2, fat export RK_USERDATA_FS_TYPE=ext2 #OEM config -export RK_OEM_DIR= +export RK_OEM_DIR=oem_normal # OEM build on buildroot #export RK_OEM_BUILDIN_BUILDROOT=YES #userdata config -export RK_USERDATA_DIR= +export RK_USERDATA_DIR=userdata_normal #misc image -export RK_MISC= +export RK_MISC=wipe_all-misc.img #choose enable distro module export RK_DISTRO_MODULE= # Define pre-build script for this board @@ -67,6 +65,4 @@ export RK_UBUNTU_VERSION=20.04 # 定义默认rootfs是否为桌面版 desktop :桌面版 console :控制台版 export RK_ROOTFS_TARGET=desktop # 定义默认rootfs是否添加DEBUG工具 debug :添加 none :不添加 -export RK_ROOTFS_DEBUG=none -# 使用exboot内核分区 -export RK_EXTBOOT=true \ No newline at end of file +export RK_ROOTFS_DEBUG=none \ No newline at end of file diff --git a/rk356x/BoardConfig-LubanCat2IO-ububtu.mk b/rk356x/BoardConfig-LubanCat2IO-ububtu.mk index 6801f21..b33b6c4 100644 --- a/rk356x/BoardConfig-LubanCat2IO-ububtu.mk +++ b/rk356x/BoardConfig-LubanCat2IO-ububtu.mk @@ -19,13 +19,11 @@ export RK_KERNEL_IMG=kernel/arch/arm64/boot/Image # kernel image format type: fit(flattened image tree) export RK_KERNEL_FIT_ITS=boot.its # parameter for GPT table -export RK_PARAMETER=parameter-ubuntu-fit.txt -# 分区表对应的打包文件 -export RK_PACKAGE_FILE=rk356x-package-file-ubuntu +export RK_PARAMETER=parameter-buildroot-fit.txt # Buildroot config export RK_CFG_BUILDROOT=rockchip_rk3568 # Recovery config -export RK_CFG_RECOVERY= +export RK_CFG_RECOVERY=rockchip_rk356x_recovery # Recovery image format type: fit(flattened image tree) export RK_RECOVERY_FIT_ITS=boot4recovery.its # ramboot config @@ -49,13 +47,13 @@ export RK_OEM_FS_TYPE=ext2 # Set userdata partition type, including ext2, fat export RK_USERDATA_FS_TYPE=ext2 #OEM config -export RK_OEM_DIR= +export RK_OEM_DIR=oem_normal # OEM build on buildroot #export RK_OEM_BUILDIN_BUILDROOT=YES #userdata config -export RK_USERDATA_DIR= +export RK_USERDATA_DIR=userdata_normal #misc image -export RK_MISC= +export RK_MISC=wipe_all-misc.img #choose enable distro module export RK_DISTRO_MODULE= # Define pre-build script for this board @@ -67,6 +65,4 @@ export RK_UBUNTU_VERSION=20.04 # 定义默认rootfs是否为桌面版 desktop :桌面版 console :控制台版 export RK_ROOTFS_TARGET=desktop # 定义默认rootfs是否添加DEBUG工具 debug :添加 none :不添加 -export RK_ROOTFS_DEBUG=none -# 使用exboot内核分区 -export RK_EXTBOOT=true \ No newline at end of file +export RK_ROOTFS_DEBUG=none \ No newline at end of file diff --git a/rk356x/BoardConfig-LubanCat2N-ubuntu.mk b/rk356x/BoardConfig-LubanCat2N-ubuntu.mk index 020e953..e216044 100644 --- a/rk356x/BoardConfig-LubanCat2N-ubuntu.mk +++ b/rk356x/BoardConfig-LubanCat2N-ubuntu.mk @@ -19,13 +19,11 @@ export RK_KERNEL_IMG=kernel/arch/arm64/boot/Image # kernel image format type: fit(flattened image tree) export RK_KERNEL_FIT_ITS=boot.its # parameter for GPT table -export RK_PARAMETER=parameter-ubuntu-fit.txt -# 分区表对应的打包文件 -export RK_PACKAGE_FILE=rk356x-package-file-ubuntu +export RK_PARAMETER=parameter-buildroot-fit.txt # Buildroot config export RK_CFG_BUILDROOT=rockchip_rk3568 # Recovery config -export RK_CFG_RECOVERY= +export RK_CFG_RECOVERY=rockchip_rk356x_recovery # Recovery image format type: fit(flattened image tree) export RK_RECOVERY_FIT_ITS=boot4recovery.its # ramboot config @@ -49,13 +47,13 @@ export RK_OEM_FS_TYPE=ext2 # Set userdata partition type, including ext2, fat export RK_USERDATA_FS_TYPE=ext2 #OEM config -export RK_OEM_DIR= +export RK_OEM_DIR=oem_normal # OEM build on buildroot #export RK_OEM_BUILDIN_BUILDROOT=YES #userdata config -export RK_USERDATA_DIR= +export RK_USERDATA_DIR=userdata_normal #misc image -export RK_MISC= +export RK_MISC=parameter-buildroot-fit.txt #choose enable distro module export RK_DISTRO_MODULE= # Define pre-build script for this board @@ -67,6 +65,4 @@ export RK_UBUNTU_VERSION=20.04 # 定义默认rootfs是否为桌面版 desktop :桌面版 console :控制台版 export RK_ROOTFS_TARGET=desktop # 定义默认rootfs是否添加DEBUG工具 debug :添加 none :不添加 -export RK_ROOTFS_DEBUG=none -# 使用exboot内核分区 -export RK_EXTBOOT=true \ No newline at end of file +export RK_ROOTFS_DEBUG=none \ No newline at end of file