Skip to content

Commit

Permalink
Merge remote-tracking branch 'armbian/main' into sun4i-dts-fix-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryzer58 committed Nov 30, 2024
2 parents b196271 + c90a0f7 commit 357ee4e
Show file tree
Hide file tree
Showing 217 changed files with 17,386 additions and 11,592 deletions.
2 changes: 1 addition & 1 deletion config/boards/armsom-cm5-io.csc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IMAGE_PARTITION_TABLE="gpt"
BOARD_MAINTAINER=""

function post_family_config_branch_vendor__armsom-cm5-io_use_vendor_uboot() {
display_alert "$BOARD" "vendor u-boot overrides for $BOARD / $BRANCH" "info"
display_alert "$BOARD" "vendor u-boot overrides for $BOARD / $BRANCH" "info"

declare -g BOOTSOURCE="https://github.com/ArmSoM/u-boot.git"
declare -g BOOTBRANCH="tag:rk3576-6.1-rk3.1"
Expand Down
2 changes: 1 addition & 1 deletion config/boards/armsom-cm5-rpi-cm4-io.csc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IMAGE_PARTITION_TABLE="gpt"
BOARD_MAINTAINER=""

function post_family_config_branch_vendor__armsom-cm5-rpi-cm4-io_use_vendor_uboot() {
display_alert "$BOARD" "vendor u-boot overrides for $BOARD / $BRANCH" "info"
display_alert "$BOARD" "vendor u-boot overrides for $BOARD / $BRANCH" "info"

declare -g BOOTSOURCE="https://github.com/ArmSoM/u-boot.git"
declare -g BOOTBRANCH="tag:rk3576-6.1-rk3.1"
Expand Down
2 changes: 1 addition & 1 deletion config/boards/armsom-sige5.csc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IMAGE_PARTITION_TABLE="gpt"
BOARD_MAINTAINER=""

function post_family_config_branch_vendor__armsom-sige7_use_vendor_uboot() {
display_alert "$BOARD" "vendor u-boot overrides for $BOARD / $BRANCH" "info"
display_alert "$BOARD" "vendor u-boot overrides for $BOARD / $BRANCH" "info"

declare -g BOOTSOURCE="https://github.com/ArmSoM/u-boot.git"
declare -g BOOTBRANCH="tag:rk3576-6.1-rk3.1"
Expand Down
2 changes: 1 addition & 1 deletion config/boards/bananapif3.csc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PACKAGE_LIST_BOARD="rfkill bluetooth bluez bluez-tools"

function post_config_uboot_target__extra_configs_for_bananapi_f3() {
display_alert "u-boot for ${BOARD}" "u-boot: enabling extra configs" "info"

run_host_command_logged scripts/config --enable CONFIG_SD_BOOT
run_host_command_logged scripts/config --enable CONFIG_EXT4_WRITE
run_host_command_logged scripts/config --enable CONFIG_FS_BTRFS
Expand Down
2 changes: 1 addition & 1 deletion config/boards/cherryba-m1.csc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Allwinner H618 quad core 1GB 2GB 4GB RAM SoC WiFi USB-C emmc
# Allwinner H618 quad core 1GB 2GB 4GB RAM SoC WiFi USB-C emmc
BOARD_NAME="CherryBa M1"
BOARDFAMILY="sun50iw9"
BOOTCONFIG="cherryba-m1_defconfig"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion config/boards/oneplus-kebab.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function post_family_tweaks__oneplus-kebab_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
Expand Down
2 changes: 1 addition & 1 deletion config/boards/orangepi3b.csc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function post_family_tweaks__orangepi3b_naming_audios() {
mkdir -p $SDCARD/etc/udev/rules.d/
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi-sound", ENV{SOUND_DESCRIPTION}="HDMI Audio"' > $SDCARD/etc/udev/rules.d/90-naming-audios.rules
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-rk809-sound", ENV{SOUND_DESCRIPTION}="RK809 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules # vendor dts
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-sound", ENV{SOUND_DESCRIPTION}="RK809 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules # mainline dts
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-sound", ENV{SOUND_DESCRIPTION}="RK809 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules # mainline dts

return 0
}
6 changes: 3 additions & 3 deletions config/boards/orangepi5-plus.conf
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ function post_family_config_branch_current__orangepi5plus_use_mainline_uboot() {
function post_config_uboot_target__extra_configs_for_rock5b_mainline_environment_in_spi() {
[[ "${BRANCH}" != "edge" && "${BRANCH}" != "current" ]] && return 0

display_alert "$BOARD" "u-boot configs for ${BOOTBRANCH} u-boot config BRANCH=${BRANCH}" "info"
display_alert "$BOARD" "u-boot configs for ${BOOTBRANCH} u-boot config BRANCH=${BRANCH}" "info"
run_host_command_logged scripts/config --set-val CONFIG_BOARD_RNG_SEED "y"
run_host_command_logged scripts/config --set-val ARMV8_CRYPTO "n" #broken as per 2024.10-rc3
run_host_command_logged scripts/config --set-val ARMV8_CE_SHA1 "n" #broken as per 2024.10-rc3
run_host_command_logged scripts/config --set-val ARMV8_CRYPTO "n" #broken as per 2024.10-rc3
run_host_command_logged scripts/config --set-val ARMV8_CE_SHA1 "n" #broken as per 2024.10-rc3
run_host_command_logged scripts/config --set-val ARMV8_CE_SHA256 "n" #broken as per 2024.10-rc3
}
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion config/boards/retro-lite-cm5.csc
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ function post_family_tweaks__retrolitecm5_naming_audios() {

return 0
}

123 changes: 123 additions & 0 deletions config/boards/retroidpocket-rp5.csc
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Retroid Pocket RP5 Configuration
declare -g BOARD_NAME="Retroid Pocket RP5"
declare -g BOARD_MAINTAINER="tjstyle"
declare -g BOARDFAMILY="sm8250"
declare -g KERNEL_TARGET="current"
declare -g EXTRAWIFI="no"
declare -g MODULES="panel_ddic_ch13726a"
declare -g BOOTCONFIG="none"

declare -g UEFI_GRUB_TERMINAL="gfxterm" # Use graphics in grub, for the Armbian wallpaper.
declare -g GRUB_CMDLINE_LINUX_DEFAULT="clk_ignore_unused pd_ignore_unused arm64.nopauth efi=noruntime fbcon=rotate:3 console=ttyMSM0,115200n8"
declare -g BOOT_FDT_FILE="qcom/sm8250-retroidpocket-rp5.dtb"

declare -g SERIALCON="${SERIALCON:-tty1}"

enable_extension "grub"
enable_extension "grub-with-dtb" # important, puts the whole DTB handling in place.

# declare -g BOOT_LOGO=desktop

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

function retroidpocket-rp5_is_userspace_supported() {
[[ "${RELEASE}" == "bookworm" ]] && return 0
[[ "${RELEASE}" == "jammy" ]] && return 0
[[ "${RELEASE}" == "noble" ]] && return 0
[[ "${RELEASE}" == "trixie" ]] && return 0
return 1
}

function pre_customize_image__retroidpocket-rp5_alsa_ucm_conf() {
if ! retroidpocket-rp5_is_userspace_supported; then
return 0
fi

display_alert "Add alsa-ucm-conf for ${BOARD}" "${RELEASE}" "warn"
(
cd "${SDCARD}/usr/share/alsa" || exit 6
curl -L "https://github.com/RetroidPocket/alsa-ucm-conf/archive/refs/heads/rp/v1.2.13.tar.gz" | tar xvzf - --strip-components=1
)
}

function post_family_tweaks_bsp__retroidpocket-rp5_add_services() {
if ! retroidpocket-rp5_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

display_alert "$BOARD" "Add services" "info"

# Bluetooth MAC addr setup service
mkdir -p $destination/usr/local/bin/
mkdir -p $destination/usr/lib/systemd/system/
install -Dm655 $SRC/packages/bsp/generate-bt-mac-addr/bt-fixed-mac.sh $destination/usr/local/bin/
install -Dm644 $SRC/packages/bsp/generate-bt-mac-addr/bt-fixed-mac.service $destination/usr/lib/systemd/system/

# Haptic and Gamepad rules
install -Dm644 $SRC/packages/bsp/retroidpocket/90-feedbackd-spmi-haptics.rules $destination/etc/udev/rules.d/90-feedbackd-spmi-haptics.rules
install -Dm644 $SRC/packages/bsp/retroidpocket/99-ignore-gamepad.rules $destination/etc/udev/rules.d/99-ignore-gamepad.rules
}

function post_family_tweaks__retroidpocket-rp5_enable_services() {
if ! retroidpocket-rp5_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

display_alert "$BOARD" "Enable services" "info"

chroot_sdcard systemctl enable bt-fixed-mac.service
return 0
}

function post_family_config__retroidpocket-rp5_extra_packages() {
if ! retroidpocket-rp5_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

display_alert "Setting up extra packages for ${BOARD}" "${RELEASE}" "info"
add_packages_to_image "bluez" "bluetooth" # for bluetooth stuff
add_packages_to_image "mtools" # for access to the EFI partition
add_packages_to_image "zstd" # for zstd compression of initrd
}

function post_family_tweaks_bsp__retroidpocket-rp5_bsp_firmware_in_initrd() {
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
add_file_from_stdin_to_bsp_destination "/etc/initramfs-tools/hooks/retroidpocket-rp5-firmware" <<- 'FIRMWARE_HOOK'
#!/bin/bash
[[ "$1" == "prereqs" ]] && exit 0
. /usr/share/initramfs-tools/hook-functions
for f in /lib/firmware/qcom/sm8250/* ; do
add_firmware "${f#/lib/firmware/}"
done
add_firmware "qcom/a650_sqe.fw" # extra one for dpu
add_firmware "qcom/a650_gmu.bin" # extra one for gpu
FIRMWARE_HOOK
run_host_command_logged chmod -v +x "${file_added_to_bsp_destination}"
}
## Modules, required to boot, add them to initrd
function post_family_tweaks_bsp__retroidpocket-rp5_bsp_modules_in_initrd() {
display_alert "Adding to bsp-cli" "${BOARD}: modules in initrd" "info"
add_file_from_stdin_to_bsp_destination "/etc/initramfs-tools/modules" <<- 'EXTRA_MODULES'
panel-ddic-ch13726a
EXTRA_MODULES
}
# armbian-firstrun waits for systemd to be ready, but snapd.seeded might cause it to hang due to wrong clock.
# if the battery runs out, the clock is reset to 1970. This causes snapd.seeded to hang, and armbian-firstrun to hang.
function pre_customize_image__disable_snapd_seeded() {
[[ "${DISTRIBUTION}" != "Ubuntu" ]] && return 0 # only needed for Ubuntu
display_alert "Disabling snapd.seeded" "${BOARD}" "info"
chroot_sdcard systemctl disable snapd.seeded.service "||" true
}
123 changes: 123 additions & 0 deletions config/boards/retroidpocket-rpmini.csc
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Retroid Pocket RPMini Configuration
declare -g BOARD_NAME="Retroid Pocket RPMini"
declare -g BOARD_MAINTAINER="tjstyle"
declare -g BOARDFAMILY="sm8250"
declare -g KERNEL_TARGET="current"
declare -g EXTRAWIFI="no"
declare -g MODULES="panel_ddic_ch13726a"
declare -g BOOTCONFIG="none"

declare -g UEFI_GRUB_TERMINAL="gfxterm" # Use graphics in grub, for the Armbian wallpaper.
declare -g GRUB_CMDLINE_LINUX_DEFAULT="clk_ignore_unused pd_ignore_unused arm64.nopauth efi=noruntime fbcon=rotate:1 console=ttyMSM0,115200n8"
declare -g BOOT_FDT_FILE="qcom/sm8250-retroidpocket-rpmini.dtb"

declare -g SERIALCON="${SERIALCON:-tty1}"

enable_extension "grub"
enable_extension "grub-with-dtb" # important, puts the whole DTB handling in place.

# declare -g BOOT_LOGO=desktop

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

function retroidpocket-rpmini_is_userspace_supported() {
[[ "${RELEASE}" == "bookworm" ]] && return 0
[[ "${RELEASE}" == "jammy" ]] && return 0
[[ "${RELEASE}" == "noble" ]] && return 0
[[ "${RELEASE}" == "trixie" ]] && return 0
return 1
}

function pre_customize_image__retroidpocket-rpmini_alsa_ucm_conf() {
if ! retroidpocket-rpmini_is_userspace_supported; then
return 0
fi

display_alert "Add alsa-ucm-conf for ${BOARD}" "${RELEASE}" "warn"
(
cd "${SDCARD}/usr/share/alsa" || exit 6
curl -L "https://github.com/RetroidPocket/alsa-ucm-conf/archive/refs/heads/rp/v1.2.13.tar.gz" | tar xvzf - --strip-components=1
)
}

function post_family_tweaks_bsp__retroidpocket-rpmini_add_services() {
if ! retroidpocket-rpmini_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

display_alert "$BOARD" "Add services" "info"

# Bluetooth MAC addr setup service
mkdir -p $destination/usr/local/bin/
mkdir -p $destination/usr/lib/systemd/system/
install -Dm655 $SRC/packages/bsp/generate-bt-mac-addr/bt-fixed-mac.sh $destination/usr/local/bin/
install -Dm644 $SRC/packages/bsp/generate-bt-mac-addr/bt-fixed-mac.service $destination/usr/lib/systemd/system/

# Haptic and Gamepad rules
install -Dm644 $SRC/packages/bsp/retroidpocket/90-feedbackd-spmi-haptics.rules $destination/etc/udev/rules.d/90-feedbackd-spmi-haptics.rules
install -Dm644 $SRC/packages/bsp/retroidpocket/99-ignore-gamepad.rules $destination/etc/udev/rules.d/99-ignore-gamepad.rules
}

function post_family_tweaks__retroidpocket-rpmini_enable_services() {
if ! retroidpocket-rpmini_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

display_alert "$BOARD" "Enable services" "info"

chroot_sdcard systemctl enable bt-fixed-mac.service
return 0
}

function post_family_config__retroidpocket-rpmini_extra_packages() {
if ! retroidpocket-rpmini_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

display_alert "Setting up extra packages for ${BOARD}" "${RELEASE}" "info"
add_packages_to_image "bluez" "bluetooth" # for bluetooth stuff
add_packages_to_image "mtools" # for access to the EFI partition
add_packages_to_image "zstd" # for zstd compression of initrd
}

function post_family_tweaks_bsp__retroidpocket-rpmini_bsp_firmware_in_initrd() {
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
add_file_from_stdin_to_bsp_destination "/etc/initramfs-tools/hooks/retroidpocket-rpmini-firmware" <<- 'FIRMWARE_HOOK'
#!/bin/bash
[[ "$1" == "prereqs" ]] && exit 0
. /usr/share/initramfs-tools/hook-functions
for f in /lib/firmware/qcom/sm8250/* ; do
add_firmware "${f#/lib/firmware/}"
done
add_firmware "qcom/a650_sqe.fw" # extra one for dpu
add_firmware "qcom/a650_gmu.bin" # extra one for gpu
FIRMWARE_HOOK
run_host_command_logged chmod -v +x "${file_added_to_bsp_destination}"
}
## Modules, required to boot, add them to initrd
function post_family_tweaks_bsp__retroidpocket-rpmini_bsp_modules_in_initrd() {
display_alert "Adding to bsp-cli" "${BOARD}: modules in initrd" "info"
add_file_from_stdin_to_bsp_destination "/etc/initramfs-tools/modules" <<- 'EXTRA_MODULES'
panel-ddic-ch13726a
EXTRA_MODULES
}
# armbian-firstrun waits for systemd to be ready, but snapd.seeded might cause it to hang due to wrong clock.
# if the battery runs out, the clock is reset to 1970. This causes snapd.seeded to hang, and armbian-firstrun to hang.
function pre_customize_image__disable_snapd_seeded() {
[[ "${DISTRIBUTION}" != "Ubuntu" ]] && return 0 # only needed for Ubuntu
display_alert "Disabling snapd.seeded" "${BOARD}" "info"
chroot_sdcard systemctl disable snapd.seeded.service "||" true
}
2 changes: 1 addition & 1 deletion config/boards/rock-3a.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function post_family_config_branch_edge__rock-3a_use_mainline_uboot() {
display_alert "$BOARD" "Mainline U-Boot overrides for $BOARD - $BRANCH" "info"
unset BOOTFS_TYPE # fixes armbian-install and unneeded for modern uboot anyway
declare -g BOOTCONFIG="rock-3a-rk3568_defconfig"
declare -g BOOTDELAY=1
declare -g BOOTDELAY=1
declare -g BOOTSOURCE="https://github.com/u-boot/u-boot"
declare -g BOOTBRANCH="tag:v2024.10"
declare -g BOOTPATCHDIR="v2024.10"
Expand Down
12 changes: 6 additions & 6 deletions config/boards/rock-5b-plus.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ function post_family_config_branch_edge__rock-5b_use_mainline_uboot() {
# temporary override until DT in armbian/rockchip-linux is renamed
declare -g BOOT_FDT_FILE="rockchip/rk3588-rock-5b-plus.dtb"

declare -g BOOTCONFIG="rock5b-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 tree
declare -g BOOTBRANCH="tag:v2024.10" #
declare -g BOOTPATCHDIR="v2024.10" # empty; defconfig changes are done in hook below
declare -g BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory
declare -g BOOTCONFIG="rock5b-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 tree
declare -g BOOTBRANCH="tag:v2024.10" #
declare -g BOOTPATCHDIR="v2024.10" # 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

Expand Down
Loading

0 comments on commit 357ee4e

Please sign in to comment.