Skip to content

Commit

Permalink
v24.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xaqbr committed Sep 19, 2024
1 parent e16d11f commit 421efbc
Show file tree
Hide file tree
Showing 1,341 changed files with 398,682 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/merge-announce.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: push

on:
push:
branches: [ main ]

jobs:
announcepush:
runs-on: ubuntu-latest
steps:
- name: Get repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Send push to Discord
run: |
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST --data \
"{\"username\": \"Github\", \"avatar_url\": \"${{ secrets.AVATARURL }}\", \"content\": \"\
:white_check_mark: **Merged** into [$GITHUB_REPOSITORY](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY>) by [$GITHUB_ACTOR](<$GITHUB_SERVER_URL/$GITHUB_ACTOR>) - \
[Link](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$GITHUB_SHA>): *$(git show -s --format=%s)*\"}" ${{ secrets.WEBHOOKURL }}
25 changes: 25 additions & 0 deletions .github/workflows/pr-announce.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Announce PR on Discord for review"
run-name: 'Announce PR #${{ github.event.pull_request.number }} on Discord for review'

on:
pull_request:
types: [ labeled ]

jobs:
Announce:
permissions:
pull-requests: read

runs-on: ubuntu-latest
if: ${{ github.repository == 'armbian/build' && github.event.label.id == '6210849975' }}
steps:
- name: Get repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Discord webhook
run: |
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST --data \
"{\"username\": \"Github\", \"avatar_url\": \"${{ secrets.AVATARURL }}\", \"content\": \"\
:arrow_heading_up: **Pull request** to [$GITHUB_REPOSITORY](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY>) by [$GITHUB_ACTOR](<$GITHUB_SERVER_URL/$GITHUB_ACTOR>) - **Please review!** \
:point_right: [Link](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/${{github.event.pull_request.number}}>): *$(git show -s --format=%s)*\"}" ${{ secrets.WEBHOOKURL }}
21 changes: 21 additions & 0 deletions config/boards/armsom-aim7-io.csc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Rockchip RK3588 SoC octa core 8-32GB SoC 2.5GBe eMMC USB3 NvME
BOARD_NAME="ArmSoM AIM7 IO"
BOARDFAMILY="rockchip-rk3588"
BOARD_MAINTAINER=""
BOOTCONFIG="armsom-aim7-io-rk3588_defconfig"
KERNEL_TARGET="vendor"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3588-armsom-aim7-io.dtb"
BOOT_SCENARIO="spl-blobs"
IMAGE_PARTITION_TABLE="gpt"

function post_family_tweaks__armsom-aim7-io_naming_audios() {
display_alert "$BOARD" "Renaming audios" "info"

mkdir -p $SDCARD/etc/udev/rules.d/
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi0-sound", ENV{SOUND_DESCRIPTION}="HDMI0 Audio"' > $SDCARD/etc/udev/rules.d/90-naming-audios.rules
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-dp0-sound", ENV{SOUND_DESCRIPTION}="DP0 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules

return 0
}
155 changes: 155 additions & 0 deletions config/boards/ayn-odin2.eos
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Generate kernel and rootfs image for Qcom ABL Custom booting
declare -g BOARD_NAME="Ayn Odin2"
declare -g BOARD_MAINTAINER="FantasyGmm"
declare -g BOARDFAMILY="qcom-abl"
declare -g KERNEL_TARGET="sm8550"
declare -g KERNELPATCHDIR="sm8550-6.7"
declare -g EXTRAWIFI="no"
declare -g BOOTCONFIG="none"
declare -g BOOTFS_TYPE="fat"
declare -g BOOTSIZE="256"
declare -g BOOTIMG_CMDLINE_EXTRA="clk_ignore_unused pd_ignore_unused panic=30 audit=0 allow_mismatched_32bit_el0 rw mem_sleep_default=s2idle"
declare -g IMAGE_PARTITION_TABLE="gpt"

