Skip to content

Commit d009450

Browse files
committed
Borrow <KERNEL_BRANCH> to replace <must_kernel_6xy>
1 parent acee19b commit d009450

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

build-armbian/armbian-files/common-files/etc/model_database.conf

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
# Copyright (C) 2021- https://github.com/ophub/amlogic-s9xxx-armbian
1313
#
1414
# 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
15-
# {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 ]
15+
# [ 8.KERNEL_BRANCH ] is the directory name of https://github.com/ophub/kernel/tree/main/pub/
16+
# [ rk3588 ] : used for rockchip-rk3588 series devices
17+
# [ 6.x.y ] : stable/6.x.y used for rockchip-rk3399/rk3568 series devices
18+
# [ stable ] : used for all devices
1619
# When building the Armbian firmware, find [ the first ] configuration information with the [ same BOARD name ] and [ BUILD as yes ]
1720
# In [ armbian-install ], only the list of [ the same FAMILY ] is displayed by default
1821
# 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
149152
#-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+-------
150153
# 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
151154
#-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+-------
152-
r201 :R66S :rk3568 :rk3568-fastrhino-r66s.dtb :NA :u-boot.itb :idbloader.img :stable :rockchip :rk3568 :r66s :yes
153-
r202 :R68S :rk3568 :rk3568-fastrhino-r68s.dtb :NA :NA :bootloader.bin :stable :rockchip :rk3568 :r68s :yes
154-
r203 :H66K :rk3568 :rk3568-opc-h66k.dtb :NA :NA :bootloader.bin :stable :rockchip :rk3568 :h66k :yes
155-
r204 :H68K :rk3568 :rk3568-opc-h68k.dtb :NA :NA :bootloader.bin :stable :rockchip :rk3568 :h68k :yes
155+
r201 :R66S :rk3568 :rk3568-fastrhino-r66s.dtb :NA :u-boot.itb :idbloader.img :6.x.y :rockchip :rk3568 :r66s :yes
156+
r202 :R68S :rk3568 :rk3568-fastrhino-r68s.dtb :NA :NA :bootloader.bin :6.x.y :rockchip :rk3568 :r68s :yes
157+
r203 :H66K :rk3568 :rk3568-opc-h66k.dtb :NA :NA :bootloader.bin :6.x.y :rockchip :rk3568 :h66k :yes
158+
r204 :H68K :rk3568 :rk3568-opc-h68k.dtb :NA :NA :bootloader.bin :6.x.y :rockchip :rk3568 :h68k :yes
156159

157160

158161
# Rockchip Rockchip-rk3399 Family
159162
#-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+-------
160163
# 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
161164
#-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+-------
162-
r301 :EAIDK-610 :rk3399 :rk3399-eaidk-610.dtb :NA :u-boot.itb :idbloader.img :stable :rockchip :rk3399 :eaidk-610 :yes
165+
r301 :EAIDK-610 :rk3399 :rk3399-eaidk-610.dtb :NA :u-boot.itb :idbloader.img :6.x.y :rockchip :rk3399 :eaidk-610 :yes
163166

164167

165168
# Rockchip Rockchip-rk3328 Family

build-armbian/armbian-files/common-files/usr/sbin/armbian-update

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,13 @@ init_var() {
168168
[[ "${SOC,,}" == "rk3588" ]] && KERNEL_BRANCH="rk3588" || KERNEL_BRANCH="stable"
169169
echo "KERNEL_BRANCH='${KERNEL_BRANCH}'" >>${ophub_release_file}
170170
}
171-
# Rockchip rk3588 series, such as Rock5b only support rk3588/5.10.y kernel
171+
# Rockchip rk3588 series, such as rock5b only support rk3588/5.10.y kernel
172172
[[ "${SOC,,}" == "rk3588" && "${KERNEL_BRANCH}" != "rk3588" ]] && {
173173
echo -e "${WARNING} Kernel [ ${KERNEL_BRANCH} ] is not available for this device, it has been automatically adjusted to [ rk3588 ]."
174174
KERNEL_BRANCH="rk3588"
175175
}
176+
# Adjust kernel directory [ 6.x.y ] to [ stable ]
177+
[[ "${KERNEL_BRANCH}" == "6.x.y" ]] && KERNEL_BRANCH="stable"
176178

177179
# Display settings results
178180
echo -e "${INFO} Set the kernel name: [ ${inputs_kernel} ]"
@@ -342,9 +344,9 @@ check_kernel() {
342344
cd ${kernel_path}
343345
echo -e "${STEPS} Start checking the kernel..."
344346

345-
# Rockchip rk3568 series, such as FastRhino R66S/R68S only support 6.x.y kernel
346-
[[ "${SOC,,}" == "rk3568" && "${inputs_kernel:0:2}" != "6." ]] && error_msg "Kernel [ ${inputs_kernel} ] is not available for this device."
347-
# Rockchip rk3588 series, such as Rock5b only support rk3588/5.10.y kernel
347+
# Rockchip rk3568/rk3399 series, such as r66s/r68s/h66k/h68k/eaidk-610 only support 6.x.y kernel
348+
[[ "${SOC,,}" == "rk3568" || "${SOC,,}" == "rk3399" ]] && [[ "${inputs_kernel:0:2}" != "6." ]] && error_msg "Kernel [ ${inputs_kernel} ] is not available for this device."
349+
# Rockchip rk3588 series, such as rock5b only support rk3588/5.10.y kernel
348350
[[ "${SOC,,}" == "rk3588" && "${inputs_kernel:0:5}" != "5.10." ]] && error_msg "Kernel [ ${inputs_kernel} ] is not available for this device."
349351

350352
# Determine custom kernel filename

rebuild

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ auto_kernel="true"
8484
# Get the list of devices built by default
8585
# 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
8686
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))
87-
# Set the list of devices that must use the stable/6.x.y kernel
88-
must_kernel_6xy=("r66s" "r68s" "h66k" "h68k" "eaidk-610")
8987
# Set the list of devices that must use the /boot/extlinux/extlinux.conf file
9088
must_extlinux=("s905x-t95" "s912-t95z-plus" "s905lb-r3300l")
9189

@@ -865,7 +863,7 @@ loop_rebuild() {
865863
kernel="${k}"
866864

867865
# Identify devices that must use the 6.x.y kernel
868-
[[ -n "$(echo "${must_kernel_6xy[@]}" | grep -w "${board}")" && "${kernel:0:1}" -ne "6" ]] && {
866+
[[ "${KERNEL_BRANCH}" == "6.x.y" && "${kernel:0:2}" != "6." ]] && {
869867
echo -e "(${j}.${i}) ${TIPS} The ${board} device cannot use ${kd}/${kernel} kernel, skip."
870868
let i++
871869
continue

0 commit comments

Comments
 (0)