Skip to content

Commit d22cd78

Browse files
committed
Support adding extlinux.conf by default
1 parent 3e5b6e4 commit d22cd78

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
104 :TX3-Mini :s905w :meson-gxl-s905w-tx3-mini.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxl :s905w :yes
2929
105 :MECOOL-KI-Pro :s905d :meson-gxl-s905d-mecool-ki-pro.dtb :u-boot-p201.bin :NA :NA :stable :amlogic :meson-gxl :s905d-ki :yes
3030
#-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+-------
31-
106 :T95 :s905x :meson-gxl-s905x-p212.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxl :s905x :no
31+
106 :T95 :s905x :meson-gxl-s905x-p212.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxl :s905x-t95 :yes
3232
107 :B860H :s905x :meson-gxl-s905x-b860h.dtb :u-boot-p212.bin :NA :NA :stable :amlogic :meson-gxl :s905x :no
3333
108 :TBee :s905x :meson-gxl-s905x-tbee.dtb :u-boot-p212.bin :NA :NA :stable :amlogic :meson-gxl :s905x :no
3434
109 :W95 :s905w :meson-gxl-s905w-p281.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxl :s905w :no
@@ -42,7 +42,7 @@
4242
#-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+-------
4343
116 :CM311-1/HG680-LC :s905l3 :meson-gxl-s905l2-x7-5g.dtb :u-boot-p212.bin :NA :NA :stable :amlogic :meson-gxl :s905l3 :no
4444
117 :E900V22E :s905l3b :meson-gxl-s905l3b-e900v22e.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxl :s905l3b :no
45-
118 :BesTV-R3300L :s905l-b :meson-gxl-s905x-p212.dtb :u-boot-r3300l.bin :r3300l-u-boot.bin.sd.bin :NA :stable :amlogic :meson-gxl :s905l-b-r3300l :yes
45+
118 :BesTV-R3300L :s905l-b :meson-gxl-s905x-p212.dtb :u-boot-r3300l.bin :r3300l-u-boot.bin.sd.bin :NA :stable :amlogic :meson-gxl :s905lb-r3300l :yes
4646

4747

4848
# Amlogic GXM Family
@@ -56,7 +56,7 @@
5656
205 :VORKE-Z6-Plus :s912 :meson-gxm-octopus-planet.dtb :u-boot-zyxq.bin :NA :NA :stable :amlogic :meson-gxm :s912 :no
5757
#-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+-------
5858
206 :MECOOL-M8S-Pro-L :s912 :meson-gxm-q201.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxm :s912-m8s :yes
59-
207 :T95Z-Plus :s912 :meson-gxm-t95z-plus.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxm :s912 :no
59+
207 :T95Z-Plus :s912 :meson-gxm-t95z-plus.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxm :s912-t95z-plus :yes
6060
208 :TX9-Pro(3G_32G_1Gb) :s912 :meson-gxm-tx9-pro.dtb :u-boot-zyxq.bin :NA :NA :stable :amlogic :meson-gxm :s912 :no
6161
209 :TX9-Pro(2G_16G_100Mb) :s912 :meson-gxm-q201.dtb :u-boot-p212.bin :NA :NA :stable :amlogic :meson-gxm :s912 :no
6262
210 :Nexbox-A1/A95X :s912 :meson-gxm-nexbox-a1.dtb :u-boot-p212.bin :NA :NA :stable :amlogic :meson-gxm :s912 :no

rebuild

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,14 @@ rk35xx_kernel=("5.10.150")
8282
auto_kernel="true"
8383

8484
# Get the list of devices built by default
85+
# 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
8586
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))
8687
# Set the list of devices that must use the rk35xx kernel
8788
must_kernel_rk35xx=("rock5b")
8889
# Set the list of devices that must use the stable/6.x.y kernel
8990
must_kernel_6xy=("r66s" "r68s" "eaidk-610")
91+
# Set the list of devices that must use the /boot/extlinux/extlinux.conf file
92+
must_extlinux=("s905x-t95" "s912-t95z-plus" "s905lb-r3300l")
9093

9194
# Set Armbian size (Unit: MiB, BOOT_MB >= 256, ROOT_MB >= 2048)
9295
BOOT_MB="256"
@@ -619,12 +622,18 @@ refactor_files() {
619622
sed -i "s|LABEL=ROOTFS|${uenv_rootdev}|g" ${boot_conf_file}
620623
sed -i "s|meson.*.dtb|${FDTFILE}|g" ${boot_conf_file}
621624

622-
# Add an alternate file (/boot/extlinux/extlinux.conf) for devices like T95Z. If needed, rename delete .bak
625+
# Add an alternate file (/boot/extlinux/extlinux.conf)
623626
boot_extlinux_file="extlinux/extlinux.conf.bak"
624-
if [[ -f "${boot_extlinux_file}" ]]; then
627+
[[ -f "${boot_extlinux_file}" ]] && {
625628
sed -i "s|LABEL=ROOTFS|${uenv_rootdev}|g" ${boot_extlinux_file}
626629
sed -i "s|meson.*.dtb|${FDTFILE}|g" ${boot_extlinux_file}
627-
fi
630+
}
631+
632+
# If needed, such as t95z(s905x), rename delete .bak
633+
rename_extlinux_file="extlinux/extlinux.conf"
634+
[[ -n "$(echo "${must_extlinux[@]}" | grep -w "${board}")" ]] && {
635+
mv -f ${boot_extlinux_file} ${rename_extlinux_file}
636+
}
628637
}
629638

630639
# Process Rockchip series boot partition files

0 commit comments

Comments
 (0)