diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 48b4dfe..995f724 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -31,10 +31,10 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots or terminal output to help explain your problem. # **Version Info (please complete the following information):** - - Firmware version: [e.g. 22.03.02 b124] + - Firmware version: [e.g. 23.05.3 b124] - Package name [e.g. omega2-ctrl] - - Package Version [e.g. 22-1] - - Repo branch (if applicable) [e.g. openwrt-22.03] + - Package Version [e.g. 23-1] + - Repo branch (if applicable) [e.g. openwrt-23.05] # **Additional context** Add any other context about the problem here. diff --git a/.terraform/README.md b/.terraform/README.md index 63877d5..edd7361 100644 --- a/.terraform/README.md +++ b/.terraform/README.md @@ -31,7 +31,7 @@ deployment_bucket = "repo.onioniot.com" stage_vars = { "stage_name" = { - branch = "openwrt-22.03" + branch = "openwrt-23.05" } } ``` diff --git a/.terraform/pipeline/buildspec/buildspec-build-image.yml b/.terraform/pipeline/buildspec/buildspec-build-image.yml index 0ad746e..25bfba7 100644 --- a/.terraform/pipeline/buildspec/buildspec-build-image.yml +++ b/.terraform/pipeline/buildspec/buildspec-build-image.yml @@ -5,7 +5,7 @@ version: 0.2 env: variables: - VERSION: "22.03.2" + VERSION: "23.05.3" OUTPUT_S3_PATH: "omega2/images" phases: install: diff --git a/.terraform/pipeline/buildspec/buildspec-build-packages.yml b/.terraform/pipeline/buildspec/buildspec-build-packages.yml index 18cbe9d..d446c22 100644 --- a/.terraform/pipeline/buildspec/buildspec-build-packages.yml +++ b/.terraform/pipeline/buildspec/buildspec-build-packages.yml @@ -4,7 +4,7 @@ version: 0.2 env: variables: - VERSION: "22.03.2" + VERSION: "23.05.3" phases: install: runtime-versions: diff --git a/.terraform/pipeline/terraform.tfvars b/.terraform/pipeline/terraform.tfvars index 1253205..18c1311 100644 --- a/.terraform/pipeline/terraform.tfvars +++ b/.terraform/pipeline/terraform.tfvars @@ -7,6 +7,6 @@ buildspec_file_name = "buildspec.yml" stage_vars = { "prod" = { - branch = "openwrt-22.03" + branch = "openwrt-23.05" } } diff --git a/README.md b/README.md index 2cbf4b8..3f134c5 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,114 @@ Onion Packages for OpenWRT firmware. Intended for the Onion Omega2 & Omega2+ dev ## Where can I find the compiled output of this repo? -The latest compiled packages can be found at: http://repo.onioniot.com/omega2/packages/openwrt-23.05.2/ +The latest compiled packages can be found at: http://repo.onioniot.com/omega2/packages/openwrt-23.05.3/ And firmware with these packages can be found at: http://repo.onioniot.com/omega2/images/openwrt-23.05/ -/ +> Compilation done bour our Continuous Deployment System. More details [below](#continuous-deployment-details) + + +# Developing with this Repo + +See below for information on development of the packages of this repo + +## How Can I Compile the Packages in this Repo for the Omega2 Device? + +### Compiling the Packages as they are in this repo + +> This is useful if you want to test the compilation of packages in this repo + +Use the OnionIoT/openwrt-sdk-wrapper: + +1. Clone the OnionIoT/openwrt-sdk-wrapper repo: https://github.com/OnionIoT/openwrt-sdk-wrapper and check out the `main` branch +1. Copy the `sdk-profile` config file to the locally cheked out openwrt-sdk-wrapper repo, rename it to `profile` +1. Follow the instructions in the [OnionIoT/openwrt-sdk-wrapper repo readme](https://github.com/OnionIoT/openwrt-sdk-wrapper/tree/main?tab=readme-ov-file#how-to-use-this-repo) to compile the packages + +### Compiling the Packages from a local clone of this repo + +> This is useful if you're working on changes to the packages in this repo + +Use the OnionIoT/openwrt-sdk-wrapper: + +1. Clone the OnionIoT/openwrt-sdk-wrapper repo: https://github.com/OnionIoT/openwrt-sdk-wrapper and check out the `main` branch +1. Copy the `sdk-profile` config file to the locally cheked out openwrt-sdk-wrapper repo, rename it to `profile` +1. Follow the instructions in the [OnionIoT/openwrt-sdk-wrapper repo readme on **using this repo for development**](https://github.com/OnionIoT/openwrt-sdk-wrapper/tree/main?tab=readme-ov-file#how-to-use-this-repo) + +## How Can I Build Firmware that includes the packages from this repo? + +### Building Firmware with Published Packages + +> This is useful if you need firmware with the packages from this repo + +Use the OnionIoT/openwrt-imagebuilder-wrapper to build firmware that includes the compiled, published packages from this repo: + +1. Clone the OnionIoT/openwrt-imagebuilder-wrapper repo: https://github.com/OnionIoT/openwrt-imagebuilder-wrapper and check out the `main` branch +1. Copy the `imagebuilder-profile` config file to the locally cheked out openwrt-imagebuilder-wrapper repo, rename it to `profile` +1. Follow the instructions in the [OnionIoT/openwrt-imagebuilder-wrapper repo readme](https://github.com/OnionIoT/openwrt-sdk-wrapper/tree/main?tab=readme-ov-file#how-to-use-this-repo) to build firmware + +### Building Firmware with the Packages from a local clone of this repo + +> This is useful if you're working on changes to the packages in this repo and need to test building firmware that includes the packages + +Use the OnionIoT/openwrt-imagebuilder-wrapper to build firmware that includes packages that have been locally compiled + +1. Clone the OnionIoT/openwrt-imagebuilder-wrapper repo: https://github.com/OnionIoT/openwrt-imagebuilder-wrapper and check out the `main` branch +1. Copy the `imagebuilder-profile` config file to the locally cheked out openwrt-imagebuilder-wrapper repo, rename it to `profile` +1. Follow the instructions in the [OnionIoT/openwrt-imagebuilder-wrapper repo readme on **using this repo for development**](https://github.com/OnionIoT/openwrt-imagebuilder-wrapper/tree/main?tab=readme-ov-file#using-this-repo-for-development) + + + +--- + +# Continuous Deployment Details + +Summary: + +| | Development Builds | Release Builds | +|:---------------------------------------:|------------------------------------------------------------------|--------------------------------------------------------------| +| Purpose | Internal use, may not be 100% stable but useful for testing | Meant for use by general users | +| Trigger | Commit to branch | Github Release created from branch | +| Environment variables used during build | `DEV_BUILD` | none | +| Package File Output Location | `http://repo.onioniot.com/omega2-dev/packages/openwrt-$VERSION/` | `http://repo.onioniot.com/omega2/packages/openwrt-$VERSION/` | +| Image File Output Location | `http://repo.onioniot.com/omega2-dev/images/openwrt-$RELEASE/` | `http://repo.onioniot.com/omega2/images/openwrt-$RELEASE/` | + +Where: +* `$VERSION` is the `OPENWRT_VERSION` from the `sdk-profile` config file (for example: `23.05.3`) +* `$RELEASE` is the `OPENWRT_RELEASE` from the `imagebuilder-profile` config file (for example: `23.05`) + +Image files will be named with the following syntax: `--.bin` +For example: `onion_omega2-23.05.3-20240516.bin` + +## Development Builds in Branches + +When a new branch is created from the `openwrt-23.05` branch in the `OnionIoT/OpenWRT-Packages` repository and follows the regular expression pattern `openwrt-2\d.\d\d`, an action is automatically triggered in GitHub Actions. This action then creates a new instance in AWS CodePipeline using Terraform. + +This pipeline additionally makes use of two repositories, `OnionIoT/openwrt-imagebuilder-wrapper` and `OnionIoT/openwrt-sdk-wrapper`, using their respective `main` branches. The production and development buildspecs are stored in their respective main branches. + +The newly created pipeline, following the pattern corresponding to the regex `openwrt-2\d.\d\d`, utilizes the development buildspec present in the main branch of each of the auxiliary repositories, `OnionIoT/openwrt-imagebuilder-wrapper` and `OnionIoT/openwrt-sdk-wrapper`, and will only be triggered when a new commit is made to the `OnionIoT/OpenWRT-Packages` repository. + +During the build process, the `sdk-profile` is copied to the profile of the `openwrt-sdk-wrapper` repository, and, the `imagebuilder-profile` file is copied to the `profile` of the openwrt-imagebuilder-wrapper repository. + +The output files are then stored in the following locations in S3: +- Location of the development package output file: `s3://$OUTPUT_BUCKET/omega2-dev/packages/openwrt-$VERSION` +- Location of the development image output file: `s3://$OUTPUT_BUCKET/omega2-dev/images/openwrt-$RELEASE` + +When the created branch following the regex pattern `openwrt-2\d.\d\d` is deleted, the pipeline in AWS CodePipeline will not be automatically deleted because currently, the branch defined as the default branch is `openwrt-18.06` and has not been modified during our work, and automation of the branch deletion event in GitHub Actions can only be done using the default branch. + +## Newly Created Releases + +When a new release is created on GitHub from the development branches, it is automatically merged into the release branch, triggering the AWS CodePipeline for production. + +The resulting files are stored in the following locations in S3: +- Package output file: `s3://$OUTPUT_BUCKET/omega2/packages/openwrt-$VERSION` +- ImageBuild output file: `s3://$OUTPUT_BUCKET/omega2/images/openwrt-$RELEASE` + +## Process: Creating a Release + +* Commit update to `omega2-base/Makefile` that changes `PKG_RELEASE` to the current date, in the format `%Y%m%d-%H%M%S` +* Create a new release: + * Name the release `__` where `` is `00` and increments by 1 if there are multiple releases needed in a single day + * Create a tag that's named same as the release, based on the branch in question + * Populate the Release description with bullet points outlining what's been Added, Changed, Removed, and/or Fixed + * Also use generate release notes feature +* Publish the release diff --git a/imagebuilder-profile b/imagebuilder-profile index 8cb0f89..55be541 100644 --- a/imagebuilder-profile +++ b/imagebuilder-profile @@ -2,10 +2,7 @@ # Stable OpenWrt Release version (Needs change whenever new openwrt release is available) OPENWRT_RELEASE="23.05" -OPENWRT_VERSION="${OPENWRT_RELEASE}.2" -# temporarily override the openwrt version (compile old 22.03.5 in the new 23.05 branch) -OPENWRT_RELEASE_CD_TESTING="22.03" -OPENWRT_VERSION_CD_TESTING="${OPENWRT_RELEASE_CD_TESTING}.5" +OPENWRT_VERSION="${OPENWRT_RELEASE}.3" ARCH="mipsel_24kc" TARGET="ramips" SUBTARGET="mt76x8" diff --git a/omega2-base/Makefile b/omega2-base/Makefile index 1918f5b..ee76303 100644 --- a/omega2-base/Makefile +++ b/omega2-base/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=omega2-base -PKG_VERSION:=22.03.5 -PKG_RELEASE:=20240122 +PKG_VERSION:=23.05.3 +PKG_RELEASE:=20240516 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/onion-repo-keys/Makefile b/onion-repo-keys/Makefile index 827f787..8693b78 100644 --- a/onion-repo-keys/Makefile +++ b/onion-repo-keys/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=onion-repo-keys -PKG_VERSION:=22.03.2 +PKG_VERSION:=23.05.3 PKG_RELEASE:=1 #PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/python3-spidev/Makefile b/python3-spidev/Makefile index bc22c6d..52a58c6 100644 --- a/python3-spidev/Makefile +++ b/python3-spidev/Makefile @@ -57,4 +57,8 @@ define Package/python3-spidev/install $(CP) $(PKG_BUILD_DIR)/lib/python$(PYTHON3_VERSION)/spidev.so $(1)$(PYTHON3_PKG_DIR) endef +define Build/Install + true +endef + $(eval $(call BuildPackage,python3-spidev)) diff --git a/sdk-profile b/sdk-profile index 7179610..02438d3 100644 --- a/sdk-profile +++ b/sdk-profile @@ -2,10 +2,7 @@ # Stable OpenWrt Release version (Needs change whenever new openwrt release is available) OPENWRT_RELEASE="23.05" -OPENWRT_VERSION="${OPENWRT_RELEASE}.2" -# temporarily override the openwrt version (compile old 22.03.5 in the new 23.05 branch) -OPENWRT_RELEASE_CD_TESTING="22.03" -OPENWRT_VERSION_CD_TESTING="${OPENWRT_RELEASE_CD_TESTING}.5" +OPENWRT_VERSION="${OPENWRT_RELEASE}.3" TARGET="ramips" SUBTARGET="mt76x8" @@ -13,7 +10,7 @@ SUBTARGET="mt76x8" BASE_URL="http://downloads.onioniot.com.s3.amazonaws.com/releases/$OPENWRT_VERSION_CD_TESTING/targets/$TARGET/$SUBTARGET" # SDK file name available and downloaded from BASE_URL ((Needs change whenever new openwrt release is available with different gcc version)) -SDK_FILE="openwrt-sdk-$OPENWRT_VERSION_CD_TESTING-$TARGET-${SUBTARGET}_gcc-11.2.0_musl.Linux-$(uname -p).tar.xz" +SDK_FILE="openwrt-sdk-$OPENWRT_VERSION_CD_TESTING-$TARGET-${SUBTARGET}_gcc-12.3.0_musl.Linux-$(uname -p).tar.xz" SDK_URL="$BASE_URL/$SDK_FILE" # Keys directory to sign compiled packages, Ensure you have key-build files in specificed directory diff --git a/technical-doc.md b/technical-doc.md index 5ace96a..595ad92 100644 --- a/technical-doc.md +++ b/technical-doc.md @@ -1,6 +1,6 @@ -# Usage Instructions for New OpenWRT-22.03-based Omega2 Firmware +# Usage Instructions for New OpenWRT-23.05-based Omega2 Firmware -A new firmware is available for the Omega2 and Omega2+ that's based on the recent OpenWRT 22.03 release. +A new firmware is available for the Omega2 and Omega2+ that's based on the recent OpenWRT 23.05 release. This page has instructions on using this new firmware: @@ -42,10 +42,10 @@ This page has instructions on using this new firmware: > This firmware doesn't include the `oupgrade` utility, so we'll need to manually install the firmware. The procedure is very similar to the [Manual Firmware Installation instructions in the Onion Documentation](http://docs.onion.io/omega2-docs/manual-firmware-installation.html). -The new firmware can be found online at http://repo.onioniot.com/omega2/images/openwrt-22.03/ +The new firmware can be found online at http://repo.onioniot.com/omega2/images/openwrt-23.05/ The firmware images are named according to this syntax: `--.bin` -So `onion_omega2p-22.03.2-20230221.bin` is firmware made for the Omega2+/Omega2S+, based on OpenWRT release 22.03.2, and was built on Feb 21, 2023. +So `onion_omega2p-23.05.3-20240516.bin` is firmware made for the Omega2+/Omega2S+, based on OpenWRT release 23.05.3, and was built on May 16, 2024. ## Selecting Firmware @@ -70,13 +70,13 @@ Once you know which firmware image you want to install on your device: 1. Connect to the command line of your device 1. Go to the `/tmp` directory: `cd /tmp` -1. Download the firmware image: `wget http://repo.onioniot.com.s3.amazonaws.com/omega2/images/openwrt-22.03/.bin` +1. Download the firmware image: `wget http://repo.onioniot.com.s3.amazonaws.com/omega2/images/openwrt-23.05/.bin` 1. Install the firwmare: `sysupgrade -F -n -v .bin` -Say you selected firmware `onion_omega2p-22.03.3-20230526.bin`: +Say you selected firmware `onion_omega2p-23.05.3-20240516.bin`: -* Your download command would be `wget http://repo.onioniot.com.s3.amazonaws.com/omega2/images/openwrt-22.03/onion_omega2p-22.03.3-20230526.bin` -* Your installation command would be `sysupgrade -F -n -v onion_omega2p-22.03.3-20230526.bin` +* Your download command would be `wget http://repo.onioniot.com.s3.amazonaws.com/omega2/images/openwrt-23.05/onion_omega2p-23.05.3-20240516.bin` +* Your installation command would be `sysupgrade -F -n -v onion_omega2p-23.05.3-20240516.bin` ## Updating @@ -290,14 +290,14 @@ For valid GPIO numbers, `gpio-lookup` would display the corresponding kernel GPI ## Pin Multiplexing -Changing the functionality of the Omega's pins is supported as of firmware `22.03.3-20230526`. +Changing the functionality of the Omega's pins is supported as of firmware `23.05.3-20240516`. See the [Pin Multiplexing](http://docs.onion.io/omega2-docs/pin-multiplexing.html) article in the Onion Documentation for details. ## Hardware PWM -Using the Omega's hardware PWM channels is supported as for firmware `22.03.3-20230626`. +Using the Omega's hardware PWM channels is supported as for firmware `23.05.3-20230626`. The Omega’s SoC has a number of PWM modules. The Omega2 exposes two (2) PWM hardware modules on its pin headers while the Omega2S exposes all four (4). @@ -434,7 +434,7 @@ Anything software-related for the new firmware. ## NodeJS v16.19 -The Omega2 supports NodeJS v16.19 starting in firmware `22.03.3-20230526`! +The Omega2 supports NodeJS v16.19 starting in firmware `23.05.3-20240516`! To install Node, first make sure your Omega2 is connected to the internet, then run: