Skip to content

Commit

Permalink
Merge branch 'armbian:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
shenmintao authored Dec 11, 2024
2 parents 883ff36 + 08e7bba commit 735f180
Show file tree
Hide file tree
Showing 29 changed files with 4,048 additions and 74 deletions.
7 changes: 4 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ config/boards/bananapim5.conf @igorpecovnik
config/boards/bananapim64.csc @devdotnetorg
config/boards/bananapim7.conf @amazingfate
config/boards/bigtreetech-cb1.conf @JohnTheCoolingFan
config/boards/bigtreetech-cb2.conf @JohnTheCoolingFan
config/boards/cherryba-m1.csc @IsMrX
config/boards/clearfogpro.csc @Heisath
config/boards/cm3588-nas.csc @ColorfulRhino
Expand Down Expand Up @@ -168,7 +169,7 @@ config/kernel/linux-phytium-embedded-*.config @chainsx
config/kernel/linux-rk35xx-*.config @ColorfulRhino @HeyMeco @SeeleVolleri @SuperKali @Tonymac32 @ZazaBR @alexl83 @amazingfate @catalinii @chainsx @efectn @fridtjof @ginkage @hoochiwetech @krachlatte @lanefu @linhz0hz @mahdichi @mattx433 @monkaBlyat @prahal @rpardini @schwar3kat @sputnik2019 @vamzii
config/kernel/linux-rockchip-*.config @paolosabatino
config/kernel/linux-rockchip-rk3588-*.config @ColorfulRhino @HeyMeco @SuperKali @Tonymac32 @alexl83 @amazingfate @andyshrk @efectn @fridtjof @lanefu @linhz0hz @rpardini @schwar3kat
config/kernel/linux-rockchip64-*.config @150balbes @Manouchehri @TRSx80 @TheSnowfield @Tonymac32 @ZazaBR @ahoneybun @amazingfate @andyshrk @brentr @catalinii @clee @hqnicolas @igorpecovnik @joekhoobyar @krachlatte @paolosabatino @prahal @rpardini @sicXnull @tdleiyao @utlark @vamzii
config/kernel/linux-rockchip64-*.config @150balbes @JohnTheCoolingFan @Manouchehri @TRSx80 @TheSnowfield @Tonymac32 @ZazaBR @ahoneybun @amazingfate @andyshrk @brentr @catalinii @clee @hqnicolas @igorpecovnik @joekhoobyar @krachlatte @paolosabatino @prahal @rpardini @sicXnull @tdleiyao @utlark @vamzii
config/kernel/linux-sm8250-*.config @FantasyGmm @amazingfate
config/kernel/linux-sun55iw3-syterkit-*.config @chainsx
config/kernel/linux-sunxi-*.config @1ubuntuuser @AaronNGray @DylanHP @Janmcha @StephenGraf @Tonymac32 @janprunk @lbmendes @mhawkins-consultant @sgjava
Expand All @@ -192,7 +193,7 @@ patch/kernel/phytium-embedded-*/ @chainsx
patch/kernel/rk35xx-vendor-*/ @ColorfulRhino @HeyMeco @SeeleVolleri @SuperKali @Tonymac32 @ZazaBR @alexl83 @amazingfate @catalinii @chainsx @efectn @fridtjof @ginkage @hoochiwetech @krachlatte @lanefu @linhz0hz @mahdichi @mattx433 @monkaBlyat @prahal @rpardini @schwar3kat @sputnik2019 @vamzii
patch/kernel/rockchip-*/ @paolosabatino
patch/kernel/rockchip-rk3588-*/ @ColorfulRhino @HeyMeco @SuperKali @Tonymac32 @alexl83 @amazingfate @andyshrk @efectn @fridtjof @lanefu @linhz0hz @rpardini @schwar3kat
patch/kernel/rockchip64-*/ @150balbes @Manouchehri @TRSx80 @TheSnowfield @Tonymac32 @ZazaBR @ahoneybun @amazingfate @andyshrk @brentr @catalinii @clee @hqnicolas @igorpecovnik @joekhoobyar @krachlatte @paolosabatino @prahal @rpardini @sicXnull @tdleiyao @utlark @vamzii
patch/kernel/rockchip64-*/ @150balbes @JohnTheCoolingFan @Manouchehri @TRSx80 @TheSnowfield @Tonymac32 @ZazaBR @ahoneybun @amazingfate @andyshrk @brentr @catalinii @clee @hqnicolas @igorpecovnik @joekhoobyar @krachlatte @paolosabatino @prahal @rpardini @sicXnull @tdleiyao @utlark @vamzii
patch/kernel/sm8250-*/ @FantasyGmm @amazingfate
patch/kernel/sm8550-*/ @FantasyGmm
patch/kernel/sun55iw3-syterkit-*/ @chainsx
Expand All @@ -210,7 +211,7 @@ sources/families/phytium-embedded.conf @chainsx
sources/families/rk35xx.conf @ColorfulRhino @HeyMeco @SeeleVolleri @SuperKali @Tonymac32 @ZazaBR @alexl83 @amazingfate @catalinii @chainsx @efectn @fridtjof @ginkage @hoochiwetech @krachlatte @lanefu @linhz0hz @mahdichi @mattx433 @monkaBlyat @prahal @rpardini @schwar3kat @sputnik2019 @vamzii
sources/families/rockchip-rk3588.conf @ColorfulRhino @HeyMeco @SuperKali @Tonymac32 @alexl83 @amazingfate @andyshrk @efectn @fridtjof @lanefu @linhz0hz @rpardini @schwar3kat
sources/families/rockchip.conf @paolosabatino
sources/families/rockchip64.conf @150balbes @Manouchehri @TRSx80 @TheSnowfield @Tonymac32 @ZazaBR @ahoneybun @amazingfate @andyshrk @brentr @catalinii @clee @hqnicolas @igorpecovnik @joekhoobyar @krachlatte @paolosabatino @prahal @rpardini @sicXnull @tdleiyao @utlark @vamzii
sources/families/rockchip64.conf @150balbes @JohnTheCoolingFan @Manouchehri @TRSx80 @TheSnowfield @Tonymac32 @ZazaBR @ahoneybun @amazingfate @andyshrk @brentr @catalinii @clee @hqnicolas @igorpecovnik @joekhoobyar @krachlatte @paolosabatino @prahal @rpardini @sicXnull @tdleiyao @utlark @vamzii
sources/families/sm8250.conf @FantasyGmm @amazingfate
sources/families/sun55iw3-syterkit.conf @chainsx
sources/families/sunxi.conf @1ubuntuuser @AaronNGray @DylanHP @Janmcha @StephenGraf @Tonymac32 @janprunk @lbmendes @mhawkins-consultant @sgjava
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion config/boards/bananapim4zero.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BOARDFAMILY="sun50iw9-bpi"
BOARD_MAINTAINER="pyavitz"
BOOTCONFIG="bananapi_m4zero_defconfig"
OVERLAY_PREFIX="sun50i-h616"
BOOT_FDT_FILE="allwinner/sun50i-h618-bananapi-m4-zero.dtb"
BOOT_FDT_FILE="sun50i-h618-bananapi-m4-zero.dtb"
BOOT_LOGO="desktop"
KERNEL_TARGET="current,edge"
KERNEL_TEST_TARGET="current"
Expand Down
2 changes: 1 addition & 1 deletion config/boards/bigtreetech-cb1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ FORCE_BOOTSCRIPT_UPDATE="yes"
BOOTFS_TYPE="fat"
BOOT_FS_LABEL="BOOT"
OVERLAY_PREFIX="sun50i-h616"
BOOT_FDT_FILE="allwinner/sun50i-h616-bigtreetech-cb1-sd.dtb"
BOOT_FDT_FILE="sun50i-h616-bigtreetech-cb1-sd.dtb"
48 changes: 48 additions & 0 deletions config/boards/bigtreetech-cb2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Rockchip RK3566 quad core 2GB-8GB GBE eMMC NVMe USB3 WiFi
BOARD_NAME="BigTreeTech CB2"
BOARDFAMILY="rockchip64"
BOARD_MAINTAINER="JohnTheCoolingFan"
BOOTCONFIG="bigtreetech-cb2-rk3566_defconfig"
BOOT_SOC="rk3566"
KERNEL_TARGET="current,edge"
KERNEL_TEST_TARGET="current"
BOOT_FDT_FILE="rockchip/rk3566-bigtreetech-cb2.dtb"
IMAGE_PARTITION_TABLE="gpt"
BOOT_SCENARIO="spl-blobs"
OVERLAY_PREFIX='rk3566'
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"

# TODO: replace with BOOT_SCENARIO=binman when it gets merged and in good shape
function post_family_config__bigtreetech-cb2_uboot_overrides() {
display_alert "$BOARD" "mainline u-boot overrides" "info"

DDR_BLOB="rk35/rk3566_ddr_1056MHz_v1.21.bin"
BL31_BLOB="rk35/rk3568_bl31_v1.44.elf" # NOT a typo, bl31 is shared across 68 and 66

declare -g BOOTDELAY=1 # Wait for UART interrupt to enter UMS/RockUSB mode etc
declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git"
declare -g BOOTBRANCH="tag:v2024.10"
declare -g BOOTPATCHDIR="v2024.10/board_bigtreetech-cb2"
#declare -g BOOTDIR="u-boot-${BOARD}"
declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin"
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd # disable stuff from rockchip64_common; we're using binman here which does all the work already

# Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go
function write_uboot_platform() {
dd "if=${1}/u-boot-rockchip.bin" "of=${2}" bs=32k seek=1 conv=notrunc
}

function write_uboot_platform_mtd() {
declare -a extra_opts_flashcp=("--verbose")
if flashcp -h | grep -q -e '--partition'; then
echo "Confirmed flashcp supports --partition -- read and write only changed blocks." >&2
extra_opts_flashcp+=("--partition")
else
echo "flashcp does not support --partition, will write full SPI flash blocks." >&2
fi
flashcp "${extra_opts_flashcp[@]}" "${1}/u-boot-rockchip-spi.bin" /dev/mtd0
}
}