# Use the full firmware, complete linux-firmware plus Armbian's
declare -g BOARD_FIRMWARE_INSTALL="-full"

declare -g DESKTOP_AUTOLOGIN="yes"

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"
declare -g LINUXCONFIG="linux-${ARCH}-${BRANCH}" # for this board: linux-arm64-sm8550
display_alert "Setting up kernel ${KERNEL_MAJOR_MINOR} for" "${BOARD}" "info"
}

function ayn-odin2_is_userspace_supported() {
[[ "${RELEASE}" == "trixie" || "${RELEASE}" == "sid" || "${RELEASE}" == "mantic" || "${RELEASE}" == "noble" ]] && return 0
return 1
}

function post_family_tweaks__enable_services() {
if ! ayn-odin2_is_userspace_supported; then
if [[ "${RELEASE}" != "" ]]; then
display_alert "Missing userspace for ${BOARD}" "${RELEASE} does not have the userspace necessary to support the ${BOARD}" "warn"
fi
return 0
fi

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

# We need unudhcpd from armbian repo, so enable it
mv "${SDCARD}"/etc/apt/sources.list.d/armbian.list.disabled "${SDCARD}"/etc/apt/sources.list.d/armbian.list

# Add zink env
echo '__GLX_VENDOR_LIBRARY_NAME=mesa' | tee -a "${SDCARD}"/etc/environment
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
# No driver support for suspend
chroot_sdcard systemctl mask suspend.target
# Add Bt Mac Fixed service
install -Dm655 $SRC/packages/bsp/ayn-odin2/bt-fixed-mac.sh "${SDCARD}"/usr/local/bin/
install -Dm644 $SRC/packages/bsp/ayn-odin2/bt-fixed-mac.service "${SDCARD}"/usr/lib/systemd/system/
chroot_sdcard systemctl enable bt-fixed-mac

do_with_retries 3 chroot_sdcard_apt_get_update
display_alert "$BOARD" "Installing board tweaks" "info"
do_with_retries 3 chroot_sdcard_apt_get_install alsa-ucm-conf unudhcpd mkbootimg git

# Disable armbian repo back
mv "${SDCARD}"/etc/apt/sources.list.d/armbian.list "${SDCARD}"/etc/apt/sources.list.d/armbian.list.disabled
do_with_retries 3 chroot_sdcard_apt_get_update

do_with_retries 3 chroot_sdcard_apt_get_install mesa-vulkan-drivers qbootctl qrtr-tools protection-domain-mapper tqftpserv

# Kernel postinst script to update abl boot partition
install -Dm655 $SRC/packages/bsp/ayn-odin2/zz-update-abl-kernel "${SDCARD}"/etc/kernel/postinst.d/

cp $SRC/packages/bsp/ayn-odin2/LinuxLoader.cfg "${SDCARD}"/boot/

return 0
}

