diff --git a/.github/workflow_config.yml b/.github/workflow_config.yml index 3c4b4c1e9..1e6b40b30 100644 --- a/.github/workflow_config.yml +++ b/.github/workflow_config.yml @@ -19,8 +19,8 @@ buildtest: - armbian/bananapim2zero - armbian/orangepi3lts - armbian/orangepi4lts + - armbian/orangepi_zero2 # Orange Pi OS based images - - orangepi/orangepi_zero2 # Raspberry Pi OS based images - raspberry/rpi32 - raspberry/rpi64 @@ -34,8 +34,8 @@ release: # armbian based images - armbian/orangepi3lts - armbian/orangepi4lts + - armbian/orangepi_zero2 # Orange Pi OS based images - - orangepi/orangepi_zero2 # Raspberry Pi OS based images - raspberry/rpi32 - raspberry/rpi64 diff --git a/config/orangepi/orangepi_zero2 b/config/armbian/orangepi_zero2 similarity index 72% rename from config/orangepi/orangepi_zero2 rename to config/armbian/orangepi_zero2 index f494e4874..76a09f1de 100644 --- a/config/orangepi/orangepi_zero2 +++ b/config/armbian/orangepi_zero2 @@ -5,8 +5,8 @@ BASE_ARCH="arm64" # Image source -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" +DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/armbian-orangepi_zero2_bullseye.img.xz.sha256" +DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/armbian-orangepi_zero2_bullseye.img.xz" # export Variables export BASE_ARCH diff --git a/src/modules/armbian/config b/src/modules/armbian/config index 87896f775..5fb7c64c3 100644 --- a/src/modules/armbian/config +++ b/src/modules/armbian/config @@ -22,3 +22,8 @@ bash-completion" [[ -n "$ARMBIAN_CONFIG_BPI2ZERO_OTG_SERIAL" ]] || ARMBIAN_CONFIG_BPI2ZERO_OTG_SERIAL="true" [[ -n "$ARMBIAN_CONFIG_BPI2ZERO_ENABLE_UART3" ]] || ARMBIAN_CONFIG_BPI2ZERO_ENABLE_UART3="true" [[ -n "$ARMBIAN_CONFIG_BPI2ZERO_ENABLE_SPI" ]] || ARMBIAN_CONFIG_BPI2ZERO_ENABLE_SPI="true" + +## Orange Pi Zero 2 additional configuration +[[ -n "$ARMBIAN_ENABLE_OVERLAYS_OPIZ2" ]] || ARMBIAN_ENABLE_OVERLAYS_OPIZ2="true" +[[ -n "$ARMBIAN_ADD_OVERLAYS_OPIZ2" ]] || ARMBIAN_ADD_OVERLAYS_OPIZ2="i2c3 uart5 spi-spidev" +[[ -n "$ARMBIAN_ADD_OVERLAYS_OPIZ2_PARAMS" ]] || ARMBIAN_ADD_OVERLAYS_OPIZ2_PARAMS="param_spidev_spi_bus=1 param_spidev_spi_cs=1" diff --git a/src/modules/armbian/start_chroot_script b/src/modules/armbian/start_chroot_script index 7a3f6a0f7..d3c3b8bf8 100644 --- a/src/modules/armbian/start_chroot_script +++ b/src/modules/armbian/start_chroot_script @@ -100,6 +100,25 @@ if [[ "$(is_board_type)" == "orangepi4-lts" ]]; then echo "overlays=spi-spidev" >> "${ARMBIAN_CONFIG_TXT_FILE}" echo "param_spidev_spi_bus=1" >> "${ARMBIAN_CONFIG_TXT_FILE}" fi + + +#### Orangepi Zero2 +if [[ "$(is_board_type)" == "orangepizero2" ]] && +[[ "${ARMBIAN_ENABLE_OVERLAYS_OPIZ2}" == "true" ]]; then + + if [[ -n "${ARMBIAN_ADD_OVERLAYS_OPIZ2}" ]]; then + echo_green "Adding overlays '${ARMBIAN_ADD_OVERLAYS_OPIZ2}' to ${ARMBIAN_CONFIG_TXT_FILE} ..." + echo "overlays=${ARMBIAN_ADD_OVERLAYS_OPIZ2}" >> "${ARMBIAN_CONFIG_TXT_FILE}" + fi + + if [[ -n "${ARMBIAN_ADD_OVERLAYS_OPIZ2_PARAMS}" ]]; then + for param in ${ARMBIAN_ADD_OVERLAYS_OPIZ2_PARAMS}; do + echo_green "Add ${param} to ${ARMBIAN_CONFIG_TXT_FILE} ..." + echo "${param}" >> "${ARMBIAN_CONFIG_TXT_FILE}" + done + fi +fi + ### END Substep 2: ### Substep 3: add spi-dev module to /etc/modules