Skip to content

Commit

Permalink
Support adding extlinux.conf by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Feb 2, 2023
1 parent 3e5b6e4 commit d22cd78
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
104 :TX3-Mini :s905w :meson-gxl-s905w-tx3-mini.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxl :s905w :yes
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
#-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+-------
106 :T95 :s905x :meson-gxl-s905x-p212.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxl :s905x :no
106 :T95 :s905x :meson-gxl-s905x-p212.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxl :s905x-t95 :yes
107 :B860H :s905x :meson-gxl-s905x-b860h.dtb :u-boot-p212.bin :NA :NA :stable :amlogic :meson-gxl :s905x :no
108 :TBee :s905x :meson-gxl-s905x-tbee.dtb :u-boot-p212.bin :NA :NA :stable :amlogic :meson-gxl :s905x :no
109 :W95 :s905w :meson-gxl-s905w-p281.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxl :s905w :no
Expand All @@ -42,7 +42,7 @@
#-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+-------
116 :CM311-1/HG680-LC :s905l3 :meson-gxl-s905l2-x7-5g.dtb :u-boot-p212.bin :NA :NA :stable :amlogic :meson-gxl :s905l3 :no
117 :E900V22E :s905l3b :meson-gxl-s905l3b-e900v22e.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxl :s905l3b :no
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
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


# Amlogic GXM Family
Expand All @@ -56,7 +56,7 @@
205 :VORKE-Z6-Plus :s912 :meson-gxm-octopus-planet.dtb :u-boot-zyxq.bin :NA :NA :stable :amlogic :meson-gxm :s912 :no
#-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+-------
206 :MECOOL-M8S-Pro-L :s912 :meson-gxm-q201.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxm :s912-m8s :yes
207 :T95Z-Plus :s912 :meson-gxm-t95z-plus.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxm :s912 :no
207 :T95Z-Plus :s912 :meson-gxm-t95z-plus.dtb :u-boot-s905x-s912.bin :NA :NA :stable :amlogic :meson-gxm :s912-t95z-plus :yes
208 :TX9-Pro(3G_32G_1Gb) :s912 :meson-gxm-tx9-pro.dtb :u-boot-zyxq.bin :NA :NA :stable :amlogic :meson-gxm :s912 :no
209 :TX9-Pro(2G_16G_100Mb) :s912 :meson-gxm-q201.dtb :u-boot-p212.bin :NA :NA :stable :amlogic :meson-gxm :s912 :no
210 :Nexbox-A1/A95X :s912 :meson-gxm-nexbox-a1.dtb :u-boot-p212.bin :NA :NA :stable :amlogic :meson-gxm :s912 :no
Expand Down
15 changes: 12 additions & 3 deletions rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,14 @@ rk35xx_kernel=("5.10.150")
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 rk35xx kernel
must_kernel_rk35xx=("rock5b")
# Set the list of devices that must use the stable/6.x.y kernel
must_kernel_6xy=("r66s" "r68s" "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")

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

# Add an alternate file (/boot/extlinux/extlinux.conf) for devices like T95Z. If needed, rename delete .bak
# Add an alternate file (/boot/extlinux/extlinux.conf)
boot_extlinux_file="extlinux/extlinux.conf.bak"
if [[ -f "${boot_extlinux_file}" ]]; then
[[ -f "${boot_extlinux_file}" ]] && {
sed -i "s|LABEL=ROOTFS|${uenv_rootdev}|g" ${boot_extlinux_file}
sed -i "s|meson.*.dtb|${FDTFILE}|g" ${boot_extlinux_file}
fi
}

# If needed, such as t95z(s905x), rename delete .bak
rename_extlinux_file="extlinux/extlinux.conf"
[[ -n "$(echo "${must_extlinux[@]}" | grep -w "${board}")" ]] && {
mv -f ${boot_extlinux_file} ${rename_extlinux_file}
}
}

# Process Rockchip series boot partition files
Expand Down

0 comments on commit d22cd78

Please sign in to comment.