function post_family_tweaks__preset_configs() {
display_alert "$BOARD" "preset configs for rootfs" "info"
# Set PRESET_NET_CHANGE_DEFAULTS to 1 to apply any network related settings below
echo "PRESET_NET_CHANGE_DEFAULTS=1" > "${SDCARD}"/root/.not_logged_in_yet

# Enable WiFi or Ethernet.
# NB: If both are enabled, WiFi will take priority and Ethernet will be disabled.
echo "PRESET_NET_ETHERNET_ENABLED=0" >> "${SDCARD}"/root/.not_logged_in_yet
echo "PRESET_NET_WIFI_ENABLED=1" >> "${SDCARD}"/root/.not_logged_in_yet

# Preset user default shell, you can choose bash or zsh
echo "PRESET_USER_SHELL=zsh" >> "${SDCARD}"/root/.not_logged_in_yet

# Set PRESET_CONNECT_WIRELESS=y if you want to connect wifi manually at first login
echo "PRESET_CONNECT_WIRELESS=n" >> "${SDCARD}"/root/.not_logged_in_yet

# Set SET_LANG_BASED_ON_LOCATION=n if you want to choose "Set user language based on your location?" with "n" at first login
echo "SET_LANG_BASED_ON_LOCATION=y" >> "${SDCARD}"/root/.not_logged_in_yet

# Preset default locale
echo "PRESET_LOCALE=en_US.UTF-8" >> "${SDCARD}"/root/.not_logged_in_yet

# Preset timezone
echo "PRESET_TIMEZONE=Etc/UTC" >> "${SDCARD}"/root/.not_logged_in_yet

# Preset root password
echo "PRESET_ROOT_PASSWORD=admin" >> "${SDCARD}"/root/.not_logged_in_yet

# Preset username
echo "PRESET_USER_NAME=odin" >> "${SDCARD}"/root/.not_logged_in_yet

# Preset user password
echo "PRESET_USER_PASSWORD=admin" >> "${SDCARD}"/root/.not_logged_in_yet

# Preset user default realname
echo "PRESET_DEFAULT_REALNAME=Odin" >> "${SDCARD}"/root/.not_logged_in_yet
}

