Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SBC: add cb2 support #163

Open
wants to merge 3 commits into
base: v2.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflow_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -39,4 +39,5 @@ release:
# - orangepi/orangepi_zero2
# Raspberry Pi OS based images
- raspberry/rpi32
- raspberry/cb2
# - raspberry/rpi64
15 changes: 15 additions & 0 deletions config/raspberry/cb2
Original file line number Diff line number Diff line change
@@ -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
Binary file not shown.
20 changes: 20 additions & 0 deletions src/modules/cb2-dtb/start_chroot_script
Original file line number Diff line number Diff line change
@@ -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}"
Loading