# vim: ft=bash
2 changes: 1 addition & 1 deletion config/boards/inovato-quadra.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BOARDFAMILY="sun50iw6"
BOARD_MAINTAINER="NicoD-SBC"
BOOTCONFIG="tanix_tx6_defconfig"
CRUSTCONFIG="tanix_tx6_defconfig"
BOOT_FDT_FILE="allwinner/sun50i-h6-inovato-quadra.dtb"
BOOT_FDT_FILE="sun50i-h6-inovato-quadra.dtb"
KERNEL_TARGET="legacy,current,edge"
KERNEL_TEST_TARGET="current"
BOOT_LOGO="desktop"
Expand Down
15 changes: 15 additions & 0 deletions config/boards/longanpi-3h.csc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Allwinner H618 quad core 1GB/2GB/4GB RAM
BOARD_NAME="Longan Pi 3H"
BOARDFAMILY="sun50iw9"
BOARD_MAINTAINER=""
BOOTCONFIG="longanpi_3h_defconfig"
BOOTBRANCH="tag:v2024.10"
BOOTPATCHDIR="v2024.10"
BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory
BOOT_LOGO="desktop"
OVERLAY_PREFIX="sun50i-h616"
KERNEL_TARGET="current,edge"
KERNEL_TEST_TARGET="current"
FORCE_BOOTSCRIPT_UPDATE="yes"
enable_extension "radxa-aic8800" # compatible with radxa-aic8800
AIC8800_TYPE="usb"
2 changes: 1 addition & 1 deletion config/boards/mixtile-edge2.csc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function post_family_config_branch_vendor__kernel_and_uboot_rk35xx_mixtile_edge2
# Copypasta from rockchip-rk3588.conf family file -- we _really_ gotta find a better way!
declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel.
declare -g KERNELSOURCE='https://github.com/armbian/linux-rockchip.git'
declare -g KERNELBRANCH='branch:rk-6.1-rkr3'
declare -g KERNELBRANCH='branch:rk-6.1-rkr4.1'
declare -g KERNELPATCHDIR='rk35xx-vendor-6.1'
declare -g LINUXFAMILY=rk35xx
declare -g -i KERNEL_GIT_CACHE_TTL=120 # 2 minutes
Expand Down
2 changes: 1 addition & 1 deletion config/boards/pineh64-b.csc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ BOARD_MAINTAINER=""
BOOTCONFIG="pine_h64_defconfig"
KERNEL_TARGET="legacy,current,edge"
KERNEL_TEST_TARGET="current"
BOOT_FDT_FILE="allwinner/sun50i-h6-pine-h64-model-b.dtb"
BOOT_FDT_FILE="sun50i-h6-pine-h64-model-b.dtb"
CRUSTCONFIG="h6_defconfig"
48 changes: 25 additions & 23 deletions config/bootscripts/boot-sun50i-next.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ setenv console "both"
setenv docker_optimizations "on"
setenv bootlogo "false"

