diff --git a/.github/workflow_config.yml b/.github/workflow_config.yml index 59a993b0d..4a42db272 100644 --- a/.github/workflow_config.yml +++ b/.github/workflow_config.yml @@ -26,7 +26,7 @@ buildtest: - raspberry/rpi32 # - raspberry/rpi64 - raspberry/opicm4 - + - raspberry/cb2 # This is used to setup release build chain. # Each entry will be used in setup matrix for releases @@ -39,4 +39,5 @@ release: # - orangepi/orangepi_zero2 # Raspberry Pi OS based images - raspberry/rpi32 + - raspberry/cb2 # - raspberry/rpi64 diff --git a/config/raspberry/cb2 b/config/raspberry/cb2 new file mode 100644 index 000000000..8d068d3f6 --- /dev/null +++ b/config/raspberry/cb2 @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# Shebang for better file detection + +# Just guessing, there's zero information on the architecture of this image. +BASE_ARCH="arm64" + +# Third party OrangePi 4 Raspberry Pi OS image. +DOWNLOAD_URL_CHECKSUM="https://gist.githubusercontent.com/miklschmidt/c42f91aced564b1a41001b82d98d47d0/raw/ec884dda8844fd2cb17490306044819dfa68ad75/Orangepi3b_1.0.0_raspios_bullseye_server_linux5.10.160.7z.sha256" +DOWNLOAD_URL_IMAGE="https://github.com/leeboby/raspberry-pi-os-images/releases/download/opi3b/Orangepi3b_1.0.0_raspios_bullseye_server_linux5.10.160.7z" +MODULES=$MODULES",cb2-dtb" + +# export variables +export BASE_ARCH +export DOWNLOAD_URL_CHECKSUM +export DOWNLOAD_URL_IMAGE diff --git a/src/modules/cb2-dtb/filesystem/boot/dtb/rk3566-bigtreetech-pi2.dtb b/src/modules/cb2-dtb/filesystem/boot/dtb/rk3566-bigtreetech-pi2.dtb new file mode 100644 index 000000000..9f2eecf46 Binary files /dev/null and b/src/modules/cb2-dtb/filesystem/boot/dtb/rk3566-bigtreetech-pi2.dtb differ diff --git a/src/modules/cb2-dtb/start_chroot_script b/src/modules/cb2-dtb/start_chroot_script new file mode 100644 index 000000000..7147990fe --- /dev/null +++ b/src/modules/cb2-dtb/start_chroot_script @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# Installs the CB2 device tree blob on the system +# GPL V3 +######## + +# Source error handling, leave this in place +set -Ee + +unpack /filesystem/boot/dtb /boot/dtb root + +envFile="/boot/config.txt" +if [ -f "/boot/armbianEnv.txt" ]; then + envFile="/boot/armbianEnv.txt" +fi +if [ -f "/boot/orangepiEnv.txt" ]; then + envFile="/boot/orangepiEnv.txt" +fi + +sed -i '/fdtfile=.*$/d' "${envFile}" +echo -e "fdtfile=rk3566-bigtreetech-pi2.dtb" >> "${envFile}"