From 39fdf21b98dc77f8b2a935b58bba9c1ad5a5dcd1 Mon Sep 17 00:00:00 2001 From: ColorfulRhino <131405023+ColorfulRhino@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:00:38 +0000 Subject: [PATCH] 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 --- config/boards/avaota-a1.conf | 12 +-- config/boards/ayn-odin2.conf | 8 +- config/boards/bananapim2pro.conf | 2 +- config/boards/beaglev.csc | 2 +- config/boards/clockworkpi-a06.csc | 2 +- config/boards/coolpi-cm5.csc | 5 +- config/boards/firefly-itx-3588j.csc | 2 - config/boards/fxblox-rk1.csc | 1 - config/boards/indiedroid-nova.csc | 2 +- config/boards/khadas-vim1s.conf | 4 +- config/boards/lepotato.conf | 2 +- config/boards/licheepi-4a.csc | 14 ++-- config/boards/lime-a33.csc | 1 - config/boards/longanpi-4b.csc | 12 +-- config/boards/nanopi-r2c.csc | 4 +- config/boards/nanopi-r2s.csc | 4 +- config/boards/nanopineo4.csc | 1 - config/boards/odroidc1.csc | 8 +- config/boards/onecloud.conf | 2 +- config/boards/orangepi-r1plus-lts.csc | 83 +++++++++---------- config/boards/orangepi-r1plus.csc | 6 +- config/boards/orangepi5-plus.conf | 8 +- config/boards/orangepi5.conf | 1 - config/boards/phytiumpi.conf | 10 +-- config/boards/pinebook-pro.conf | 4 +- config/boards/rk3318-box.tvb | 3 +- config/boards/rock-5c.conf | 10 +-- config/boards/rockpi-4b.csc | 2 +- config/boards/rockpi-4c.csc | 2 +- config/boards/rockpi-s.conf | 9 +- config/boards/station-m1.csc | 2 +- config/boards/station-m2.csc | 2 +- config/boards/station-m3.csc | 2 +- config/boards/station-p1.csc | 2 +- config/boards/station-p2.csc | 2 +- config/boards/sweet-potato.conf | 2 +- config/boards/tinkerboard.conf | 4 +- config/boards/wdk2023.csc | 4 +- config/boards/xiaomi-elish.conf | 2 +- config/boards/z28pro.tvb | 6 +- config/sources/families/spacemit.conf | 2 +- config/sources/families/sun50iw9.conf | 1 - config/sources/mainline-kernel.conf.sh | 2 +- .../mekotronics/mekotronics-rk3588.conf.sh | 4 +- .../sources/vendors/microsoft/wsl2.hooks.sh | 1 - lib/functions/logging/trap-logging.sh | 2 +- lib/tools/shellfmt.sh | 14 +++- 47 files changed, 135 insertions(+), 145 deletions(-) diff --git a/config/boards/avaota-a1.conf b/config/boards/avaota-a1.conf index 4b8dd2c5a..0585f82ed 100644 --- a/config/boards/avaota-a1.conf +++ b/config/boards/avaota-a1.conf @@ -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 } diff --git a/config/boards/ayn-odin2.conf b/config/boards/ayn-odin2.conf index bbd2f3c2d..9cbef2db7 100644 --- a/config/boards/ayn-odin2.conf +++ b/config/boards/ayn-odin2.conf @@ -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}" } diff --git a/config/boards/bananapim2pro.conf b/config/boards/bananapim2pro.conf index eed7f13c9..393beb517 100644 --- a/config/boards/bananapim2pro.conf +++ b/config/boards/bananapim2pro.conf @@ -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() { diff --git a/config/boards/beaglev.csc b/config/boards/beaglev.csc index 4d002427d..cc1f2b348 100644 --- a/config/boards/beaglev.csc +++ b/config/boards/beaglev.csc @@ -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 diff --git a/config/boards/clockworkpi-a06.csc b/config/boards/clockworkpi-a06.csc index bec59bac7..b5dce7708 100644 --- a/config/boards/clockworkpi-a06.csc +++ b/config/boards/clockworkpi-a06.csc @@ -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 diff --git a/config/boards/coolpi-cm5.csc b/config/boards/coolpi-cm5.csc index ae6c70bb4..6a4e4f045 100644 --- a/config/boards/coolpi-cm5.csc +++ b/config/boards/coolpi-cm5.csc @@ -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 } } - diff --git a/config/boards/firefly-itx-3588j.csc b/config/boards/firefly-itx-3588j.csc index db186aff3..ababe6afd 100644 --- a/config/boards/firefly-itx-3588j.csc +++ b/config/boards/firefly-itx-3588j.csc @@ -36,5 +36,3 @@ function post_family_tweaks__firefly_itx_3588j_enable_services() { chroot_sdcard systemctl enable rk3588-bluetooth.service return 0 } - - diff --git a/config/boards/fxblox-rk1.csc b/config/boards/fxblox-rk1.csc index 5d59c2bf6..25ae7ac75 100644 --- a/config/boards/fxblox-rk1.csc +++ b/config/boards/fxblox-rk1.csc @@ -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" diff --git a/config/boards/indiedroid-nova.csc b/config/boards/indiedroid-nova.csc index 9b6030a12..0ae33502b 100644 --- a/config/boards/indiedroid-nova.csc +++ b/config/boards/indiedroid-nova.csc @@ -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 diff --git a/config/boards/khadas-vim1s.conf b/config/boards/khadas-vim1s.conf index a0773feaf..1a47470c3 100644 --- a/config/boards/khadas-vim1s.conf +++ b/config/boards/khadas-vim1s.conf @@ -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) } diff --git a/config/boards/lepotato.conf b/config/boards/lepotato.conf index 80b34a179..c39f3d727 100644 --- a/config/boards/lepotato.conf +++ b/config/boards/lepotato.conf @@ -10,4 +10,4 @@ ASOUND_STATE="asound.state.lepotato" BOOT_LOGO="desktop" BOOTBRANCH_BOARD="tag:v2024.01" -BOOTPATCHDIR="v2024.01" \ No newline at end of file +BOOTPATCHDIR="v2024.01" diff --git a/config/boards/licheepi-4a.csc b/config/boards/licheepi-4a.csc index 2a823d706..aee8a80c0 100644 --- a/config/boards/licheepi-4a.csc +++ b/config/boards/licheepi-4a.csc @@ -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" } diff --git a/config/boards/lime-a33.csc b/config/boards/lime-a33.csc index 34e84fe35..dc825f35c 100644 --- a/config/boards/lime-a33.csc +++ b/config/boards/lime-a33.csc @@ -6,4 +6,3 @@ HAS_VIDEO_OUTPUT="no" BOOTCONFIG="A33-OLinuXino_defconfig" OVERLAY_PREFIX="sun8i-a33" KERNEL_TARGET="legacy,current,edge" - diff --git a/config/boards/longanpi-4b.csc b/config/boards/longanpi-4b.csc index c6b6c72fc..8560f24e6 100644 --- a/config/boards/longanpi-4b.csc +++ b/config/boards/longanpi-4b.csc @@ -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 } diff --git a/config/boards/nanopi-r2c.csc b/config/boards/nanopi-r2c.csc index a6521fa04..4ce2c65d9 100644 --- a/config/boards/nanopi-r2c.csc +++ b/config/boards/nanopi-r2c.csc @@ -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 -} \ No newline at end of file +} diff --git a/config/boards/nanopi-r2s.csc b/config/boards/nanopi-r2s.csc index ee24a2032..c22ff0ad1 100644 --- a/config/boards/nanopi-r2s.csc +++ b/config/boards/nanopi-r2s.csc @@ -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 -} \ No newline at end of file +} diff --git a/config/boards/nanopineo4.csc b/config/boards/nanopineo4.csc index 54b672f17..e28d7832f 100644 --- a/config/boards/nanopineo4.csc +++ b/config/boards/nanopineo4.csc @@ -6,4 +6,3 @@ BOOTCONFIG="nanopi-neo4-rk3399_defconfig" KERNEL_TARGET="current,edge" FULL_DESKTOP="yes" BOOT_LOGO="desktop" - diff --git a/config/boards/odroidc1.csc b/config/boards/odroidc1.csc index d7086e9fb..f37dde4ac 100644 --- a/config/boards/odroidc1.csc +++ b/config/boards/odroidc1.csc @@ -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 } diff --git a/config/boards/onecloud.conf b/config/boards/onecloud.conf index 4a5cd947a..21539992c 100644 --- a/config/boards/onecloud.conf +++ b/config/boards/onecloud.conf @@ -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 } diff --git a/config/boards/orangepi-r1plus-lts.csc b/config/boards/orangepi-r1plus-lts.csc index 40cadf92a..bc3d061f5 100644 --- a/config/boards/orangepi-r1plus-lts.csc +++ b/config/boards/orangepi-r1plus-lts.csc @@ -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 } - diff --git a/config/boards/orangepi-r1plus.csc b/config/boards/orangepi-r1plus.csc index d7fb4d167..0d4f6b92e 100644 --- a/config/boards/orangepi-r1plus.csc +++ b/config/boards/orangepi-r1plus.csc @@ -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 -} \ No newline at end of file +} diff --git a/config/boards/orangepi5-plus.conf b/config/boards/orangepi5-plus.conf index cb7114790..2b149ac36 100644 --- a/config/boards/orangepi5-plus.conf +++ b/config/boards/orangepi5-plus.conf @@ -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 diff --git a/config/boards/orangepi5.conf b/config/boards/orangepi5.conf index 89dfc026c..33a329ceb 100644 --- a/config/boards/orangepi5.conf +++ b/config/boards/orangepi5.conf @@ -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 diff --git a/config/boards/phytiumpi.conf b/config/boards/phytiumpi.conf index 345bdd969..24894917d 100644 --- a/config/boards/phytiumpi.conf +++ b/config/boards/phytiumpi.conf @@ -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" } diff --git a/config/boards/pinebook-pro.conf b/config/boards/pinebook-pro.conf index 1f0fdfad9..0862be323 100644 --- a/config/boards/pinebook-pro.conf +++ b/config/boards/pinebook-pro.conf @@ -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/ diff --git a/config/boards/rk3318-box.tvb b/config/boards/rk3318-box.tvb index f4462b941..ececada8e 100644 --- a/config/boards/rk3318-box.tvb +++ b/config/boards/rk3318-box.tvb @@ -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 diff --git a/config/boards/rock-5c.conf b/config/boards/rock-5c.conf index a5d34f392..c33a2523e 100644 --- a/config/boards/rock-5c.conf +++ b/config/boards/rock-5c.conf @@ -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() { diff --git a/config/boards/rockpi-4b.csc b/config/boards/rockpi-4b.csc index a87983365..c72fe8054 100644 --- a/config/boards/rockpi-4b.csc +++ b/config/boards/rockpi-4b.csc @@ -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 diff --git a/config/boards/rockpi-4c.csc b/config/boards/rockpi-4c.csc index bc5f5c262..9e1fcd56a 100644 --- a/config/boards/rockpi-4c.csc +++ b/config/boards/rockpi-4c.csc @@ -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 diff --git a/config/boards/rockpi-s.conf b/config/boards/rockpi-s.conf index 9e6d8b59f..a0b5e6646 100644 --- a/config/boards/rockpi-s.conf +++ b/config/boards/rockpi-s.conf @@ -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 } - } - diff --git a/config/boards/station-m1.csc b/config/boards/station-m1.csc index e4647140a..3f16db252 100644 --- a/config/boards/station-m1.csc +++ b/config/boards/station-m1.csc @@ -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/ diff --git a/config/boards/station-m2.csc b/config/boards/station-m2.csc index 6b68f380e..4903eef81 100644 --- a/config/boards/station-m2.csc +++ b/config/boards/station-m2.csc @@ -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/ diff --git a/config/boards/station-m3.csc b/config/boards/station-m3.csc index 0a8cdc04a..7d099a6ad 100644 --- a/config/boards/station-m3.csc +++ b/config/boards/station-m3.csc @@ -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/ diff --git a/config/boards/station-p1.csc b/config/boards/station-p1.csc index 38c1c67bf..d48f3c9dc 100644 --- a/config/boards/station-p1.csc +++ b/config/boards/station-p1.csc @@ -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/ diff --git a/config/boards/station-p2.csc b/config/boards/station-p2.csc index a167cc166..fe60e29e6 100644 --- a/config/boards/station-p2.csc +++ b/config/boards/station-p2.csc @@ -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/ diff --git a/config/boards/sweet-potato.conf b/config/boards/sweet-potato.conf index f10b54ee9..179f3f061 100644 --- a/config/boards/sweet-potato.conf +++ b/config/boards/sweet-potato.conf @@ -12,4 +12,4 @@ BOOT_LOGO="desktop" function post_family_config__declare_u-boot-version() { BOOTBRANCH='tag:v2024.04' BOOTPATCHDIR='v2024.04' - } +} diff --git a/config/boards/tinkerboard.conf b/config/boards/tinkerboard.conf index 89de73639..0c58653b3 100644 --- a/config/boards/tinkerboard.conf +++ b/config/boards/tinkerboard.conf @@ -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') } diff --git a/config/boards/wdk2023.csc b/config/boards/wdk2023.csc index b5f09b34e..c694985f7 100644 --- a/config/boards/wdk2023.csc +++ b/config/boards/wdk2023.csc @@ -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 } - diff --git a/config/boards/xiaomi-elish.conf b/config/boards/xiaomi-elish.conf index ab8e1e269..7877eb20e 100644 --- a/config/boards/xiaomi-elish.conf +++ b/config/boards/xiaomi-elish.conf @@ -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 diff --git a/config/boards/z28pro.tvb b/config/boards/z28pro.tvb index 331624436..3d061ce22 100644 --- a/config/boards/z28pro.tvb +++ b/config/boards/z28pro.tvb @@ -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 diff --git a/config/sources/families/spacemit.conf b/config/sources/families/spacemit.conf index b722b4b35..82eb88f4e 100644 --- a/config/sources/families/spacemit.conf +++ b/config/sources/families/spacemit.conf @@ -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) diff --git a/config/sources/families/sun50iw9.conf b/config/sources/families/sun50iw9.conf index c4fa0e27b..7cbca66d6 100644 --- a/config/sources/families/sun50iw9.conf +++ b/config/sources/families/sun50iw9.conf @@ -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 } - diff --git a/config/sources/mainline-kernel.conf.sh b/config/sources/mainline-kernel.conf.sh index 2970323f5..be688fbcf 100644 --- a/config/sources/mainline-kernel.conf.sh +++ b/config/sources/mainline-kernel.conf.sh @@ -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" diff --git a/config/sources/vendors/mekotronics/mekotronics-rk3588.conf.sh b/config/sources/vendors/mekotronics/mekotronics-rk3588.conf.sh index e56a74697..fa414f9b5 100644 --- a/config/sources/vendors/mekotronics/mekotronics-rk3588.conf.sh +++ b/config/sources/vendors/mekotronics/mekotronics-rk3588.conf.sh @@ -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" diff --git a/config/sources/vendors/microsoft/wsl2.hooks.sh b/config/sources/vendors/microsoft/wsl2.hooks.sh index 1dd337bba..821cc4c31 100644 --- a/config/sources/vendors/microsoft/wsl2.hooks.sh +++ b/config/sources/vendors/microsoft/wsl2.hooks.sh @@ -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) diff --git a/lib/functions/logging/trap-logging.sh b/lib/functions/logging/trap-logging.sh index 830aad5a8..861be9e0f 100644 --- a/lib/functions/logging/trap-logging.sh +++ b/lib/functions/logging/trap-logging.sh @@ -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. diff --git a/lib/tools/shellfmt.sh b/lib/tools/shellfmt.sh index a595464e7..04678ec16 100755 --- a/lib/tools/shellfmt.sh +++ b/lib/tools/shellfmt.sh @@ -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!"