# Remember the default u-boot fdtfile
setenv deffdt_file ${fdtfile}
setenv vendor "allwinner"

# Remember the default fdtfile provided by u-boot and delete the vendor name
if setexpr subfdt sub ${vendor}/ "" ${fdtfile};then
setenv deffdt_file ${subfdt}
fi

# Remember the default u-boot fdtdir
setenv deffdt_dir "${prefix}dtb"
if test "$fdtdir" = ""; then setenv fdtdir "${deffdt_dir}";fi

setenv vendor "allwinner"
if test "$fdtdir" = ""; then setenv fdtdir "${deffdt_dir}/${vendor}";fi

# Print boot source
itest.b *0x10028 == 0x00 && echo "U-boot loaded from SD"
Expand All @@ -34,32 +36,32 @@ if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then
env import -t ${load_addr} ${filesize}
fi

# Delete the vendor's name from the fdtfile variable and record the result
# after the file with the environment variables has been read
if setexpr subfdt sub ${vendor}/ "" ${fdtfile};then
setenv fdtfile ${subfdt}
fi

# In this shell, we can only check the existence of the file.
# Make a check of reasonable ways to find the dtb file.
# Set the true value of the paths.
if test -e ${devtype} ${devnum} "${fdtdir}/${fdtfile}"; then
:
echo "Load fdt: ${fdtdir}/${fdtfile}"
else
echo "File ${fdtdir}/${fdtfile} does not exists"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${vendor}/${fdtfile}"; then
setenv fdtdir "${deffdt_dir}/${vendor}"
echo "The file ${fdtfile} was not found in the path ${fdtdir}"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${fdtfile}"; then
setenv fdtdir "${deffdt_dir}"
echo "Load fdt: ${fdtdir}/${fdtfile}"
else
echo "File ${deffdt_dir}/${vendor}/${fdtfile} does not exists"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${fdtfile}"; then
setenv fdtdir "${deffdt_dir}"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${vendor}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}/${vendor}"
setenv fdtfile "${deffdt_file}"
echo "Load fdt: ${fdtdir}/${fdtfile}"
else
echo "File ${deffdt_dir}/${fdtfile} does not exists"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${vendor}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}/${vendor}"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}"
setenv fdtfile "${deffdt_file}"
else
echo "File ${deffdt_dir}/${vendor}/${deffdt_file} does not exists"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}"
setenv fdtfile "${deffdt_file}"
else
echo "File ${deffdt_dir}/${deffdt_file} does not exists"
fi
echo "Load fdt: ${fdtdir}/${fdtfile}"
fi
fi
fi
Expand Down
39 changes: 19 additions & 20 deletions config/bootscripts/boot-sunxi.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,32 @@ if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then
env import -t ${load_addr} ${filesize}
fi

# Delete the vendor's name from the fdtfile variable and record the result
# after the file with the environment variables has been read
if setexpr subfdt sub ${vendor}/ "" ${fdtfile};then
setenv fdtfile ${subfdt}
fi

