From b8dbbc4c4109f1a71769b4d60b945cda4363c03c Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Wed, 16 Oct 2024 01:55:57 +0200 Subject: [PATCH] include openhd --- .github/workflows/main.yml | 219 ++---------------- external/br2-external/Config.in | 3 +- external/br2-external/openhd/Config.in | 10 + .../br2-external/openhd/openhd.mk.template | 20 ++ .../cvitek_CV181X_musl_riscv64_defconfig | 131 +++++++---- external/buildroot/package/openhd/Config.in | 11 + external/buildroot/package/openhd/openhd.mk | 41 ++++ external/setenv.sh | 10 + external/updates/Config.in | 123 ++++++++++ external/updates/poco.hash | 3 + external/updates/poco.mk | 109 +++++++++ linux_5.10 | 2 +- 12 files changed, 431 insertions(+), 251 deletions(-) create mode 100644 external/br2-external/openhd/Config.in create mode 100644 external/br2-external/openhd/openhd.mk.template create mode 100644 external/buildroot/package/openhd/Config.in create mode 100644 external/buildroot/package/openhd/openhd.mk create mode 100644 external/updates/Config.in create mode 100644 external/updates/poco.hash create mode 100644 external/updates/poco.mk diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5f00ce14..1bed201b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,83 +1,26 @@ name: Build and Create Release on Tag on: - create: - tags: - - '**' # match all tags - - workflow_dispatch: - inputs: - tag_name: - description: 'Tag name for the release' - required: true - type: string + push: jobs: build-and-release: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: target: - sg2002_recamera_emmc - - sg2002_recamera_sd - + #- sg2002_recamera_sd steps: - - name: Determine tag name - id: tag-name - run: | - if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then - echo "Tag name provided through workflow_dispatch: ${{ github.event.inputs.tag_name }}" - echo "tag_name=${{ github.event.inputs.tag_name }}" >> "$GITHUB_OUTPUT" - elif [ "${{ github.event_name }}" == "create" ]; then - echo "Tag name provided through create event: ${GITHUB_REF#refs/tags/}" - echo "tag_name=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" - else - echo "Unknown event type" - exit 1 - fi - name: Checkout code uses: actions/checkout@v4.1.7 with: fetch-depth: 1 - - name: Get CHANGELOG.md entry - id: changelog - env: - CURRENT_TARGET: ${{ matrix.target }} - run: | - TAG=${{ steps.tag-name.outputs.tag_name }} - echo TAG=$TAG - - # Get the title and content of CHANGELOG.md entry - TITLE=$(grep "^## ${TAG}" CHANGELOG.md | awk '{print $2" "$3}' | tr -d '\n') - echo $TITLE - echo "changelog_title=$TITLE" >> $GITHUB_OUTPUT - CONTENT=$(mktemp) - awk 'BEGIN {flag=0} /^## '${TAG}'/ {flag=1} flag {if (NF && !/^## /) {print}} /^## / && !/^## '${TAG}'/ {flag=0}' CHANGELOG.md > "$CONTENT" - echo "changelog_content="$CONTENT"" >> $GITHUB_OUTPUT - cat $CONTENT - - # Check if title and content are not empty - if [ -z "$TITLE" ]; then echo "Title is empty. Exiting with status 1."; exit 1; fi - if [ ! -s "$CONTENT" ]; then echo "Content is empty. Exiting with status 1."; exit 1; fi - - # Check if target is in the $CONTENT - if grep -q "### ${CURRENT_TARGET}" "$CONTENT"; then - echo "Found target in CONTENT: ${CURRENT_TARGET}" - echo "skip_workflow=false" >> $GITHUB_OUTPUT - else - echo "Target not found in CONTENT: ${CURRENT_TARGET}" - echo "skip_workflow=true" >> $GITHUB_OUTPUT - fi - - # Watch log - echo GITHUB_OUTPUT=$GITHUB_OUTPUT - cat $GITHUB_OUTPUT - - name: Install dependencies - if: steps.changelog.outputs.skip_workflow == 'false' run: | + sudo apt update sudo apt-get remove aria2 ansible shellcheck rpm xorriso zsync \ clang-6.0 lldb-6.0 lld-6.0 clang-format-6.0 clang-8 lldb-8 lld-8 clang-format-8 \ clang-9 lldb-9 lld-9 clangd-9 clang-format-9 \ @@ -115,14 +58,14 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential ninja-build automake autoconf libtool wget curl git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils \ - android-sdk-ext4-utils jq cmake python3-distutils tclsh scons parallel ssh-client tree python3-dev python3-pip device-tree-compiler libssl-dev ssh cpio \ - squashfs-tools fakeroot libncurses5 flex bison mtools + jq genext2fs cmake python3-distutils tclsh scons parallel ssh-client tree python3-dev python3-pip device-tree-compiler libssl-dev ssh cpio \ + squashfs-tools fakeroot libncurses5 flex bison mtools libpoco-dev + sudo apt-get install -y pkg-config build-essential ninja-build automake autoconf libtool wget curl git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils jq python3-distutils scons parallel tree python3-dev python3-pip device-tree-compiler ssh cpio fakeroot libncurses5 flex bison libncurses5-dev genext2fs rsync unzip dosfstools mtools tcl openssh-client cmake expect libconfuse2 sudo apt-get clean df -h - name: Build ${{ matrix.target }} id: build - if: steps.changelog.outputs.skip_workflow == 'false' run: | echo `pwd` git submodule update --init --recursive --depth 1 @@ -130,147 +73,11 @@ jobs: DIR=output/${{ matrix.target }}/install/soc_${{ matrix.target }} echo "output_dir=./$DIR" >> $GITHUB_OUTPUT du -h -d1 - - - name: Check if release exists - id: check_release - if: steps.changelog.outputs.skip_workflow == 'false' - run: | - # Todo: avoid confilict - sleep $((RANDOM % 30)) - - TAG=${{ steps.tag-name.outputs.tag_name }} - RELEASE_URL="https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG" - RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" $RELEASE_URL) - RELEASE_EXISTS=$(echo $RESPONSE | jq -r '.message // empty') - if [[ -n "$RELEASE_EXISTS" && "$RELEASE_EXISTS" == "Not Found" ]]; then - echo "Release for tag $TAG does not exist." - echo "tag_exist=false" >> $GITHUB_OUTPUT - else - echo "Release for tag $TAG already exists." - echo "tag_exist=true" >> $GITHUB_OUTPUT - - UPLOAD_URL=$(echo "$RESPONSE" | jq -r '.upload_url // empty') - echo "upload_url=$UPLOAD_URL" >> $GITHUB_OUTPUT - fi - - - name: Create release ${{ steps.changelog.outputs.changelog_title }} - id: create_release - if: steps.changelog.outputs.skip_workflow == 'false' && steps.check_release.outputs.tag_exist == 'false' - uses: actions/create-release@v1.1.4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.tag-name.outputs.tag_name }} - release_name: ${{ steps.changelog.outputs.changelog_title }} - body_path: ${{ steps.changelog.outputs.changelog_content }} - draft: false - prerelease: true - - - name: Preparing upload - id: uploader - if: steps.changelog.outputs.skip_workflow == 'false' - run: | - URL=${{ steps.create_release.outputs.upload_url }} - if [ -z "$URL" ]; then - echo "upload_url=${{ steps.check_release.outputs.upload_url }}" >> $GITHUB_OUTPUT - else - echo "upload_url=${URL}" >> $GITHUB_OUTPUT - fi - - # Preparing files to upload - OUTPUT=${{ steps.build.outputs.output_dir }} - - file_suffixes=("md5sum.txt" "emmc.zip" "ota.zip" "recovery.zip" "sd.zip" "emmc_sd_compat.zip" "swu.zip") - for suffix in "${file_suffixes[@]}"; do - file_path=$(find $OUTPUT/ -maxdepth 1 -name "*${suffix}") - if [ -n "$file_path" ]; then - file_name=$(basename "$file_path") - variable_name="${suffix%.*}_path" - echo "${variable_name}=${file_path}" >> "$GITHUB_OUTPUT" - variable_name="${suffix%.*}_name" - echo "${variable_name}=${file_name}" >> "$GITHUB_OUTPUT" - else - echo "No ${suffix} file found in $OUTPUT" - fi - done - - # watch log - echo GITHUB_OUTPUT=$GITHUB_OUTPUT - cat $GITHUB_OUTPUT - - - name: Upload md5sum file - uses: actions/upload-release-asset@v1.0.2 - if: steps.changelog.outputs.skip_workflow == 'false' && steps.uploader.outputs.md5sum_path != '' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.uploader.outputs.upload_url }} - asset_path: ${{ steps.uploader.outputs.md5sum_path }} - asset_name: ${{ steps.uploader.outputs.md5sum_name }} - asset_content_type: text/plain - - - name: Upload emmc package - uses: actions/upload-release-asset@v1.0.2 - if: steps.changelog.outputs.skip_workflow == 'false' && steps.uploader.outputs.emmc_path != '' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.uploader.outputs.upload_url }} - asset_path: ${{ steps.uploader.outputs.emmc_path }} - asset_name: ${{ steps.uploader.outputs.emmc_name }} - asset_content_type: application/zip - - - name: Upload ota package - uses: actions/upload-release-asset@v1.0.2 - if: steps.changelog.outputs.skip_workflow == 'false' && steps.uploader.outputs.ota_path != '' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.uploader.outputs.upload_url }} - asset_path: ${{ steps.uploader.outputs.ota_path }} - asset_name: ${{ steps.uploader.outputs.ota_name }} - asset_content_type: application/zip - - - name: Upload recovery package - uses: actions/upload-release-asset@v1.0.2 - if: steps.changelog.outputs.skip_workflow == 'false' && steps.uploader.outputs.recovery_path != '' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.uploader.outputs.upload_url }} - asset_path: ${{ steps.uploader.outputs.recovery_path }} - asset_name: ${{ steps.uploader.outputs.recovery_name }} - asset_content_type: application/zip - - - name: Upload sd package - uses: actions/upload-release-asset@v1.0.2 - if: steps.changelog.outputs.skip_workflow == 'false' && steps.uploader.outputs.sd_path != '' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.uploader.outputs.upload_url }} - asset_path: ${{ steps.uploader.outputs.sd_path }} - asset_name: ${{ steps.uploader.outputs.sd_name }} - asset_content_type: application/zip - - - name: Upload emmc_sd_compat package - uses: actions/upload-release-asset@v1.0.2 - if: steps.changelog.outputs.skip_workflow == 'false' && steps.uploader.outputs.emmc_sd_compat_path != '' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.uploader.outputs.upload_url }} - asset_path: ${{ steps.uploader.outputs.emmc_sd_compat_path }} - asset_name: ${{ steps.uploader.outputs.emmc_sd_compat_name }} - asset_content_type: application/zip + ls -a - - name: Upload swu package - uses: actions/upload-release-asset@v1.0.2 - if: steps.changelog.outputs.skip_workflow == 'false' && steps.uploader.outputs.swu_path != '' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload to Github + uses: 'actions/upload-artifact@v4' with: - upload_url: ${{ steps.uploader.outputs.upload_url }} - asset_path: ${{ steps.uploader.outputs.swu_path }} - asset_name: ${{ steps.uploader.outputs.swu_name }} - asset_content_type: application/zip + name: "upload" + path: | + output/${{ matrix.target }}/install/soc_${{ matrix.target }} diff --git a/external/br2-external/Config.in b/external/br2-external/Config.in index 2aad1c53..2e8aee56 100644 --- a/external/br2-external/Config.in +++ b/external/br2-external/Config.in @@ -1,4 +1,3 @@ source "$BR2_EXTERNAL_BR2EXT_PATH/reCamera/Config.in" -source "$BR2_EXTERNAL_BR2EXT_PATH/sscma-supervisor/Config.in" -source "$BR2_EXTERNAL_BR2EXT_PATH/sscma-app/Config.in" source "$BR2_EXTERNAL_BR2EXT_PATH/libhv/Config.in" +source "$BR2_EXTERNAL_BR2EXT_PATH/openhd/Config.in" \ No newline at end of file diff --git a/external/br2-external/openhd/Config.in b/external/br2-external/openhd/Config.in new file mode 100644 index 00000000..da2a5629 --- /dev/null +++ b/external/br2-external/openhd/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_OPENHD + bool "openhd" + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBSODIUM + select BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP + + help + OpenHD package \ No newline at end of file diff --git a/external/br2-external/openhd/openhd.mk.template b/external/br2-external/openhd/openhd.mk.template new file mode 100644 index 00000000..70f4bb4c --- /dev/null +++ b/external/br2-external/openhd/openhd.mk.template @@ -0,0 +1,20 @@ +################################################################################ +# +# OpenHD +# +################################################################################ +$(info Building the OpenHD template package...) + +OPENHD_SITE = https://github.com/OpenHD/OpenHD +OPENHD_SITE_METHOD = git +OPENHD_GIT_SUBMODULES = YES +OPENHD_VERSION = {{VERSION}} +OPENHD_SUBDIR = OpenHD + +OPENHD_INSTALL_STAGING = NO +OPENHD_INSTALL_TARGET = YES + +OPENHD_CONF_OPTS = -DENABLE_USB_CAMERAS=OFF +OPENHD_DEPENDENCIES = libsodium gstreamer1 gst1-plugins-base libpcap host-pkgconf +$(eval $(cmake-package)) + diff --git a/external/buildroot/configs/cvitek_CV181X_musl_riscv64_defconfig b/external/buildroot/configs/cvitek_CV181X_musl_riscv64_defconfig index 0c11827c..6e095c3d 100644 --- a/external/buildroot/configs/cvitek_CV181X_musl_riscv64_defconfig +++ b/external/buildroot/configs/cvitek_CV181X_musl_riscv64_defconfig @@ -182,7 +182,7 @@ BR2_TOOLCHAIN_HAS_ATOMIC=y # BR2_ROOTFS_SKELETON_DEFAULT=y # BR2_ROOTFS_SKELETON_CUSTOM is not set -BR2_TARGET_GENERIC_HOSTNAME="reCamera" +BR2_TARGET_GENERIC_HOSTNAME="Buildroot" BR2_TARGET_GENERIC_ISSUE="" BR2_TARGET_GENERIC_PASSWD_SHA256=y # BR2_TARGET_GENERIC_PASSWD_SHA512 is not set @@ -258,6 +258,42 @@ BR2_PACKAGE_SKELETON_INIT_SYSV=y # dt needs a glibc or uClibc toolchain w/ threads # # BR2_PACKAGE_DUMA is not set + +# Audio and video applications +# +BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS=y +BR2_PACKAGE_GSTREAMER1=y +BR2_PACKAGE_GSTREAMER1_PARSE=y +BR2_PACKAGE_GSTREAMER1_TRACE=y +BR2_PACKAGE_GSTREAMER1_PLUGIN_REGISTRY=y +BR2_PACKAGE_GST1_PLUGINS_BASE=y +# BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT=y +# BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK=y +# BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE=y +BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TYPEFIND=y +BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOSCALE=y +# BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME=y +# OPENHD +BR2_PACKAGE_OPENHD=y +#BR2_PACKAGE_OPENHD_AIR_FILES=y +#BR2_PACKAGE_RTL8812AU_OPENHD=y + +BR2_PACKAGE_GSTREAMER1_GST_DEBUG=n +BR2_PACKAGE_GSTREAMER1_INSTALL_TOOLS=n +#BR2_PACKAGE_GSTREAMER1_PARSE=y +BR2_PACKAGE_GST1_PLUGINS_GOOD=y +BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_UDP=y +BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTP=y + +BR2_PACKAGE_GST1_PLUGINS_BAD=y +BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOPARSERS=y +# BR2_PACKAGE_GST1_PLUGINS_GOOD is not set +# BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AVI is not set +# BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ISOMP4 is not set +# BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVPARSE is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD is not set +# BR2_PACKAGE_GST1_PLUGINS_UGLY is not set + # BR2_PACKAGE_FIO is not set BR2_PACKAGE_GDB_ARCH_SUPPORTS=y BR2_PACKAGE_GDB=y @@ -342,18 +378,20 @@ BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS=y # BR2_PACKAGE_LIBCAMERA is not set BR2_PACKAGE_LIVE555=y + # # Interpreter languages and scripting # -BR2_PACKAGE_NODEJS_ARCH_SUPPORTS=y -BR2_PACKAGE_NODEJS=y -BR2_PACKAGE_NODEJS_NPM=y -BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL="node-red@3.1.11" -BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS="" +# BR2_PACKAGE_NODEJS_ARCH_SUPPORTS=y +# BR2_PACKAGE_NODEJS=y +# BR2_PACKAGE_NODEJS_NPM=y +# BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL="node-red@3.1.11" +# BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS="" BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON3_PY_PYC=y BR2_PACKAGE_PYTHON3_UNICODEDATA=y +BR2_PACKAGE_EXPAT=Y # # libcgroup needs a glibc toolchain w/ C++ @@ -363,7 +401,8 @@ BR2_PACKAGE_MUSL_COMPAT_HEADERS=y # BR2_PACKAGE_ORC is not set # BR2_PACKAGE_P11_KIT is not set BR2_PACKAGE_POCO_ARCH_SUPPORTS=y -# BR2_PACKAGE_POCO is not set +BR2_PACKAGE_POCO=y +BR2_PACKAGE_POCO_NET=y BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS=y # BR2_PACKAGE_PROTOBUF is not set # BR2_PACKAGE_PROTOBUF_C is not set @@ -371,41 +410,41 @@ BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS=y # # Networking applications # -BR2_PACKAGE_AVAHI=y -BR2_PACKAGE_AVAHI_AUTOIPD=y -BR2_PACKAGE_AVAHI_DAEMON=y -BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y -BR2_PACKAGE_MOSQUITTO=y -BR2_PACKAGE_MOSQUITTO_BROKER=y -BR2_PACKAGE_NGINX=y -BR2_PACKAGE_NGINX_HTTP=y -BR2_PACKAGE_NGINX_HTTP_CHARSET_MODULE=y -BR2_PACKAGE_NGINX_HTTP_GZIP_MODULE=y -BR2_PACKAGE_NGINX_HTTP_SSI_MODULE=y -BR2_PACKAGE_NGINX_HTTP_USERID_MODULE=y -BR2_PACKAGE_NGINX_HTTP_ACCESS_MODULE=y -BR2_PACKAGE_NGINX_HTTP_AUTH_BASIC_MODULE=y -BR2_PACKAGE_NGINX_HTTP_AUTOINDEX_MODULE=y -BR2_PACKAGE_NGINX_HTTP_GEO_MODULE=y -BR2_PACKAGE_NGINX_HTTP_MAP_MODULE=y -BR2_PACKAGE_NGINX_HTTP_SPLIT_CLIENTS_MODULE=y -BR2_PACKAGE_NGINX_HTTP_REFERER_MODULE=y -BR2_PACKAGE_NGINX_HTTP_REWRITE_MODULE=y -BR2_PACKAGE_NGINX_HTTP_PROXY_MODULE=y -BR2_PACKAGE_NGINX_HTTP_FASTCGI_MODULE=y -BR2_PACKAGE_NGINX_HTTP_UWSGI_MODULE=y -BR2_PACKAGE_NGINX_HTTP_SCGI_MODULE=y -BR2_PACKAGE_NGINX_HTTP_MEMCACHED_MODULE=y -BR2_PACKAGE_NGINX_HTTP_LIMIT_CONN_MODULE=y -BR2_PACKAGE_NGINX_HTTP_LIMIT_REQ_MODULE=y -BR2_PACKAGE_NGINX_HTTP_EMPTY_GIF_MODULE=y -BR2_PACKAGE_NGINX_HTTP_BROWSER_MODULE=y -BR2_PACKAGE_NGINX_HTTP_UPSTREAM_IP_HASH_MODULE=y -BR2_PACKAGE_NGINX_HTTP_UPSTREAM_LEAST_CONN_MODULE=y -BR2_PACKAGE_NGINX_HTTP_UPSTREAM_KEEPALIVE_MODULE=y -BR2_PACKAGE_NGINX_HTTP_UPSTREAM_RANDOM_MODULE=y - -BR2_PACKAGE_NGINX_ADD_MODULES="" +# BR2_PACKAGE_AVAHI=y +# BR2_PACKAGE_AVAHI_AUTOIPD=y +# BR2_PACKAGE_AVAHI_DAEMON=y +# BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y +# BR2_PACKAGE_MOSQUITTO=y +# BR2_PACKAGE_MOSQUITTO_BROKER=y +# BR2_PACKAGE_NGINX=y +# BR2_PACKAGE_NGINX_HTTP=y +# BR2_PACKAGE_NGINX_HTTP_CHARSET_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_GZIP_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_SSI_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_USERID_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_ACCESS_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_AUTH_BASIC_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_AUTOINDEX_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_GEO_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_MAP_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_SPLIT_CLIENTS_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_REFERER_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_REWRITE_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_PROXY_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_FASTCGI_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_UWSGI_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_SCGI_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_MEMCACHED_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_LIMIT_CONN_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_LIMIT_REQ_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_EMPTY_GIF_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_BROWSER_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_UPSTREAM_IP_HASH_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_UPSTREAM_LEAST_CONN_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_UPSTREAM_KEEPALIVE_MODULE=y +# BR2_PACKAGE_NGINX_HTTP_UPSTREAM_RANDOM_MODULE=y + +# BR2_PACKAGE_NGINX_ADD_MODULES="" BR2_PACKAGE_OPENSSH=y BR2_PACKAGE_OPENSSH_CLIENT=y @@ -420,6 +459,9 @@ BR2_PACKAGE_LIBCURL_COOKIES_SUPPORT=y BR2_PACKAGE_LIBCURL_EXTRA_PROTOCOLS_FEATURES=y BR2_PACKAGE_LIBCURL_OPENSSL=y +# Other +BR2_PACKAGE_LIBPCAP=y + # # vdr needs a glibc toolchain w/ C++, dynamic library, NPTL, wchar, headers >= 3.9 # @@ -479,6 +521,11 @@ BR2_PACKAGE_UTIL_LINUX_BINARIES=y # BR2_PACKAGE_UTIL_LINUX_UUIDD=y +# +# Text editors and viewers +# +BR2_PACKAGE_NANO=y + # # Filesystem images # diff --git a/external/buildroot/package/openhd/Config.in b/external/buildroot/package/openhd/Config.in new file mode 100644 index 00000000..e26cab7c --- /dev/null +++ b/external/buildroot/package/openhd/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_OPENHD + bool "openhd" + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_POCO + select BR2_PACKAGE_LIBSODIUM + select BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP + + help + OpenHD package diff --git a/external/buildroot/package/openhd/openhd.mk b/external/buildroot/package/openhd/openhd.mk new file mode 100644 index 00000000..52e59e1c --- /dev/null +++ b/external/buildroot/package/openhd/openhd.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# OpenHD +# +################################################################################ +$(info Building the OpenHD package...) + +# The Git repository from which to clone the source code +OPENHD_SITE = https://github.com/openhd/OpenHD.git +OPENHD_SITE_METHOD = git +OPENHD_GIT_SUBMODULES = YES + +# Set the version to the latest commit of the default branch +OPENHD_VERSION = 2.6-evo + +# Enable Git submodules if the project requires them +OPENHD_GIT_SUBMODULES = YES + +# Subdirectory inside the Git repo, if needed (if OpenHD is not in the root) +OPENHD_SUBDIR = OpenHD + +# Install to both the staging directory and target, for linking and runtime +OPENHD_INSTALL_STAGING = YES +OPENHD_INSTALL_TARGET = YES + +# List of dependencies that must be built before OpenHD +OPENHD_DEPENDENCIES = poco libsodium gstreamer1 gst1-plugins-base libpcap host-pkgconf + +# Additional configuration options for the CMake build +OPENHD_CONF_OPTS = \ + -DENABLE_USB_CAMERAS=OFF + +# Print the staging directory +$(info The Staging Directory is: $(STAGING_DIR)) + +# List all files in the staging directory +$(info Listing all files in the staging directory:) +$(shell find $(STAGING_DIR) -type f | xargs -I {} echo {}) + +# Use Buildroot's CMake package infrastructure to handle the build +$(eval $(cmake-package)) diff --git a/external/setenv.sh b/external/setenv.sh index 9d61c7eb..b92b1528 100755 --- a/external/setenv.sh +++ b/external/setenv.sh @@ -10,6 +10,14 @@ function rsync_dir() echo "rsync $1 -> $PROJECT_OUT/$2"; rsync -a --exclude='.git' $1 $PROJECT_OUT/$2 || exit 1 } +################################### +# updating packages before sync +################################### +echo "updating poco" +rm -Rf buildroot-2021.05/package/poco/* +cp -v external/updates/* buildroot-2021.05/package/poco/ + + ################################### # rsync codes ################################### @@ -42,6 +50,8 @@ rsync_dir ./cvi_rtsp ################################### rsync_dir $EXTERNAL/build . rsync_dir $EXTERNAL/buildroot/ $BUILDROOT_DIR/ +echo "patching openhd into config.in" +sed -i '/menu "Audio and video applications"/a\ source "package/openhd/Config.in"' "$BUILDROOT_DIR/package/Config.in" rsync_dir $EXTERNAL/isp_tuning . rsync_dir $EXTERNAL/ramdisk/ ramdisk/ rsync_dir $EXTERNAL/u-boot/ $UBOOT_DIR/ diff --git a/external/updates/Config.in b/external/updates/Config.in new file mode 100644 index 00000000..9bdef125 --- /dev/null +++ b/external/updates/Config.in @@ -0,0 +1,123 @@ +config BR2_PACKAGE_POCO_ARCH_SUPPORTS + bool + default y + depends on !BR2_arc + depends on !BR2_microblaze + depends on !BR2_mipsel + depends on !BR2_or1k + depends on !BR2_RISCV_32 + depends on !BR2_xtensa + +config BR2_PACKAGE_POCO + bool "poco" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # C++17 + # pthread_condattr_setclock + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on !BR2_STATIC_LIBS # dlopen() + depends on BR2_PACKAGE_POCO_ARCH_SUPPORTS + select BR2_PACKAGE_PCRE2 + select BR2_PACKAGE_ZLIB + help + The C++ Portable Components Libraries + + http://pocoproject.org + +if BR2_PACKAGE_POCO + +comment "poco components" + +config BR2_PACKAGE_POCO_ACTIVERECORD + bool "ActiveRecord" + select BR2_PACKAGE_POCO_XML + +config BR2_PACKAGE_POCO_CPP_PARSER + bool "CppParser" + +config BR2_PACKAGE_POCO_CRYPTO + bool "Crypto" + select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if BR2_PACKAGE_LIBOPENSSL + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_POCO_DATA + bool + +config BR2_PACKAGE_POCO_DATA_MYSQL + bool "Data/MySQL" + depends on BR2_USE_MMU # mysql + select BR2_PACKAGE_MARIADB + select BR2_PACKAGE_POCO_DATA + +config BR2_PACKAGE_POCO_DATA_PGSQL + bool "Data/PostgreSQL" + depends on BR2_USE_MMU # postgresql + depends on !BR2_OPTIMIZE_FAST # postgresql + select BR2_PACKAGE_POCO_DATA + select BR2_PACKAGE_POSTGRESQL + +comment "Data/PostgreSQL can't be built with Optimize for fast" + depends on BR2_OPTIMIZE_FAST + +config BR2_PACKAGE_POCO_DATA_SQLITE + bool "Data/SQLite" + select BR2_PACKAGE_POCO_DATA + select BR2_PACKAGE_SQLITE + +config BR2_PACKAGE_POCO_JSON + bool "JSON" + +config BR2_PACKAGE_POCO_JWT + bool "JWT" + select BR2_PACKAGE_POCO_CRYPTO + select BR2_PACKAGE_POCO_JSON + +config BR2_PACKAGE_POCO_MONGODB + bool "MongoDB" + select BR2_PACKAGE_POCO_NET + +config BR2_PACKAGE_POCO_NET + bool "Net" + +config BR2_PACKAGE_POCO_NETSSL_OPENSSL + bool "NetSSL_OpenSSL" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_POCO_CRYPTO + select BR2_PACKAGE_POCO_NET + select BR2_PACKAGE_POCO_UTIL + +config BR2_PACKAGE_POCO_PDF + bool "PDF" + select BR2_PACKAGE_POCO_JSON + select BR2_PACKAGE_POCO_UTIL + select BR2_PACKAGE_POCO_XML + +config BR2_PACKAGE_POCO_PROMETHEUS + bool "Prometheus" + select BR2_PACKAGE_POCO_NET + +config BR2_PACKAGE_POCO_REDIS + bool "Redis" + select BR2_PACKAGE_POCO_NET + +config BR2_PACKAGE_POCO_UTIL + bool "Util" + select BR2_PACKAGE_POCO_XML + +config BR2_PACKAGE_POCO_XML + bool "XML" + select BR2_PACKAGE_EXPAT + +config BR2_PACKAGE_POCO_ZIP + bool "Zip" + select BR2_PACKAGE_POCO_NET + select BR2_PACKAGE_POCO_UTIL + select BR2_PACKAGE_POCO_XML + +endif # BR2_PACKAGE_POCO + +comment "poco needs a toolchain w/ wchar, NPTL, C++, dynamic library, gcc >= 8" + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_8 + depends on BR2_PACKAGE_POCO_ARCH_SUPPORTS diff --git a/external/updates/poco.hash b/external/updates/poco.hash new file mode 100644 index 00000000..0a1e900b --- /dev/null +++ b/external/updates/poco.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 c01221870aa9bccedf1de39890279699207848fe61a0cfb6aeec7c5942c4627f poco-1.13.2.tar.gz +sha256 c4b1e1e5f36d8331737231fefcc30f5714326aec7c387ad59a8115eb0ba7d6b5 LICENSE diff --git a/external/updates/poco.mk b/external/updates/poco.mk new file mode 100644 index 00000000..1b6393ed --- /dev/null +++ b/external/updates/poco.mk @@ -0,0 +1,109 @@ +################################################################################ +# +# Simple Poco Build (Net + Foundation Only) with Logging +# +################################################################################ + +POCO_VERSION = 1.13.2 +POCO_SITE = $(call github,pocoproject,poco,poco-$(POCO_VERSION)-release) +POCO_LICENSE = BSL-1.0 +POCO_LICENSE_FILES = LICENSE +POCO_INSTALL_STAGING = YES + +# Dependencies: Include only the necessary ones for Net and Foundation +POCO_DEPENDENCIES = \ + pcre2 \ + zlib \ + expat \ + openssl + +# Log file for verbose output +POCO_BUILD_LOG = poco_build.log + +# Verbose echo statements to track progress +define POCO_VERBOSE_MSG + @echo "***************************************************************************" + @echo "* Building Poco version $(POCO_VERSION)" + @echo "* Including components: Foundation, Net" + @echo "* Using configuration options: $(POCO_CONF_OPTS)" + @echo "***************************************************************************" +endef + +# Only include Foundation and Net, exclude everything else +POCO_OMIT = \ + PageCompiler \ + Data \ + Data/ODBC \ + Data/MySQL \ + Data/SQLite \ + Data/PostgreSQL \ + JSON \ + JWT \ + MongoDB \ + PDF \ + Prometheus \ + Redis \ + Util \ + XML \ + Zip + +# Always include Foundation and Net components +POCO_CONF_OPTS += --minimal +$(info [INFO] Poco Foundation and Net components included) + +# Disable certain features based on toolchain (e.g., no fpenvironment for uClibc) +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +POCO_CONF_OPTS += --no-fpenvironment --no-wstring +endif + +# Disable fpenvironment for soft floating point configuration +ifeq ($(BR2_SOFT_FLOAT),y) +POCO_CONF_OPTS += --no-fpenvironment +endif + +# Set shared library target by default +POCO_MAKE_TARGET = shared_release + +# Ensure we link against atomic if necessary +POCO_LDFLAGS=$(TARGET_LDFLAGS) +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +POCO_LDFLAGS += -latomic +endif + +# Configure Poco with verbose output and log to file +define POCO_CONFIGURE_CMDS + $(POCO_VERBOSE_MSG) + (cd $(@D); $(TARGET_MAKE_ENV) ./configure \ + --config=Linux \ + --prefix=/usr \ + --ldflags="$(POCO_LDFLAGS)" \ + --omit="$(POCO_OMIT)" \ + $(POCO_CONF_OPTS) \ + --unbundled \ + --no-tests \ + --no-samples) +endef + +# Use $(MAKE1) to avoid failures with highly parallel builds, and log the build process to file +define POCO_BUILD_CMDS + @echo "[INFO] Building Poco with target $(POCO_MAKE_TARGET)" + $(TARGET_MAKE_ENV) $(MAKE1) V=1 POCO_TARGET_OSARCH=$(ARCH) CROSS_COMPILE=$(TARGET_CROSS) \ + DEFAULT_TARGET=$(POCO_MAKE_TARGET) -C $(@D) >> $(POCO_BUILD_LOG) 2>&1 +endef + +# Install into staging directory, and log the installation process to file +define POCO_INSTALL_STAGING_CMDS + @echo "[INFO] Installing Poco into the staging directory" + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(STAGING_DIR) POCO_TARGET_OSARCH=$(ARCH) \ + DEFAULT_TARGET=$(POCO_MAKE_TARGET) install -C $(@D) >> $(POCO_BUILD_LOG) 2>&1 +endef + +# Install into target directory, and log the installation process to file +define POCO_INSTALL_TARGET_CMDS + @echo "[INFO] Installing Poco into the target directory" + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) POCO_TARGET_OSARCH=$(ARCH) \ + DEFAULT_TARGET=$(POCO_MAKE_TARGET) install -C $(@D) >> $(POCO_BUILD_LOG) 2>&1 +endef + +# Evaluate the package +$(eval $(generic-package)) diff --git a/linux_5.10 b/linux_5.10 index 085eec53..479119bd 160000 --- a/linux_5.10 +++ b/linux_5.10 @@ -1 +1 @@ -Subproject commit 085eec53fc4d1935e6736ddad1d6dce5f755dc20 +Subproject commit 479119bd153b7e4ebb87432b6cf5e2c5d06ad158