From 544b9c6c74b7ddf07319aec1e4b6de6bc93296f1 Mon Sep 17 00:00:00 2001 From: meganukebmp Date: Sat, 28 Oct 2023 11:55:37 +0200 Subject: [PATCH 1/3] Other orangepi boards have different partition layouts. Uncommonize these values --- config/orangepi/default | 7 ------- config/orangepi/orangepi_zero2 | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/config/orangepi/default b/config/orangepi/default index 8cfe3ad87..385f5ef79 100644 --- a/config/orangepi/default +++ b/config/orangepi/default @@ -16,10 +16,6 @@ BASE_USER_PASSWORD="armbian" BASE_DISTRO="armbian" BASE_IMAGE_RASPBIAN="no" -# partition resizing -BASE_ROOT_PARTITION="2" -BASE_IMAGE_ENLARGEROOT=2500 -BASE_IMAGE_RESIZEROOT=600 # Compress not needed due compression done in workflow BASE_RELEASE_COMPRESS=no # Modules are valid for 32bit and 64bit images @@ -32,8 +28,5 @@ export BASE_USER export BASE_USER_PASSWORD export BASE_DISTRO export BASE_IMAGE_RASPBIAN -export BASE_ROOT_PARTITION -export BASE_IMAGE_ENLARGEROOT -export BASE_IMAGE_RESIZEROOT export BASE_RELEASE_COMPRESS export MODULES diff --git a/config/orangepi/orangepi_zero2 b/config/orangepi/orangepi_zero2 index c149d83f2..ca2e07e2e 100644 --- a/config/orangepi/orangepi_zero2 +++ b/config/orangepi/orangepi_zero2 @@ -8,7 +8,15 @@ BASE_ARCH="arm64" DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/orangepi-orangepi_zero2_bullseye.img.xz.sha256" DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/orangepi-orangepi_zero2_bullseye.img.xz" +# partition resizing +BASE_ROOT_PARTITION="2" +BASE_IMAGE_ENLARGEROOT=2500 +BASE_IMAGE_RESIZEROOT=600 + # export Variables export BASE_ARCH export DOWNLOAD_URL_CHECKSUM export DOWNLOAD_URL_IMAGE +export BASE_ROOT_PARTITION +export BASE_IMAGE_ENLARGEROOT +export BASE_IMAGE_RESIZEROOT \ No newline at end of file From 9644890f16a55e7c9f97d50c62d33c033d77eb75 Mon Sep 17 00:00:00 2001 From: meganukebmp Date: Sat, 28 Oct 2023 11:56:57 +0200 Subject: [PATCH 2/3] Orangepi Zero3 support --- config/orangepi/orangepi_zero3_1500mb | 22 ++++++++++++++++++++++ config/orangepi/orangepi_zero3_others | 22 ++++++++++++++++++++++ src/modules/orangepi/config | 7 +++++++ src/modules/orangepi/start_chroot_script | 18 ++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 config/orangepi/orangepi_zero3_1500mb create mode 100644 config/orangepi/orangepi_zero3_others diff --git a/config/orangepi/orangepi_zero3_1500mb b/config/orangepi/orangepi_zero3_1500mb new file mode 100644 index 000000000..9088e7b3d --- /dev/null +++ b/config/orangepi/orangepi_zero3_1500mb @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# Shebang for better file detection +# shellcheck enable=require-variable-braces + +BASE_ARCH="arm64" + +# Image source +DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/orangepi-orangepi_zero3_1500mb_bullseye.img.xz.sha256" +DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/orangepi-orangepi_zero3_1500mb_bullseye.img.xz" + +# partition resizing +BASE_ROOT_PARTITION="1" +BASE_IMAGE_ENLARGEROOT=2500 +BASE_IMAGE_RESIZEROOT=600 + +# export Variables +export BASE_ARCH +export DOWNLOAD_URL_CHECKSUM +export DOWNLOAD_URL_IMAGE +export BASE_ROOT_PARTITION +export BASE_IMAGE_ENLARGEROOT +export BASE_IMAGE_RESIZEROOT \ No newline at end of file diff --git a/config/orangepi/orangepi_zero3_others b/config/orangepi/orangepi_zero3_others new file mode 100644 index 000000000..db225efd0 --- /dev/null +++ b/config/orangepi/orangepi_zero3_others @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# Shebang for better file detection +# shellcheck enable=require-variable-braces + +BASE_ARCH="arm64" + +# Image source +DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/orangepi-orangepi_zero3_others_bullseye.img.xz.sha256" +DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/orangepi-orangepi_zero3_others_bullseye.img.xz" + +# partition resizing +BASE_ROOT_PARTITION="1" +BASE_IMAGE_ENLARGEROOT=2500 +BASE_IMAGE_RESIZEROOT=600 + +# export Variables +export BASE_ARCH +export DOWNLOAD_URL_CHECKSUM +export DOWNLOAD_URL_IMAGE +export BASE_ROOT_PARTITION +export BASE_IMAGE_ENLARGEROOT +export BASE_IMAGE_RESIZEROOT \ No newline at end of file diff --git a/src/modules/orangepi/config b/src/modules/orangepi/config index dab971308..1bcf9124c 100644 --- a/src/modules/orangepi/config +++ b/src/modules/orangepi/config @@ -23,6 +23,13 @@ bash-completion" [[ -n "$ORANGEPI_ADD_OVERLAYS_OPIZ2" ]] || ORANGEPI_ADD_OVERLAYS_OPIZ2="i2c3 uart5 spi-spidev" [[ -n "$ORANGEPI_ADD_OVERLAYS_OPIZ2_PARAMS" ]] || ORANGEPI_ADD_OVERLAYS_OPIZ2_PARAMS="param_spidev_spi_bus=1 param_spidev_spi_cs=1" +## Orange Pi Zero 3 additional configuration +[[ -n "$ORANGEPI_ENABLE_OVERLAYS_OPIZ3" ]] || ORANGEPI_ENABLE_OVERLAYS_OPIZ3="true" +# cs1 is PH9 for SPI1 +# cs0 is PH5 for SPI1 +[[ -n "$ORANGEPI_ADD_OVERLAYS_OPIZ3" ]] || ORANGEPI_ADD_OVERLAYS_OPIZ3="ph-i2c3 ph-uart5 spi1-cs1-spidev" +[[ -n "$ORANGEPI_ADD_OVERLAYS_OPIZ3_PARAMS" ]] || ORANGEPI_ADD_OVERLAYS_OPIZ3_PARAMS="" + ## Disable Autologin on gettys [[ -n "$ORANGEPI_DISABLE_GETTY_AUTOLOGIN" ]] || ORANGEPI_DISABLE_GETTY_AUTOLOGIN="1" diff --git a/src/modules/orangepi/start_chroot_script b/src/modules/orangepi/start_chroot_script index 7e5d05544..6f12c81c0 100644 --- a/src/modules/orangepi/start_chroot_script +++ b/src/modules/orangepi/start_chroot_script @@ -125,6 +125,24 @@ if [[ "$(is_board_type)" == "orangepizero2" ]] && fi #### END +#### Orangepi Zero3 +if [[ "$(is_board_type)" == "orangepizero3" ]] && +[[ "${ORANGEPI_ENABLE_OVERLAYS_OPIZ3}" == "true" ]]; then + + if [[ -n "${ORANGEPI_ADD_OVERLAYS_OPIZ3}" ]]; then + echo_green "Adding overlays '${ORANGEPI_ADD_OVERLAYS_OPIZ3}' to ${ORANGEPI_CONFIG_TXT_FILE} ..." + echo "overlays=${ORANGEPI_ADD_OVERLAYS_OPIZ3}" >> "${ORANGEPI_CONFIG_TXT_FILE}" + fi + + if [[ -n "${ORANGEPI_ADD_OVERLAYS_OPIZ3_PARAMS}" ]]; then + for param in ${ORANGEPI_ADD_OVERLAYS_OPIZ3_PARAMS}; do + echo_green "Add ${param} to ${ORANGEPI_CONFIG_TXT_FILE} ..." + echo "${param}" >> "${ORANGEPI_CONFIG_TXT_FILE}" + done + fi +fi +#### END + ### END Substep 2 # Substep 3: add spi-dev module to /etc/modules From f67cc2550cddd524bdb668bd87379b6397743142 Mon Sep 17 00:00:00 2001 From: meganukebmp Date: Sun, 29 Oct 2023 11:44:16 +0100 Subject: [PATCH 3/3] Fixup: We do in fact have boot partitions! --- config/orangepi/orangepi_zero3_1500mb | 2 +- config/orangepi/orangepi_zero3_others | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/orangepi/orangepi_zero3_1500mb b/config/orangepi/orangepi_zero3_1500mb index 9088e7b3d..833413b3e 100644 --- a/config/orangepi/orangepi_zero3_1500mb +++ b/config/orangepi/orangepi_zero3_1500mb @@ -9,7 +9,7 @@ DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/orangepi-orangepi_zero3_1500mb_bulls DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/orangepi-orangepi_zero3_1500mb_bullseye.img.xz" # partition resizing -BASE_ROOT_PARTITION="1" +BASE_ROOT_PARTITION="2" BASE_IMAGE_ENLARGEROOT=2500 BASE_IMAGE_RESIZEROOT=600 diff --git a/config/orangepi/orangepi_zero3_others b/config/orangepi/orangepi_zero3_others index db225efd0..40ede0286 100644 --- a/config/orangepi/orangepi_zero3_others +++ b/config/orangepi/orangepi_zero3_others @@ -9,7 +9,7 @@ DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/orangepi-orangepi_zero3_others_bulls DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/orangepi-orangepi_zero3_others_bullseye.img.xz" # partition resizing -BASE_ROOT_PARTITION="1" +BASE_ROOT_PARTITION="2" BASE_IMAGE_ENLARGEROOT=2500 BASE_IMAGE_RESIZEROOT=600