# In this shell, we can only check the existence of the file.
# Make a check of reasonable ways to find the dtb file.
# Set the true value of the paths.
if test -e ${devtype} ${devnum} "${fdtdir}/${fdtfile}"; then
:
echo "Load fdt: ${fdtdir}/${fdtfile}"
else
echo "File ${fdtdir}/${fdtfile} does not exists"
echo "The file ${fdtfile} was not found in the path ${fdtdir}"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${vendor}/${fdtfile}"; then
setenv fdtdir "${deffdt_dir}/${vendor}"
echo "Load fdt: ${fdtdir}/${fdtfile}"
else
echo "File ${deffdt_dir}/${vendor}/${fdtfile} does not exists"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${fdtfile}"; then
setenv fdtdir "${deffdt_dir}"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${vendor}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}/${vendor}"
setenv fdtfile "${deffdt_file}"
echo "Load fdt: ${fdtdir}/${fdtfile}"
else
echo "File ${deffdt_dir}/${fdtfile} does not exists"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${vendor}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}/${vendor}"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}"
setenv fdtfile "${deffdt_file}"
else
echo "File ${deffdt_dir}/${vendor}/${deffdt_file} does not exists"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}"
setenv fdtfile "${deffdt_file}"
else
echo "File ${deffdt_dir}/${deffdt_file} does not exists"
fi
echo "Load fdt: ${fdtdir}/${fdtfile}"
fi
fi
fi
Expand Down Expand Up @@ -99,9 +99,7 @@ load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}zImage

if test -e ${devtype} ${devnum} "${prefix}.next"; then
echo "Found mainline kernel configuration"
if load ${devtype} ${devnum} ${fdt_addr_r} ${fdtdir}/${fdtfile}; then
echo "Load fdt: ${fdtdir}/${fdtfile}"
fi
load ${devtype} ${devnum} ${fdt_addr_r} ${fdtdir}/${fdtfile}
fdt addr ${fdt_addr_r}
fdt resize 65536
for overlay_file in ${overlays}; do
Expand All @@ -120,7 +118,8 @@ if test -e ${devtype} ${devnum} "${prefix}.next"; then
echo "Error applying DT overlays, restoring original DT"
load ${devtype} ${devnum} ${fdt_addr_r} ${fdtdir}/${fdtfile}
else
if load ${devtype} ${devnum} ${load_addr} ${fdtdir}/overlay/${overlay_prefix}-fixup.scr; then
if test -e ${devtype} ${devnum} ${fdtdir}/overlay/${overlay_prefix}-fixup.scr; then
load ${devtype} ${devnum} ${load_addr} ${fdtdir}/overlay/${overlay_prefix}-fixup.scr
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
source ${load_addr}
fi
Expand Down
1 change: 1 addition & 0 deletions config/kernel/linux-rockchip64-current.config
Original file line number Diff line number Diff line change
Expand Up @@ -7796,6 +7796,7 @@ CONFIG_FB_TFT_SSD1331=m
CONFIG_FB_TFT_SSD1351=m
CONFIG_FB_TFT_ST7735R=m
CONFIG_FB_TFT_ST7789V=m
CONFIG_FB_TFT_ST7796=m
CONFIG_FB_TFT_TINYLCD=m
CONFIG_FB_TFT_TLS8204=m
CONFIG_FB_TFT_UC1611=m
Expand Down
1 change: 1 addition & 0 deletions config/kernel/linux-rockchip64-edge.config
Original file line number Diff line number Diff line change
Expand Up @@ -8031,6 +8031,7 @@ CONFIG_FB_TFT_SSD1331=m
CONFIG_FB_TFT_SSD1351=m
CONFIG_FB_TFT_ST7735R=m
CONFIG_FB_TFT_ST7789V=m
CONFIG_FB_TFT_ST7796=m
CONFIG_FB_TFT_TINYLCD=m
CONFIG_FB_TFT_TLS8204=m
CONFIG_FB_TFT_UC1611=m
Expand Down
11 changes: 4 additions & 7 deletions config/sources/families/include/rockchip64_common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -301,18 +301,15 @@ write_uboot_platform_mtd() {
}

