Skip to content

Commit

Permalink
Merge pull request #7 from armbian/main
Browse files Browse the repository at this point in the history
[pull] main from armbian:main
  • Loading branch information
inozemtsev-roman authored Feb 8, 2024
2 parents 84e9ab7 + de97ea5 commit cfd3dd8
Show file tree
Hide file tree
Showing 179 changed files with 60,652 additions and 43,649 deletions.
6 changes: 6 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,9 @@
- name: "Build"
color: "1d76db"
description: "Executing build train"
- name: "Needs Documentation"
color: "#4FD1EF"
description: "New feature needs documentation entry"
- name: "Improper usage"
color: "#CD456C"
description: "Provided input is not in the expected data format or structure"
2 changes: 1 addition & 1 deletion .github/workflows/build-board-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository: armbian/os
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository: armbian/os
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/forked-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
echo "::set-output name=event_details::${JSON}"
- name: Dispatch event on forked repostitory
if: steps.get_dispatch_secret.outputs.dispatch_secret
uses: peter-evans/repository-dispatch@v2
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ steps.get_dispatch_secret.outputs.dispatch_secret }}
repository: ${{ github.repository }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kernel-security-analysis-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
uses: tj-actions/changed-files@v42

- name: Checkout repository
uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/labels-from-yml.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Set PR and issues labels from yaml

on:
workflow_dispatch:
push:
branches:
- 'main'
Expand All @@ -12,6 +13,10 @@ on:

jobs:
labeler:
permissions:
contents: read # for actions/labeler to determine modified files
pull-requests: write # for actions/labeler to add labels to PRs
issues: write # for actions/labeler to add labels to issues
if: ${{ github.repository_owner == 'Armbian' }}
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-scripts-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
uses: tj-actions/changed-files@v42

- name: List all changed files
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: SARIF file
path: results.sarif
Expand Down
13 changes: 9 additions & 4 deletions config/boards/aml-s9xx-box.tvb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ BOOT_LOGO="desktop"
SRC_CMDLINE='rootflags=data=writeback console=ttyAML0,115200n8 console=tty0'


function post_family_tweaks__config_aml-s9xx-box_bsp() {
function post_family_tweaks_bsp__config_aml-s9xx-box_bsp() {

display_alert "$BOARD" "Installing bsp files" "info"

cp -r $SRC/packages/bsp/aml-s9xx-box/boot $SDCARD
install -m 755 $SRC/packages/bsp/aml-s9xx-box/root/install-aml.sh $SDCARD/root
install -m 644 $SRC/packages/bsp/aml-s9xx-box/root/fstab.template $SDCARD/root
cp -r "${SRC}"/packages/bsp/aml-s9xx-box/boot "${destination}"
install -D -m 744 "${SRC}"/packages/bsp/aml-s9xx-box/root/install-aml.sh "${destination}"/root/install-aml.sh
install -m 644 "${SRC}"/packages/bsp/aml-s9xx-box/root/fstab.template "${destination}"/root/fstab.template

display_alert "${BOARD}" "Removing armbian-install" "info"

rm "${destination}"/usr/sbin/armbian-install

}
4 changes: 2 additions & 2 deletions config/boards/bananapicm4io.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ FULL_DESKTOP="yes"
SERIALCON="ttyAML0"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="amlogic/meson-g12b-bananapi-cm4-cm4io.dtb"
BOOTBRANCH_BOARD="tag:v2023.07.02"
BOOTPATCHDIR="v2023.07.02"
BOOTBRANCH_BOARD="tag:v2024.01"
BOOTPATCHDIR="v2024.01"

function post_family_tweaks_bsp__bananapi_rtl_bt() {
if [[ -d "$SRC/packages/bsp/bananapi/rtl_bt" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions config/boards/bananapim2s.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ FULL_DESKTOP="yes"
SERIALCON="ttyAML0"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="amlogic/meson-g12b-a311d-bananapi-m2s.dtb"
BOOTBRANCH_BOARD="tag:v2023.07.02"
BOOTPATCHDIR="v2023.07.02"
BOOTBRANCH_BOARD="tag:v2024.01"
BOOTPATCHDIR="v2024.01"

function post_family_tweaks_bsp__bananapi_rtl_bt() {
if [[ -d "$SRC/packages/bsp/bananapi/rtl_bt" ]]; then
Expand Down
6 changes: 0 additions & 6 deletions config/boards/khadas-vim1s.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ declare -g KHADAS_OOWOW_BOARD_ID="VIM1S" # for use with EXT=output-image-oowow

OVERLAY_PREFIX='s4-s905y4'

function image_specific_armbian_env_ready__set_vim1s_specific_parameters() {
display_alert "Writing vim1s parameters in /boot/armbianEnv.txt"
run_host_command_logged echo "earlycon=on" >>${SDCARD}/boot/armbianEnv.txt
run_host_command_logged echo "extraboardargs=meson-gx-mmc.caps2_quirks=mmc-hs400" >>${SDCARD}/boot/armbianEnv.txt
}

function post_family_tweaks_bsp__populate_etc_firmware() {
# The hciattach command needs firmware to be placed in /etc/firmware directory.
# Populate the same.
Expand Down
12 changes: 0 additions & 12 deletions config/boards/khadas-vim4.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@ declare -g KHADAS_OOWOW_BOARD_ID="VIM4" # for use with EXT=output-image-oowow

OVERLAY_PREFIX='t7-a311d2'

# Add modprobe configuration for the ISP, see https://github.com/khadas/fenix/blob/master/archives/filesystem/special/VIM4/etc/modprobe.d/isp.conf
# This avoids a kernel panic related to the ISP firmware; see https://armbian.atlassian.net/browse/AR-1801?focusedCommentId=11995
function post_family_tweaks_bsp__kvim4_isp_modprobe() {
: "${destination:?}"
display_alert "${BOARD}" "Adding modprobe configuration for the ISP" "info"
mkdir -p "${destination}"/etc/modprobe.d
cat <<- EOD > "${destination}"/etc/modprobe.d/isp.conf
options iv009_isp dcam=2
softdep iv009_isp pre: iv009_isp_iq iv009_isp_lens iv009_isp_sensor
EOD
}

function post_family_tweaks_bsp__enable_fan_service() {
if [[ ${BRANCH} = "legacy" ]]; then
run_host_command_logged mkdir -p "${destination}"/etc/systemd/system/mutli-user.target.wants
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion config/boards/odroidn2l.csc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
BOARD_NAME="Odroid N2L"
BOARDFAMILY="meson-g12b"
BOARD_MAINTAINER=""
KERNEL_TARGET="edge" # @TODO: DTB for N2L is only in 6.3+; add current when we bump it to 6.3 or newer.
KERNEL_TARGET="current,edge"
MODULES_BLACKLIST="simpledrm" # SimpleDRM conflicts with Panfrost
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Allwinner H618 quad core 1/2/4GB RAM SoC WiFi SPI USB-C
BOARD_NAME="Orange Pi Zero3"
BOARDFAMILY="sun50iw9"
BOARD_MAINTAINER="viraniac"
BOARD_MAINTAINER=""
BOOTCONFIG="orangepi_zero3_defconfig"
OVERLAY_PREFIX="sun50i-h616"
BOOT_LOGO="desktop"
Expand Down
2 changes: 1 addition & 1 deletion config/boards/rockpi-4cplus.csc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ BOOTCONFIG="rock-pi-4c-rk3399_defconfig"
KERNEL_TARGET="current,edge"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3399-rock-pi-4c-plus.dtb"
BOOT_FDT_FILE="rockchip/rk3399-rock-4c-plus.dtb"
BOOT_SCENARIO="tpl-spl-blob"
BOOT_SUPPORT_SPI=yes
23 changes: 13 additions & 10 deletions config/boards/station-m3.csc
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
# Rockchip RK3588s 2GB-16GB GBE eMMC NVMe SATA USB3 WiFi
BOARD_NAME="Station M3"
BOARDFAMILY="media"
BOARD_MAINTAINER="150balbes"
BOOTCONFIG="rk3588_defconfig"
BOARDFAMILY="rockchip-rk3588"
BOARD_MAINTAINER=""
KERNEL_TARGET="legacy"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3588s-roc-pc.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS02,1500000 console=tty0"
BOOT_SOC="rk3588"
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"

cp -R $SRC/packages/blobs/rtl8723bt_fw/* $SDCARD/lib/firmware/rtl_bt/
cp -R $SRC/packages/blobs/station/firmware/* $SDCARD/lib/firmware/
if [[ $BRANCH == legacy ]]; then
install -m 755 $SRC/packages/blobs/station/firefly_fan_control $SDCARD/usr/bin/firefly_fan_control
install -m 755 $SRC/packages/blobs/station/firefly-fan-init $SDCARD/usr/bin/firefly-fan-init
install -m 755 $SRC/packages/blobs/station/firefly-fan.service $SDCARD/usr/lib/systemd/system/firefly-fan.service
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable firefly-fan.service >/dev/null 2>&1"
fi
return 0
}
# Override family config for this board; let's avoid conditionals in family config.
function post_family_config__stationm3_use_vendor_uboot() {
BOOTCONFIG="rk3588_defconfig"
BOOTSOURCE='https://github.com/150balbes/u-boot-rk'
BOOTBRANCH='branch:rk3588'
BOOTDIR="u-boot-${BOARD}"
BOOTPATCHDIR="u-boot-station-p2"
}
13 changes: 13 additions & 0 deletions config/boards/tinker-edge-r.csc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Rockchip RK3399Pro hexa core NPU 4GB SoC GBe eMMC USB3 PCIe WiFi/BT
BOARD_NAME="Tinker Edge R"
BOARDFAMILY="rockchip64"
BOARD_MAINTAINER=""
BOOTCONFIG="tinker-edge-r_rk3399pro_defconfig"
KERNEL_TARGET="current,edge"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3399pro-tinker-edge-r.dtb"
BOOT_SUPPORT_SPI=yes
BOOT_SCENARIO="tpl-spl-blob"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS0,115200 console=tty1"
22 changes: 22 additions & 0 deletions config/boards/tinkerboard.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,25 @@ KERNEL_TARGET="current,edge"
KERNEL_TEST_TARGET="current"
FULL_DESKTOP="yes"
BOOT_SOC="rk3288"

function tinkerboard_uboot_postinst(){
[[ $DEVICE == /dev/null ]] && exit 0
if [[ -z $DEVICE ]]; then
DEVICE="/dev/mmcblk0"
# proceed to other options.
[ ! -b $DEVICE ] && DEVICE="/dev/mmcblk1"
[ ! -b $DEVICE ] && DEVICE="/dev/mmcblk2"
fi
[[ $(type -t setup_write_uboot_platform) == function ]] && setup_write_uboot_platform
if [[ -b $DEVICE ]]; then
echo "Updating u-boot on $DEVICE" >&2
write_uboot_platform $DIR $DEVICE
sync
else
echo "Device $DEVICE does not exist, skipping" >&2
fi
}

function pre_package_uboot_image__tinkerboard_update_uboot_postinst_script(){
postinst_functions+=('tinkerboard_uboot_postinst')
}
6 changes: 3 additions & 3 deletions config/boards/xiaomi-elish.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ function post_family_tweaks_bsp__xiaomi-elish_firmware() {
# USB Gadget Network service
mkdir -p $destination/usr/local/bin/
mkdir -p $destination/usr/lib/systemd/system/
install -Dm655 $SRC/packages/bsp/xiaomi-elish/setup-usbgadget-network.sh $destination/usr/local/bin/
install -Dm655 $SRC/packages/bsp/xiaomi-elish/remove-usbgadget-network.sh $destination/usr/local/bin/
install -Dm644 $SRC/packages/bsp/xiaomi-elish/usbgadget-rndis.service $destination/usr/lib/systemd/system/
install -Dm655 $SRC/packages/bsp/usb-gadget-network/setup-usbgadget-network.sh $destination/usr/local/bin/
install -Dm655 $SRC/packages/bsp/usb-gadget-network/remove-usbgadget-network.sh $destination/usr/local/bin/
install -Dm644 $SRC/packages/bsp/usb-gadget-network/usbgadget-rndis.service $destination/usr/lib/systemd/system/

# Kernel postinst script to update abl boot partition
install -Dm655 $SRC/packages/bsp/xiaomi-elish/zz-update-abl-kernel $destination/etc/kernel/postinst.d/
Expand Down
106 changes: 106 additions & 0 deletions config/boards/xiaomi-umi.wip
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Generate kernel and rootfs image for Qcom ABL booting
declare -g BOARD_NAME="Xiaomi Umi"
declare -g BOARD_MAINTAINER="FantasyGmm"
declare -g BOARDFAMILY="qcom-abl"
declare -g KERNEL_TARGET="sm8250"
declare -g KERNELPATCHDIR="arm64-sm8250"
declare -g EXTRAWIFI="no"
declare -g MODULES="spi-geni-qcom"
declare -g BOOTCONFIG="none"
declare -g IMAGE_PARTITION_TABLE="gpt"
declare -g -a ABL_DTB_LIST=("sm8250-xiaomi-umi")

# Use the full firmware, complete linux-firmware plus Armbian's (for qcom/a650_sqe.fw)
declare -g BOARD_FIRMWARE_INSTALL="-full"

function post_family_config_branch_sm8250__pmos_kernel() {
display_alert "Setting up kernel for" "${BOARD}" "info"
declare -g KERNEL_MAJOR_MINOR="6.7" # Major and minor versions of this kernel.
declare -g KERNELBRANCH='branch:linux-6.7.y'
}

function xiaomi-umi_is_userspace_supported() {
[[ "${RELEASE}" == "jammy" ]] && return 0
[[ "${RELEASE}" == "trixie" ]] && return 0
[[ "${RELEASE}" == "noble" ]] && return 0
return 1
}

function post_family_tweaks_bsp__xiaomi-umi_firmware() {
display_alert "$BOARD" "Install firmwares for xiaomi umi" "info"

# Alsa-ucm-conf profile for Xiaomi Umi
mkdir -p $destination/usr/share/alsa/ucm2/conf.d/sm8250
install -Dm644 $SRC/packages/bsp/xiaomi-umi/umi.conf $destination/usr/share/alsa/ucm2/Xiaomi/umi/umi.conf
install -Dm644 $SRC/packages/bsp/xiaomi-umi/umi_HiFi.conf $destination/usr/share/alsa/ucm2/Xiaomi/umi/HiFi.conf
ln -sfv ../../Xiaomi/umi/umi.conf \
"$destination/usr/share/alsa/ucm2/conf.d/sm8250/Xiaomi Mi 10.conf"

# USB Gadget Network service
mkdir -p $destination/usr/local/bin/
mkdir -p $destination/usr/lib/systemd/system/
install -Dm655 $SRC/packages/bsp/usb-gadget-network/setup-usbgadget-network.sh $destination/usr/local/bin/
install -Dm655 $SRC/packages/bsp/usb-gadget-network/remove-usbgadget-network.sh $destination/usr/local/bin/
install -Dm644 $SRC/packages/bsp/usb-gadget-network/usbgadget-rndis.service $destination/usr/lib/systemd/system/

# Kernel postinst script to update abl boot partition
install -Dm655 $SRC/packages/bsp/xiaomi-umi/zz-update-abl-kernel $destination/etc/kernel/postinst.d/

return 0
}

function post_family_tweaks__xiaomi-umi_enable_services() {
if ! xiaomi-umi_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}" == "jammy" ]]; 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

# 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

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 qbootctl qrtr-tools protection-domain-mapper tqftpserv unudhcpd mkbootimg

# 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

chroot_sdcard systemctl enable qbootctl.service
chroot_sdcard systemctl enable usbgadget-rndis.service
chroot_sdcard systemctl enable pd-mapper.service
chroot_sdcard systemctl enable tqftpserv.service
return 0
}

function post_family_tweaks_bsp__xiaomi-umi_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
# Using Elish's firmware for now
add_file_from_stdin_to_bsp_destination "/etc/initramfs-tools/hooks/xiaomi-elish-firmware" <<- 'FIRMWARE_HOOK'
#!/bin/bash
[[ "$1" == "prereqs" ]] && exit 0
. /usr/share/initramfs-tools/hook-functions
for f in /lib/firmware/qcom/sm8250/xiaomi/elish/* ; 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__xiaomi-umi_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'
spi-geni-qcom
EXTRA_MODULES
}
Loading

0 comments on commit cfd3dd8

Please sign in to comment.