function post_family_tweaks_bsp__firmware_in_initrd() {
random_mac=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
declare -g BOOTIMG_CMDLINE_EXTRA="${BOOTIMG_CMDLINE_EXTRA} bt_mac=${random_mac}"
display_alert "Generate a random Bluetooth MAC address, Mac:${random_mac}" "info"
display_alert "Adding to bsp-cli" "${BOARD}: firmware in initrd" "info"
declare file_added_to_bsp_destination # Will be filled in by add_file_from_stdin_to_bsp_destination
# Using odin2's firmware for now
add_file_from_stdin_to_bsp_destination "/etc/initramfs-tools/hooks/ayn-odin2-firmware" <<- 'FIRMWARE_HOOK'
#!/bin/bash
[[ "$1" == "prereqs" ]] && exit 0
. /usr/share/initramfs-tools/hook-functions
for f in /lib/firmware/qcom/sm8550/ayn/odin2/* ; do
add_firmware "${f#/lib/firmware/}"
done
add_firmware "qcom/a740_sqe.fw" # Extra one for dpu
add_firmware "qcom/gmu_gen70200.bin" # Extra one for gpu
# Extra one for wifi
for f in /lib/firmware/ath12k/WCN7850/hw2.0/* ; do
add_firmware "${f#/lib/firmware/}"
done
# Extra one for bt
for f in /lib/firmware/qca/* ; do
add_firmware "${f#/lib/firmware/}"
done
FIRMWARE_HOOK
run_host_command_logged chmod -v +x "${file_added_to_bsp_destination}"
}

function pre_umount_final_image__update_ABL_settings() {
if [ -z "$BOOTFS_TYPE" ]; then
return 0
fi
display_alert "Update ABL settings for " "${BOARD}" "info"
uuid_line=$(head -n 1 "${SDCARD}"/etc/fstab)
rootfs_image_uuid=$(echo "${uuid_line}" | awk '{print $1}' | awk -F '=' '{print $2}')
initrd_name=$(find "${SDCARD}/boot/" -type f -name "config-*" | sed 's/.*config-//')
sed -i "s/UUID_PLACEHOLDER/${rootfs_image_uuid}/g" "${MOUNT}"/boot/LinuxLoader.cfg
sed -i "s/INITRD_PLACEHOLDER/${initrd_name}/g" "${MOUNT}"/boot/LinuxLoader.cfg
}
15 changes: 15 additions & 0 deletions config/boards/bananapi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Allwinner A20 dual core 1Gb RAM SoC 1xSATA GBE
BOARD_NAME="Banana Pi"
BOARDFAMILY="sun7i"
BOARD_MAINTAINER="janprunk"
BOOTCONFIG="Bananapi_defconfig"
KERNEL_TARGET="legacy,current,edge"
KERNEL_TEST_TARGET="current"

function post_config_uboot_target__extra_configs_for_bananapi() {
display_alert "$BOARD" "set dram clock" "info"
run_host_command_logged scripts/config --set-val CONFIG_DRAM_CLK "384"

display_alert "$BOARD" "disable de2 to improve edid detection" "info"
run_host_command_logged scripts/config --disable CONFIG_VIDEO_DE2
}
19 changes: 19 additions & 0 deletions config/boards/gateway-gz80x.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Amlogic A113X quad core 1Gb RAM SoC, eMMC 8Gb
BOARD_NAME="Gateway GZ80x"
BOARDFAMILY="meson-axg"
BOARD_MAINTAINER="pyavitz"
BOOTCONFIG="amper_gateway_am-gz80x_defconfig"
KERNEL_TARGET="current,edge"
KERNEL_TEST_TARGET="current"
BOOTBRANCH_BOARD="tag:v2024.04"
BOOTPATCHDIR="v2024.04"
BOOT_FDT_FILE="amlogic/meson-axg-amper-gateway-am-gz80x.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyAML0,115200n8 clk_ignore_unused loglevel=7"
HAS_VIDEO_OUTPUT="no"

function post_family_tweaks_bsp__gateway_gz80x_udev() {
mkdir -p "${destination}"/etc/udev/rules.d
display_alert "$BOARD" "Install zwave udev rule" "info"
echo 'KERNEL=="ttyAML2", NAME="tts/%n", SYMLINK+="zwave", GROUP="dialout", MODE="0660"' > "${destination}"/etc/udev/rules.d/10-zwave.rules
}
107 changes: 107 additions & 0 deletions config/boards/nanopct6.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Rockchip RK3588S octa core 8GB RAM SoC eMMC USB3 USB2 1x GbE 2x 2.5GbE
BOARD_NAME="NanoPC T6"
BOARDFAMILY="rockchip-rk3588"
BOARD_MAINTAINER="Tonymac32"
BOOTCONFIG="nanopc_t6_defconfig" # vendor name, not standard, see hook below, set BOOT_SOC below to compensate
BOOT_SOC="rk3588"
KERNEL_TARGET="edge,current,vendor"
KERNEL_TEST_TARGET="vendor,current"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3588-nanopc-t6.dtb"
BOOT_SCENARIO="spl-blobs"
BOOT_SUPPORT_SPI="yes"
BOOT_SPI_RKSPI_LOADER="yes"
IMAGE_PARTITION_TABLE="gpt"
declare -g UEFI_EDK2_BOARD_ID="nanopc-t6" # This _only_ used for uefi-edk2-rk3588 extension

function post_family_tweaks__nanopct6_naming_audios() {
display_alert "$BOARD" "Renaming nanopct6 audio" "info"

mkdir -p $SDCARD/etc/udev/rules.d/
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi0-sound", ENV{SOUND_DESCRIPTION}="HDMI0 Audio"' > $SDCARD/etc/udev/rules.d/90-naming-audios.rules

return 0
}

# Mainline u-boot or Kwiboo's tree
function post_family_config_branch_edge__nanopct6_use_mainline_uboot() {
display_alert "$BOARD" "mainline (next branch) u-boot overrides for $BOARD / $BRANCH" "info"

declare -g BOOTCONFIG="nanopc-t6-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/Kwiboo/u-boot-rockchip.git" # We ❤️ Kwiboo's tree
declare -g BOOTBRANCH="branch:rk3xxx-2024.07" # commit:xx as of 2024-06-04
declare -g BOOTPATCHDIR="v2024.04/board_${BOARD}" # empty; defconfig changes are done in hook below
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

# 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 status=none
}

function write_uboot_platform_mtd() {
flashcp -v -p "$1/u-boot-rockchip-spi.bin" /dev/mtd0
}
}

function post_config_uboot_target__extra_configs_for_nanopct6_mainline_environment_in_spi() {
[[ "${BRANCH}" != "edge" ]] && return 0

display_alert "$BOARD" "u-boot configs for ${BOOTBRANCH} u-boot config BRANCH=${BRANCH}" "info"
run_host_command_logged scripts/config --set-val CONFIG_ENV_IS_NOWHERE "n"
run_host_command_logged scripts/config --set-val CONFIG_ENV_IS_IN_SPI_FLASH "y"
run_host_command_logged scripts/config --set-val CONFIG_ENV_SECT_SIZE_AUTO "y"
run_host_command_logged scripts/config --set-val CONFIG_ENV_OVERWRITE "y"
run_host_command_logged scripts/config --set-val CONFIG_ENV_SIZE "0x20000"
run_host_command_logged scripts/config --set-val CONFIG_ENV_OFFSET "0xc00000"

display_alert "u-boot for ${BOARD}" "u-boot: enable preboot & flash user LED in preboot" "info"
run_host_command_logged scripts/config --enable CONFIG_USE_PREBOOT
run_host_command_logged scripts/config --set-str CONFIG_PREBOOT "'led user-led on; sleep 0.1; led user-led off'" # double quotes required due to run_host_command_logged's quirks

display_alert "u-boot for ${BOARD}" "u-boot: enable EFI debugging command" "info"
run_host_command_logged scripts/config --enable CMD_EFIDEBUG
run_host_command_logged scripts/config --enable CMD_NVEDIT_EFI

display_alert "u-boot for ${BOARD}" "u-boot: enable more compression support" "info"
run_host_command_logged scripts/config --enable CONFIG_LZO
run_host_command_logged scripts/config --enable CONFIG_BZIP2
run_host_command_logged scripts/config --enable CONFIG_ZSTD

display_alert "u-boot for ${BOARD}" "u-boot: enable gpio LED support" "info"
run_host_command_logged scripts/config --enable CONFIG_LED
run_host_command_logged scripts/config --enable CONFIG_LED_GPIO

display_alert "u-boot for ${BOARD}" "u-boot: enable networking cmds" "info"
run_host_command_logged scripts/config --enable CONFIG_CMD_NFS
run_host_command_logged scripts/config --enable CONFIG_CMD_WGET
run_host_command_logged scripts/config --enable CONFIG_CMD_DNS
run_host_command_logged scripts/config --enable CONFIG_PROT_TCP
run_host_command_logged scripts/config --enable CONFIG_PROT_TCP_SACK

# UMS, RockUSB, gadget stuff
declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ROCKUSB" "CONFIG_USB_FUNCTION_ACM" "CONFIG_CMD_ROCKUSB" "CONFIG_CMD_USB_MASS_STORAGE")
for config in "${enable_configs[@]}"; do
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable ${config}" "info"
run_host_command_logged scripts/config --enable "${config}"
done
# Auto-enabled by the above, force off...
run_host_command_logged scripts/config --disable USB_FUNCTION_FASTBOOT

}

# Include fw_setenv, configured to point to the correct spot on the SPI Flash
PACKAGE_LIST_BOARD="libubootenv-tool" # libubootenv-tool provides fw_printenv and fw_setenv, for talking to U-Boot environment
function post_family_tweaks__config_nanopct6_fwenv() {
[[ "${BRANCH}" != "edge" ]] && return 0
display_alert "Configuring fw_printenv and fw_setenv" "for ${BOARD} and u-boot ${BOOTBRANCH}" "info"
# Addresses below come from CONFIG_ENV_OFFSET and CONFIG_ENV_SIZE in defconfig
cat <<- 'FW_ENV_CONFIG' > "${SDCARD}"/etc/fw_env.config
# MTD/SPI u-boot env for the ${BOARD_NAME}
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc00000 0x20000
FW_ENV_CONFIG
}
Loading

0 comments on commit 421efbc

Please sign in to comment.