setup_write_uboot_platform() {

if grep -q "ubootpart" /proc/cmdline; then

local tmp=$(cat /proc/cmdline)
local tmp part dev
tmp=$(cat /proc/cmdline)
tmp="${tmp##*ubootpart=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2> /dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $tmp ]] && part=$(findfs PARTUUID=$tmp 2> /dev/null)
[[ -n $part ]] && dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $dev ]] && DEVICE="/dev/$dev"

fi

}

family_tweaks() {
Expand Down
13 changes: 7 additions & 6 deletions config/sources/families/include/sunxi64_common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,22 @@ write_uboot_platform() {
}

setup_write_uboot_platform() {
local tmp part dev
if grep -q "ubootpart" /proc/cmdline; then
# mainline with new boot script
local tmp=$(cat /proc/cmdline)
tmp=$(cat /proc/cmdline)
tmp="${tmp##*ubootpart=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2> /dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $tmp ]] && part=$(findfs PARTUUID=$tmp 2> /dev/null)
[[ -n $part ]] && dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $dev ]] && DEVICE="/dev/$dev"
else
# legacy or old boot script
local tmp=$(cat /proc/cmdline)
tmp=$(cat /proc/cmdline)
tmp="${tmp##*root=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && local part=$(findfs $tmp 2> /dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $tmp ]] && part=$(findfs $tmp 2> /dev/null)
[[ -n $part ]] && dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
# do not try to write u-boot to USB devices
[[ -n $dev && $dev == mmcblk* ]] && DEVICE="/dev/$dev"
fi
Expand Down
7 changes: 4 additions & 3 deletions config/sources/families/include/sunxi_common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ write_uboot_platform() {
}

setup_write_uboot_platform() {
local tmp part dev
if grep -q "ubootpart" /proc/cmdline; then
local tmp=$(cat /proc/cmdline)
tmp=$(cat /proc/cmdline)
tmp="${tmp##*ubootpart=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2> /dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $tmp ]] && part=$(findfs PARTUUID=$tmp 2> /dev/null)
[[ -n $part ]] && dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $dev ]] && DEVICE="/dev/$dev"
elif [[ -f /var/lib/armbian/force_search_uboot ]]; then
# This may cause overwriting u-boot for android or other non-Armbian OS installed on eMMC
Expand Down
9 changes: 4 additions & 5 deletions config/sources/families/odroidxu4.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,16 @@ function custom_kernel_config__hack_odroidxu4_firmware() {
}

setup_write_uboot_platform() {

# this will update u-boot on the device rootfs is located on
# in case it's a mmc device, otherwise DEVICE will not be changed
# and will default to /dev/mmcblk0
local tmp=$(cat /proc/cmdline)
local tmp part dev
tmp=$(cat /proc/cmdline)
tmp="${tmp##*root=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && local part=$(findfs $tmp 2> /dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $tmp ]] && part=$(findfs $tmp 2> /dev/null)
[[ -n $part ]] && dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $dev && $dev == mmcblk* ]] && DEVICE="/dev/${dev}"

}

write_uboot_platform() {
Expand Down
2 changes: 1 addition & 1 deletion extensions/image-output-abl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function post_build_image__900_convert_to_abl_img() {
old_rootfs_image_mount_dir=${DESTIMG}/rootfs-old
new_rootfs_image_mount_dir=${DESTIMG}/rootfs-new
mkdir -p ${old_rootfs_image_mount_dir} ${new_rootfs_image_mount_dir}
truncate --size=9216M ${ROOTFS_IMAGE_FILE}
truncate --size=9728M ${ROOTFS_IMAGE_FILE}
mkfs.ext4 -F ${ROOTFS_IMAGE_FILE}
new_rootfs_image_uuid=$(blkid -s UUID -o value ${ROOTFS_IMAGE_FILE})
old_image_loop_device=$(losetup -f -P --show ${DESTIMG}/${version}.img)
Expand Down
Loading

0 comments on commit 735f180

Please sign in to comment.