From d0094501e0f4e6acd3005cc34df2a9198d93e95c Mon Sep 17 00:00:00 2001 From: ophub Date: Sun, 5 Feb 2023 13:36:29 +0000 Subject: [PATCH] Borrow to replace --- .../common-files/etc/model_database.conf | 15 +++++++++------ .../common-files/usr/sbin/armbian-update | 10 ++++++---- rebuild | 4 +--- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/build-armbian/armbian-files/common-files/etc/model_database.conf b/build-armbian/armbian-files/common-files/etc/model_database.conf index e45e036833..5499264a9a 100644 --- a/build-armbian/armbian-files/common-files/etc/model_database.conf +++ b/build-armbian/armbian-files/common-files/etc/model_database.conf @@ -12,7 +12,10 @@ # Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian # # 1.ID 2.MODEL 3.SOC 4.FDTFILE 5.UBOOT_OVERLOAD 6.MAINLINE_UBOOT 7.BOOTLOADER_IMG 8.KERNEL_BRANCH 9.PLATFORM 10.FAMILY 11.BOARD 12.BUILD -# {8.KERNEL_BRANCH} is the directory name of https://github.com/ophub/kernel/tree/main/pub. Rockchip-rk3588 devices must use the kernel of the [ rk3588 ] +# [ 8.KERNEL_BRANCH ] is the directory name of https://github.com/ophub/kernel/tree/main/pub/ +# [ rk3588 ] : used for rockchip-rk3588 series devices +# [ 6.x.y ] : stable/6.x.y used for rockchip-rk3399/rk3568 series devices +# [ stable ] : used for all devices # When building the Armbian firmware, find [ the first ] configuration information with the [ same BOARD name ] and [ BUILD as yes ] # In [ armbian-install ], only the list of [ the same FAMILY ] is displayed by default # Description: https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/build-armbian/documents/amlogic_model_database.md @@ -149,17 +152,17 @@ r102 :H88K :rk3588 :rk3588-hinlink-h88k.dtb #-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+------- # 1.ID 2.MODEL 3.SOC 4.FDTFILE 5.UBOOT_OVERLOAD 6.MAINLINE_UBOOT 7.BOOTLOADER_IMG 8.KERNEL_BRANCH 9.PLATFORM 10.FAMILY 11.BOARD 12.BUILD #-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+------- -r201 :R66S :rk3568 :rk3568-fastrhino-r66s.dtb :NA :u-boot.itb :idbloader.img :stable :rockchip :rk3568 :r66s :yes -r202 :R68S :rk3568 :rk3568-fastrhino-r68s.dtb :NA :NA :bootloader.bin :stable :rockchip :rk3568 :r68s :yes -r203 :H66K :rk3568 :rk3568-opc-h66k.dtb :NA :NA :bootloader.bin :stable :rockchip :rk3568 :h66k :yes -r204 :H68K :rk3568 :rk3568-opc-h68k.dtb :NA :NA :bootloader.bin :stable :rockchip :rk3568 :h68k :yes +r201 :R66S :rk3568 :rk3568-fastrhino-r66s.dtb :NA :u-boot.itb :idbloader.img :6.x.y :rockchip :rk3568 :r66s :yes +r202 :R68S :rk3568 :rk3568-fastrhino-r68s.dtb :NA :NA :bootloader.bin :6.x.y :rockchip :rk3568 :r68s :yes +r203 :H66K :rk3568 :rk3568-opc-h66k.dtb :NA :NA :bootloader.bin :6.x.y :rockchip :rk3568 :h66k :yes +r204 :H68K :rk3568 :rk3568-opc-h68k.dtb :NA :NA :bootloader.bin :6.x.y :rockchip :rk3568 :h68k :yes # Rockchip Rockchip-rk3399 Family #-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+------- # 1.ID 2.MODEL 3.SOC 4.FDTFILE 5.UBOOT_OVERLOAD 6.MAINLINE_UBOOT 7.BOOTLOADER_IMG 8.KERNEL_BRANCH 9.PLATFORM 10.FAMILY 11.BOARD 12.BUILD #-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+------- -r301 :EAIDK-610 :rk3399 :rk3399-eaidk-610.dtb :NA :u-boot.itb :idbloader.img :stable :rockchip :rk3399 :eaidk-610 :yes +r301 :EAIDK-610 :rk3399 :rk3399-eaidk-610.dtb :NA :u-boot.itb :idbloader.img :6.x.y :rockchip :rk3399 :eaidk-610 :yes # Rockchip Rockchip-rk3328 Family diff --git a/build-armbian/armbian-files/common-files/usr/sbin/armbian-update b/build-armbian/armbian-files/common-files/usr/sbin/armbian-update index 635aba9736..0400a19b60 100755 --- a/build-armbian/armbian-files/common-files/usr/sbin/armbian-update +++ b/build-armbian/armbian-files/common-files/usr/sbin/armbian-update @@ -168,11 +168,13 @@ init_var() { [[ "${SOC,,}" == "rk3588" ]] && KERNEL_BRANCH="rk3588" || KERNEL_BRANCH="stable" echo "KERNEL_BRANCH='${KERNEL_BRANCH}'" >>${ophub_release_file} } - # Rockchip rk3588 series, such as Rock5b only support rk3588/5.10.y kernel + # Rockchip rk3588 series, such as rock5b only support rk3588/5.10.y kernel [[ "${SOC,,}" == "rk3588" && "${KERNEL_BRANCH}" != "rk3588" ]] && { echo -e "${WARNING} Kernel [ ${KERNEL_BRANCH} ] is not available for this device, it has been automatically adjusted to [ rk3588 ]." KERNEL_BRANCH="rk3588" } + # Adjust kernel directory [ 6.x.y ] to [ stable ] + [[ "${KERNEL_BRANCH}" == "6.x.y" ]] && KERNEL_BRANCH="stable" # Display settings results echo -e "${INFO} Set the kernel name: [ ${inputs_kernel} ]" @@ -342,9 +344,9 @@ check_kernel() { cd ${kernel_path} echo -e "${STEPS} Start checking the kernel..." - # Rockchip rk3568 series, such as FastRhino R66S/R68S only support 6.x.y kernel - [[ "${SOC,,}" == "rk3568" && "${inputs_kernel:0:2}" != "6." ]] && error_msg "Kernel [ ${inputs_kernel} ] is not available for this device." - # Rockchip rk3588 series, such as Rock5b only support rk3588/5.10.y kernel + # Rockchip rk3568/rk3399 series, such as r66s/r68s/h66k/h68k/eaidk-610 only support 6.x.y kernel + [[ "${SOC,,}" == "rk3568" || "${SOC,,}" == "rk3399" ]] && [[ "${inputs_kernel:0:2}" != "6." ]] && error_msg "Kernel [ ${inputs_kernel} ] is not available for this device." + # Rockchip rk3588 series, such as rock5b only support rk3588/5.10.y kernel [[ "${SOC,,}" == "rk3588" && "${inputs_kernel:0:5}" != "5.10." ]] && error_msg "Kernel [ ${inputs_kernel} ] is not available for this device." # Determine custom kernel filename diff --git a/rebuild b/rebuild index 914eb2ae05..a9a5d4dbe3 100755 --- a/rebuild +++ b/rebuild @@ -84,8 +84,6 @@ auto_kernel="true" # Get the list of devices built by default # 1.ID 2.MODEL 3.SOC 4.FDTFILE 5.UBOOT_OVERLOAD 6.MAINLINE_UBOOT 7.BOOTLOADER_IMG 8.KERNEL_BRANCH 9.PLATFORM 10.FAMILY 11.BOARD 12.BUILD build_armbian=($(cat ${model_conf} | sed -e 's/NA//g' -e 's/NULL//g' -e 's/[ ][ ]*//g' | grep -E "^[^#].*:yes$" | awk -F':' '{print $11}' | sort | uniq | xargs)) -# Set the list of devices that must use the stable/6.x.y kernel -must_kernel_6xy=("r66s" "r68s" "h66k" "h68k" "eaidk-610") # Set the list of devices that must use the /boot/extlinux/extlinux.conf file must_extlinux=("s905x-t95" "s912-t95z-plus" "s905lb-r3300l") @@ -865,7 +863,7 @@ loop_rebuild() { kernel="${k}" # Identify devices that must use the 6.x.y kernel - [[ -n "$(echo "${must_kernel_6xy[@]}" | grep -w "${board}")" && "${kernel:0:1}" -ne "6" ]] && { + [[ "${KERNEL_BRANCH}" == "6.x.y" && "${kernel:0:2}" != "6." ]] && { echo -e "(${j}.${i}) ${TIPS} The ${board} device cannot use ${kd}/${kernel} kernel, skip." let i++ continue