diff --git a/common/build.sh b/common/build.sh index 57d89b6..f84b4ae 100755 --- a/common/build.sh +++ b/common/build.sh @@ -689,13 +689,13 @@ function build_ubuntu(){ esac echo "=========Start building ubuntu for $ARCH=========" - echo "==== RK_UBUNTU_VERSION: $RK_UBUNTU_VERSION ARCH: $ARCH ====" + echo "==== RK_UBUNTU_VERSION: $RK_UBUNTU_VERSION ARCH: $ARCH ====" cd ubuntu - if [ ! -e ubuntu-base-desktop-$ARCH.tar.gz ]; then - ARCH=arm64 ./mk-base-desktop-ubuntu.sh + if [ ! -e ubuntu-base-$RK_ROOTFS_TARGET-$ARCH.tar.gz ]; then + ARCH=arm64 ./mk-base-$RK_ROOTFS_TARGET-ubuntu.sh fi - VERSION=debug ARCH=arm64 RELEASE=desktop ./mk-rootfs.sh + VERSION=debug ARCH=arm64 ./mk-$RK_ROOTFS_TARGET-rootfs.sh ./mk-image.sh @@ -924,6 +924,7 @@ function build_cleanall(){ rm -rf yocto/build/tmp rm -rf distro/output rm -rf debian/binary + rm -rf ubuntu/binary finish_build } diff --git a/rk356x/BoardConfig-rk3568-lubancat-lbc-ubuntu.mk b/rk356x/BoardConfig-rk3568-lubancat-lbc-ubuntu.mk new file mode 100644 index 0000000..0519fda --- /dev/null +++ b/rk356x/BoardConfig-rk3568-lubancat-lbc-ubuntu.mk @@ -0,0 +1,68 @@ +#!/bin/bash + +# Target arch +export RK_ARCH=arm64 +# Uboot defconfig +export RK_UBOOT_DEFCONFIG=rk3568 +# Uboot image format type: fit(flattened image tree) +export RK_UBOOT_FORMAT_TYPE=fit +# Kernel defconfig +export RK_KERNEL_DEFCONFIG=ebf_rk3568_defconfig +# Kernel defconfig fragment +export RK_KERNEL_DEFCONFIG_FRAGMENT= +# Kernel dts +export RK_KERNEL_DTS=rk3568-ebf-lubancat +# 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_rk3568 +# Recovery config +export RK_CFG_RECOVERY=rockchip_rk356x_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=blank-misc.img +#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为ubuntu +export RK_ROOTFS_SYSTEM=ubuntu +# Set ubuntu version (ubuntu18: bionic, ubuntu20: ) +export RK_UBUNTU_VERSION=bionic +# 定义默认rootfs是否为桌面版 desktop:桌面版 console:控制台版 +export RK_ROOTFS_TARGET=desktop \ No newline at end of file diff --git a/rk356x/Configuration_manual b/rk356x/Configuration_manual new file mode 100644 index 0000000..afbeda1 --- /dev/null +++ b/rk356x/Configuration_manual @@ -0,0 +1,70 @@ +#!/bin/bash + +# Target arch +export RK_ARCH=arm64 +# Uboot defconfig +export RK_UBOOT_DEFCONFIG=rk3568 +# Uboot image format type: fit(flattened image tree) +export RK_UBOOT_FORMAT_TYPE=fit +# Kernel defconfig +export RK_KERNEL_DEFCONFIG=ebf_rk3568_defconfig +# Kernel defconfig fragment +export RK_KERNEL_DEFCONFIG_FRAGMENT= +# Kernel dts +export RK_KERNEL_DTS=rk3568-ebf-lubancat +# 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-buildroot-fit.txt +# 分区表对应的打包文件,用于生成update.img +export RK_PACKAGE_FILE=rk356x-package-file-ubuntu +# Buildroot config +export RK_CFG_BUILDROOT=rockchip_rk3568 +# Recovery config +export RK_CFG_RECOVERY=rockchip_rk356x_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 +# Set ubuntu version (ubuntu18: bionic, ubuntu20: ) +export RK_UBUNTU_VERSION=bionic +# 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 device/rockchip/oem +export RK_OEM_DIR=oem_normal +# OEM build on buildroot +#export RK_OEM_BUILDIN_BUILDROOT=YES +#userdata config device/rockchip/userdata +export RK_USERDATA_DIR=userdata_normal +#misc image +#作为系统升级时或者恢复出厂设置时使用,用于存放一些引导配置参数 +#参考文档:docs/Linux/Recovery/Rockchip_Developer_Guide_Linux_Recovery_CN.pdf +export RK_MISC=blank-misc.img +#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为ubuntu +export RK_ROOTFS_SYSTEM=ubuntu +# 定义默认rootfs是否为桌面版 desktop:桌面版 console:控制台版 +export RK_ROOTFS_TARGET=console \ No newline at end of file diff --git a/rk356x/parameter-ubuntu-fit.txt b/rk356x/parameter-ubuntu-fit.txt new file mode 100644 index 0000000..5a17cbd --- /dev/null +++ b/rk356x/parameter-ubuntu-fit.txt @@ -0,0 +1,12 @@ +FIRMWARE_VER: 1.0 +MACHINE_MODEL: RK3568 +MACHINE_ID: 007 +MANUFACTURER: RK3568 +MAGIC: 0x5041524B +ATAG: 0x00200800 +MACHINE: 0xffffffff +CHECK_MASK: 0x80 +PWR_HLD: 0,0,A,0,1 +TYPE: GPT +CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(misc),0x00020000@0x00008000(boot),0x00020000@0x00028000(recovery),0x00010000@0x00048000(backup),-@0x00058000(rootfs:grow) +uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9