diff --git a/rk356x/BoardConfig.mk b/rk356x/BoardConfig.mk new file mode 100644 index 0000000..f79d422 --- /dev/null +++ b/rk356x/BoardConfig.mk @@ -0,0 +1,58 @@ +#!/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=rockchip_linux_defconfig +# Kernel defconfig fragment +export RK_KERNEL_DEFCONFIG_FRAGMENT= +# Kernel dts +export RK_KERNEL_DTS=rk3568-evb1-ddr4-v10-linux +# 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 +# Buildroot config +export RK_CFG_BUILDROOT=rockchip_rk356x +# 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=12 +# target chip +export RK_TARGET_PRODUCT=rk356x +# Set rootfs type, including ext2 ext4 squashfs +export RK_ROOTFS_TYPE=ext4 +# 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_normal +# OEM build on buildroot +export RK_OEM_BUILDIN_BUILDROOT=YES +#userdata config +export RK_USERDATA_DIR=userdata_normal +#misc image +export RK_MISC=wipe_all-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 diff --git a/rk356x/boot.its b/rk356x/boot.its new file mode 100644 index 0000000..6d5a908 --- /dev/null +++ b/rk356x/boot.its @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2020 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0 + */ + +/dts-v1/; +/ { + description = "U-Boot FIT source file for arm"; + + images { + fdt { + data = /incbin/("kernel/arch/arm64/boot/dts/rk3568-evb1-ddr4-v10-linux.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0xffffff00>; + + hash { + algo = "sha256"; + }; + }; + + kernel { + data = /incbin/("kernel/arch/arm64/boot/Image"); + type = "kernel"; + arch = "arm64"; + os = "linux"; + compression = "none"; + entry = <0xffffff01>; + load = <0xffffff01>; + + hash { + algo = "sha256"; + }; + }; + + resource { + data = /incbin/("kernel/resource.img"); + type = "multi"; + arch = "arm64"; + compression = "none"; + + hash { + algo = "sha256"; + }; + }; + }; + + configurations { + default = "conf"; + + conf { + rollback-index = <0x00>; + fdt = "fdt"; + kernel = "kernel"; + multi = "resource"; + + signature { + algo = "sha256,rsa2048"; + padding = "pss"; + key-name-hint = "dev"; + sign-images = "fdt", "kernel", "multi"; + }; + }; + }; +}; diff --git a/rk356x/boot4recovery.its b/rk356x/boot4recovery.its new file mode 100644 index 0000000..4260ee3 --- /dev/null +++ b/rk356x/boot4recovery.its @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2020 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0 + */ + +/dts-v1/; +/ { + description = "U-Boot FIT source file for arm"; + + images { + fdt { + data = /incbin/("kernel/arch/arm64/boot/dts/rk3568-evb1-ddr4-v10-linux.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0xffffff00>; + + hash { + algo = "sha256"; + }; + }; + + kernel { + data = /incbin/("kernel/arch/arm64/boot/Image"); + type = "kernel"; + arch = "arm64"; + os = "linux"; + compression = "none"; + entry = <0xffffff01>; + load = <0xffffff01>; + + hash { + algo = "sha256"; + }; + }; + + ramdisk { + data = /incbin/("out/ramdisk"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0xffffff02>; + + hash { + algo = "sha256"; + }; + }; + + resource { + data = /incbin/("kernel/resource.img"); + type = "multi"; + arch = "arm64"; + compression = "none"; + + hash { + algo = "sha256"; + }; + }; + }; + + configurations { + default = "conf"; + + conf { + rollback-index = <0x00>; + fdt = "fdt"; + kernel = "kernel"; + ramdisk = "ramdisk"; + multi = "resource"; + + signature { + algo = "sha256,rsa2048"; + padding = "pss"; + key-name-hint = "dev"; + sign-images = "fdt", "kernel", "ramdisk", "multi"; + }; + }; + }; +}; diff --git a/rk356x/parameter-buildroot-fit.txt b/rk356x/parameter-buildroot-fit.txt new file mode 100644 index 0000000..5efb5b3 --- /dev/null +++ b/rk356x/parameter-buildroot-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),0x00010000@0x00008000(boot),0x00010000@0x00018000(recovery),0x00010000@0x00028000(backup),0x00200000@0x00038000(rootfs),0x00040000@0x00238000(oem),-@0x00278000(userdata:grow) +uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9