Beautify `shellfmt` and add board configs to formatting list (#6910)

* tools: shellfmt: Beautify and add board configs to formatting list
* Format the whole code using `lib/tools/shellfmt.sh`
---------
Co-authored-by: Igor <igor@armbian.com>
This commit is contained in:
ColorfulRhino 2024-07-08 15:00:38 +00:00 committed by GitHub
parent 9e5b8592c9
commit 39fdf21b98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
47 changed files with 135 additions and 145 deletions

View File

@ -12,13 +12,13 @@ SERIALCON="ttyAS0"
declare -g SYTERKIT_BOARD_ID="avaota-a1" # This _only_ used for syterkit-allwinner extension
function post_family_tweaks__avaota-a1() {
display_alert "Applying boot blobs"
display_alert "Applying boot blobs"
cp -v "$SRC/packages/blobs/sunxi/sun50iw3/bl31.bin" "$SDCARD/boot/bl31.bin"
cp -v "$SRC/packages/blobs/sunxi/sun50iw3/scp.bin" "$SDCARD/boot/scp.bin"
cp -v "$SRC/packages/blobs/sunxi/sun50iw3/splash.bin" "$SDCARD/boot/splash.bin"
display_alert "Applying wifi firmware"
pushd "$SDCARD/lib/firmware"
ln -s "aic8800/SDIO/aic8800D80" "aic8800d80" # use armbian-firmware
popd
display_alert "Applying wifi firmware"
pushd "$SDCARD/lib/firmware"
ln -s "aic8800/SDIO/aic8800D80" "aic8800d80" # use armbian-firmware
popd
}

View File

@ -16,7 +16,7 @@ declare -g BOARD_FIRMWARE_INSTALL="-full"
declare -g DESKTOP_AUTOLOGIN="yes"
function post_family_config_branch_sm8550__edk2_kernel() {
function post_family_config_branch_sm8550__edk2_kernel() {
declare -g KERNELSOURCE='https://github.com/edk2-porting/linux-next'
declare -g KERNEL_MAJOR_MINOR="6.7" # Major and minor versions of this kernel.
declare -g KERNELBRANCH="branch:integration/ayn-odin2"
@ -37,7 +37,7 @@ function post_family_tweaks__enable_services() {
return 0
fi
if [[ "${RELEASE}" == "noble" ]];then
if [[ "${RELEASE}" == "noble" ]]; then
display_alert "Adding Mesa PPA For Ubuntu " "${BOARD}" "info"
do_with_retries 3 chroot_sdcard add-apt-repository ppa:oibaf/graphics-drivers --yes --no-update
fi
@ -50,7 +50,7 @@ function post_family_tweaks__enable_services() {
echo 'MESA_LOADER_DRIVER_OVERRIDE=zink' | tee -a "${SDCARD}"/etc/environment
echo 'GALLIUM_DRIVER=zink' | tee -a "${SDCARD}"/etc/environment
# Add Gamepad udev rule
echo 'SUBSYSTEM=="input", ATTRS{name}=="Ayn Odin2 Gamepad", MODE="0666", ENV{ID_INPUT_MOUSE}="0", ENV{ID_INPUT_JOYSTICK}="1"'> "${SDCARD}"/etc/udev/rules.d/99-ignore-gamepad.rules
echo 'SUBSYSTEM=="input", ATTRS{name}=="Ayn Odin2 Gamepad", MODE="0666", ENV{ID_INPUT_MOUSE}="0", ENV{ID_INPUT_JOYSTICK}="1"' > "${SDCARD}"/etc/udev/rules.d/99-ignore-gamepad.rules
# No driver support for suspend
chroot_sdcard systemctl mask suspend.target
# Add Bt Mac Fixed service
@ -137,7 +137,7 @@ function post_family_tweaks_bsp__firmware_in_initrd() {
# Extra one for bt
for f in /lib/firmware/qca/* ; do
add_firmware "${f#/lib/firmware/}"
done
done
FIRMWARE_HOOK
run_host_command_logged chmod -v +x "${file_added_to_bsp_destination}"
}

View File

@ -13,7 +13,7 @@ BOOTBRANCH_BOARD="tag:v2023.07.02"
BOOTPATCHDIR="v2023.07.02"
function fetch_sources_tools__libreelec_amlogic_fip_pre_m2-pro_blob_update() {
fetch_from_repo "https://github.com/Dangku/amlogic-boot-fip" "amlogic-boot-fip" "branch:master"
fetch_from_repo "https://github.com/Dangku/amlogic-boot-fip" "amlogic-boot-fip" "branch:master"
}
function post_uboot_custom_postprocess__bpi-m2-pro() {

View File

@ -6,7 +6,7 @@ KERNEL_TARGET="edge"
BOOT_FDT_FILE="starfive/jh7100-beaglev-starlight-a1.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS0,115200n8 console=tty0 earlycon=sbi rootflags=data=writeback stmmaceth=chain_mode:1 rw"
BOOTCONFIG=none
BOOTCONFIG=none
function post_family_tweaks__beaglev_uenv() {
# rpardini: uEnv.txt is needed to re-enable distroboot-like behaviour on the board's SPI u-boot

View File

@ -10,7 +10,7 @@ BOOTBRANCH_BOARD="tag:v2022.04"
BOOTPATCHDIR="u-boot-rockchip64-v2022.04"
function post_family_tweaks_bsp__clockworkpi-a06() {
display_alert "Installing BSP firmware and fixups"
display_alert "Installing BSP firmware and fixups"
# rotate screen & disable dpms
mkdir -p "$destination"/etc/X11/xorg.conf.d

View File

@ -21,8 +21,8 @@ function post_family_config_branch_edge__coolpi-cm5_use_mainline_uboot() {
declare -g BOOTSOURCE="https://github.com/Kwiboo/u-boot-rockchip.git" # Kwiboo U-Boot
unset BOOTBRANCH
unset BOOTPATCHDIR
declare -g BOOTBRANCH_BOARD="tag:v2024.07" # commit: 52835266d3e as of v2024.07-rc2
declare -g BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory
declare -g BOOTBRANCH_BOARD="tag:v2024.07"
declare -g BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory
declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin u-boot-rockchip-spi.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
@ -35,4 +35,3 @@ function post_family_config_branch_edge__coolpi-cm5_use_mainline_uboot() {
flashcp -v -p "$1/u-boot-rockchip-spi.bin" /dev/mtd0
}
}

View File

@ -36,5 +36,3 @@ function post_family_tweaks__firefly_itx_3588j_enable_services() {
chroot_sdcard systemctl enable rk3588-bluetooth.service
return 0
}

View File

@ -17,7 +17,6 @@ IMAGE_PARTITION_TABLE="gpt"
DDR_BLOB='rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.11.bin'
BL31_BLOB='rk35/rk3588_bl31_v1.38.elf'
function post_family_tweaks__fxblox-rk1_naming_audios() {
display_alert "$BOARD" "Renaming fxblox rk1 audios" "info"

View File

@ -11,7 +11,7 @@ declare -g BOOT_FDT_FILE="rockchip/rk3588s-indiedroid-nova.dtb"
declare -g BOOT_SCENARIO="spl-blobs"
declare -g BOOT_SUPPORT_SPI="no"
declare -g IMAGE_PARTITION_TABLE="gpt"
declare -g SRC_EXTLINUX="no" # going back to standard uboot for now
declare -g SRC_EXTLINUX="no" # going back to standard uboot for now
declare -g UEFI_EDK2_BOARD_ID="indiedroid-nova" # This _only_ used for uefi-edk2-rk3588 extension
# @TODO: consider removing those, as the defaults in rockchip64_common have been bumped up

View File

@ -22,9 +22,9 @@ function post_family_tweaks_bsp__populate_etc_firmware() {
}
function vim1s_bsp_legacy_postinst_link_video_firmware() {
ln -sf video_ucode.bin.s4 /lib/firmware/video/video_ucode.bin
ln -sf video_ucode.bin.s4 /lib/firmware/video/video_ucode.bin
}
function post_family_tweaks_bsp__vim1s_link_video_firmware_on_install() {
postinst_functions+=(vim1s_bsp_legacy_postinst_link_video_firmware)
postinst_functions+=(vim1s_bsp_legacy_postinst_link_video_firmware)
}

View File

@ -10,4 +10,4 @@ ASOUND_STATE="asound.state.lepotato"
BOOT_LOGO="desktop"
BOOTBRANCH_BOARD="tag:v2024.01"
BOOTPATCHDIR="v2024.01"
BOOTPATCHDIR="v2024.01"

View File

@ -11,18 +11,18 @@ BOOTFS_TYPE="ext4"
BOOTSIZE="512"
function post_family_tweaks__licheepi4a() {
display_alert "Applying boot blobs"
display_alert "Applying boot blobs"
cp -v "$SRC/packages/blobs/riscv64/thead/light_aon_fpga.bin" "$SDCARD/boot/light_aon_fpga.bin"
cp -v "$SRC/packages/blobs/riscv64/thead/light_c906_audio.bin" "$SDCARD/boot/light_c906_audio.bin"
cp -v "$SRC/packages/blobs/riscv64/thead/fw_dynamic.bin" "$SDCARD/boot/fw_dynamic.bin"
display_alert "Applying bt blobs"
cp -v "$SRC/packages/blobs/riscv64/thead/rtlbt/rtk-hciattach.service" "$SDCARD/etc/systemd/system/rtk-hciattach.service"
cp -v "$SRC/packages/blobs/riscv64/thead/rtlbt/rtk_hciattach" "$SDCARD/usr/local/bin/rtk_hciattach"
cp -v "$SRC/packages/blobs/riscv64/thead/rtlbt/rtl8723d_config" "$SDCARD/lib/firmware/rtlbt/rtl8723d_config"
cp -v "$SRC/packages/blobs/riscv64/thead/rtlbt/rtl8723d_fw" "$SDCARD/lib/firmware/rtlbt/rtl8723d_fw"
display_alert "Applying bt blobs"
cp -v "$SRC/packages/blobs/riscv64/thead/rtlbt/rtk-hciattach.service" "$SDCARD/etc/systemd/system/rtk-hciattach.service"
cp -v "$SRC/packages/blobs/riscv64/thead/rtlbt/rtk_hciattach" "$SDCARD/usr/local/bin/rtk_hciattach"
cp -v "$SRC/packages/blobs/riscv64/thead/rtlbt/rtl8723d_config" "$SDCARD/lib/firmware/rtlbt/rtl8723d_config"
cp -v "$SRC/packages/blobs/riscv64/thead/rtlbt/rtl8723d_fw" "$SDCARD/lib/firmware/rtlbt/rtl8723d_fw"
display_alert "Temp add HDMI audio output on Volume control"
display_alert "Temp add HDMI audio output on Volume control"
mkdir -p $SDCARD/etc/pulse/
echo "load-module module-alsa-sink device=hw:0,2" >> "$SDCARD/etc/pulse/default.pa"
}

View File

@ -6,4 +6,3 @@ HAS_VIDEO_OUTPUT="no"
BOOTCONFIG="A33-OLinuXino_defconfig"
OVERLAY_PREFIX="sun8i-a33"
KERNEL_TARGET="legacy,current,edge"

View File

@ -12,12 +12,12 @@ SERIALCON="ttyAS0"
declare -g SYTERKIT_BOARD_ID="longanpi-4b" # This _only_ used for syterkit-allwinner extension
function post_family_tweaks__longanpi-4b() {
display_alert "Applying boot blobs"
display_alert "Applying boot blobs"
cp -v "$SRC/packages/blobs/sunxi/sun50iw3/bl31.bin" "$SDCARD/boot/bl31.bin"
cp -v "$SRC/packages/blobs/sunxi/sun50iw3/scp.bin" "$SDCARD/boot/scp.bin"
display_alert "Applying wifi firmware"
pushd "$SDCARD/lib/firmware"
display_alert "Applying wifi firmware"
pushd "$SDCARD/lib/firmware"
ln -s "aic8800/SDIO/aic8800/fmacfw_rf.bin" "$SDCARD/lib/firmware"
ln -s "aic8800/SDIO/aic8800/fw_adid.bin" "$SDCARD/lib/firmware"
ln -s "aic8800/SDIO/aic8800/fw_patch_table.bin" "$SDCARD/lib/firmware"
@ -29,6 +29,6 @@ function post_family_tweaks__longanpi-4b() {
ln -s "aic8800/SDIO/aic8800/fmacfw_usb.bin" "$SDCARD/lib/firmware"
ln -s "aic8800/SDIO/aic8800/fw_patch.bin" "$SDCARD/lib/firmware"
ln -s "aic8800/SDIO/aic8800/fw_patch_u03.bin" "$SDCARD/lib/firmware"
ln -s "aic8800/SDIO/aic8800D80" "aic8800d80" # use armbian-firmware
popd
ln -s "aic8800/SDIO/aic8800D80" "aic8800d80" # use armbian-firmware
popd
}

View File

@ -12,11 +12,11 @@ HAS_VIDEO_OUTPUT="no"
BOOT_FDT_FILE="rockchip/rk3328-nanopi-r2-rev06.dtb"
function post_family_tweaks__nanopi-r2c_rename_USB_LAN() {
display_alert "$BOARD" "Installing board tweaks" "info"
display_alert "$BOARD" "Installing board tweaks" "info"
# rename USB based network to lan0
mkdir -p $SDCARD/etc/udev/rules.d/
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="r8152", KERNEL=="eth1", NAME="lan0"' > $SDCARD/etc/udev/rules.d/70-rename-lan.rules
return 0
}
}

View File

@ -12,11 +12,11 @@ HAS_VIDEO_OUTPUT="no"
BOOT_FDT_FILE="rockchip/rk3328-nanopi-r2-rev00.dtb"
function post_family_tweaks__nanopi-r2s_rename_USB_LAN() {
display_alert "$BOARD" "Installing board tweaks" "info"
display_alert "$BOARD" "Installing board tweaks" "info"
# rename USB based network to lan0
mkdir -p $SDCARD/etc/udev/rules.d/
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="r8152", KERNEL=="eth1", NAME="lan0"' > $SDCARD/etc/udev/rules.d/70-rename-lan.rules
return 0
}
}

View File

@ -6,4 +6,3 @@ BOOTCONFIG="nanopi-neo4-rk3399_defconfig"
KERNEL_TARGET="current,edge"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"

View File

@ -19,8 +19,8 @@ BOOTSIZE="200"
BOOTFS_TYPE="fat"
write_uboot_platform() {
dd if=$1/bl1.bin.hardkernel of=$2 bs=1 count=442 conv=fsync > /dev/null 2>&1
dd if=$1/bl1.bin.hardkernel of=$2 bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1
dd if=$1/u-boot.bin of=$2 bs=512 seek=64 conv=fsync > /dev/null 2>&1
dd if=/dev/zero of=$2 seek=1024 count=32 bs=512 conv=fsync > /dev/null 2>&1
dd if=$1/bl1.bin.hardkernel of=$2 bs=1 count=442 conv=fsync > /dev/null 2>&1
dd if=$1/bl1.bin.hardkernel of=$2 bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1
dd if=$1/u-boot.bin of=$2 bs=512 seek=64 conv=fsync > /dev/null 2>&1
dd if=/dev/zero of=$2 seek=1024 count=32 bs=512 conv=fsync > /dev/null 2>&1
}

View File

@ -18,5 +18,5 @@ BOOTFS_TYPE="fat"
BOOT_LOGO=desktop
family_tweaks() {
cp $SRC/packages/blobs/splash/armbian-u-boot-24.bmp $SDCARD/boot/boot.bmp
cp $SRC/packages/blobs/splash/armbian-u-boot-24.bmp $SDCARD/boot/boot.bmp
}

View File

@ -24,52 +24,51 @@ BOOT_FDT_FILE="rockchip/rk3328-orangepi-r1-plus-lts.dtb"
# Content:
function post_family_tweaks_bsp__enable_leds_orangepi_r1_plus_lts() {
display_alert "Creating board support LEDs config for orangepi-r1-plus-lts"
cat <<- EOF > "${destination}"/etc/armbian-leds.conf
[/sys/class/leds/orangepi-r1-plus-lts:green:lan]
trigger=netdev
interval=52
brightness=1
link=1
tx=0
rx=1
device_name=eth0
display_alert "Creating board support LEDs config for orangepi-r1-plus-lts"
cat <<- EOF > "${destination}"/etc/armbian-leds.conf
[/sys/class/leds/orangepi-r1-plus-lts:green:lan]
trigger=netdev
interval=52
brightness=1
link=1
tx=0
rx=1
device_name=eth0
[/sys/class/leds/orangepi-r1-plus-lts:green:wan]
trigger=netdev
interval=52
brightness=1
link=1
tx=0
rx=1
device_name=lan0
[/sys/class/leds/orangepi-r1-plus-lts:green:wan]
trigger=netdev
interval=52
brightness=1
link=1
tx=0
rx=1
device_name=lan0
[/sys/class/leds/orangepi-r1-plus-lts:red:status]
trigger=heartbeat
brightness=0
invert=0
EOF
[/sys/class/leds/orangepi-r1-plus-lts:red:status]
trigger=heartbeat
brightness=0
invert=0
EOF
if [[ $BRANCH == legacy ]]; then
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
fi
# add a network rule to work-around RTL8153B initialization issue.
display_alert "Creating board support network rename rule to work-around RTL8153B initialization issue for orangepi-r1-plus-lts"
mkdir -p "${destination}"/etc/udev/rules.d/
cat <<- EOF > "${destination}"/etc/udev/rules.d/70-rename-lan.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="end*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="r8152", KERNEL=="e*", NAME="lan0", \
RUN+="/usr/sbin/ip link set lan0 down", \
RUN+="/usr/sbin/ip link set eth0 down", \
RUN+="/usr/bin/sleep 5s ", \
RUN+="/usr/sbin/ip link set eth0 up", \
RUN+="/usr/bin/sleep 25s ", \
RUN+="/usr/sbin/ip link set lan0 up"
EOF
# add a network rule to work-around RTL8153B initialization issue.
display_alert "Creating board support network rename rule to work-around RTL8153B initialization issue for orangepi-r1-plus-lts"
mkdir -p "${destination}"/etc/udev/rules.d/
cat <<- EOF > "${destination}"/etc/udev/rules.d/70-rename-lan.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="end*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="r8152", KERNEL=="e*", NAME="lan0", \
RUN+="/usr/sbin/ip link set lan0 down", \
RUN+="/usr/sbin/ip link set eth0 down", \
RUN+="/usr/bin/sleep 5s ", \
RUN+="/usr/sbin/ip link set eth0 up", \
RUN+="/usr/bin/sleep 25s ", \
RUN+="/usr/sbin/ip link set lan0 up"
EOF
}

View File

@ -12,7 +12,7 @@ HAS_VIDEO_OUTPUT="no"
BOOT_FDT_FILE="rockchip/rk3328-orangepi-r1-plus.dtb"
function post_family_tweaks__opi-r1plus_rename_USB_LAN() {
display_alert "$BOARD" "Installing board tweaks" "info"
display_alert "$BOARD" "Installing board tweaks" "info"
# rename USB based network to lan0
mkdir -p $SDCARD/etc/udev/rules.d/
@ -22,7 +22,7 @@ function post_family_tweaks__opi-r1plus_rename_USB_LAN() {
}
function post_family_tweaks_bsp__orangepi-r1plus_BSP() {
display_alert "Installing BSP firmware and fixups"
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
@ -33,4 +33,4 @@ function post_family_tweaks_bsp__orangepi-r1plus_BSP() {
fi
return 0
}
}

View File

@ -32,12 +32,12 @@ function post_family_tweaks__orangepi5plus_naming_audios() {
function post_family_config_branch_edge__orangepi5plus_use_mainline_uboot() {
display_alert "$BOARD" "Mainline U-Boot overrides for $BOARD - $BRANCH" "info"
declare -g BOOTCONFIG="orangepi-5-plus-rk3588_defconfig" # override the default for the board/family
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" # We ❤️ mainline U-Boot
declare -g BOOTCONFIG="orangepi-5-plus-rk3588_defconfig" # override the default for the board/family
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" # We ❤️ mainline U-Boot
declare -g BOOTBRANCH="tag:v2024.07"
declare -g BOOTPATCHDIR="v2024.07/board_${BOARD}"
declare -g BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory
declare -g BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory
declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin u-boot-rockchip-spi.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

View File

@ -64,7 +64,6 @@ function post_family_tweaks__orangepi5_naming_audios() {
return 0
}
function post_family_config__orangepi5_uboot_add_sata_target() {
if [[ $BRANCH == "edge" ]]; then
return

View File

@ -10,9 +10,9 @@ SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyAMA1,115200 earlycon=pl011,0x2800d000 rootfstype=ext4 rootwait cma=256m"
function post_family_tweaks__phytiumpi() {
display_alert "Applying bt blobs"
cp -v "$SRC/packages/blobs/phytiumpi/rtlbt/systemd-hciattach.service" "$SDCARD/etc/systemd/system/systemd-hciattach.service"
cp -v "$SRC/packages/blobs/phytiumpi/rtlbt/rtk_hciattach" "$SDCARD/usr/bin/rtk_hciattach"
cp -v "$SRC/packages/blobs/phytiumpi/rtlbt/rtl8821c_config" "$SDCARD/lib/firmware/rtlbt/rtl8821c_config"
cp -v "$SRC/packages/blobs/phytiumpi/rtlbt/rtl8821c_fw" "$SDCARD/lib/firmware/rtlbt/rtl8821c_fw"
display_alert "Applying bt blobs"
cp -v "$SRC/packages/blobs/phytiumpi/rtlbt/systemd-hciattach.service" "$SDCARD/etc/systemd/system/systemd-hciattach.service"
cp -v "$SRC/packages/blobs/phytiumpi/rtlbt/rtk_hciattach" "$SDCARD/usr/bin/rtk_hciattach"
cp -v "$SRC/packages/blobs/phytiumpi/rtlbt/rtl8821c_config" "$SDCARD/lib/firmware/rtlbt/rtl8821c_config"
cp -v "$SRC/packages/blobs/phytiumpi/rtlbt/rtl8821c_fw" "$SDCARD/lib/firmware/rtlbt/rtl8821c_fw"
}

View File

@ -13,7 +13,7 @@ BOOTBRANCH_BOARD="tag:v2022.04"
BOOTPATCHDIR="u-boot-rockchip64-v2022.04"
function post_family_tweaks__PBP() {
display_alert "$BOARD" "Installing board tweaks" "info"
display_alert "$BOARD" "Installing board tweaks" "info"
chroot $SDCARD /bin/bash -c "echo SuspendState=freeze >> /etc/systemd/sleep.conf"
chroot $SDCARD /bin/bash -c "echo HandlePowerKey=ignore >> /etc/systemd/login.d"
@ -22,7 +22,7 @@ function post_family_tweaks__PBP() {
}
function post_family_tweaks_bsp__PBP_BSP() {
display_alert "Installing BSP firmware and fixups"
display_alert "Installing BSP firmware and fixups"
# special keys
mkdir -p "${destination}"/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/

View File

@ -25,9 +25,8 @@ function post_family_config__uboot_cmdline() {
}
function post_family_tweaks_bsp__rk3318-box() {
display_alert "Installing BSP firmware and fixups"
display_alert "Installing BSP firmware and fixups"
# Optional board dtbo selection script
mkdir -p $destination/usr/local/bin

View File

@ -14,11 +14,11 @@ enable_extension "radxa-aic8800"
AIC8800_TYPE="usb"
function post_family_config__uboot_rock5c() {
display_alert "$BOARD" "Configuring armsom u-boot" "info"
declare -g BOOTSOURCE='https://github.com/radxa/u-boot.git'
declare -g BOOTBRANCH="branch:next-dev-v2024.03"
declare -g OVERLAY_PREFIX='rockchip-rk3588'
declare -g BOOTDELAY=1 # build injects this into u-boot config. we can then get into UMS mode and avoid the whole rockusb/rkdeveloptool thing
display_alert "$BOARD" "Configuring armsom u-boot" "info"
declare -g BOOTSOURCE='https://github.com/radxa/u-boot.git'
declare -g BOOTBRANCH="branch:next-dev-v2024.03"
declare -g OVERLAY_PREFIX='rockchip-rk3588'
declare -g BOOTDELAY=1 # build injects this into u-boot config. we can then get into UMS mode and avoid the whole rockusb/rkdeveloptool thing
}
function post_family_tweaks__rock5c_naming_audios() {

View File

@ -13,7 +13,7 @@ BOOT_SUPPORT_SPI=yes
DDR_BLOB="rk33/rk3399_ddr_933MHz_v1.20.bin"
function post_family_tweaks_bsp__rockpi-4b_BSP() {
display_alert "Installing BSP firmware and fixups"
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then

View File

@ -11,7 +11,7 @@ BOOT_SCENARIO="tpl-spl-blob"
BOOT_SUPPORT_SPI=yes
function post_family_tweaks_bsp__rockpi-4c_BSP() {
display_alert "Installing BSP firmware and fixups"
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then

View File

@ -35,11 +35,10 @@ IDBLOADER_BLOB=$SRC/packages/blobs/rockchip/rk3308_idbloader_ddr589MHz_uart0_m0_
#Then, reset the RockPi-S to boot from SDNAND. Using that running image:
# dd if=/dev/mmcblk0 of=rk3308_idbloader_ddr589MHz_uart0_m0_v2.06.136sd.bin skip=64 count=280
function post_family_config___uboot_config() {
display_alert "$BOARD" "u-boot ${BOOTBRANCH_BOARD} overrides" "info"
unset uboot_custom_postprocess family_tweaks_bsp # disable stuff from rockchip64_common
display_alert "$BOARD" "u-boot ${BOOTBRANCH_BOARD} overrides" "info"
unset uboot_custom_postprocess family_tweaks_bsp # disable stuff from rockchip64_common
BOOTSCRIPT=boot-rockpis.cmd:boot.cmd
BOOTENV_FILE='rockpis.txt'
@ -68,9 +67,7 @@ function post_family_config___uboot_config() {
rules=etc/udev/rules.d
install -m 755 $bsp/lib/udev/fixEtherAddr $destination/lib/udev &&
install -m 644 $bsp/$rules/05-fixMACaddress.rules $destination/$rules
install -m 644 $bsp/$rules/05-fixMACaddress.rules $destination/$rules
}
}

View File

@ -11,7 +11,7 @@ BOOT_FDT_FILE="rockchip/rk3328-roc-pc.dtb"
ASOUND_STATE="asound.state.station-m1"
function post_family_tweaks__station_m1() {
display_alert "$BOARD" "Installing board tweaks" "info"
display_alert "$BOARD" "Installing board tweaks" "info"
cp -R $SRC/packages/blobs/rtl8723bt_fw/* $SDCARD/lib/firmware/rtl_bt/
cp -R $SRC/packages/blobs/station/firmware/* $SDCARD/lib/firmware/

View File

@ -12,7 +12,7 @@ ASOUND_STATE="asound.state.station-m2"
IMAGE_PARTITION_TABLE="gpt"
function post_family_tweaks__station_m2() {
display_alert "$BOARD" "Installing board tweaks" "info"
display_alert "$BOARD" "Installing board tweaks" "info"
cp -R $SRC/packages/blobs/station/firmware/* $SDCARD/lib/firmware/

View File

@ -13,7 +13,7 @@ IMAGE_PARTITION_TABLE="gpt"
declare -g UEFI_EDK2_BOARD_ID="station-m3" # This _only_ used for uefi-edk2-rk3588 extension
function post_family_tweaks__station_m3() {
display_alert "$BOARD" "Installing board tweaks" "info"
display_alert "$BOARD" "Installing board tweaks" "info"
cp -R $SRC/packages/blobs/rtl8723bt_fw/* $SDCARD/lib/firmware/rtl_bt/
cp -R $SRC/packages/blobs/station/firmware/* $SDCARD/lib/firmware/

View File

@ -14,7 +14,7 @@ SRC_CMDLINE="console=ttyS2,1500000 console=tty0"
ASOUND_STATE="asound.state.station-p1"
function post_family_tweaks__station_p1() {
display_alert "$BOARD" "Installing board tweaks" "info"
display_alert "$BOARD" "Installing board tweaks" "info"
cp -R $SRC/packages/blobs/rtl8723bt_fw/* $SDCARD/lib/firmware/rtl_bt/
cp -R $SRC/packages/blobs/station/firmware/* $SDCARD/lib/firmware/

View File

@ -11,7 +11,7 @@ ASOUND_STATE="asound.state.station-p2"
IMAGE_PARTITION_TABLE="gpt"
function post_family_tweaks__station_p2() {
display_alert "$BOARD" "Installing board tweaks" "info"
display_alert "$BOARD" "Installing board tweaks" "info"
cp -R $SRC/packages/blobs/rtl8723bt_fw/* $SDCARD/lib/firmware/rtl_bt/
cp -R $SRC/packages/blobs/station/firmware/* $SDCARD/lib/firmware/

View File

@ -12,4 +12,4 @@ BOOT_LOGO="desktop"
function post_family_config__declare_u-boot-version() {
BOOTBRANCH='tag:v2024.04'
BOOTPATCHDIR='v2024.04'
}
}

View File

@ -9,7 +9,7 @@ KERNEL_TEST_TARGET="current,edge"
FULL_DESKTOP="yes"
BOOT_SOC="rk3288"
function tinkerboard_uboot_postinst(){
function tinkerboard_uboot_postinst() {
[[ $DEVICE == /dev/null ]] && exit 0
if [[ -z $DEVICE ]]; then
DEVICE="/dev/mmcblk0"
@ -27,6 +27,6 @@ function tinkerboard_uboot_postinst(){
fi
}
function pre_package_uboot_image__tinkerboard_update_uboot_postinst_script(){
function pre_package_uboot_image__tinkerboard_update_uboot_postinst_script() {
postinst_functions+=('tinkerboard_uboot_postinst')
}

View File

@ -10,7 +10,7 @@ declare -g BOOT_LOGO=desktop
# This board boots via EFI/Grub, but requires a DTB to be passed, from Grub, to the Kernel.
declare -g GRUB_CMDLINE_LINUX_DEFAULT="efi=noruntime clk_ignore_unused pd_ignore_unused arm64.nopauth iommu.passthrough=0 iommu.strict=0 pcie_aspm.policy=powersupersave"
declare -g BOOT_FDT_FILE="qcom/sc8280xp-microsoft-dev-kit-2023.dtb"
enable_extension "grub-with-dtb" # important, puts the whole DTB handling in place.
enable_extension "grub-with-dtb" # important, puts the whole DTB handling in place.
# Use the full firmware, complete linux-firmware plus Armbian's
# @TODO: see if we can only get the blobs that are required for WDK operation.
@ -47,7 +47,6 @@ function post_family_config__debian_now_has_userspace_for_the_wdk2023() {
add_packages_to_image "zstd" # for zstd compression of initrd
add_packages_to_image "mtools" # for access to the EFI partition
# Trixie, as of 2023-10-13, is missing fprintd and libpam-fprintd; see https://tracker.debian.org/pkg/fprintd and https://tracker.debian.org/pkg/libpam-fprintd
# @TODO: check again later, and remove this if it's there
if [[ "${RELEASE}" != "trixie" ]]; then
@ -147,4 +146,3 @@ function pre_customize_image__disable_snapd_seeded() {
display_alert "Disabling snapd.seeded" "${BOARD}" "info"
chroot_sdcard systemctl disable snapd.seeded.service "||" true
}

View File

@ -55,7 +55,7 @@ function post_family_tweaks__xiaomi-elish_enable_services() {
return 0
fi
if [[ "${RELEASE}" == "jammy" ]] || [[ "${RELEASE}" == "noble" ]];then
if [[ "${RELEASE}" == "jammy" ]] || [[ "${RELEASE}" == "noble" ]]; then
display_alert "Adding qcom-mainline PPA" "${BOARD}" "info"
do_with_retries 3 chroot_sdcard add-apt-repository ppa:liujianfeng1994/qcom-mainline --yes --no-update
fi

View File

@ -9,15 +9,15 @@ FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
function post_family_tweaks__z28pro() {
display_alert "$BOARD" "Installing board tweaks" "info"
display_alert "$BOARD" "Installing board tweaks" "info"
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable z28pro-bluetooth.service >/dev/null 2>&1"
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable z28pro-bluetooth.service >/dev/null 2>&1"
return 0
}
function post_family_tweaks_bsp__z28pro_BSP() {
display_alert "Installing BSP firmware and fixups"
display_alert "Installing BSP firmware and fixups"
mkdir -p $destination/usr/local/bin

View File

@ -42,7 +42,7 @@ case "${BRANCH}" in
declare -g KERNEL_MAJOR_MINOR="6.1"
declare -g LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
declare -g KERNELPATCHDIR="${LINUXFAMILY}-legacy-${KERNEL_MAJOR_MINOR}" # Needed as long as both legacy and current are 6.1 kernels
declare -g EXTRAWIFI="no" # WiFi drivers are already included in th legacy kernel
declare -g EXTRAWIFI="no" # WiFi drivers are already included in th legacy kernel
;;
current)

View File

@ -41,4 +41,3 @@ function family_tweaks_s() {
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable hdmi-audio.service >/dev/null 2>&1"
fi
}

View File

@ -6,7 +6,7 @@
# Shared versioning logic for Armbian mainline kernels.
function mainline_kernel_decide_version__upstream_release_candidate_number() {
[[ -n "${KERNELBRANCH}" ]] && return 0 # if already set, don't touch it; that way other hooks can run in any order
[[ -n "${KERNELBRANCH}" ]] && return 0 # if already set, don't touch it; that way other hooks can run in any order
if [[ "${KERNEL_MAJOR_MINOR}" == "6.10" ]]; then # @TODO: roll over to next MAJOR.MINOR and MAJOR.MINOR-rc1 when it is released
declare -g KERNELBRANCH="tag:v6.10-rc5"
display_alert "mainline-kernel: upstream release candidate" "Using KERNELBRANCH='${KERNELBRANCH}' for KERNEL_MAJOR_MINOR='${KERNEL_MAJOR_MINOR}'" "info"

View File

@ -16,8 +16,8 @@ declare -g BLUETOOTH_HCIATTACH_PARAMS="-s 115200 /dev/ttyS6 bcm43xx 1500000" # F
enable_extension "bluetooth-hciattach" # Enable the bluetooth-hciattach extension
# board-like config
declare -g BOOT_SCENARIO="spl-blobs" # so we don't depend on defconfig naming convention
declare -g BOOT_SOC="rk3588" # so we don't depend on defconfig naming convention
declare -g BOOT_SCENARIO="spl-blobs" # so we don't depend on defconfig naming convention
declare -g BOOT_SOC="rk3588" # so we don't depend on defconfig naming convention
declare -g BOOTCONFIG="rk3588_meko_defconfig" # generic ebv plus distro dtb hacks
declare -g IMAGE_PARTITION_TABLE="gpt"

View File

@ -1,4 +1,3 @@
# enable output-vhdx, so image files for wsl2 can be used directly as Hyper-V virtual machines as well.
enable_extension "image-output-vhdx" # Use .vhdx dynamic output, for Hyper-V (not Azure 1024-aligned static vhd)

View File

@ -97,7 +97,7 @@ function trap_handler_cleanup_logging() {
fi
# Export Markdown assets, but not if in GHA and GHA_EXPORT_MD_SUMMARY != yes
if [[ "${CI}" == "true" ]] && ( [[ "${GITHUB_ACTIONS}" != "true" ]] || [[ "${GHA_EXPORT_MD_SUMMARY:-no}" != "yes" ]] ); then
if [[ "${CI}" == "true" ]] && ([[ "${GITHUB_ACTIONS}" != "true" ]] || [[ "${GHA_EXPORT_MD_SUMMARY:-no}" != "yes" ]]); then
display_alert "Not exporting Markdown logs to GitHub Actions" "GITHUB_ACTIONS: '${GITHUB_ACTIONS}', GHA_EXPORT_MD_SUMMARY: '${GHA_EXPORT_MD_SUMMARY}'" "debug"
else
# Export Markdown logs.

View File

@ -61,17 +61,23 @@ cd "${SRC}"
# Should match the .editorconfig
declare -a ALL_BASH_FILES=($(find config/sources -type f | grep -e "\.conf\$" -e "\.inc\$") $(find lib -type f | grep -e "\.sh\$" | grep -v -e "^lib\/tools\/") $(find extensions -type f | grep -e "\.sh\$") compile.sh)
# Aggregate all files that should be formatted
board_config_files=$(find config/boards -type f \( -name "*.conf" -o -name "*.csc" -o -name "*.tvb" \)) # All board config files
family_config_files=$(find config/sources -type f \( -name "*.conf" -o -name "*.inc" -o -name "*.sh" \)) # All family config files
lib_files=$(find lib -type f -name "*.sh") # All build framework shell files
extensions_files=$(find extensions -type f -name "*.sh") # All extension shell files
echo "All files:" "${ALL_BASH_FILES[@]}"
declare -a ALL_BASH_FILES=(compile.sh ${board_config_files} ${family_config_files} ${lib_files} ${extensions_files})
echo "Shellfmt files differing:"
echo -e "\nAll files:" "${ALL_BASH_FILES[@]}"
echo -e "\nShellfmt files differing:"
"${SHELLFMT_BIN}" -l "${ALL_BASH_FILES[@]}" | sort -h # list all formatted files
#echo "Diff with current:"
# "${SHELLFMT_BIN}" -d "${ALL_BASH_FILES[@]}" # list files that have different formatting than they should
echo "Doing for real:"
echo -e "\nFormatting files..."
"${SHELLFMT_BIN}" -w "${ALL_BASH_FILES[@]}"
echo "Shellfmt finished!"