├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .github └── workflows │ ├── main.yml │ ├── stale.yml │ └── sync_issues.yml ├── .gitignore ├── .gitmodules ├── CHANGELOG.md ├── Makefile ├── README.md ├── external ├── SensorSupportList │ ├── sensor.mk │ ├── sensor.mk.orig │ └── sensor │ │ └── cv182x │ │ ├── Makefile │ │ ├── Makefile.orig │ │ ├── ov_ov5647 │ │ ├── Makefile │ │ ├── ov5647_cmos.c │ │ ├── ov5647_cmos_ex.h │ │ ├── ov5647_cmos_param.h │ │ └── ov5647_sensor_ctl.c │ │ └── sms_sc530ai_2L │ │ ├── Makefile │ │ ├── sc530ai_2L_cmos.c │ │ ├── sc530ai_2L_cmos_ex.h │ │ ├── sc530ai_2L_cmos_param.h │ │ └── sc530ai_2L_sensor_ctl.c ├── br2-external │ ├── Config.in │ ├── external.desc │ ├── external.mk │ ├── libhv │ │ ├── Config.in │ │ └── libhv.mk │ ├── libxcrypt-dev │ │ ├── Config.in │ │ ├── libxcrypt-dev.hash │ │ └── libxcrypt-dev.mk │ ├── opencv4-contrib │ │ ├── Config.in │ │ ├── opencv4-contrib.hash │ │ └── opencv4-contrib.mk │ ├── opencv4 │ │ ├── Config.in │ │ ├── opencv4.hash │ │ └── opencv4.mk │ ├── reCamera │ │ ├── Config.in │ │ └── reCamera.mk │ ├── sscma-node │ │ ├── Config.in │ │ └── sscma-node.mk │ └── sscma-supervisor │ │ ├── Config.in │ │ └── sscma-supervisor.mk ├── build.sh ├── build │ ├── boards │ │ └── cv181x │ │ │ ├── sg2002_recamera_emmc │ │ │ ├── config.json │ │ │ ├── dts_riscv │ │ │ │ └── sg2002_recamera_emmc.dts │ │ │ ├── linux │ │ │ │ └── cvitek_sg2002_recamera_emmc_defconfig │ │ │ ├── memmap.py │ │ │ ├── partition │ │ │ │ └── partition_emmc.xml │ │ │ ├── rootfs │ │ │ │ └── etc │ │ │ │ │ ├── device-name │ │ │ │ │ ├── issue │ │ │ │ │ ├── secret │ │ │ │ │ └── upgrade │ │ │ ├── rootfs_script │ │ │ │ └── clean_rootfs.sh │ │ │ ├── sg2002_recamera_emmc_defconfig │ │ │ └── u-boot │ │ │ │ ├── cvi_board_init.c │ │ │ │ ├── cvitek.h │ │ │ │ └── cvitek_sg2002_recamera_emmc_defconfig │ │ │ ├── sg2002_recamera_sd │ │ │ ├── config.json │ │ │ ├── dts_riscv │ │ │ │ └── sg2002_recamera_sd.dts │ │ │ ├── linux │ │ │ │ └── cvitek_sg2002_recamera_sd_defconfig │ │ │ ├── memmap.py │ │ │ ├── partition │ │ │ │ └── partition_sd.xml │ │ │ ├── rootfs_script │ │ │ │ └── clean_rootfs.sh │ │ │ ├── sg2002_recamera_sd_defconfig │ │ │ └── u-boot │ │ │ │ ├── cvi_board_init.c │ │ │ │ ├── cvitek.h │ │ │ │ └── cvitek_sg2002_recamera_sd_defconfig │ │ │ └── sg2002_xiao_sd │ │ │ ├── config.json │ │ │ ├── dts_riscv │ │ │ └── sg2002_xiao_sd.dts │ │ │ ├── linux │ │ │ └── cvitek_sg2002_xiao_sd_defconfig │ │ │ ├── memmap.py │ │ │ ├── partition │ │ │ └── partition_sd.xml │ │ │ ├── rootfs_script │ │ │ └── clean_rootfs.sh │ │ │ ├── sg2002_xiao_sd_defconfig │ │ │ └── u-boot │ │ │ ├── cvi_board_init.c │ │ │ ├── cvitek.h │ │ │ └── cvitek_sg2002_xiao_sd_defconfig │ ├── sensors │ │ └── sensor_list.json │ └── tools │ │ └── common │ │ ├── sd_tools │ │ ├── sd_gen_burn_image.sh │ │ └── sd_gen_recovery_image.sh │ │ └── sw-description ├── buildroot │ ├── board │ │ └── cvitek │ │ │ └── CV181X │ │ │ ├── overlay │ │ │ ├── etc │ │ │ │ ├── .first_login │ │ │ │ ├── avahi │ │ │ │ │ └── avahi-daemon.conf │ │ │ │ ├── dhcpcd.conf │ │ │ │ ├── dnsmasq │ │ │ │ │ ├── default.conf │ │ │ │ │ ├── usb_only.conf │ │ │ │ │ └── usb_wlan1.conf │ │ │ │ ├── fw_env.config │ │ │ │ ├── hostapd.conf.default │ │ │ │ ├── hostapd_2g4.conf │ │ │ │ ├── hostapd_5g.conf │ │ │ │ ├── hotplug │ │ │ │ │ └── automount.sh │ │ │ │ ├── init.d │ │ │ │ │ ├── S03node-red │ │ │ │ │ ├── S50nginx │ │ │ │ │ ├── S70hardware │ │ │ │ │ ├── S80dnsmasq │ │ │ │ │ ├── S91mdev │ │ │ │ │ └── S99user │ │ │ │ ├── inittab │ │ │ │ ├── mdev.conf │ │ │ │ ├── profile │ │ │ │ ├── run_usb.sh │ │ │ │ ├── ssh │ │ │ │ │ └── sshd_config │ │ │ │ ├── sudoers.d │ │ │ │ │ └── sudo_users │ │ │ │ ├── swupdate │ │ │ │ │ └── conf.d │ │ │ │ │ │ └── swupdate_extra_args.sh │ │ │ │ ├── syslog-ng.conf │ │ │ │ ├── udev │ │ │ │ │ └── rules.d │ │ │ │ │ │ ├── 98-sd-auto-mount.rules │ │ │ │ │ │ └── 99-com.rules │ │ │ │ ├── uhubon.sh │ │ │ │ └── wpa_supplicant.conf │ │ │ ├── lib │ │ │ │ └── firmware │ │ │ │ │ └── brcm │ │ │ │ │ ├── brcmfmac43012-sdio.bin │ │ │ │ │ ├── brcmfmac43012-sdio.clm_blob │ │ │ │ │ ├── brcmfmac43012-sdio.cvitek,cv181x.txt │ │ │ │ │ └── brcmfmac43012-sdio.txt │ │ │ └── usr │ │ │ │ ├── bin │ │ │ │ ├── gimbal │ │ │ │ └── rootfs_rw │ │ │ │ └── lib │ │ │ │ └── node_modules │ │ │ │ └── node-red │ │ │ │ ├── custom.css │ │ │ │ └── settings.js │ │ │ └── users_table.txt │ ├── configs │ │ └── cvitek_CV181X_musl_riscv64_defconfig │ ├── package │ │ ├── busybox │ │ │ └── busybox.fragment │ │ ├── c-ares │ │ │ ├── Config.in │ │ │ ├── c-ares.hash │ │ │ └── c-ares.mk │ │ ├── icu │ │ │ ├── 0001-dont-build-static-dynamic-twice.patch │ │ │ ├── 0002-workaround-toolchain-bugs.patch │ │ │ ├── 0003-link-icudata-as-data-only.patch │ │ │ ├── 0004-fix-static-linking-with-icu-uc.patch │ │ │ ├── Config.in │ │ │ ├── icu.hash │ │ │ └── icu.mk │ │ ├── libuv │ │ │ ├── Config.in │ │ │ ├── libuv.hash │ │ │ └── libuv.mk │ │ ├── nodejs │ │ │ ├── 0001-add-qemu_wrapper-support.patch │ │ │ ├── 0002-include-obj-name-in-shared-intermediate.patch │ │ │ ├── 0003-lib-internal-modules-cjs-loader.js-adjust-default-pa.patch │ │ │ ├── 0004-fix-v8-lite-mode-compile-errors.patch │ │ │ ├── 0005-fix-WebAssembly-is-not-defined.patch │ │ │ ├── Config.in │ │ │ ├── Config.in.host │ │ │ ├── nodejs.hash │ │ │ ├── nodejs.mk │ │ │ └── v8-qemu-wrapper.in │ │ ├── openssh │ │ │ ├── Config.in │ │ │ ├── S50sshd │ │ │ ├── openssh.hash │ │ │ ├── openssh.mk │ │ │ ├── sshd-sysusers.conf │ │ │ └── sshd.service │ │ └── swupdate │ │ │ ├── 10-mongoose-args │ │ │ ├── 90-start-progress │ │ │ ├── Config.in │ │ │ ├── S80swupdate │ │ │ ├── swupdate-progress.service │ │ │ ├── swupdate-usb.rules │ │ │ ├── swupdate-usb@.service │ │ │ ├── swupdate.config │ │ │ ├── swupdate.hash │ │ │ ├── swupdate.mk │ │ │ ├── swupdate.service │ │ │ ├── swupdate.sh │ │ │ ├── swupdate.socket │ │ │ └── tmpfiles-swupdate.conf │ └── toolchain │ │ └── toolchain-external │ │ ├── pkg-toolchain-external.mk │ │ └── toolchain-external-custom │ │ └── Config.in.options ├── configs │ ├── sg2002_recamera_emmc_defconfig │ ├── sg2002_recamera_sd_defconfig │ └── sg2002_xiao_sd_defconfig ├── isp_tuning │ └── cv181x │ │ └── src │ │ └── ov_ov5647 │ │ ├── ov_ov5647_sdr.bin │ │ └── ov_ov5647_sdr.json ├── ramdisk │ └── rootfs │ │ └── overlay │ │ └── cv181x_musl_riscv64 │ │ └── system │ │ ├── auto.sh │ │ ├── auto_download.sh │ │ ├── ko │ │ └── loadsystemko.sh │ │ ├── rootfs_overlay.sh │ │ ├── upgrade.sh │ │ ├── usb-ncm.sh │ │ ├── usb-net.sh │ │ └── usb-rndis.sh ├── setenv.sh ├── subtree.xml └── u-boot │ └── include │ └── configs │ └── cv181x-asic.h └── scripts ├── git_version_v4.1.6.txt ├── repo_clone.sh └── subtree.xml /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG VARIANT="noble" 2 | FROM buildpack-deps:${VARIANT}-curl 3 | 4 | LABEL dev.containers.features="common" 5 | 6 | ARG VARIANT 7 | RUN if [ "$VARIANT" = "noble" ]; then \ 8 | if id "ubuntu" &>/dev/null; then \ 9 | echo "Deleting user 'ubuntu' for $VARIANT" && userdel -f -r ubuntu || echo "Failed to delete ubuntu user for $VARIANT"; \ 10 | else \ 11 | echo "User 'ubuntu' does not exist for $VARIANT"; \ 12 | fi; \ 13 | fi 14 | 15 | RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - 16 | 17 | RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 18 | && apt-get -y install --no-install-recommends \ 19 | build-essential \ 20 | ninja-build \ 21 | automake \ 22 | autoconf \ 23 | libtool \ 24 | wget \ 25 | curl \ 26 | git \ 27 | libssl-dev \ 28 | bc \ 29 | squashfs-tools \ 30 | android-sdk-libsparse-utils \ 31 | jq \ 32 | cmake \ 33 | tclsh \ 34 | scons \ 35 | parallel \ 36 | ssh-client \ 37 | tree \ 38 | python3-dev \ 39 | python3-pip \ 40 | device-tree-compiler \ 41 | libssl-dev \ 42 | cpio \ 43 | squashfs-tools \ 44 | fakeroot \ 45 | flex \ 46 | bison \ 47 | mtools \ 48 | gcc \ 49 | g++ \ 50 | libbz2-dev \ 51 | lib32c-dev \ 52 | lib32stdc++6 \ 53 | libpcre3-dev \ 54 | unzip \ 55 | ca-certificates \ 56 | lsb-release \ 57 | curl \ 58 | gnupg \ 59 | sudo \ 60 | ca-certificates \ 61 | nodejs -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reCameraOS Devcontainer", 3 | "build": { 4 | "dockerfile": "./Dockerfile", 5 | "context": "." 6 | }, 7 | "features": { 8 | "ghcr.io/devcontainers/features/common-utils:2": { 9 | "installZsh": "true", 10 | "username": "vscode", 11 | "userUid": "1000", 12 | "userGid": "1000", 13 | "upgradePackages": "true" 14 | }, 15 | "ghcr.io/devcontainers/features/git:1": { 16 | "version": "latest", 17 | "ppa": "false" 18 | } 19 | }, 20 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 21 | // "forwardPorts": [], 22 | // Use 'postCreateCommand' to run commands after the container is created. 23 | // "postCreateCommand": "uname -a", 24 | // Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. 25 | "remoteUser": "vscode" 26 | } -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: 'Close stale issues and PRs' 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '0 4 * * *' 7 | 8 | jobs: 9 | stale: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout repository 14 | uses: actions/checkout@v4 15 | 16 | - name: Checkout script repository 17 | uses: actions/checkout@v4 18 | with: 19 | repository: Seeed-Studio/sync-github-all-issues 20 | path: ci 21 | 22 | - name: Run script 23 | run: ./ci/tools/stale.sh 24 | env: 25 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 26 | -------------------------------------------------------------------------------- /.github/workflows/sync_issues.yml: -------------------------------------------------------------------------------- 1 | name: Automate Issue Management 2 | 3 | on: 4 | issues: 5 | types: 6 | - opened 7 | - edited 8 | - assigned 9 | - unassigned 10 | - labeled 11 | - unlabeled 12 | - reopened 13 | 14 | jobs: 15 | add_issue_to_project: 16 | runs-on: ubuntu-latest 17 | steps: 18 | - name: Add issue to GitHub Project 19 | uses: actions/add-to-project@v1.0.2 20 | with: 21 | project-url: https://github.com/orgs/Seeed-Studio/projects/17 22 | github-token: ${{ secrets.ISSUE_ASSEMBLE }} 23 | labeled: bug 24 | label-operator: NOT -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build 2 | # freertos 3 | # fsbl 4 | # host-tools 5 | # isp_tuning 6 | # linux_5.10 7 | # cvi_mpi 8 | # opensbi 9 | # osdrv 10 | # ramdisk 11 | # u-boot-2021.10 12 | # buildroot-2021.05 13 | # oss 14 | # cviruntime 15 | # cvikernel 16 | # cvimath 17 | # cvibuilder 18 | # cnpy 19 | # flatbuffers 20 | # install 21 | 22 | 23 | # OS generated files 24 | .DS_Store 25 | 26 | # Build output dirs 27 | /release 28 | output*/ 29 | 30 | # Certificates 31 | *.pem 32 | 33 | # vscode generated files 34 | .vscode* 35 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "host-tools"] 2 | path = host-tools 3 | url = https://github.com/sophgo/host-tools.git 4 | branch = master 5 | [submodule "build"] 6 | path = build 7 | url = https://github.com/sophgo/build.git 8 | branch = sg200x-dev 9 | [submodule "freertos"] 10 | path = freertos 11 | url = https://github.com/sophgo/freertos.git 12 | branch = sg200x-dev 13 | [submodule "FreeRTOS-Kernel"] 14 | path = FreeRTOS-Kernel 15 | url = https://github.com/sophgo/FreeRTOS-Kernel.git 16 | branch = sg200x-dev 17 | [submodule "Lab-Project-FreeRTOS-POSIX"] 18 | path = Lab-Project-FreeRTOS-POSIX 19 | url = https://github.com/sophgo/Lab-Project-FreeRTOS-POSIX.git 20 | branch = sg200x-dev 21 | [submodule "fsbl"] 22 | path = fsbl 23 | url = https://github.com/sophgo/fsbl.git 24 | branch = sg200x-dev 25 | [submodule "opensbi"] 26 | path = opensbi 27 | url = https://github.com/sophgo/opensbi.git 28 | branch = sg200x-dev 29 | [submodule "u-boot-2021.10"] 30 | path = u-boot-2021.10 31 | url = https://github.com/sophgo/u-boot-2021.10.git 32 | branch = sg200x-dev 33 | [submodule "linux_5.10"] 34 | path = linux_5.10 35 | url = https://github.com/sophgo/linux_5.10.git 36 | branch = sg200x-dev 37 | [submodule "osdrv"] 38 | path = osdrv 39 | url = https://github.com/sophgo/osdrv.git 40 | branch = sg200x-dev 41 | [submodule "ramdisk"] 42 | path = ramdisk 43 | url = https://github.com/sophgo/ramdisk.git 44 | branch = sg200x-dev 45 | [submodule "oss"] 46 | path = oss 47 | url = https://github.com/sophgo/oss.git 48 | branch = master 49 | [submodule "cvi_rtsp"] 50 | path = cvi_rtsp 51 | url = https://github.com/sophgo/cvi_rtsp.git 52 | branch = master 53 | [submodule "cvi_mpi"] 54 | path = cvi_mpi 55 | url = https://github.com/sophgo/cvi_mpi.git 56 | branch = sg200x-dev 57 | [submodule "isp_tuning"] 58 | path = isp_tuning 59 | url = https://github.com/sophgo/isp_tuning.git 60 | branch = sg200x-dev 61 | [submodule "SensorSupportList"] 62 | path = SensorSupportList 63 | url = https://github.com/sophgo/SensorSupportList.git 64 | branch = sg200x-dev 65 | [submodule "cvibuilder"] 66 | path = cvibuilder 67 | url = https://github.com/sophgo/cvibuilder.git 68 | branch = sg200x-dev 69 | [submodule "cvikernel"] 70 | path = cvikernel 71 | url = https://github.com/sophgo/cvikernel.git 72 | branch = sg200x-dev 73 | [submodule "cviruntime"] 74 | path = cviruntime 75 | url = https://github.com/sophgo/cviruntime.git 76 | branch = sg200x-dev 77 | [submodule "cvimath"] 78 | path = cvimath 79 | url = https://github.com/sophgo/cvimath.git 80 | branch = sg200x-dev 81 | [submodule "flatbuffers"] 82 | path = flatbuffers 83 | url = https://github.com/sophgo/flatbuffers.git 84 | branch = master 85 | [submodule "cnpy"] 86 | path = cnpy 87 | url = https://github.com/sophgo/cnpy.git 88 | branch = tpu 89 | [submodule "buildroot-2021.05"] 90 | path = buildroot-2021.05 91 | url = https://github.com/sophgo/buildroot-2021.05.git 92 | branch = sg200x-dev 93 | [submodule "tdl_sdk"] 94 | path = tdl_sdk 95 | url = https://github.com/sophgo/tdl_sdk.git 96 | branch = master 97 | [submodule "ive"] 98 | path = ive 99 | url = https://github.com/sophgo/ive.git 100 | branch = master 101 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.2.0 (2025-03-31) 2 | 3 | ### sg2002_recamera_emmc 4 | 5 | - New Features: 6 | - Add gimbal automatic calibration 7 | - Add Node-red gimbal flow 8 | 9 | - Bug Fixes: 10 | - Resolved various bugs in the SSCMA 11 | 12 | ## 0.1.5 (2025-01-22) 13 | 14 | ### sg2002_recamera_emmc 15 | 16 | - New Features: 17 | - Added support for device discovery 18 | - Added support for 63-byte WiFi passwords 19 | - Added support for audio recording 20 | - Added ability to enable/disable nodes in the SSCMA Node 21 | - Introduced a more user-friendly interface for improved interaction 22 | 23 | - Bug Fixes: 24 | - Resolved various bugs in the SSCMA Node 25 | - Resolved various bugs in the SSCMA Supervisor 26 | 27 | If you need any more modifications, feel free to ask! 28 | ## 0.1.4 (2024-12-23) 29 | 30 | ### sg2002_recamera_emmc 31 | 32 | - New features: 33 | - support fip and boot partition auto update 34 | - support /mnt/system/upgrade.sh start *ota.zip 35 | - support gimbal (spi-can mcp2518fd) 36 | - add cvi_pinmux tool 37 | - use udev instead of mdev 38 | - udev rules for sd auto mount 39 | 40 | - Fix bugs: 41 | - factory reset failed (if sg2002_recamera_emmc_md5sum.txt is not exist) 42 | - solve the problem that the pc cannot access the Internet when connected via usb 43 | - dnsmasq fails to run without wifi 44 | 45 | ## 0.1.3 (2024-11-08) 46 | 47 | ### sg2002_recamera_emmc 48 | 49 | - New features: 50 | - support 64G emmc 51 | 52 | ## 0.1.2 (2024-11-01) 53 | 54 | ### sg2002_recamera_emmc 55 | 56 | - New features: 57 | - support global.gc operation 58 | - built-in model files 59 | 60 | - Fix bugs: 61 | - solve some supervisor bugs 62 | - solve some sscma-node bugs 63 | 64 | ## 0.1.1 (2024-10-30) 65 | 66 | ### sg2002_recamera_emmc 67 | 68 | - New features: 69 | - limit node-red to version 3.1.14 70 | 71 | - Fix bugs: 72 | - solve some supervisor bugs 73 | - fix sd_gen_recovery_image.sh script bugs 74 | 75 | ## 0.1.0 (2024-10-28) 76 | 77 | ### sg2002_recamera_emmc 78 | 79 | - New features: 80 | - update ov5647 isp params (denoise) 81 | - optimize ota 82 | 83 | ## 0.0.9 (2024-10-26) 84 | 85 | ### sg2002_recamera_emmc 86 | 87 | - New features: 88 | - enable nodejs --v8-lite-mode (disable WebAssembly) 89 | - optimize system upgrade operations 90 | 91 | - Fix bugs: 92 | - remove node-red-dashboard from node-red 93 | - solve some sscma-node bug 94 | 95 | ## 0.0.8 (2024-10-22) 96 | 97 | ### sg2002_recamera_emmc 98 | 99 | - New features: 100 | - auto swapon /userdata/.swapfile 101 | - reduce node-red startup time (skip npm -v) 102 | - supervior 103 | - add the operation that AP will automatically turn on or off according to the status of WiFi 104 | - split the wifi scan into two operations: scan wifi and get scan results 105 | - add a judgement that an upgrade is in progress 106 | 107 | - Fix bugs: 108 | - solve some supervisor bug 109 | - solve some sscma-node bug 110 | 111 | ## 0.0.7 (2024-10-16) 112 | 113 | ### sg2002_recamera_emmc 114 | 115 | - New features: 116 | - reduce ION_SIZE to 50M 117 | - kernel support swap 118 | - kernel support advise syscalls 119 | - update c-ares to 1.32.2 120 | - update libuv to 1.48.0 121 | - update nodejs to 22.8.0 122 | - update node-red to 4.0.0 123 | - sd supports hotplug 124 | - close swupdate auto start (`sudo /usr/lib/swupdate/swupdate.sh`) 125 | 126 | - Fix bugs: 127 | - solve some supervisor bug 128 | - solve some sscma-node bug 129 | 130 | ## 0.0.6 (2024-10-12) 131 | 132 | ### sg2002_recamera_emmc 133 | 134 | - New features: 135 | - sensor auto detection (ov5647/sc530ai) 136 | - supports restore to factory 137 | - get mac & sn from efuse 138 | - add sscma-node program 139 | - supervisor 140 | - support https service 141 | - add service status detection 142 | - add a feature for file management 143 | - add wifi password verification operation 144 | 145 | - Fix bugs: 146 | - solve some compilation issues 147 | - solve some supervisor bugs 148 | 149 | ## 0.0.5 (2024-09-25) 150 | 151 | ### sg2002_recamera_emmc 152 | 153 | - New features: 154 | - update node-red interface style 155 | - supervisor 156 | - add APIs for uploading models and getting model information 157 | - allow CORS 158 | 159 | - Fix bugs: 160 | - fix the problem that some configuration files did not exist 161 | - node-red start failed when reset system 162 | - solve some supervisor bugs 163 | 164 | - Docs: 165 | - add compilation notes 166 | 167 | ## 0.0.4 (2024-09-12) 168 | 169 | ### sg2002_recamera_emmc 170 | 171 | - New features: 172 | - buildin supervisor 173 | - buildin npm@8.11.0 and node-red@v3.1.11 174 | - update ov5647 isp params 175 | - supports rootfs overlay (/bin /etc /lib /home /root /usr /var) 176 | - add recamera as default user 177 | - supports sudo 178 | - upgrade icu to 73-2 179 | 180 | - Fix bugs: 181 | - upgrade.sh checksum failed 182 | - fixed ov5647 mirror 183 | 184 | ## 0.0.3 (2024-08-30) 185 | 186 | ### sg2002_recamera_emmc 187 | - update sdk upstream (6cd7a5b) 188 | - support more buildroot packages (mosquitto/avahi/opkg/live555) 189 | - remove reCamera app 190 | - change ota (not compatible with last version) and supports swupdate 191 | - use ncm replace of rndis 192 | - expand rootfs size to 512M, rootfs default readonly (rootfs_rw (on|off)) 193 | - auto mount /dev/mmcblk0p6 to /userdata 194 | - update nodejs to 17.9.1 195 | 196 | ## 0.0.2 (2024-06-24) 197 | 198 | ### sg2002_recamera_emmc 199 | - update sdk upstream 200 | - support booting from sd (sg2002_reCamera_0.0.2_emmc_sd_compat.zip) 201 | - support sd recovery (sg2002_reCamera_0.0.2_emmc_recovery.zip) 202 | 203 | ## 0.0.1 (2024-06-21) 204 | 205 | ### sg2002_recamera_emmc 206 | - First beta release 207 | - SDK: supported emmc/sdcard/leds/wifi/uart/ethernet/ov5647 sensor 208 | - APP: complete basic functions(Overview/Security/Newwork/Terminal/Setting) 209 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TOPDIR := $(shell pwd) 2 | EXTERNAL = $(TOPDIR)/external 3 | DEFCONFIGS = $(EXTERNAL)/configs 4 | 5 | TARGETS := $(notdir $(patsubst %_defconfig, %, $(wildcard $(DEFCONFIGS)/*_defconfig))) 6 | 7 | # Set O variable if not already done on the command line 8 | ifneq ("$(origin OUTDIR)", "command line") 9 | OUTDIR := $(TOPDIR)/output 10 | else 11 | override OUTDIR := $(TOPDIR)/$(OUTDIR) 12 | endif 13 | 14 | export TOPDIR EXTERNAL DEFCONFIGS OUTDIR 15 | 16 | $(TARGETS): %: 17 | @echo "build $@" 18 | @bash $(EXTERNAL)/build.sh $@ 19 | 20 | clean: 21 | @rm -rf $(OUTDIR) 22 | @echo "clean finished" 23 | 24 | help: 25 | @echo "Supported targets: $(TARGETS)" 26 | @echo "Run 'make ' to build a target image." 27 | @echo "Run 'make all' to build all target images." 28 | @echo "Run 'make clean' to clean the build output." 29 | # @echo "Run 'make -config' to configure buildroot for a target." 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | - [1. Official reference](#1-official-reference) 2 | - [2. How to start](#2-how-to-start) 3 | - [2.1. Preparation](#21-preparation) 4 | - [2.2 Checkout code](#22-checkout-code) 5 | - [2.3 Build](#23-build) 6 | - [2.4 Flashing](#24-flashing) 7 | 8 | ## 1. Official reference 9 | 10 | - [Developer Portal](https://developer.sophgo.com/thread/471.html) 11 | 12 | ## 2. How to start 13 | 14 | ### 2.1. Preparation 15 | 16 | - Recommended OS: Ubuntu 20.04 LTS 17 | - Recommended C/C++: GCC/G++ >= 11.4.0 18 | - Recommended minimum free space: 30 GB 19 | - Install dependencies 20 | 21 | ```bash 22 | sudo add-apt-repository ppa:ubuntu-toolchain-r/test 23 | sudo apt update 24 | sudo apt-get install -y pkg-config build-essential ninja-build automake autoconf libtool wget curl git libssl-dev bc squashfs-tools android-sdk-libsparse-utils \ 25 | jq cmake tclsh scons parallel ssh-client tree python3-dev python3-pip device-tree-compiler libssl-dev ssh cpio \ 26 | squashfs-tools fakeroot flex bison mtools gcc-11 g++-11 libbz2-dev \ 27 | android-sdk-ext4-utils python3-distutils slib libncurses5 28 | sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 60 29 | pip install cmake jinja2 30 | ``` 31 | 32 | Note: The minimum required cmake version is 3.16.5 33 | 34 | ### 2.2 Checkout code 35 | 36 | - Clone the Repository 37 | 38 | ```bash 39 | git clone https://github.com/Seeed-Studio/reCamera.git -b sg200x-reCamera 40 | cd reCamera 41 | git submodule init 42 | git submodule update --depth 1 43 | ``` 44 | 45 | - Update Submodules (optional) 46 | 47 | ```bash 48 | ./scripts/repo_clone.sh --gitpull external/subtree.xml 49 | ``` 50 | 51 | ### 2.3 Build 52 | 53 | - Location of the ${project}_defconfig 54 | 55 | ```bash 56 | ls external/configs/ 57 | sg2002_recamera_emmc_defconfig sg2002_recamera_sd_defconfig sg2002_xiao_sd_defconfig 58 | ``` 59 | 60 | - Building the Project 61 | 62 | ```bash 63 | make ${project} 64 | ``` 65 | 66 | Example: 67 | ```bash 68 | make sg2002_recamera_emmc 69 | ``` 70 | 71 | - Location of the Build Targets 72 | 73 | ```bash 74 | ls -l output/${project}/install/soc_${project}/${project} 75 | ``` 76 | 77 | Example: 78 | 79 | ```bash 80 | cd output/sg2002_recamera_emmc/install/soc_sg2002_recamera_emmc/ 81 | ls -l *.zip 82 | sg2002_reCamera_0.0.1_emmc_ota.zip 83 | sg2002_reCamera_0.0.1_emmc_recovery.zip 84 | sg2002_reCamera_0.0.1_emmc_sd_compat.zip 85 | sg2002_reCamera_0.0.1_emmc.zip 86 | ``` 87 | 88 | ### 2.4 Flashing 89 | 90 | - Booting from eMMC (Example: sg2002_reCamera_0.0.1_emmc.zip) 91 | 92 | - Install windows driver: [CviUsbDownloadInstallDriver.zip](https://github.com/Seeed-Studio/reCamera/releases/download/0.0.1/CviUsbDownloadInstallDriver.zip) 93 | - Unzip the [CviBurn_v2.0_cli_windows.zip](https://github.com/Seeed-Studio/reCamera/releases/download/0.0.1/CviBurn_v2.0_cli_windows.zip) package. 94 | - Unzip the package generated by [Section 2.3](#23-build), for example: 95 | ./output/sg2002_recamera_emmc/install/soc_sg2002_recamera_emmc/sg2002_reCamera_0.0.1_emmc.zip 96 | - Execute the following command in Windows (use [-m xx:xx:xx:xx:xx:xx] to configure the Ethernet MAC address): 97 | `usb_dl.exe -c cv181x -s linux -i ..\sg2002_reCamera_0.0.1_emmc [-m xx:xx:xx:xx:xx:xx]` 98 | 99 | - SD Card recovery (Example: sg2002_reCamera_0.0.1_emmc_recovery.zip) 100 | 101 | - Use [balenaEtcher](https://etcher.balena.io/#download-etcher) to flash the `sg2002_reCamera_0.0.1_emmc_recovery.zip` file into the SD card. 102 | - Then insert the SD card into the board, and power on. It will automatically burn image into emmc. 103 | 104 | - Booting from SD Card (Example: sg2002_reCamera_0.0.1_emmc_sd_compat.zip) 105 | 106 | - Use [balenaEtcher](https://etcher.balena.io/#download-etcher) to flash the `sg2002_reCamera_0.0.1_emmc_sd_compat.zip` file into the SD card. 107 | - Then insert the SD card into the board, and power on. The board will booting from SD card. 108 | 109 | - OTA (Example: sg2002_reCamera_0.0.1_emmc_ota.zip) 110 | 111 | - This image is specifically designed for OTA updates via the WebUI. 112 | -------------------------------------------------------------------------------- /external/SensorSupportList/sensor/cv182x/ov_ov5647/Makefile: -------------------------------------------------------------------------------- 1 | SHELL = /bin/bash 2 | ifeq ($(PARAM_FILE), ) 3 | PARAM_FILE=../../../../../Makefile.param 4 | include $(PARAM_FILE) 5 | endif 6 | 7 | SDIR = $(PWD) 8 | SRCS = $(wildcard $(SDIR)/*.c) 9 | INCS = -I$(MW_INC) -I$(ISP_INC) -I$(KERNEL_INC) -I./include 10 | OBJS = $(SRCS:.c=.o) 11 | DEPS = $(SRCS:.c=.d) 12 | TARGET_A = $(MW_LIB)/libsns_ov5647.a 13 | TARGET_SO = $(MW_LIB)/libsns_ov5647.so 14 | 15 | EXTRA_CFLAGS = $(INCS) $(PROJ_CFLAGS) 16 | EXTRA_LDFLAGS = 17 | 18 | .PHONY : clean all 19 | all : $(TARGET_A) $(TARGET_SO) 20 | 21 | $(SDIR)/%.o: $(SDIR)/%.c 22 | @$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ 23 | @echo [$(notdir $(CC))] $(notdir $@) 24 | 25 | $(TARGET_A): $(OBJS) 26 | @$(AR) $(ARFLAGS) $@ $(OBJS) 27 | @echo -e $(YELLOW)[LINK]$(END)[$(notdir $(AR))] $(notdir $@) 28 | 29 | $(TARGET_SO): $(OBJS) 30 | @$(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ --start-group $(OBJS) --end-group 31 | @echo -e $(GREEN)[LINK]$(END)[$(notdir $(LD))] $(notdir $@) 32 | 33 | clean: 34 | @rm -f $(OBJS) $(DEPS) $(TARGET_A) $(TARGET_SO) 35 | 36 | -include $(DEPS) 37 | 38 | -------------------------------------------------------------------------------- /external/SensorSupportList/sensor/cv182x/ov_ov5647/ov5647_cmos_ex.h: -------------------------------------------------------------------------------- 1 | #ifndef __OV5647_CMOS_EX_H_ 2 | #define __OV5647_CMOS_EX_H_ 3 | 4 | #ifdef __cplusplus 5 | #if __cplusplus 6 | extern "C" { 7 | #endif 8 | #endif 9 | 10 | #ifdef ARCH_CV182X 11 | #include 12 | #include 13 | #include "cvi_type.h" 14 | #else 15 | #include 16 | #include 17 | #include 18 | #endif 19 | #include "cvi_sns_ctrl.h" 20 | 21 | 22 | enum ov5647_linear_regs_e { 23 | LINEAR_EXP_0, 24 | LINEAR_EXP_1, 25 | LINEAR_EXP_2, 26 | LINEAR_AGAIN_0, 27 | LINEAR_AGAIN_1, 28 | LINEAR_VTS_0, 29 | LINEAR_VTS_1, 30 | LINEAR_REGS_NUM 31 | }; 32 | 33 | typedef enum _OV5647_MODE_E { 34 | OV5647_MODE_1920X1080P30 = 0, 35 | OV5647_MODE_LINEAR_NUM, 36 | OV5647_MODE_NUM 37 | } OV5647_MODE_E; 38 | 39 | typedef struct _OV5647_STATE_S { 40 | CVI_U32 u32Sexp_MAX; 41 | } OV5647_STATE_S; 42 | 43 | typedef struct _OV5647_MODE_S { 44 | ISP_WDR_SIZE_S astImg[2]; 45 | CVI_FLOAT f32MaxFps; 46 | CVI_FLOAT f32MinFps; 47 | CVI_U32 u32HtsDef; 48 | CVI_U32 u32VtsDef; 49 | CVI_U16 u16L2sOffset; 50 | CVI_U16 u16TopBoundary; 51 | CVI_U16 u16BotBoundary; 52 | SNS_ATTR_S stExp[2]; 53 | SNS_ATTR_LARGE_S stAgain[2]; 54 | SNS_ATTR_LARGE_S stDgain[2]; 55 | CVI_U32 u32L2S_offset; 56 | CVI_U32 u32IspResTime; 57 | CVI_U32 u32HdrMargin; 58 | char name[64]; 59 | } OV5647_MODE_S; 60 | 61 | /**************************************************************************** 62 | * external variables and functions * 63 | ****************************************************************************/ 64 | 65 | extern ISP_SNS_STATE_S *g_pastOv5647[VI_MAX_PIPE_NUM]; 66 | extern ISP_SNS_COMMBUS_U g_aunOv5647_BusInfo[]; 67 | extern CVI_U16 g_au16Ov5647_GainMode[]; 68 | extern CVI_U16 g_au16Ov5647_UseHwSync[VI_MAX_PIPE_NUM]; 69 | extern CVI_U8 ov5647_i2c_addr; 70 | extern const CVI_U32 ov5647_addr_byte; 71 | extern const CVI_U32 ov5647_data_byte; 72 | extern void ov5647_init(VI_PIPE ViPipe); 73 | extern void ov5647_exit(VI_PIPE ViPipe); 74 | extern void ov5647_standby(VI_PIPE ViPipe); 75 | extern void ov5647_restart(VI_PIPE ViPipe); 76 | extern int ov5647_write_register(VI_PIPE ViPipe, int addr, int data); 77 | extern int ov5647_read_register(VI_PIPE ViPipe, int addr); 78 | extern void ov5647_mirror_flip(VI_PIPE ViPipe, ISP_SNS_MIRRORFLIP_TYPE_E eSnsMirrorFlip); 79 | extern int ov5647_probe(VI_PIPE ViPipe); 80 | 81 | #ifdef __cplusplus 82 | #if __cplusplus 83 | } 84 | #endif 85 | #endif /* End of #ifdef __cplusplus */ 86 | 87 | 88 | #endif /* __OV5647_CMOS_EX_H_ */ 89 | 90 | -------------------------------------------------------------------------------- /external/SensorSupportList/sensor/cv182x/ov_ov5647/ov5647_cmos_param.h: -------------------------------------------------------------------------------- 1 | #ifndef __OV5647_CMOS_PARAM_H_ 2 | #define __OV5647_CMOS_PARAM_H_ 3 | 4 | #ifdef __cplusplus 5 | #if __cplusplus 6 | extern "C" { 7 | #endif 8 | #endif 9 | 10 | #ifdef ARCH_CV182X 11 | #include 12 | #include 13 | #include "cvi_type.h" 14 | #else 15 | #include 16 | #include 17 | #include 18 | #endif 19 | #include "cvi_sns_ctrl.h" 20 | #include "ov5647_cmos_ex.h" 21 | 22 | static const OV5647_MODE_S g_astOv5647_mode[OV5647_MODE_NUM] = { 23 | [OV5647_MODE_1920X1080P30] = { 24 | .name = "1920x1080p30", 25 | .astImg[0] = { 26 | .stSnsSize = { 27 | .u32Width = 1920, 28 | .u32Height = 1080, 29 | }, 30 | .stWndRect = { 31 | .s32X = 0, 32 | .s32Y = 0, 33 | .u32Width = 1920, 34 | .u32Height = 1080, 35 | }, 36 | .stMaxSize = { 37 | .u32Width = 2592, 38 | .u32Height = 1944, 39 | }, 40 | }, 41 | 42 | .f32MaxFps = 30, 43 | .f32MinFps = 0.711, /* 0x4e2 * 30 / 0xFFFF */ 44 | .u32HtsDef = 2416, 45 | .u32VtsDef = 1104, 46 | .stExp[0] = { 47 | .u16Min = 4, 48 | .u16Max = 1104 - 4, 49 | .u16Def = 400, 50 | .u16Step = 1, 51 | }, 52 | .stAgain[0] = { 53 | .u32Min = 1024, 54 | .u32Max = 63448, 55 | .u32Def = 1024, 56 | .u32Step = 1, 57 | }, 58 | .stDgain[0] = { 59 | .u32Min = 1024, 60 | .u32Max = 1024, 61 | .u32Def = 1024, 62 | .u32Step = 1, 63 | }, 64 | }, 65 | }; 66 | 67 | static ISP_CMOS_BLACK_LEVEL_S g_stIspBlcCalibratio = { 68 | .bUpdate = CVI_TRUE, 69 | .blcAttr = { 70 | .Enable = 1, 71 | .enOpType = OP_TYPE_AUTO, 72 | .stManual = {60, 60, 60, 60, 0, 0, 0, 0 73 | #ifdef ARCH_CV182X 74 | , 1039, 1039, 1039, 1039 75 | #endif 76 | }, 77 | .stAuto = { 78 | {60, 60, 60, 60, 60, 60, 60, 60, /*8*/60, 60, 60, 60, 60, 60, 60, 60}, 79 | {60, 60, 60, 60, 60, 60, 60, 60, /*8*/60, 60, 60, 60, 60, 60, 60, 60}, 80 | {60, 60, 60, 60, 60, 60, 60, 60, /*8*/60, 60, 60, 60, 60, 60, 60, 60}, 81 | {60, 60, 60, 60, 60, 60, 60, 60, /*8*/60, 60, 60, 60, 60, 60, 60, 60}, 82 | {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 83 | {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 84 | {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 85 | {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 86 | #ifdef ARCH_CV182X 87 | {1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 88 | /*8*/1039, 1039, 1039, 1039, 1204, 1039, 1039, 1039}, 89 | {1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 90 | /*8*/1039, 1039, 1039, 1039, 1204, 1039, 1039, 1039}, 91 | {1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 92 | /*8*/1039, 1039, 1039, 1039, 1204, 1039, 1039, 1039}, 93 | {1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 94 | /*8*/1039, 1039, 1039, 1039, 1204, 1039, 1039, 1039}, 95 | #endif 96 | }, 97 | }, 98 | }; 99 | 100 | 101 | struct combo_dev_attr_s ov5647_rx_attr = { 102 | .input_mode = INPUT_MODE_MIPI, 103 | .mac_clk = RX_MAC_CLK_400M, 104 | .mipi_attr = { 105 | .raw_data_type = RAW_DATA_10BIT, 106 | .lane_id = {0, 1, 2, -1, -1}, 107 | .pn_swap = {0, 0, 0, 0, 0}, 108 | .wdr_mode = CVI_MIPI_WDR_MODE_NONE, 109 | .dphy = { 110 | .enable = 1, 111 | .hs_settle = 8, 112 | }, 113 | }, 114 | .mclk = { 115 | .cam = 0, 116 | .freq = CAMPLL_FREQ_24M, 117 | }, 118 | .devno = 0, 119 | }; 120 | 121 | #ifdef __cplusplus 122 | #if __cplusplus 123 | } 124 | #endif 125 | #endif /* End of #ifdef __cplusplus */ 126 | 127 | 128 | #endif /* __OV5647_CMOS_PARAM_H_ */ 129 | 130 | -------------------------------------------------------------------------------- /external/SensorSupportList/sensor/cv182x/sms_sc530ai_2L/Makefile: -------------------------------------------------------------------------------- 1 | SHELL = /bin/bash 2 | ifeq ($(PARAM_FILE), ) 3 | PARAM_FILE=../../../../../Makefile.param 4 | include $(PARAM_FILE) 5 | endif 6 | 7 | SDIR = $(PWD) 8 | SRCS = $(wildcard $(SDIR)/*.c) 9 | INCS = -I$(MW_INC) -I$(ISP_INC) -I$(KERNEL_INC) -I./include 10 | OBJS = $(SRCS:.c=.o) 11 | DEPS = $(SRCS:.c=.d) 12 | TARGET_A = $(MW_LIB)/libsns_sc530ai_2l.a 13 | TARGET_SO = $(MW_LIB)/libsns_sc530ai_2l.so 14 | 15 | EXTRA_CFLAGS = $(INCS) 16 | EXTRA_LDFLAGS = 17 | 18 | .PHONY : clean all 19 | all : $(TARGET_A) $(TARGET_SO) 20 | 21 | $(SDIR)/%.o: $(SDIR)/%.c 22 | @$(CC) $(DEPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ 23 | @echo [$(notdir $(CC))] $(notdir $@) 24 | 25 | $(TARGET_A): $(OBJS) 26 | @$(AR) $(ARFLAGS) $@ $(OBJS) 27 | @echo -e $(YELLOW)[LINK]$(END)[$(notdir $(AR))] $(notdir $(TARGET_A)) 28 | 29 | $(TARGET_SO): $(OBJS) 30 | @$(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ --start-group $(OBJS) --end-group 31 | @echo -e $(GREEN)[LINK]$(END)[$(notdir $(LD))] $(notdir $(TARGET_SO)) 32 | 33 | clean: 34 | @rm -f $(OBJS) $(DEPS) $(TARGET_A) $(TARGET_SO) 35 | 36 | -include $(DEPS) 37 | -------------------------------------------------------------------------------- /external/SensorSupportList/sensor/cv182x/sms_sc530ai_2L/sc530ai_2L_cmos_ex.h: -------------------------------------------------------------------------------- 1 | #ifndef __SC530AI_2L_CMOS_EX_H_ 2 | #define __SC530AI_2L_CMOS_EX_H_ 3 | 4 | #ifdef __cplusplus 5 | #if __cplusplus 6 | extern "C" { 7 | #endif 8 | #endif 9 | 10 | #ifdef ARCH_CV182X 11 | #include 12 | #include 13 | #include "cvi_type.h" 14 | #else 15 | #include 16 | #include 17 | #include 18 | #endif 19 | #include "cvi_sns_ctrl.h" 20 | 21 | 22 | enum sc530ai_2l_linear_regs_e { 23 | LINEAR_SHS1_0_ADDR, 24 | LINEAR_SHS1_1_ADDR, 25 | LINEAR_SHS1_2_ADDR, 26 | LINEAR_AGAIN_ADDR, 27 | LINEAR_DGAIN_ADDR, 28 | LINEAR_DGAIN_FINE_ADDR, 29 | LINEAR_FLIP_MIRROR, 30 | LINEAR_VMAX_H_ADDR, 31 | LINEAR_VMAX_L_ADDR, 32 | LINEAR_REGS_NUM 33 | }; 34 | 35 | typedef enum _sc530AI_2L_MODE_E { 36 | sc530AI_2L_MODE_1620P30 = 0, 37 | sc530AI_2L_MODE_LINEAR_NUM, 38 | sc530AI_2L_MODE_NUM 39 | } sc530AI_2L_MODE_E; 40 | 41 | typedef struct _sc530AI_2L_STATE_S { 42 | CVI_U32 u32Sexp_MAX; 43 | } sc530AI_2L_STATE_S; 44 | 45 | typedef struct _sc530AI_2L_MODE_S { 46 | ISP_WDR_SIZE_S astImg[2]; 47 | CVI_FLOAT f32MaxFps; 48 | CVI_FLOAT f32MinFps; 49 | CVI_U32 u32HtsDef; 50 | CVI_U32 u32VtsDef; 51 | SNS_ATTR_S stExp[2]; 52 | SNS_ATTR_LARGE_S stAgain[2]; 53 | SNS_ATTR_LARGE_S stDgain[2]; 54 | CVI_U16 u16SexpMaxReg; 55 | char name[64]; 56 | } sc530AI_2L_MODE_S; 57 | 58 | /**************************************************************************** 59 | * external variables and functions * 60 | ****************************************************************************/ 61 | 62 | extern ISP_SNS_STATE_S *g_pastsc530AI_2L[VI_MAX_PIPE_NUM]; 63 | extern ISP_SNS_COMMBUS_U g_aunsc530AI_2L_BusInfo[]; 64 | extern CVI_U16 g_au16sc530AI_2L_GainMode[]; 65 | extern CVI_U16 g_au16sc530AI_2L_L2SMode[]; 66 | extern const CVI_U8 sc530ai_2l_i2c_addr; 67 | extern const CVI_U32 sc530ai_2l_addr_byte; 68 | extern const CVI_U32 sc530ai_2l_data_byte; 69 | extern void sc530ai_2l_init(VI_PIPE ViPipe); 70 | extern void sc530ai_2l_exit(VI_PIPE ViPipe); 71 | extern void sc530ai_2l_standby(VI_PIPE ViPipe); 72 | extern void sc530ai_2l_restart(VI_PIPE ViPipe); 73 | extern int sc530ai_2l_write_register(VI_PIPE ViPipe, int addr, int data); 74 | extern int sc530ai_2l_read_register(VI_PIPE ViPipe, int addr); 75 | extern int sc530ai_2l_probe(VI_PIPE ViPipe); 76 | 77 | #ifdef __cplusplus 78 | #if __cplusplus 79 | } 80 | #endif 81 | #endif /* End of #ifdef __cplusplus */ 82 | 83 | 84 | #endif /* __sc530AI_2L_CMOS_EX_H_ */ 85 | -------------------------------------------------------------------------------- /external/br2-external/Config.in: -------------------------------------------------------------------------------- 1 | source "$BR2_EXTERNAL_BR2EXT_PATH/reCamera/Config.in" 2 | source "$BR2_EXTERNAL_BR2EXT_PATH/libhv/Config.in" 3 | source "$BR2_EXTERNAL_BR2EXT_PATH/libxcrypt-dev/Config.in" 4 | source "$BR2_EXTERNAL_BR2EXT_PATH/sscma-node/Config.in" 5 | source "$BR2_EXTERNAL_BR2EXT_PATH/sscma-supervisor/Config.in" 6 | source "$BR2_EXTERNAL_BR2EXT_PATH/opencv4/Config.in" 7 | source "$BR2_EXTERNAL_BR2EXT_PATH/opencv4-contrib/Config.in" 8 | -------------------------------------------------------------------------------- /external/br2-external/external.desc: -------------------------------------------------------------------------------- 1 | name: BR2EXT -------------------------------------------------------------------------------- /external/br2-external/external.mk: -------------------------------------------------------------------------------- 1 | include $(sort $(wildcard $(BR2_EXTERNAL_BR2EXT_PATH)/*/*.mk)) -------------------------------------------------------------------------------- /external/br2-external/libhv/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_LIBHV 2 | bool "libhv" 3 | default y 4 | help 5 | This is the help text for the libhv package. 6 | It will be displayed in the Buildroot configuration menu. 7 | -------------------------------------------------------------------------------- /external/br2-external/libhv/libhv.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # libhv 4 | # 5 | ################################################################################ 6 | 7 | LIBHV_VERSION = v1.3.3 8 | LIBHV_SOURCE = $(LIBHV_VERSION).tar.gz 9 | LIBHV_SITE = https://github.com/ithewei/libhv/archive/refs/tags 10 | LIBHV_DEPENDENCIES = openssl 11 | LIBHV_INSTALL_STAGING = YES 12 | 13 | define LIBHV_CONFIGURE_CMDS 14 | (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure --with-mqtt --with-openssl) 15 | endef 16 | 17 | define LIBHV_BUILD_CMDS 18 | $(TARGET_CONFIGURE_OPTS) $(MAKE) libhv -C $(@D) 19 | endef 20 | 21 | define LIBHV_INSTALL_TARGET_CMDS 22 | cp -rf $(@D)/lib/* $(TARGET_DIR)/usr/lib/ 23 | endef 24 | 25 | define LIBHV_INSTALL_STAGING_CMDS 26 | cp -rf $(@D)/lib/* $(STAGING_DIR)/usr/lib/ 27 | cp -rf $(@D)/include/* $(STAGING_DIR)/usr/include/ 28 | endef 29 | 30 | $(eval $(generic-package)) 31 | -------------------------------------------------------------------------------- /external/br2-external/libxcrypt-dev/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_LIBXCRYPT_DEV 2 | bool "libxcrypt-dev" 3 | help 4 | libxcrypt is a modern library for one-way hashing 5 | of passwords. It supports a wide variety of both 6 | modern and historical hashing methods: 7 | yescrypt, gost-yescrypt, scrypt, bcrypt, sha512crypt, 8 | sha256crypt, md5crypt, SunMD5, sha1crypt, NT, 9 | bsdicrypt, bigcrypt, and descrypt. 10 | 11 | https://github.com/besser82/libxcrypt 12 | -------------------------------------------------------------------------------- /external/br2-external/libxcrypt-dev/libxcrypt-dev.hash: -------------------------------------------------------------------------------- 1 | # Locally calculated 2 | sha256 b979838d5f1f238869d467484793b72b8bca64c4eae696fdbba0a9e0b6c28453 libxcrypt-dev-4.4.36.tar.gz 3 | sha256 f8198fcc4f002bf54512bac2e68e1e3f04af7d105f4f4f98d7d22cb110e04715 LICENSING 4 | sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB 5 | -------------------------------------------------------------------------------- /external/br2-external/libxcrypt-dev/libxcrypt-dev.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # libxcrypt 4 | # 5 | ################################################################################ 6 | 7 | LIBXCRYPT_DEV_VERSION = 4.4.36 8 | LIBXCRYPT_DEV_SITE = $(call github,besser82,libxcrypt,v$(LIBXCRYPT_DEV_VERSION)) 9 | LIBXCRYPT_DEV_LICENSE = LGPL-2.1+ 10 | LIBXCRYPT_DEV_LICENSE_FILES = LICENSING COPYING.LIB 11 | LIBXCRYPT_DEV_INSTALL_STAGING = YES 12 | LIBXCRYPT_DEV_AUTORECONF = YES 13 | 14 | # Some warnings turn into errors with some sensitive compilers 15 | LIBXCRYPT_DEV_CONF_OPTS = --disable-werror 16 | 17 | # Disable obsolete and unsecure API 18 | LIBXCRYPT_DEV_CONF_OPTS += --disable-obsolete_api 19 | 20 | $(eval $(autotools-package)) 21 | -------------------------------------------------------------------------------- /external/br2-external/opencv4-contrib/opencv4-contrib.hash: -------------------------------------------------------------------------------- 1 | # Locally calculated 2 | sha256 65597f8fb8dc2b876c1b45b928bbcc5f772ddbaf97539bf1b737623d0604cba1 opencv4-contrib-4.10.0.tar.gz 3 | sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE 4 | -------------------------------------------------------------------------------- /external/br2-external/opencv4-contrib/opencv4-contrib.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # opencv4-contrib 4 | # 5 | ################################################################################ 6 | 7 | OPENCV4_CONTRIB_VERSION = 4.10.0 8 | OPENCV4_CONTRIB_SITE = $(call github,opencv,opencv_contrib,$(OPENCV4_CONTRIB_VERSION)) 9 | OPENCV4_CONTRIB_INSTALL_TARGET = NO 10 | OPENCV4_CONTRIB_LICENSE = Apache-2.0 11 | OPENCV4_CONTRIB_LICENSE_FILES = LICENSE 12 | 13 | # Modules provided by opencv4-contrib are built as part of the opencv4 package, 14 | # so opencv4-contrib only serves for downloading the source code. 15 | 16 | $(eval $(generic-package)) 17 | -------------------------------------------------------------------------------- /external/br2-external/opencv4/opencv4.hash: -------------------------------------------------------------------------------- 1 | # Locally calculated 2 | sha256 b2171af5be6b26f7a06b1229948bbb2bdaa74fcf5cd097e0af6378fce50a6eb9 opencv4-4.10.0.tar.gz 3 | sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE 4 | -------------------------------------------------------------------------------- /external/br2-external/reCamera/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_RECAMERA 2 | bool "reCamera" 3 | default n 4 | help 5 | This is the help text for the reCamera package. 6 | It will be displayed in the Buildroot configuration menu. 7 | 8 | #if BR2_PACKAGE_RECAMERA 9 | #config BR2_PACKAGE_RECAMERA_CUSTOM_REPO_URL 10 | # string "Custom repository URL for reCamera" 11 | # default "https://github.com/Seeed-Studio/sscma-example-sg200x.git" 12 | # help 13 | # Specify the URL of the custom reCamera repository to clone. 14 | # The default is the official GitHub repository. 15 | #endif -------------------------------------------------------------------------------- /external/br2-external/reCamera/reCamera.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # reCamera 4 | # 5 | ################################################################################ 6 | 7 | RECAMERA_SOURCE = reCamera.zip 8 | RECAMERA_SITE = https://github.com/Seeed-Studio/sscma-example-sg200x/archive 9 | BR_NO_CHECK_HASH_FOR += $(RECAMERA_SOURCE) 10 | 11 | define RECAMERA_EXTRACT_CMDS 12 | $(UNZIP) -d $(@D) $(RECAMERA_DL_DIR)/$(RECAMERA_SOURCE) 13 | @mv -fv $(@D)/* $(@D)/source 14 | endef 15 | 16 | define RECAMERA_BUILD_CMDS 17 | $(TARGET_MAKE_ENV) $(BR2_MAKE) -j1 recamera -C $(@D)/source 18 | $(TARGET_MAKE_ENV) $(BR2_MAKE) -j1 recamera install -C $(@D)/source 19 | endef 20 | 21 | define RECAMERA_INSTALL_TARGET_CMDS 22 | @cp -rf $(@D)/source/out/install/* $(TARGET_DIR)/ 23 | endef 24 | 25 | $(eval $(generic-package)) -------------------------------------------------------------------------------- /external/br2-external/sscma-node/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_SSCMA_NODE 2 | bool "sscma-node" 3 | default y 4 | select BR2_PACKAGE_MOSQUITTO 5 | select BR2_PACKAGE_LIBHV 6 | select BR2_PACKAGE_ALSA_LIB 7 | select BR2_PACKAGE_ALSA_UTILS 8 | select BR2_PACKAGE_ALSA_UTILS_ALSAMIXER 9 | help 10 | This is the help text for the ssmca-node package. 11 | It will be displayed in the Buildroot configuration menu. -------------------------------------------------------------------------------- /external/br2-external/sscma-node/sscma-node.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # sscma-node 4 | # 5 | ################################################################################ 6 | 7 | SSCMA_NODE_VERSION = 0.2.0 8 | SSCMA_NODE_SITE = https://github.com/Seeed-Studio/sscma-example-sg200x 9 | SSCMA_NODE_SITE_METHOD = git 10 | SSCMA_NODE_GIT_SUBMODULES = YES 11 | SSCMA_NODE_LICENSE = Apache-2.0 12 | SSCMA_NODE_DEPENDENCIES = host-nodejs mosquitto libhv alsa-lib 13 | 14 | # Configure step: prepare the build environment and run CMake to configure the build 15 | define SSCMA_NODE_CONFIGURE_CMDS 16 | mkdir -p $(@D)/solutions/sscma-node/build && \ 17 | cd $(@D)/solutions/sscma-node/build && \ 18 | $(BR2_CMAKE) -DSG200X_SDK_PATH=$(shell realpath $(BUILD_DIR)/../../../../) -DSYSROOT=${STAGING_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(TARGET_DIR) .. 19 | endef 20 | 21 | # Build step: compile the package using the Makefile in the build directory 22 | define SSCMA_NODE_BUILD_CMDS 23 | $(MAKE) -C $(@D)/solutions/sscma-node/build 24 | endef 25 | 26 | # Install step: copy the built files to the target directory 27 | define SSCMA_NODE_INSTALL_TARGET_CMDS 28 | 29 | # Create the necessary directories for node-red 30 | mkdir -p $(TARGET_DIR)/home/recamera/.node-red/node_modules 31 | 32 | # Install npm packages 33 | $(NPM) install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict --prefix $(TARGET_DIR)/home/recamera/.node-red node-red-contrib-sscma 34 | $(NPM) install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict --prefix $(TARGET_DIR)/home/recamera/.node-red node-red-contrib-os 35 | $(NPM) install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict --prefix $(TARGET_DIR)/home/recamera/.node-red node-red-contrib-seeed-canbus 36 | $(NPM) install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict --prefix $(TARGET_DIR)/home/recamera/.node-red node-red-contrib-seeed-recamera 37 | $(NPM) install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict --prefix $(TARGET_DIR)/home/recamera/.node-red @flowfuse/node-red-dashboard 38 | 39 | $(NPM) install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict --prefix $(TARGET_DIR)/home/recamera/.node-red socketcan@4.0.5 40 | 41 | # Install the executable file 42 | $(INSTALL) -D -m 0755 $(@D)/solutions/sscma-node/build/sscma-node $(TARGET_DIR)/usr/local/bin/sscma-node 43 | 44 | # Copy other files from the source directory to the target directory 45 | cp -r $(@D)/solutions/sscma-node/rootfs/* $(TARGET_DIR)/ 46 | 47 | 48 | endef 49 | 50 | $(eval $(generic-package)) 51 | -------------------------------------------------------------------------------- /external/br2-external/sscma-supervisor/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_SSCMA_SUPERVISOR 2 | bool "sscma-supervisor" 3 | default y 4 | select BR2_PACKAGE_LIBHV 5 | help 6 | This is the help text for the ssmca-supervisor package. 7 | It will be displayed in the Buildroot configuration menu. -------------------------------------------------------------------------------- /external/br2-external/sscma-supervisor/sscma-supervisor.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # sscma-supervisor 4 | # 5 | ################################################################################ 6 | 7 | SSCMA_SUPERVISOR_VERSION = 0.2.0 8 | SSCMA_SUPERVISOR_SITE = https://github.com/Seeed-Studio/sscma-example-sg200x 9 | SSCMA_SUPERVISOR_SITE_METHOD = git 10 | SSCMA_SUPERVISOR_GIT_SUBMODULES = YES 11 | SSCMA_SUPERVISOR_LICENSE = Apache-2.0 12 | SSCMA_SUPERVISOR_DEPENDENCIES = libhv 13 | 14 | # Configure step: prepare the build environment and run CMake to configure the build 15 | define SSCMA_SUPERVISOR_CONFIGURE_CMDS 16 | mkdir -p $(@D)/solutions/supervisor/build && \ 17 | cd $(@D)/solutions/supervisor/build && \ 18 | $(BR2_CMAKE) -DSG200X_SDK_PATH=$(shell realpath $(BUILD_DIR)/../../../../) -DWEB=ON -DSYSROOT=${STAGING_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(TARGET_DIR) .. 19 | endef 20 | 21 | # Build step: compile the package using the Makefile in the build directory 22 | define SSCMA_SUPERVISOR_BUILD_CMDS 23 | $(MAKE) -C $(@D)/solutions/supervisor/build 24 | endef 25 | 26 | # Install step: copy the built files to the target directory 27 | define SSCMA_SUPERVISOR_INSTALL_TARGET_CMDS 28 | # Install the executable file 29 | $(INSTALL) -D -m 0755 $(@D)/solutions/supervisor/build/supervisor $(TARGET_DIR)/usr/local/bin/supervisor 30 | 31 | # Copy other files from the source directory to the target directory 32 | cp -r $(@D)/solutions/supervisor/rootfs/* $(TARGET_DIR)/ 33 | 34 | endef 35 | 36 | $(eval $(generic-package)) 37 | -------------------------------------------------------------------------------- /external/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PROJECT_OUT=$OUTDIR/$1 4 | export PROJECT_DIR=$(dirname $(realpath $DEFCONFIGS/${1}_defconfig)) 5 | 6 | export BR2_EXTERNAL="$EXTERNAL/br2-external" 7 | export BUILDROOT_DIR=$(basename $(realpath $TOPDIR/buildroot*)) 8 | export UBOOT_DIR=$(basename $(realpath $TOPDIR/u-boot*)) 9 | export LINUX_DIR=$(basename $(realpath $TOPDIR/linux*)) 10 | 11 | CHANGELOG=$TOPDIR/CHANGELOG.md 12 | 13 | source $EXTERNAL/setenv.sh 14 | defconfig $1 15 | 16 | # copy project rootfs to buildroot overlay 17 | rsync -av $PROJECT_DIR/rootfs/ $BR_OVERLAY_DIR 18 | 19 | md5file=${1}_md5sum.txt 20 | ISSUE_FILE=$PROJECT_DIR/rootfs/etc/issue 21 | if [ -f $ISSUE_FILE ]; then 22 | issue=$(cat $ISSUE_FILE) 23 | fi 24 | if [ -z "$issue" ]; then 25 | target_name="${1}" 26 | else 27 | target_name=${CHIP} 28 | 29 | version_name=$issue 30 | target_name=${target_name}_${version_name} 31 | 32 | # TODO: get version from CHANGELOG.md base on project name 33 | if [ -f $CHANGELOG ]; then 34 | verison_num=$(awk -F' ' 'BEGIN {f=0} /^## .*/ && !f {print $2; f=1; exit}' $CHANGELOG) 35 | echo "$version_name $verison_num" > $BR_OVERLAY_DIR/etc/issue 36 | cp -fv $CHANGELOG $BR_OVERLAY_DIR/etc/ 37 | target_name=${target_name}_${verison_num} 38 | fi 39 | 40 | target_name=${target_name}_${STORAGE_TYPE} 41 | fi 42 | 43 | export LIVE555_DIR=${TPU_SDK_INSTALL_PATH} 44 | build_all || exit 1 45 | 46 | ################################################## 47 | # gen packages 48 | echo "Target name: ${target_name}" 49 | 50 | function gen_emmc_zip() { 51 | echo "Run ${FUNCNAME[0]}" 52 | 53 | pushd $OUTPUT_DIR 54 | if [ -f upgrade.zip ]; then 55 | rm -rf ${1}.zip 56 | cp -fv upgrade.zip ${1}.zip || exit 1 57 | fi 58 | popd 59 | 60 | echo "${FUNCNAME[0]} ok" 61 | } 62 | 63 | function gen_rawimages_zip() { 64 | echo "Run ${FUNCNAME[0]}" 65 | 66 | pushd $OUTPUT_DIR/rawimages 67 | rm -rfv ../*rawimages.zip 68 | cp -fv ../fip.bin . || exit 1 69 | md5sum fip.bin boot.emmc rootfs_ext4.emmc > md5sum.txt 70 | zip -j rawimages.zip fip.bin boot.emmc rootfs_ext4.emmc md5sum.txt || exit 1 71 | rm -rf fip.bin 72 | mv -fv rawimages.zip ../${1}.zip 73 | popd 74 | 75 | echo "${FUNCNAME[0]} ok" 76 | } 77 | 78 | function gen_sd_recovery_zip() { 79 | echo "Run ${FUNCNAME[0]}" 80 | 81 | echo PROJECT_OUT=$PROJECT_OUT 82 | pushd $PROJECT_OUT 83 | ./build/tools/common/sd_tools/sd_gen_recovery_image.sh ${OUTPUT_DIR} ${1} 84 | popd 85 | 86 | echo "${FUNCNAME[0]} ok" 87 | } 88 | 89 | function gen_sd_zip() { 90 | echo "Run ${FUNCNAME[0]}" 91 | 92 | echo PROJECT_OUT=$PROJECT_OUT 93 | pushd $PROJECT_OUT 94 | ./build/tools/common/sd_tools/sd_gen_burn_image.sh ${OUTPUT_DIR} ${1} 95 | popd 96 | 97 | echo "${FUNCNAME[0]} ok" 98 | } 99 | 100 | function gen_swu() { 101 | echo "Run ${FUNCNAME[0]}" 102 | 103 | echo OUTPUT_DIR=$OUTPUT_DIR 104 | pushd $OUTPUT_DIR 105 | rm -rfv *.swu 106 | cd rawimages/ 107 | cp ${PROJECT_OUT}/build/tools/common/sw-description . 108 | FILES="sw-description rootfs_ext4.emmc" 109 | for i in $FILES; do 110 | echo $i; 111 | done | cpio -ov -H crc > ${1}.swu 112 | mv -fv *.swu ../ 113 | cd .. 114 | zip -j ${1}_swu.zip *.swu || exit 1 115 | popd 116 | 117 | echo "${FUNCNAME[0]} ok" 118 | } 119 | 120 | function check_zip() { 121 | file=$1 122 | if [ -f ${file} ]; then 123 | md5sum ${file} >> ${2} 124 | else 125 | echo "Gen ${file} failed!" 126 | exit 1 127 | fi 128 | } 129 | 130 | function gen_md5sum() { 131 | echo "Run ${FUNCNAME[0]}" 132 | 133 | pushd $OUTPUT_DIR/ > /dev/null 2>&1 134 | rm -rf $md5file 135 | 136 | LIST=$(find . -maxdepth 1 -name "${target_name}*.zip") 137 | while IFS= read -r file; do 138 | file=$(basename $file) 139 | check_zip $file $md5file 140 | done <<< "$LIST" 141 | 142 | echo "Success" 143 | popd > /dev/null 2>&1 144 | } 145 | 146 | if [ $STORAGE_TYPE = "emmc" ]; then 147 | gen_emmc_zip ${target_name} || exit 1 148 | gen_rawimages_zip ${target_name}_ota || exit 1 149 | gen_sd_recovery_zip ${target_name}_recovery || exit 1 150 | gen_sd_zip ${target_name}_sd_compat || exit 1 151 | gen_swu ${target_name} || exit 1 152 | 153 | gen_md5sum || exit 1 154 | else 155 | gen_sd_zip ${target_name} || exit 1 156 | 157 | gen_md5sum || exit 1 158 | fi 159 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ddr_cfg_list": [ 3 | "", 4 | "ddr3_1866_x16", 5 | "ddr3_2133_x16", 6 | "ddr_auto_x16" 7 | ], 8 | "board_information": "C906B + EMMC 8192MB + DDR 256MB" 9 | } 10 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/dts_riscv/sg2002_recamera_emmc.dts: -------------------------------------------------------------------------------- 1 | /dts-v1/; 2 | #include "cv181x_base_riscv.dtsi" 3 | /*#include "cv181x_asic_qfn.dtsi"*/ 4 | /*#include "cv181x_asic_sd.dtsi"*/ 5 | #include "cv181x_default_memmap.dtsi" 6 | 7 | &sd { 8 | no-1-8-v; 9 | max-frequency = <50000000>; 10 | }; 11 | 12 | &emmc { 13 | max-frequency = <50000000>; 14 | }; 15 | 16 | &mipi_rx{ 17 | /delete-property/ snsr-reset; 18 | }; 19 | 20 | &mipi_tx { 21 | /delete-property/ reset-gpio; 22 | /delete-property/ pwm-gpio; 23 | /delete-property/ power-ct-gpio; 24 | }; 25 | 26 | &dac{ 27 | /delete-property/ mute-gpio-r; 28 | }; 29 | 30 | &portc { 31 | #interrupt-cells = <2>; 32 | }; 33 | 34 | &spi0 { 35 | status = "okay"; 36 | num-cs = <1>; 37 | cs-gpios = <&porta 12 0>; 38 | 39 | mcp2518fd: mcp2518fd@0 { 40 | reg = <0>; 41 | compatible = "microchip,mcp2518fd"; 42 | spi-max-frequency = <10000000>; 43 | clocks = <&mcp2518fd_osc>; 44 | interrupts = <12 IRQ_TYPE_LEVEL_LOW>; 45 | interrupt-parent = <&portc>; 46 | }; 47 | }; 48 | 49 | &spi1 { 50 | status = "disabled"; 51 | }; 52 | 53 | &spi2 { 54 | status = "disabled"; 55 | }; 56 | 57 | &spi3 { 58 | status = "disabled"; 59 | }; 60 | 61 | &i2c0 { 62 | status = "disabled"; 63 | }; 64 | 65 | &i2c1 { 66 | status = "disabled"; 67 | }; 68 | 69 | &i2c2 { 70 | status = "okay"; 71 | }; 72 | 73 | &i2c3 { 74 | status = "disabled"; 75 | }; 76 | 77 | &i2c4 { 78 | status = "disabled"; 79 | }; 80 | 81 | &uart1 { 82 | status = "okay"; 83 | }; 84 | 85 | &uart2 { 86 | status = "okay"; 87 | }; 88 | 89 | &uart3 { 90 | status = "okay"; 91 | }; 92 | 93 | &uart4 { 94 | status = "okay"; 95 | }; 96 | 97 | &wifisd { 98 | status = "okay"; 99 | }; 100 | 101 | / { 102 | model = "Seeed reCamera"; 103 | 104 | /delete-node/ cvi-spif@10000000; 105 | /delete-node/ cv-spinf@4060000; 106 | 107 | leds { 108 | compatible = "gpio-leds"; 109 | 110 | led0 { 111 | label = "red"; 112 | gpios = <&porta 15 GPIO_ACTIVE_HIGH>; 113 | linux,default-trigger = "heartbeat"; 114 | default-state = "on"; 115 | }; 116 | 117 | led1 { 118 | label = "blue"; 119 | gpios = <&porte 24 GPIO_ACTIVE_HIGH>; 120 | linux,default-trigger = "mmc0"; 121 | default-state = "on"; 122 | }; 123 | 124 | led2 { 125 | label = "white"; 126 | gpios = <&porte 0 GPIO_ACTIVE_HIGH>; 127 | default-state = "off"; 128 | }; 129 | }; 130 | 131 | /delete-node/ bt_pin; 132 | /delete-node/ wifi_pin; 133 | wifi_pin { 134 | compatible = "cvitek,wifi-pin"; 135 | poweron-gpio = <&porta 30 GPIO_ACTIVE_HIGH>; 136 | /*wakeup-gpio = <&porte 8 GPIO_ACTIVE_HIGH>;*/ 137 | }; 138 | 139 | mcp2518fd_osc: mcp2518fd_osc { 140 | #clock-cells = <0>; 141 | compatible = "fixed-clock"; 142 | clock-frequency = <40000000>; 143 | }; 144 | }; 145 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/memmap.py: -------------------------------------------------------------------------------- 1 | SIZE_1M = 0x100000 2 | SIZE_1K = 1024 3 | 4 | 5 | # Only attributes in class MemoryMap are generated to .h 6 | class MemoryMap: 7 | # No prefix "CVIMMAP_" for the items in _no_prefix[] 8 | _no_prefix = [ 9 | "CONFIG_SYS_TEXT_BASE" # u-boot's CONFIG_SYS_TEXT_BASE is used without CPP. 10 | ] 11 | 12 | DRAM_BASE = 0x80000000 13 | DRAM_SIZE = 256 * SIZE_1M 14 | 15 | # ============== 16 | # C906L FreeRTOS 17 | # ============== 18 | FREERTOS_SIZE = 2 * SIZE_1M 19 | # FreeRTOS is at the end of DRAM 20 | FREERTOS_ADDR = DRAM_BASE + DRAM_SIZE - FREERTOS_SIZE 21 | FSBL_C906L_START_ADDR = FREERTOS_ADDR 22 | 23 | # ============================== 24 | # OpenSBI | arm-trusted-firmware 25 | # ============================== 26 | # Monitor is at the begining of DRAM 27 | MONITOR_ADDR = DRAM_BASE 28 | 29 | ATF_SIZE = 512 * SIZE_1K 30 | OPENSBI_SIZE = 512 * SIZE_1K 31 | OPENSBI_FDT_ADDR = MONITOR_ADDR + OPENSBI_SIZE 32 | 33 | # ========================= 34 | # memory@DRAM_BASE in .dts. 35 | # ========================= 36 | # Ignore the area of FreeRTOS in u-boot and kernel 37 | KERNEL_MEMORY_ADDR = DRAM_BASE 38 | KERNEL_MEMORY_SIZE = DRAM_SIZE - FREERTOS_SIZE 39 | 40 | # ================= 41 | # Multimedia buffer. Used by u-boot/kernel/FreeRTOS 42 | # ================= 43 | ION_SIZE = 50 * SIZE_1M 44 | H26X_BITSTREAM_SIZE = 2 * SIZE_1M 45 | H26X_ENC_BUFF_SIZE = 0 46 | ISP_MEM_BASE_SIZE = 20 * SIZE_1M 47 | FREERTOS_RESERVED_ION_SIZE = H26X_BITSTREAM_SIZE + H26X_ENC_BUFF_SIZE + ISP_MEM_BASE_SIZE 48 | 49 | # ION after FreeRTOS 50 | ION_ADDR = FREERTOS_ADDR - ION_SIZE 51 | 52 | # Buffers of the fast image are inside the ION buffer 53 | H26X_BITSTREAM_ADDR = ION_ADDR 54 | H26X_ENC_BUFF_ADDR = H26X_BITSTREAM_ADDR + H26X_BITSTREAM_SIZE 55 | ISP_MEM_BASE_ADDR = H26X_ENC_BUFF_ADDR + H26X_ENC_BUFF_SIZE 56 | 57 | assert ISP_MEM_BASE_ADDR + ISP_MEM_BASE_SIZE <= ION_ADDR + ION_SIZE 58 | 59 | # Boot logo is after the ION buffer 60 | # Framebuffer uses boot logo's reserved memory 61 | BOOTLOGO_SIZE = 1800 * SIZE_1K 62 | BOOTLOGO_ADDR = ION_ADDR - BOOTLOGO_SIZE 63 | FRAMEBUFFER_SIZE = BOOTLOGO_SIZE 64 | FRAMEBUFFER_ADDR = BOOTLOGO_ADDR 65 | 66 | # =================== 67 | # FSBL and u-boot-2021 68 | # =================== 69 | CVI_UPDATE_HEADER_SIZE = SIZE_1K 70 | UIMAG_SIZE = 16 * SIZE_1M 71 | 72 | # kernel image loading buffer 73 | UIMAG_ADDR = DRAM_BASE + 24 * SIZE_1M 74 | CVI_UPDATE_HEADER_ADDR = UIMAG_ADDR - CVI_UPDATE_HEADER_SIZE 75 | 76 | # FSBL decompress buffer 77 | FSBL_UNZIP_ADDR = UIMAG_ADDR 78 | FSBL_UNZIP_SIZE = UIMAG_SIZE 79 | 80 | assert UIMAG_ADDR + UIMAG_SIZE <= BOOTLOGO_ADDR 81 | 82 | # u-boot's run address and entry point 83 | CONFIG_SYS_TEXT_BASE = DRAM_BASE + 2 * SIZE_1M 84 | # u-boot's init stack point is only used before board_init_f() 85 | CONFIG_SYS_INIT_SP_ADDR = UIMAG_ADDR + UIMAG_SIZE 86 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/partition/partition_emmc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/rootfs/etc/device-name: -------------------------------------------------------------------------------- 1 | reCamera -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/rootfs/etc/issue: -------------------------------------------------------------------------------- 1 | reCamera 2 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/rootfs/etc/secret: -------------------------------------------------------------------------------- 1 | 5d064167d420d64cd7ff943ec4387f9ff5fcf3453cd67ec0d53fb1b697e02dc4 - 2 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/rootfs/etc/upgrade: -------------------------------------------------------------------------------- 1 | 0 -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/rootfs_script/clean_rootfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SYSTEM_DIR=$1 4 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libz* 5 | rm -f $SYSTEM_DIR/mnt/system/lib/libz* 6 | 7 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libcvi* 8 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libmad* 9 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libmp3* 10 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libopencv* 11 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libopencv* 12 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvi_rtsp.so 13 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libcvi_rtsp.so 14 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvikernel.so 15 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/*.a 16 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libgst* 17 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libg* 18 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/gstreamer-1.0/libgst* 19 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libcrypto.so* 20 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libssl.so* 21 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libcvi_protobuf.so* 22 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libprotobuf-lite.so* 23 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcviai* 24 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvi_ispd.so* 25 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libraw_replay.so* 26 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvi_ive_tpu.so* 27 | rm -rf $SYSTEM_DIR/mnt/system/usr/lib/gio 28 | rm -rf $SYSTEM_DIR/mnt/system/usr/lib/glib* 29 | rm -rf $SYSTEM_DIR/mnt/system/usr/lib/gstreamer-1.0* 30 | rm -rf $SYSTEM_DIR/mnt/system/usr/libexec* 31 | rm -rf $SYSTEM_DIR/mnt/system/usr/bin 32 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvimath.so 33 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcviruntime.so 34 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcnpy.so 35 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcipher.so 36 | 37 | rm -f $SYSTEM_DIR/mnt/system/lib/libcipher.so* 38 | rm -f $SYSTEM_DIR/mnt/system/lib/libcvi_ispd.so* 39 | rm -f $SYSTEM_DIR/mnt/system/lib/libraw_replay.so* 40 | rm -f $SYSTEM_DIR/mnt/system/lib/libmad.so* 41 | rm -f $SYSTEM_DIR/mnt/system/lib/libmp3* 42 | rm -f $SYSTEM_DIR/mnt/system/lib/libnanomsg* 43 | 44 | #del 3rdparty lib 45 | #del thttpd/libwebsockets lib 46 | rm -f $SYSTEM_DIR/mnt/system/lib/libthttpd* 47 | rm -f $SYSTEM_DIR/mnt/system/lib/libwebsocket* 48 | if [ $SDK_VER = "uclibc" ] 49 | then 50 | #del opencv lib 51 | rm -f $SYSTEM_DIR/mnt/system/lib/libopencv* 52 | #del ffmpeg lib 53 | rm -f $SYSTEM_DIR/mnt/system/lib/libav* 54 | #save /mnt/system/lib/ openssl lib; need by ntpdate/wpa_supplicant 55 | else 56 | #glibc ramdisk(rootfs/common_arm/usr/lib/) has libcrypto.so and libssl.so 57 | #del openssl 58 | rm -f $SYSTEM_DIR/mnt/system/lib/libssl* 59 | rm -f $SYSTEM_DIR/mnt/system/lib/libcrypto* 60 | fi 61 | 62 | rm -rf $SYSTEM_DIR/etc/init.d/S23ntp 63 | rm -rf $SYSTEM_DIR/bin/ntpd 64 | 65 | du -sh $SYSTEM_DIR/* |sort -rh 66 | du -sh $SYSTEM_DIR/mnt/* |sort -rh 67 | du -sh $SYSTEM_DIR/mnt/system/* |sort -rh 68 | du -sh $SYSTEM_DIR/mnt/system/lib/* |sort -rh 69 | du -sh $SYSTEM_DIR/mnt/system/data/install/* |sort -rh 70 | du -sh $SYSTEM_DIR/usr/* |sort -rh 71 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/sg2002_recamera_emmc_defconfig: -------------------------------------------------------------------------------- 1 | CONFIG_CHIP_sg2002=y 2 | CONFIG_BOARD_recamera_emmc=y 3 | CONFIG_DDR_CFG_ddr3_1866_x16=y 4 | CONFIG_ARCH="riscv" 5 | CONFIG_CROSS_COMPILE="riscv64-unknown-linux-musl-" 6 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y 7 | CONFIG_KERNEL_ENTRY_HACK=y 8 | CONFIG_KERNEL_ENTRY_HACK_ADDR="0x80200000" 9 | CONFIG_TOOLCHAIN_MUSL_RISCV64=y 10 | CONFIG_FLASH_SIZE_SHRINK=y 11 | CONFIG_BOOT_IMAGE_SINGLE_DTB=y 12 | CONFIG_STORAGE_TYPE_emmc=y 13 | CONFIG_SENSOR_OV_OV5647=y 14 | CONFIG_SENSOR_SMS_SC530AI_2L=y 15 | CONFIG_SENSOR_TUNING_PARAM_cv181x_src_ov_ov5647=y 16 | CONFIG_UBOOT_2021_10=y 17 | CONFIG_KERNEL_SRC_5.10=y 18 | CONFIG_KERNEL_LZMA=y 19 | CONFIG_SKIP_RAMDISK=y 20 | CONFIG_ROOTFS_OVERLAYFS=y 21 | CONFIG_TARGET_PACKAGE_DROPBEAR=y 22 | CONFIG_TARGET_PACKAGE_MTD-UTILS=y 23 | # CONFIG_TARGET_PACKAGE_RSYSLOG is not set 24 | CONFIG_TARGET_PACKAGE_BUSYBOX_SYSLOGD_SCRIPT=y 25 | CONFIG_ENABLE_FREERTOS=y 26 | CONFIG_ENABLE_RTOS_DUMP_PRINT=y 27 | CONFIG_DUMP_PRINT_SZ_IDX=17 28 | CONFIG_TARGET_PACKAGE_GATORD=n 29 | CONFIG_TARGET_PACKAGE_NTP=y 30 | CONFIG_TARGET_PACKAGE_WIFI=y 31 | CONFIG_BUILDROOT_FS=y 32 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/u-boot/cvi_board_init.c: -------------------------------------------------------------------------------- 1 | int cvi_board_init(void) 2 | { 3 | // WIFI/BT 4 | PINMUX_CONFIG(AUX0, XGPIOA_30); // BT_REG_ON & WIFI_REG_ON -- gpio510 5 | PINMUX_CONFIG(JTAG_CPU_TMS, UART1_RTS); 6 | PINMUX_CONFIG(JTAG_CPU_TCK, UART1_CTS); 7 | PINMUX_CONFIG(IIC0_SDA, UART1_RX); 8 | PINMUX_CONFIG(IIC0_SCL, UART1_TX); 9 | 10 | // Camera 11 | PINMUX_CONFIG(PWR_WAKEUP0, PWR_GPIO_6); // CAM_EN -- gpio358 12 | PINMUX_CONFIG(PWR_GPIO1, IIC2_SCL); // PWR_GPIO1 -- IIC2_SCL 13 | PINMUX_CONFIG(PWR_GPIO2, IIC2_SDA); // PWR_GPIO2 -- IIC2_SDA 14 | 15 | // Red & Blue leds 16 | PINMUX_CONFIG(SPK_EN, XGPIOA_15); // GPIO15/IR_CUT -- gpio495 17 | PINMUX_CONFIG(GPIO_ZQ, PWR_GPIO_24); // PAD_ZQ -- gpio376 18 | // White led 19 | PINMUX_CONFIG(PWR_GPIO0, PWR_GPIO_0); // PWR_GPIO0 -- gpio352 20 | 21 | return 0; 22 | } 23 | 24 | 25 | #include 26 | #include 27 | 28 | static int do_cvi_otp(struct cmd_tbl* cmdtp, int flag, int argc, 29 | char* const argv[]) 30 | { 31 | extern int64_t cvi_efuse_read_from_shadow(uint32_t addr); 32 | 33 | int i = 0; 34 | uint32_t buf[5]; 35 | unsigned char* pu8 = NULL; 36 | char str[32] = ""; 37 | char* str_get; 38 | unsigned char save_flag = 0; 39 | 40 | for (i = 0; i < ARRAY_SIZE(buf); i++) { 41 | buf[i] = cvi_efuse_read_from_shadow(0x40 + i * sizeof(uint32_t)); 42 | } 43 | 44 | str_get = env_get("ethaddr"); 45 | if ((buf[0] != 0x0) && (buf[0] != 0xffffffff)) { 46 | pu8 = (char*)buf; 47 | sprintf(str, "%02x:%02x:%02x:%02x:%02x:%02x", pu8[0], pu8[1], pu8[2], pu8[3], pu8[4], pu8[5]); 48 | printf("mac: %s\n", str); 49 | if ((NULL == str_get) || strcmp(str, str_get)) { 50 | save_flag = 1; 51 | env_set("ethaddr", str); 52 | } 53 | } else { 54 | printf("random mac: %s\n", (NULL == str_get) ? "null" : str_get); 55 | } 56 | 57 | str_get = env_get("sn"); 58 | pu8 = (char*)&buf[2]; 59 | sprintf(str, "%02X%02X%02X%02X%02X%02X%02X%02X%02X", 60 | pu8[0], pu8[1], pu8[2], pu8[3], pu8[4], pu8[5], pu8[6], pu8[7], pu8[8]); 61 | printf("sn: %s\n", str); 62 | if ((NULL == str_get) || strcmp(str, str_get)) { 63 | save_flag = 1; 64 | env_set("sn", str); 65 | } 66 | 67 | if (save_flag) { 68 | env_save(); 69 | } 70 | 71 | return 0; 72 | } 73 | 74 | U_BOOT_CMD_COMPLETE( 75 | cvi_otp, CONFIG_SYS_MAXARGS, 1, do_cvi_otp, 76 | "load efuse info to env", 77 | " - load efuse info to env", 78 | var_complete); 79 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/u-boot/cvitek.h: -------------------------------------------------------------------------------- 1 | /* 2 | *VO control GPIOs 3 | */ 4 | #define VO_GPIO_RESET_PORT portb 5 | #define VO_GPIO_RESET_INDEX 5 6 | #define VO_GPIO_RESET_ACTIVE GPIO_ACTIVE_LOW 7 | #define VO_GPIO_PWM_PORT portb 8 | #define VO_GPIO_PWM_INDEX 4 9 | #define VO_GPIO_PWM_ACTIVE GPIO_ACTIVE_HIGH 10 | #define VO_GPIO_POWER_CT_PORT portb 11 | #define VO_GPIO_POWER_CT_INDEX 3 12 | #define VO_GPIO_POWER_CT_ACTIVE GPIO_ACTIVE_HIGH 13 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_emmc/u-boot/cvitek_sg2002_recamera_emmc_defconfig: -------------------------------------------------------------------------------- 1 | CONFIG_RISCV=y 2 | CONFIG_SYS_MALLOC_F_LEN=0x2000 3 | CONFIG_NR_DRAM_BANKS=1 4 | CONFIG_DEFAULT_DEVICE_TREE="soph_asic" 5 | CONFIG_IDENT_STRING=" soph" 6 | CONFIG_ARCH_RV64I=y 7 | CONFIG_RISCV_SMODE=y 8 | CONFIG_TARGET_CVITEK_CV181X=y 9 | CONFIG_DISTRO_DEFAULTS=y 10 | CONFIG_FIT=y 11 | # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set 12 | CONFIG_BOOTDELAY=0 13 | CONFIG_SYS_PROMPT="reCamera # " 14 | # CONFIG_CMD_CONSOLE is not set 15 | # CONFIG_CMD_XIMG is not set 16 | # CONFIG_CMD_EDITENV is not set 17 | # CONFIG_CMD_CRC32 is not set 18 | # CONFIG_CMD_LZMADEC is not set 19 | # CONFIG_CMD_UNLZ4 is not set 20 | # CONFIG_CMD_UNZIP is not set 21 | # CONFIG_CMD_LOADS is not set 22 | CONFIG_CMD_MMC=y 23 | # CONFIG_CMD_ITEST is not set 24 | CONFIG_CMD_CACHE=y 25 | CONFIG_CMD_CVI_SD_UPDATE=y 26 | # CONFIG_ISO_PARTITION is not set 27 | # CONFIG_EFI_PARTITION is not set 28 | CONFIG_NET_RANDOM_ETHADDR=y 29 | CONFIG_MMC=y 30 | CONFIG_MMC_SDHCI=y 31 | CONFIG_MMC_SDHCI_SDMA=y 32 | CONFIG_MMC_SDHCI_CVITEK=y 33 | CONFIG_MTD=y 34 | # CONFIG_PHY_SMSC is not set 35 | CONFIG_DM_ETH=y 36 | CONFIG_ETH_DESIGNWARE=y 37 | CONFIG_PHY_CVITEK=y 38 | CONFIG_SYS_NS16550=y 39 | CONFIG_SPI=y 40 | CONFIG_LZ4=y 41 | CONFIG_LZMA=y 42 | # CONFIG_TOOLS_LIBCRYPTO is not set 43 | CONFIG_ENV_IS_IN_MMC=y 44 | 45 | # supports ota 46 | CONFIG_CMD_ITEST=y 47 | CONFIG_CMD_SETEXPR=y -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_sd/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ddr_cfg_list": [ 3 | "", 4 | "ddr3_1866_x16", 5 | "ddr3_2133_x16", 6 | "ddr_auto_x16" 7 | ], 8 | "board_information": "C906B + EMMC 8192MB + DDR 256MB" 9 | } 10 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_sd/dts_riscv/sg2002_recamera_sd.dts: -------------------------------------------------------------------------------- 1 | /dts-v1/; 2 | #include "cv181x_base_riscv.dtsi" 3 | /*#include "cv181x_asic_qfn.dtsi"*/ 4 | /*#include "cv181x_asic_sd.dtsi"*/ 5 | #include "cv181x_default_memmap.dtsi" 6 | 7 | &sd { 8 | no-1-8-v; 9 | }; 10 | 11 | &mipi_rx{ 12 | /delete-property/ snsr-reset; 13 | }; 14 | 15 | &mipi_tx { 16 | /delete-property/ reset-gpio; 17 | /delete-property/ pwm-gpio; 18 | /delete-property/ power-ct-gpio; 19 | }; 20 | 21 | &dac{ 22 | /delete-property/ mute-gpio-r; 23 | }; 24 | 25 | &spi0 { 26 | status = "disabled"; 27 | }; 28 | 29 | &spi1 { 30 | status = "disabled"; 31 | }; 32 | 33 | &spi2 { 34 | status = "disabled"; 35 | }; 36 | 37 | &spi3 { 38 | status = "disabled"; 39 | }; 40 | 41 | &i2c0 { 42 | status = "disabled"; 43 | }; 44 | 45 | &i2c1 { 46 | status = "disabled"; 47 | }; 48 | 49 | &i2c2 { 50 | status = "okay"; 51 | }; 52 | 53 | &i2c3 { 54 | status = "disabled"; 55 | }; 56 | 57 | &i2c4 { 58 | status = "disabled"; 59 | }; 60 | 61 | &uart1 { 62 | status = "okay"; 63 | }; 64 | 65 | &uart2 { 66 | status = "okay"; 67 | }; 68 | 69 | &uart3 { 70 | status = "okay"; 71 | }; 72 | 73 | &uart4 { 74 | status = "okay"; 75 | }; 76 | 77 | &wifisd { 78 | status = "okay"; 79 | }; 80 | 81 | / { 82 | model = "Seeed reCamera"; 83 | 84 | /delete-node/ cvi-spif@10000000; 85 | /delete-node/ cv-spinf@4060000; 86 | 87 | leds { 88 | compatible = "gpio-leds"; 89 | 90 | led0 { 91 | label = "red"; 92 | gpios = <&porta 15 GPIO_ACTIVE_HIGH>; 93 | linux,default-trigger = "heartbeat"; 94 | default-state = "on"; 95 | }; 96 | 97 | led1 { 98 | label = "blue"; 99 | gpios = <&porte 24 GPIO_ACTIVE_HIGH>; 100 | linux,default-trigger = "mmc0"; 101 | default-state = "on"; 102 | }; 103 | 104 | led2 { 105 | label = "white"; 106 | gpios = <&porte 0 GPIO_ACTIVE_HIGH>; 107 | default-state = "off"; 108 | }; 109 | }; 110 | 111 | /delete-node/ bt_pin; 112 | /delete-node/ wifi_pin; 113 | wifi_pin { 114 | compatible = "cvitek,wifi-pin"; 115 | poweron-gpio = <&porta 30 GPIO_ACTIVE_HIGH>; 116 | /*wakeup-gpio = <&porte 8 GPIO_ACTIVE_HIGH>;*/ 117 | }; 118 | }; 119 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_sd/memmap.py: -------------------------------------------------------------------------------- 1 | SIZE_1M = 0x100000 2 | SIZE_1K = 1024 3 | 4 | 5 | # Only attributes in class MemoryMap are generated to .h 6 | class MemoryMap: 7 | # No prefix "CVIMMAP_" for the items in _no_prefix[] 8 | _no_prefix = [ 9 | "CONFIG_SYS_TEXT_BASE" # u-boot's CONFIG_SYS_TEXT_BASE is used without CPP. 10 | ] 11 | 12 | DRAM_BASE = 0x80000000 13 | DRAM_SIZE = 256 * SIZE_1M 14 | 15 | # ============== 16 | # C906L FreeRTOS 17 | # ============== 18 | FREERTOS_SIZE = 2 * SIZE_1M 19 | # FreeRTOS is at the end of DRAM 20 | FREERTOS_ADDR = DRAM_BASE + DRAM_SIZE - FREERTOS_SIZE 21 | FSBL_C906L_START_ADDR = FREERTOS_ADDR 22 | 23 | # ============================== 24 | # OpenSBI | arm-trusted-firmware 25 | # ============================== 26 | # Monitor is at the begining of DRAM 27 | MONITOR_ADDR = DRAM_BASE 28 | 29 | ATF_SIZE = 512 * SIZE_1K 30 | OPENSBI_SIZE = 512 * SIZE_1K 31 | OPENSBI_FDT_ADDR = MONITOR_ADDR + OPENSBI_SIZE 32 | 33 | # ========================= 34 | # memory@DRAM_BASE in .dts. 35 | # ========================= 36 | # Ignore the area of FreeRTOS in u-boot and kernel 37 | KERNEL_MEMORY_ADDR = DRAM_BASE 38 | KERNEL_MEMORY_SIZE = DRAM_SIZE - FREERTOS_SIZE 39 | 40 | # ================= 41 | # Multimedia buffer. Used by u-boot/kernel/FreeRTOS 42 | # ================= 43 | ION_SIZE = 75 * SIZE_1M 44 | H26X_BITSTREAM_SIZE = 2 * SIZE_1M 45 | H26X_ENC_BUFF_SIZE = 0 46 | ISP_MEM_BASE_SIZE = 20 * SIZE_1M 47 | FREERTOS_RESERVED_ION_SIZE = H26X_BITSTREAM_SIZE + H26X_ENC_BUFF_SIZE + ISP_MEM_BASE_SIZE 48 | 49 | # ION after FreeRTOS 50 | ION_ADDR = FREERTOS_ADDR - ION_SIZE 51 | 52 | # Buffers of the fast image are inside the ION buffer 53 | H26X_BITSTREAM_ADDR = ION_ADDR 54 | H26X_ENC_BUFF_ADDR = H26X_BITSTREAM_ADDR + H26X_BITSTREAM_SIZE 55 | ISP_MEM_BASE_ADDR = H26X_ENC_BUFF_ADDR + H26X_ENC_BUFF_SIZE 56 | 57 | assert ISP_MEM_BASE_ADDR + ISP_MEM_BASE_SIZE <= ION_ADDR + ION_SIZE 58 | 59 | # Boot logo is after the ION buffer 60 | # Framebuffer uses boot logo's reserved memory 61 | BOOTLOGO_SIZE = 1800 * SIZE_1K 62 | BOOTLOGO_ADDR = ION_ADDR - BOOTLOGO_SIZE 63 | FRAMEBUFFER_SIZE = BOOTLOGO_SIZE 64 | FRAMEBUFFER_ADDR = BOOTLOGO_ADDR 65 | 66 | # =================== 67 | # FSBL and u-boot-2021 68 | # =================== 69 | CVI_UPDATE_HEADER_SIZE = SIZE_1K 70 | UIMAG_SIZE = 16 * SIZE_1M 71 | 72 | # kernel image loading buffer 73 | UIMAG_ADDR = DRAM_BASE + 24 * SIZE_1M 74 | CVI_UPDATE_HEADER_ADDR = UIMAG_ADDR - CVI_UPDATE_HEADER_SIZE 75 | 76 | # FSBL decompress buffer 77 | FSBL_UNZIP_ADDR = UIMAG_ADDR 78 | FSBL_UNZIP_SIZE = UIMAG_SIZE 79 | 80 | assert UIMAG_ADDR + UIMAG_SIZE <= BOOTLOGO_ADDR 81 | 82 | # u-boot's run address and entry point 83 | CONFIG_SYS_TEXT_BASE = DRAM_BASE + 2 * SIZE_1M 84 | # u-boot's init stack point is only used before board_init_f() 85 | CONFIG_SYS_INIT_SP_ADDR = UIMAG_ADDR + UIMAG_SIZE 86 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_sd/partition/partition_sd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_sd/rootfs_script/clean_rootfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SYSTEM_DIR=$1 4 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libz* 5 | rm -f $SYSTEM_DIR/mnt/system/lib/libz* 6 | 7 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libcvi* 8 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libmad* 9 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libmp3* 10 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libopencv* 11 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libopencv* 12 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvi_rtsp.so 13 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libcvi_rtsp.so 14 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvikernel.so 15 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/*.a 16 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libgst* 17 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libg* 18 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/gstreamer-1.0/libgst* 19 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libcrypto.so* 20 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libssl.so* 21 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libcvi_protobuf.so* 22 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libprotobuf-lite.so* 23 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcviai* 24 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvi_ispd.so* 25 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libraw_replay.so* 26 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvi_ive_tpu.so* 27 | rm -rf $SYSTEM_DIR/mnt/system/usr/lib/gio 28 | rm -rf $SYSTEM_DIR/mnt/system/usr/lib/glib* 29 | rm -rf $SYSTEM_DIR/mnt/system/usr/lib/gstreamer-1.0* 30 | rm -rf $SYSTEM_DIR/mnt/system/usr/libexec* 31 | rm -rf $SYSTEM_DIR/mnt/system/usr/bin 32 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvimath.so 33 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcviruntime.so 34 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcnpy.so 35 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcipher.so 36 | 37 | rm -f $SYSTEM_DIR/mnt/system/lib/libcipher.so* 38 | rm -f $SYSTEM_DIR/mnt/system/lib/libcvi_ispd.so* 39 | rm -f $SYSTEM_DIR/mnt/system/lib/libraw_replay.so* 40 | rm -f $SYSTEM_DIR/mnt/system/lib/libmad.so* 41 | rm -f $SYSTEM_DIR/mnt/system/lib/libmp3* 42 | rm -f $SYSTEM_DIR/mnt/system/lib/libnanomsg* 43 | 44 | #del 3rdparty lib 45 | #del thttpd/libwebsockets lib 46 | rm -f $SYSTEM_DIR/mnt/system/lib/libthttpd* 47 | rm -f $SYSTEM_DIR/mnt/system/lib/libwebsocket* 48 | if [ $SDK_VER = "uclibc" ] 49 | then 50 | #del opencv lib 51 | rm -f $SYSTEM_DIR/mnt/system/lib/libopencv* 52 | #del ffmpeg lib 53 | rm -f $SYSTEM_DIR/mnt/system/lib/libav* 54 | #save /mnt/system/lib/ openssl lib; need by ntpdate/wpa_supplicant 55 | else 56 | #glibc ramdisk(rootfs/common_arm/usr/lib/) has libcrypto.so and libssl.so 57 | #del openssl 58 | rm -f $SYSTEM_DIR/mnt/system/lib/libssl* 59 | rm -f $SYSTEM_DIR/mnt/system/lib/libcrypto* 60 | fi 61 | 62 | rm -rf $SYSTEM_DIR/etc/init.d/S23ntp 63 | rm -rf $SYSTEM_DIR/bin/ntpd 64 | 65 | du -sh $SYSTEM_DIR/* |sort -rh 66 | du -sh $SYSTEM_DIR/mnt/* |sort -rh 67 | du -sh $SYSTEM_DIR/mnt/system/* |sort -rh 68 | du -sh $SYSTEM_DIR/mnt/system/lib/* |sort -rh 69 | du -sh $SYSTEM_DIR/mnt/system/data/install/* |sort -rh 70 | du -sh $SYSTEM_DIR/usr/* |sort -rh 71 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_sd/sg2002_recamera_sd_defconfig: -------------------------------------------------------------------------------- 1 | CONFIG_CHIP_sg2002=y 2 | CONFIG_BOARD_recamera_sd=y 3 | CONFIG_DDR_CFG_ddr3_1866_x16=y 4 | CONFIG_ARCH="riscv" 5 | CONFIG_CROSS_COMPILE="riscv64-unknown-linux-musl-" 6 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y 7 | CONFIG_KERNEL_ENTRY_HACK=y 8 | CONFIG_KERNEL_ENTRY_HACK_ADDR="0x80200000" 9 | CONFIG_TOOLCHAIN_MUSL_RISCV64=y 10 | CONFIG_FLASH_SIZE_SHRINK=y 11 | CONFIG_BOOT_IMAGE_SINGLE_DTB=y 12 | CONFIG_STORAGE_TYPE_sd=y 13 | CONFIG_SENSOR_OV_OV5647=y 14 | CONFIG_SENSOR_TUNING_PARAM_cv181x_src_ov_ov5647=y 15 | CONFIG_UBOOT_2021_10=y 16 | CONFIG_KERNEL_SRC_5.10=y 17 | CONFIG_KERNEL_LZMA=y 18 | CONFIG_SKIP_RAMDISK=y 19 | CONFIG_ROOTFS_OVERLAYFS=y 20 | CONFIG_TARGET_PACKAGE_DROPBEAR=y 21 | CONFIG_TARGET_PACKAGE_MTD-UTILS=y 22 | # CONFIG_TARGET_PACKAGE_RSYSLOG is not set 23 | CONFIG_TARGET_PACKAGE_BUSYBOX_SYSLOGD_SCRIPT=y 24 | CONFIG_ENABLE_FREERTOS=y 25 | CONFIG_ENABLE_RTOS_DUMP_PRINT=y 26 | CONFIG_DUMP_PRINT_SZ_IDX=17 27 | CONFIG_TARGET_PACKAGE_GATORD=n 28 | CONFIG_TARGET_PACKAGE_NTP=y 29 | CONFIG_TARGET_PACKAGE_WIFI=y 30 | CONFIG_BUILDROOT_FS=y 31 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_sd/u-boot/cvi_board_init.c: -------------------------------------------------------------------------------- 1 | int cvi_board_init(void) 2 | { 3 | // WIFI/BT 4 | PINMUX_CONFIG(AUX0, XGPIOA_30); // BT_REG_ON & WIFI_REG_ON -- gpio510 5 | PINMUX_CONFIG(JTAG_CPU_TMS, UART1_RTS); 6 | PINMUX_CONFIG(JTAG_CPU_TCK, UART1_CTS); 7 | PINMUX_CONFIG(IIC0_SDA, UART1_RX); 8 | PINMUX_CONFIG(IIC0_SCL, UART1_TX); 9 | 10 | // Camera 11 | PINMUX_CONFIG(PWR_WAKEUP0, PWR_GPIO_6); // CAM_EN -- gpio358 12 | PINMUX_CONFIG(PWR_GPIO1, IIC2_SCL); // PWR_GPIO1 -- IIC2_SCL 13 | PINMUX_CONFIG(PWR_GPIO2, IIC2_SDA); // PWR_GPIO2 -- IIC2_SDA 14 | 15 | // Red & Blue leds 16 | PINMUX_CONFIG(SPK_EN, XGPIOA_15); // GPIO15/IR_CUT -- gpio495 17 | PINMUX_CONFIG(GPIO_ZQ, PWR_GPIO_24); // PAD_ZQ -- gpio376 18 | // White led 19 | PINMUX_CONFIG(PWR_GPIO0, PWR_GPIO_0); // PWR_GPIO0 -- gpio352 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_sd/u-boot/cvitek.h: -------------------------------------------------------------------------------- 1 | /* 2 | *VO control GPIOs 3 | */ 4 | #define VO_GPIO_RESET_PORT portb 5 | #define VO_GPIO_RESET_INDEX 5 6 | #define VO_GPIO_RESET_ACTIVE GPIO_ACTIVE_LOW 7 | #define VO_GPIO_PWM_PORT portb 8 | #define VO_GPIO_PWM_INDEX 4 9 | #define VO_GPIO_PWM_ACTIVE GPIO_ACTIVE_HIGH 10 | #define VO_GPIO_POWER_CT_PORT portb 11 | #define VO_GPIO_POWER_CT_INDEX 3 12 | #define VO_GPIO_POWER_CT_ACTIVE GPIO_ACTIVE_HIGH 13 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_recamera_sd/u-boot/cvitek_sg2002_recamera_sd_defconfig: -------------------------------------------------------------------------------- 1 | CONFIG_RISCV=y 2 | CONFIG_SYS_MALLOC_F_LEN=0x2000 3 | CONFIG_NR_DRAM_BANKS=1 4 | CONFIG_DEFAULT_DEVICE_TREE="soph_asic" 5 | CONFIG_IDENT_STRING=" soph" 6 | CONFIG_ARCH_RV64I=y 7 | CONFIG_RISCV_SMODE=y 8 | CONFIG_TARGET_CVITEK_CV181X=y 9 | CONFIG_DISTRO_DEFAULTS=y 10 | CONFIG_FIT=y 11 | # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set 12 | CONFIG_BOOTDELAY=1 13 | CONFIG_SYS_PROMPT="soph# " 14 | # CONFIG_CMD_CONSOLE is not set 15 | # CONFIG_CMD_XIMG is not set 16 | # CONFIG_CMD_EDITENV is not set 17 | # CONFIG_CMD_CRC32 is not set 18 | # CONFIG_CMD_LZMADEC is not set 19 | # CONFIG_CMD_UNLZ4 is not set 20 | # CONFIG_CMD_UNZIP is not set 21 | # CONFIG_CMD_LOADS is not set 22 | CONFIG_CMD_MMC=y 23 | # CONFIG_CMD_ITEST is not set 24 | CONFIG_CMD_CACHE=y 25 | CONFIG_CMD_CVI_SD_UPDATE=y 26 | # CONFIG_ISO_PARTITION is not set 27 | # CONFIG_EFI_PARTITION is not set 28 | CONFIG_NET_RANDOM_ETHADDR=y 29 | CONFIG_MMC=y 30 | CONFIG_MMC_SDHCI=y 31 | CONFIG_MMC_SDHCI_SDMA=y 32 | CONFIG_MMC_SDHCI_CVITEK=y 33 | CONFIG_MTD=y 34 | # CONFIG_PHY_SMSC is not set 35 | CONFIG_DM_ETH=y 36 | CONFIG_ETH_DESIGNWARE=y 37 | CONFIG_PHY_CVITEK=y 38 | CONFIG_SYS_NS16550=y 39 | CONFIG_SPI=y 40 | CONFIG_LZ4=y 41 | CONFIG_LZMA=y 42 | # CONFIG_TOOLS_LIBCRYPTO is not set 43 | CONFIG_ENV_IS_NOWHERE=y 44 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_xiao_sd/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ddr_cfg_list": [ 3 | "", 4 | "ddr3_1866_x16", 5 | "ddr3_2133_x16", 6 | "ddr_auto_x16" 7 | ], 8 | "board_information": "C906B + EMMC 8192MB + DDR 256MB" 9 | } 10 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_xiao_sd/dts_riscv/sg2002_xiao_sd.dts: -------------------------------------------------------------------------------- 1 | /dts-v1/; 2 | #include "cv181x_base_riscv.dtsi" 3 | #include "cv181x_asic_qfn.dtsi" 4 | #include "cv181x_asic_sd.dtsi" 5 | #include "cv181x_default_memmap.dtsi" 6 | 7 | / { 8 | 9 | }; 10 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_xiao_sd/memmap.py: -------------------------------------------------------------------------------- 1 | SIZE_1M = 0x100000 2 | SIZE_1K = 1024 3 | 4 | 5 | # Only attributes in class MemoryMap are generated to .h 6 | class MemoryMap: 7 | # No prefix "CVIMMAP_" for the items in _no_prefix[] 8 | _no_prefix = [ 9 | "CONFIG_SYS_TEXT_BASE" # u-boot's CONFIG_SYS_TEXT_BASE is used without CPP. 10 | ] 11 | 12 | DRAM_BASE = 0x80000000 13 | DRAM_SIZE = 256 * SIZE_1M 14 | 15 | # ============== 16 | # C906L FreeRTOS 17 | # ============== 18 | FREERTOS_SIZE = 2 * SIZE_1M 19 | # FreeRTOS is at the end of DRAM 20 | FREERTOS_ADDR = DRAM_BASE + DRAM_SIZE - FREERTOS_SIZE 21 | FSBL_C906L_START_ADDR = FREERTOS_ADDR 22 | 23 | # ============================== 24 | # OpenSBI | arm-trusted-firmware 25 | # ============================== 26 | # Monitor is at the begining of DRAM 27 | MONITOR_ADDR = DRAM_BASE 28 | 29 | ATF_SIZE = 512 * SIZE_1K 30 | OPENSBI_SIZE = 512 * SIZE_1K 31 | OPENSBI_FDT_ADDR = MONITOR_ADDR + OPENSBI_SIZE 32 | 33 | # ========================= 34 | # memory@DRAM_BASE in .dts. 35 | # ========================= 36 | # Ignore the area of FreeRTOS in u-boot and kernel 37 | KERNEL_MEMORY_ADDR = DRAM_BASE 38 | KERNEL_MEMORY_SIZE = DRAM_SIZE - FREERTOS_SIZE 39 | 40 | # ================= 41 | # Multimedia buffer. Used by u-boot/kernel/FreeRTOS 42 | # ================= 43 | ION_SIZE = 75 * SIZE_1M 44 | H26X_BITSTREAM_SIZE = 2 * SIZE_1M 45 | H26X_ENC_BUFF_SIZE = 0 46 | ISP_MEM_BASE_SIZE = 20 * SIZE_1M 47 | FREERTOS_RESERVED_ION_SIZE = H26X_BITSTREAM_SIZE + H26X_ENC_BUFF_SIZE + ISP_MEM_BASE_SIZE 48 | 49 | # ION after FreeRTOS 50 | ION_ADDR = FREERTOS_ADDR - ION_SIZE 51 | 52 | # Buffers of the fast image are inside the ION buffer 53 | H26X_BITSTREAM_ADDR = ION_ADDR 54 | H26X_ENC_BUFF_ADDR = H26X_BITSTREAM_ADDR + H26X_BITSTREAM_SIZE 55 | ISP_MEM_BASE_ADDR = H26X_ENC_BUFF_ADDR + H26X_ENC_BUFF_SIZE 56 | 57 | assert ISP_MEM_BASE_ADDR + ISP_MEM_BASE_SIZE <= ION_ADDR + ION_SIZE 58 | 59 | # Boot logo is after the ION buffer 60 | # Framebuffer uses boot logo's reserved memory 61 | BOOTLOGO_SIZE = 1800 * SIZE_1K 62 | BOOTLOGO_ADDR = ION_ADDR - BOOTLOGO_SIZE 63 | FRAMEBUFFER_SIZE = BOOTLOGO_SIZE 64 | FRAMEBUFFER_ADDR = BOOTLOGO_ADDR 65 | 66 | # =================== 67 | # FSBL and u-boot-2021 68 | # =================== 69 | CVI_UPDATE_HEADER_SIZE = SIZE_1K 70 | UIMAG_SIZE = 16 * SIZE_1M 71 | 72 | # kernel image loading buffer 73 | UIMAG_ADDR = DRAM_BASE + 24 * SIZE_1M 74 | CVI_UPDATE_HEADER_ADDR = UIMAG_ADDR - CVI_UPDATE_HEADER_SIZE 75 | 76 | # FSBL decompress buffer 77 | FSBL_UNZIP_ADDR = UIMAG_ADDR 78 | FSBL_UNZIP_SIZE = UIMAG_SIZE 79 | 80 | assert UIMAG_ADDR + UIMAG_SIZE <= BOOTLOGO_ADDR 81 | 82 | # u-boot's run address and entry point 83 | CONFIG_SYS_TEXT_BASE = DRAM_BASE + 2 * SIZE_1M 84 | # u-boot's init stack point is only used before board_init_f() 85 | CONFIG_SYS_INIT_SP_ADDR = UIMAG_ADDR + UIMAG_SIZE 86 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_xiao_sd/partition/partition_sd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_xiao_sd/rootfs_script/clean_rootfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SYSTEM_DIR=$1 4 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libz* 5 | rm -f $SYSTEM_DIR/mnt/system/lib/libz* 6 | 7 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libcvi* 8 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libmad* 9 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libmp3* 10 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/3rd/libopencv* 11 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libopencv* 12 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvi_rtsp.so 13 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libcvi_rtsp.so 14 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvikernel.so 15 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/*.a 16 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libgst* 17 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libg* 18 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/gstreamer-1.0/libgst* 19 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libcrypto.so* 20 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libssl.so* 21 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libcvi_protobuf.so* 22 | rm -f $SYSTEM_DIR/mnt/system/data/install/lib/libprotobuf-lite.so* 23 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcviai* 24 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvi_ispd.so* 25 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libraw_replay.so* 26 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvi_ive_tpu.so* 27 | rm -rf $SYSTEM_DIR/mnt/system/usr/lib/gio 28 | rm -rf $SYSTEM_DIR/mnt/system/usr/lib/glib* 29 | rm -rf $SYSTEM_DIR/mnt/system/usr/lib/gstreamer-1.0* 30 | rm -rf $SYSTEM_DIR/mnt/system/usr/libexec* 31 | rm -rf $SYSTEM_DIR/mnt/system/usr/bin 32 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcvimath.so 33 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcviruntime.so 34 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcnpy.so 35 | rm -f $SYSTEM_DIR/mnt/system/usr/lib/libcipher.so 36 | 37 | rm -f $SYSTEM_DIR/mnt/system/lib/libcipher.so* 38 | rm -f $SYSTEM_DIR/mnt/system/lib/libcvi_ispd.so* 39 | rm -f $SYSTEM_DIR/mnt/system/lib/libraw_replay.so* 40 | rm -f $SYSTEM_DIR/mnt/system/lib/libmad.so* 41 | rm -f $SYSTEM_DIR/mnt/system/lib/libmp3* 42 | rm -f $SYSTEM_DIR/mnt/system/lib/libnanomsg* 43 | 44 | #del 3rdparty lib 45 | #del thttpd/libwebsockets lib 46 | rm -f $SYSTEM_DIR/mnt/system/lib/libthttpd* 47 | rm -f $SYSTEM_DIR/mnt/system/lib/libwebsocket* 48 | if [ $SDK_VER = "uclibc" ] 49 | then 50 | #del opencv lib 51 | rm -f $SYSTEM_DIR/mnt/system/lib/libopencv* 52 | #del ffmpeg lib 53 | rm -f $SYSTEM_DIR/mnt/system/lib/libav* 54 | #save /mnt/system/lib/ openssl lib; need by ntpdate/wpa_supplicant 55 | else 56 | #glibc ramdisk(rootfs/common_arm/usr/lib/) has libcrypto.so and libssl.so 57 | #del openssl 58 | rm -f $SYSTEM_DIR/mnt/system/lib/libssl* 59 | rm -f $SYSTEM_DIR/mnt/system/lib/libcrypto* 60 | fi 61 | 62 | rm -rf $SYSTEM_DIR/etc/init.d/S23ntp 63 | rm -rf $SYSTEM_DIR/bin/ntpd 64 | 65 | du -sh $SYSTEM_DIR/* |sort -rh 66 | du -sh $SYSTEM_DIR/mnt/* |sort -rh 67 | du -sh $SYSTEM_DIR/mnt/system/* |sort -rh 68 | du -sh $SYSTEM_DIR/mnt/system/lib/* |sort -rh 69 | du -sh $SYSTEM_DIR/mnt/system/data/install/* |sort -rh 70 | du -sh $SYSTEM_DIR/usr/* |sort -rh 71 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_xiao_sd/sg2002_xiao_sd_defconfig: -------------------------------------------------------------------------------- 1 | CONFIG_CHIP_sg2002=y 2 | CONFIG_BOARD_xiao_sd=y 3 | CONFIG_DDR_CFG_ddr3_1866_x16=y 4 | CONFIG_ARCH="riscv" 5 | CONFIG_CROSS_COMPILE="riscv64-unknown-linux-musl-" 6 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y 7 | CONFIG_KERNEL_ENTRY_HACK=y 8 | CONFIG_KERNEL_ENTRY_HACK_ADDR="0x80200000" 9 | CONFIG_TOOLCHAIN_MUSL_RISCV64=y 10 | CONFIG_FLASH_SIZE_SHRINK=y 11 | CONFIG_BOOT_IMAGE_SINGLE_DTB=y 12 | CONFIG_STORAGE_TYPE_sd=y 13 | CONFIG_SENSOR_OV_OV5647=y 14 | CONFIG_SENSOR_TUNING_PARAM_cv181x_src_ov_ov5647=y 15 | CONFIG_UBOOT_2021_10=y 16 | CONFIG_KERNEL_SRC_5.10=y 17 | CONFIG_KERNEL_LZMA=y 18 | CONFIG_SKIP_RAMDISK=y 19 | CONFIG_ROOTFS_OVERLAYFS=y 20 | CONFIG_TARGET_PACKAGE_DROPBEAR=y 21 | CONFIG_TARGET_PACKAGE_MTD-UTILS=y 22 | # CONFIG_TARGET_PACKAGE_RSYSLOG is not set 23 | CONFIG_TARGET_PACKAGE_BUSYBOX_SYSLOGD_SCRIPT=y 24 | CONFIG_ENABLE_FREERTOS=y 25 | CONFIG_ENABLE_RTOS_DUMP_PRINT=y 26 | CONFIG_DUMP_PRINT_SZ_IDX=17 27 | CONFIG_TARGET_PACKAGE_GATORD=n 28 | CONFIG_TARGET_PACKAGE_NTP=y 29 | CONFIG_TARGET_PACKAGE_WIFI=y 30 | CONFIG_BUILDROOT_FS=y 31 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_xiao_sd/u-boot/cvi_board_init.c: -------------------------------------------------------------------------------- 1 | int cvi_board_init(void) 2 | { 3 | PINMUX_CONFIG(PAD_MIPI_TXM1, IIC2_SDA); 4 | PINMUX_CONFIG(PAD_MIPI_TXP1, IIC2_SCL); 5 | PINMUX_CONFIG(PAD_MIPI_TXM0, CAM_MCLK1); 6 | 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_xiao_sd/u-boot/cvitek.h: -------------------------------------------------------------------------------- 1 | /* 2 | *VO control GPIOs 3 | */ 4 | #define VO_GPIO_RESET_PORT portb 5 | #define VO_GPIO_RESET_INDEX 5 6 | #define VO_GPIO_RESET_ACTIVE GPIO_ACTIVE_LOW 7 | #define VO_GPIO_PWM_PORT portb 8 | #define VO_GPIO_PWM_INDEX 4 9 | #define VO_GPIO_PWM_ACTIVE GPIO_ACTIVE_HIGH 10 | #define VO_GPIO_POWER_CT_PORT portb 11 | #define VO_GPIO_POWER_CT_INDEX 3 12 | #define VO_GPIO_POWER_CT_ACTIVE GPIO_ACTIVE_HIGH 13 | -------------------------------------------------------------------------------- /external/build/boards/cv181x/sg2002_xiao_sd/u-boot/cvitek_sg2002_xiao_sd_defconfig: -------------------------------------------------------------------------------- 1 | CONFIG_RISCV=y 2 | CONFIG_SYS_MALLOC_F_LEN=0x2000 3 | CONFIG_NR_DRAM_BANKS=1 4 | CONFIG_DEFAULT_DEVICE_TREE="soph_asic" 5 | CONFIG_IDENT_STRING=" soph" 6 | CONFIG_ARCH_RV64I=y 7 | CONFIG_RISCV_SMODE=y 8 | CONFIG_TARGET_CVITEK_CV181X=y 9 | CONFIG_DISTRO_DEFAULTS=y 10 | CONFIG_FIT=y 11 | # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set 12 | CONFIG_BOOTDELAY=1 13 | CONFIG_SYS_PROMPT="soph# " 14 | # CONFIG_CMD_CONSOLE is not set 15 | # CONFIG_CMD_XIMG is not set 16 | # CONFIG_CMD_EDITENV is not set 17 | # CONFIG_CMD_CRC32 is not set 18 | # CONFIG_CMD_LZMADEC is not set 19 | # CONFIG_CMD_UNLZ4 is not set 20 | # CONFIG_CMD_UNZIP is not set 21 | # CONFIG_CMD_LOADS is not set 22 | CONFIG_CMD_MMC=y 23 | # CONFIG_CMD_ITEST is not set 24 | CONFIG_CMD_CACHE=y 25 | CONFIG_CMD_CVI_SD_UPDATE=y 26 | # CONFIG_ISO_PARTITION is not set 27 | # CONFIG_EFI_PARTITION is not set 28 | CONFIG_NET_RANDOM_ETHADDR=y 29 | CONFIG_MMC=y 30 | CONFIG_MMC_SDHCI=y 31 | CONFIG_MMC_SDHCI_SDMA=y 32 | CONFIG_MMC_SDHCI_CVITEK=y 33 | CONFIG_MTD=y 34 | # CONFIG_PHY_SMSC is not set 35 | CONFIG_DM_ETH=y 36 | CONFIG_ETH_DESIGNWARE=y 37 | CONFIG_PHY_CVITEK=y 38 | CONFIG_SYS_NS16550=y 39 | CONFIG_SPI=y 40 | CONFIG_LZ4=y 41 | CONFIG_LZMA=y 42 | # CONFIG_TOOLS_LIBCRYPTO is not set 43 | CONFIG_ENV_IS_NOWHERE=y 44 | -------------------------------------------------------------------------------- /external/build/sensors/sensor_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "sensor_list": [ 3 | "BRIGATES_BG0808", 4 | "BYD_BF2253L", 5 | "CHIPUP_XS9922B", 6 | "CVSENS_CV2003", 7 | "CVSENS_CV2003_1L", 8 | "CVSENS_CV2003_1L_SLAVE", 9 | "CVSENS_CV2003_1L_SLAVE1", 10 | "CVSENS_CV4001", 11 | "GCORE_GC02M1", 12 | "GCORE_GC0312", 13 | "GCORE_GC0329", 14 | "GCORE_GC1054", 15 | "GCORE_GC1084", 16 | "GCORE_GC1084_SLAVE", 17 | "GCORE_GC1084_SLAVE1", 18 | "GCORE_GC1084_SLAVE2", 19 | "GCORE_GC2053", 20 | "GCORE_GC2053_1L", 21 | "GCORE_GC2053_SLAVE", 22 | "GCORE_GC2083", 23 | "GCORE_GC2093", 24 | "GCORE_GC2093_SLAVE", 25 | "GCORE_GC2145", 26 | "GCORE_GC2385_1L", 27 | "GCORE_GC4023", 28 | "GCORE_GC4653", 29 | "GCORE_GC4653_SLAVE", 30 | "IMGDS_MIS2008", 31 | "IMGDS_MIS2008_1L", 32 | "NEXTCHIP_N5", 33 | "NEXTCHIP_N6", 34 | "OV_OS02D10", 35 | "OV_OS02D10_SLAVE", 36 | "OV_OS02N10_1L", 37 | "OV_OS02K10_SLAVE", 38 | "OV_OS04A10", 39 | "OV_OS04C10", 40 | "OV_OS04C10_SLAVE", 41 | "OV_OS08A20", 42 | "OV_OS08A20_SLAVE", 43 | "OV_OV4689", 44 | "OV_OV5647", 45 | "OV_OV6211", 46 | "OV_OV7251", 47 | "PICO_384", 48 | "PICO_640", 49 | "PIXELPLUS_PR2020", 50 | "PIXELPLUS_PR2100", 51 | "SMS_SC035GS", 52 | "SMS_SC035GS_1L", 53 | "SMS_SC035HGS", 54 | "SMS_SC035HGS_1L", 55 | "SMS_SC132GS", 56 | "SMS_SC132GS_SLAVE", 57 | "SMS_SC1336_1L", 58 | "SMS_SC1346_1L", 59 | "SMS_SC1346_1L_SLAVE", 60 | "SMS_SC200AI", 61 | "SMS_SC200AI_1L", 62 | "SMS_SC230AI_2L", 63 | "SMS_SC230AI_2L_SLAVE", 64 | "SMS_SC301IOT", 65 | "SMS_SC401AI", 66 | "SMS_SC500AI", 67 | "SMS_SC501AI_2L", 68 | "SMS_SC530AI_2L", 69 | "SMS_SC531AI_2L", 70 | "SMS_SC850SL", 71 | "SMS_SC3332", 72 | "SMS_SC3335", 73 | "SMS_SC3335_SLAVE", 74 | "SMS_SC3336", 75 | "SMS_SC3336_1L", 76 | "SMS_SC2331_1L", 77 | "SMS_SC2331_1L_SLAVE", 78 | "SMS_SC2331_1L_SLAVE1", 79 | "SMS_SC2335", 80 | "SMS_SC2336", 81 | "SMS_SC2336_SLAVE", 82 | "SMS_SC2336_SLAVE1", 83 | "SMS_SC2336_1L", 84 | "SMS_SC2336P", 85 | "SMS_SC2336P_1L", 86 | "SMS_SC223A_1L", 87 | "SMS_SC4210", 88 | "SMS_SC4336", 89 | "SMS_SC4336P", 90 | "SMS_SC5336_2L", 91 | "SMS_SC8238", 92 | "SOI_F23", 93 | "SOI_F35", 94 | "SOI_F35_SLAVE", 95 | "SOI_F37P", 96 | "SOI_F38P", 97 | "SOI_H65", 98 | "SOI_K06", 99 | "SOI_Q03", 100 | "SOI_Q03P", 101 | "SOI_F53", 102 | "SOI_F352", 103 | "SOI_K306", 104 | "SONY_IMX290_2L", 105 | "SONY_IMX307", 106 | "SONY_IMX307_2L", 107 | "SONY_IMX307_SLAVE", 108 | "SONY_IMX307_SUBLVDS", 109 | "SONY_IMX327", 110 | "SONY_IMX327_2L", 111 | "SONY_IMX327_FPGA", 112 | "SONY_IMX327_SLAVE", 113 | "SONY_IMX327_SUBLVDS", 114 | "SONY_IMX334", 115 | "SONY_IMX335", 116 | "SONY_IMX347", 117 | "SONY_IMX385", 118 | "SONY_IMX675", 119 | "TECHPOINT_TP2850", 120 | "TECHPOINT_TP2863", 121 | "VIVO_MCS369", 122 | "VIVO_MCS369Q", 123 | "VIVO_MCS308M2", 124 | "LONTIUM_LT6911", 125 | "LONTIUM_LT7911" 126 | ], 127 | 128 | "lens_list" : [ 129 | "f10", 130 | "f18" 131 | ] 132 | } 133 | -------------------------------------------------------------------------------- /external/build/tools/common/sd_tools/sd_gen_burn_image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # a sd image generator for sophpi 3 | # usage 4 | if [ "$#" -ne "2" ] 5 | then 6 | echo "usage: sudo ./sd_gen_burn_image.sh OUTPUT_DIR IMAGE_NAME" 7 | echo "" 8 | echo " The script is used to create a sdcard image with two partitions, " 9 | echo " one is fat32 with 128MB, the other is ext4 with 256MB." 10 | echo " You can modify the capacities in this script as you wish!" 11 | echo "" 12 | echo "Note: Please backup you sdcard files before using this image!" 13 | 14 | exit 15 | fi 16 | 17 | function size2sectors() { 18 | local f=0 19 | for v in "${@}" 20 | do 21 | local p=$(echo "$v" | awk \ 22 | 'BEGIN{IGNORECASE = 1} 23 | function printsectors(n,b,p) {printf "%u\n", n*b^p/512} 24 | /B$/{ printsectors($1, 1, 0)}; 25 | /K(iB)?$/{printsectors($1, 2, 10)}; 26 | /M(iB)?$/{printsectors($1, 2, 20)}; 27 | /G(iB)?$/{printsectors($1, 2, 30)}; 28 | /T(iB)?$/{printsectors($1, 2, 40)}; 29 | /KB$/{ printsectors($1, 10, 3)}; 30 | /MB$/{ printsectors($1, 10, 6)}; 31 | /GB$/{ printsectors($1, 10, 9)}; 32 | /TB$/{ printsectors($1, 10, 12)}') 33 | for s in $p 34 | do 35 | f=$((f+s)) 36 | done 37 | 38 | done 39 | echo $f 40 | } 41 | 42 | boot_cap=8M 43 | boot_label="BOOT" 44 | rootfs_cap=512M 45 | rootfs_label="ROOTFS" 46 | 47 | boot_start="2048" 48 | boot_size=$(size2sectors ${boot_cap}) 49 | rootfs_start=$((boot_start+boot_size)) 50 | rootfs_size=$(size2sectors ${rootfs_cap}) 51 | img_size=$((boot_start+boot_size+rootfs_size)) 52 | 53 | function create_disk_mbr() { 54 | echo "Run ${FUNCNAME[0]}" 55 | if [ -z "${1}" ]; then 56 | echo "image name is empty" 57 | exit 1 58 | fi 59 | 60 | image=$1 61 | dd if=/dev/zero of=${image} bs=512 count=${img_size} 62 | 63 | # Create the disk image 64 | ( 65 | echo "label: dos" 66 | echo "label-id: 0x48617373" 67 | echo "unit: sectors" 68 | echo "boot : start= ${boot_start}, size= ${boot_size}, type=c, bootable" #create the boot partition 69 | echo "rootfs: start= ${rootfs_start}, size= ${rootfs_size}, type=83" #Make a rootfs partition 70 | ) | sfdisk --force -uS ${image} 71 | 72 | echo "${FUNCNAME[0]} ok" 73 | } 74 | 75 | function write_boot_part() { 76 | echo "Run ${FUNCNAME[0]}" 77 | if [ -z $1 ]; then 78 | echo "image name is empty" 79 | exit 1 80 | fi 81 | 82 | local part=$(mktemp) 83 | 84 | ls -l ${part} 85 | dd if=/dev/zero of=${part} bs=512 count=${boot_size} 86 | mkfs.vfat -n ${boot_label} ${part} 87 | 88 | mcopy -i ${part} fip.bin :: 89 | mcopy -i ${part} rawimages/boot.* ::boot.sd 90 | 91 | dd if=${part} of=${1} seek=${boot_start} bs=512 conv=notrunc,sparse 92 | 93 | rm -rf ${part} 94 | echo "${FUNCNAME[0]} ok" 95 | } 96 | 97 | function write_rootfs_part() { 98 | echo "Run ${FUNCNAME[0]}" 99 | if [ -z $1 ]; then 100 | echo "image name is empty" 101 | exit 1 102 | fi 103 | 104 | rfs=$(ls -l rawimages/rootfs_ext4.* | awk '{print $NF}') 105 | dd if=${rfs} of=${1} seek=${rootfs_start} bs=512 conv=notrunc,sparse 106 | 107 | echo "${FUNCNAME[0]} ok" 108 | } 109 | 110 | # Start gen image 111 | pushd $1 || exit 1 112 | # target=$2_`date +%Y%m%d%H%M` 113 | target=$2 114 | image_name=${target}.img 115 | echo "Image: ${image_name}" 116 | rm -rf ${target}* 117 | create_disk_mbr $image_name || exit 1 118 | write_boot_part $image_name || exit 1 119 | write_rootfs_part $image_name || exit 1 120 | 121 | zip -j ${target}.zip ${image_name} 122 | rm -rf ${image_name} 123 | popd -------------------------------------------------------------------------------- /external/build/tools/common/sd_tools/sd_gen_recovery_image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # a sd image generator for sophpi 3 | # usage 4 | if [ "$#" -ne "2" ] 5 | then 6 | echo "usage: sudo ./sd_gen_burn_image.sh OUTPUT_DIR IMAGE_NAME" 7 | echo "" 8 | echo " The script is used to create a sdcard image with two partitions, " 9 | echo " one is fat32 with 128MB, the other is ext4 with 256MB." 10 | echo " You can modify the capacities in this script as you wish!" 11 | echo "" 12 | echo "Note: Please backup you sdcard files before using this image!" 13 | 14 | exit 15 | fi 16 | 17 | function size2sectors() { 18 | local f=0 19 | for v in "${@}" 20 | do 21 | local p=$(echo "$v" | awk \ 22 | 'BEGIN{IGNORECASE = 1} 23 | function printsectors(n,b,p) {printf "%u\n", n*b^p/512} 24 | /B$/{ printsectors($1, 1, 0)}; 25 | /K(iB)?$/{printsectors($1, 2, 10)}; 26 | /M(iB)?$/{printsectors($1, 2, 20)}; 27 | /G(iB)?$/{printsectors($1, 2, 30)}; 28 | /T(iB)?$/{printsectors($1, 2, 40)}; 29 | /KB$/{ printsectors($1, 10, 3)}; 30 | /MB$/{ printsectors($1, 10, 6)}; 31 | /GB$/{ printsectors($1, 10, 9)}; 32 | /TB$/{ printsectors($1, 10, 12)}') 33 | for s in $p 34 | do 35 | f=$((f+s)) 36 | done 37 | 38 | done 39 | echo $f 40 | } 41 | 42 | part_label="RESERVED" 43 | part_start="2048" 44 | part_size=$(size2sectors "600M") 45 | img_size=$((part_start+part_size)) # sectors 46 | echo "Image size: ${img_size} sectors $part_size" 47 | 48 | function create_disk_mbr() { 49 | echo "Run ${FUNCNAME[0]}" 50 | if [ -z "${1}" ]; then 51 | echo "image name is empty" 52 | exit 1 53 | fi 54 | 55 | image=$1 56 | dd if=/dev/zero of=./${image} bs=512 count=${img_size} 57 | 58 | # Create the disk image 59 | ( 60 | echo "label: dos" 61 | echo "label-id: 0x48617373" 62 | echo "unit: sectors" 63 | echo "boot: start=${part_start}, size=${part_size}, type=c,bootable" # create the boot partition 64 | ) | sfdisk ${image} 65 | #> sfdisk --force -uS ${image} 66 | 67 | echo "${FUNCNAME[0]} ok" 68 | } 69 | 70 | function write_boot_part() { 71 | echo "Run ${FUNCNAME[0]}" 72 | if [ -z $1 ]; then 73 | echo "image name is empty" 74 | exit 1 75 | fi 76 | 77 | local part=$(mktemp) 78 | dd if=/dev/zero of=${part} bs=512 count=${part_size} 79 | mkfs.vfat -n ${part_label} ${part} 80 | 81 | mcopy -i ${part} fip.bin :: 82 | mcopy -i ${part} boot.emmc :: 83 | mcopy -i ${part} rootfs_ext4.emmc :: 84 | 85 | dd if=${part} of=${1} seek=${part_start} bs=512 conv=notrunc,sparse 86 | 87 | rm -rf ${part} 88 | echo "${FUNCNAME[0]} ok" 89 | } 90 | 91 | # Start gen image 92 | pushd $1 || exit 1 93 | # target=$2_`date +%Y%m%d%H%M` 94 | target=$2 95 | image_name=${target}.img 96 | echo "Image: ${image_name}" 97 | rm -rf ${target}* 98 | create_disk_mbr $image_name || exit 1 99 | write_boot_part $image_name || exit 1 100 | 101 | zip -j ${target}.zip ${image_name} 102 | rm -rf ${image_name} 103 | popd 104 | -------------------------------------------------------------------------------- /external/build/tools/common/sw-description: -------------------------------------------------------------------------------- 1 | software = 2 | { 3 | version = "0.0.0"; 4 | 5 | description = "Firmware update for reCamera"; 6 | 7 | /* differentiate running image modes/sets */ 8 | stable: 9 | { 10 | a_write_b: 11 | { 12 | images: ( 13 | { 14 | filename = "rootfs_ext4.emmc"; 15 | device = "/dev/mmcblk0p4"; 16 | installed-directly = true; 17 | } 18 | ); 19 | 20 | bootenv: ( 21 | { 22 | name = "use_part_b"; 23 | value = "1"; 24 | }, 25 | { 26 | name = "boot_failed_limits"; 27 | value = "5"; 28 | }, 29 | { 30 | name = "boot_rollback"; 31 | value = ""; 32 | } 33 | ); 34 | }; 35 | 36 | b_write_a: 37 | { 38 | images: ( 39 | { 40 | filename = "rootfs_ext4.emmc"; 41 | device = "/dev/mmcblk0p3"; 42 | installed-directly = true; 43 | } 44 | ); 45 | 46 | bootenv: ( 47 | { 48 | name = "use_part_b"; 49 | value = "0"; 50 | }, 51 | { 52 | name = "boot_failed_limits"; 53 | value = "5"; 54 | }, 55 | { 56 | name = "boot_rollback"; 57 | value = ""; 58 | } 59 | ); 60 | }; 61 | }; 62 | } -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/.first_login: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Seeed-Studio/reCamera-OS/89d24f67cf269f4858928d8810e36845298ab784/external/buildroot/board/cvitek/CV181X/overlay/etc/.first_login -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/avahi/avahi-daemon.conf: -------------------------------------------------------------------------------- 1 | [server] 2 | host-name=reCamera 3 | domain-name=local 4 | use-ipv4=yes 5 | use-ipv6=yes 6 | allow-interfaces=eth0,usb0,wlan0,wlan1 7 | ratelimit-interval-usec=1000000 8 | ratelimit-burst=1000 9 | 10 | [wide-area] 11 | enable-wide-area=yes 12 | 13 | [publish] 14 | publish-hinfo=no 15 | publish-workstation=no 16 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/dhcpcd.conf: -------------------------------------------------------------------------------- 1 | # A sample configuration for dhcpcd. 2 | # See dhcpcd.conf(5) for details. 3 | 4 | # Allow users of this group to interact with dhcpcd via the control socket. 5 | #controlgroup wheel 6 | 7 | # Inform the DHCP server of our hostname for DDNS. 8 | #hostname 9 | 10 | # Use the hardware address of the interface for the Client ID. 11 | #clientid 12 | # or 13 | # Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361. 14 | # Some non-RFC compliant DHCP servers do not reply with this set. 15 | # In this case, comment out duid and enable clientid above. 16 | duid 17 | 18 | # Persist interface configuration when dhcpcd exits. 19 | persistent 20 | 21 | # vendorclassid is set to blank to avoid sending the default of 22 | # dhcpcd-::: 23 | vendorclassid 24 | 25 | # A list of options to request from the DHCP server. 26 | option domain_name_servers, domain_name, domain_search 27 | option classless_static_routes 28 | # Respect the network MTU. This is applied to DHCP routes. 29 | option interface_mtu 30 | 31 | # Request a hostname from the network 32 | option host_name 33 | 34 | # Most distributions have NTP support. 35 | #option ntp_servers 36 | 37 | # Rapid commit support. 38 | # Safe to enable by default because it requires the equivalent option set 39 | # on the server to actually work. 40 | option rapid_commit 41 | 42 | # A ServerID is required by RFC2131. 43 | require dhcp_server_identifier 44 | 45 | # Generate SLAAC address using the Hardware Address of the interface 46 | #slaac hwaddr 47 | # OR generate Stable Private IPv6 Addresses based from the DUID 48 | slaac private 49 | 50 | # denyinterfaces usb0 51 | interface usb0 52 | metric 9997 53 | static ip_address=192.168.42.1/24 54 | static routers=192.168.42.1 55 | static domain_name_servers=192.168.42.1 56 | 57 | interface wlan1 58 | metric 9998 59 | static ip_address=192.168.16.1/24 60 | static routers=192.168.16.1 61 | static domain_name_servers=192.168.16.1 62 | nohook wpa_supplicant 63 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/dnsmasq/default.conf: -------------------------------------------------------------------------------- 1 | bind-interfaces 2 | 3 | interface=usb0 4 | listen-address=192.168.42.1 5 | dhcp-range=192.168.42.10,192.168.42.242,12h 6 | dhcp-option=3,192.168.42.1 7 | dhcp-option=6 8 | 9 | interface=wlan1 10 | listen-address=192.168.16.1 11 | dhcp-range=192.168.16.10,192.168.16.242,12h 12 | dhcp-option=3,192.168.16.1 13 | dhcp-option=6,192.168.16.1 14 | address=/www.msftconnecttest.com/192.168.16.1 15 | address=/edge.microsoft.com/192.168.16.1 16 | address=/captive.apple.com/192.168.16.1 17 | address=/www.gstatic.com/192.168.16.1 18 | address=/connectivitycheck.gstatic.com/192.168.16.1 19 | address=/connectivitycheck.platform.hicloud.com/192.168.16.1 20 | address=/connectivitycheck.cbg-app.huawei.com/192.168.16.1 21 | address=/connect.rom.miui.com/192.168.16.1 22 | address=/wifi.vivo.com.cn/192.168.16.1 23 | address=/g.cn/192.168.16.1 24 | address=/cp.cloudflare.com/192.168.16.1 25 | 26 | log-queries 27 | log-dhcp 28 | log-facility=/var/log/dnsmasq.log 29 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/dnsmasq/usb_only.conf: -------------------------------------------------------------------------------- 1 | bind-interfaces 2 | 3 | interface=usb0 4 | listen-address=192.168.42.1 5 | dhcp-range=192.168.42.10,192.168.42.242,12h 6 | dhcp-option=3,192.168.42.1 7 | dhcp-option=6 8 | 9 | log-queries 10 | log-dhcp 11 | log-facility=/var/log/dnsmasq.log 12 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/dnsmasq/usb_wlan1.conf: -------------------------------------------------------------------------------- 1 | bind-interfaces 2 | 3 | interface=wlan1 4 | listen-address=192.168.16.1 5 | dhcp-range=192.168.16.10,192.168.16.242,12h 6 | dhcp-option=3,192.168.16.1 7 | dhcp-option=6,192.168.16.1 8 | address=/www.msftconnecttest.com/192.168.16.1 9 | address=/edge.microsoft.com/192.168.16.1 10 | address=/captive.apple.com/192.168.16.1 11 | address=/www.gstatic.com/192.168.16.1 12 | address=/connectivitycheck.gstatic.com/192.168.16.1 13 | address=/connectivitycheck.platform.hicloud.com/192.168.16.1 14 | address=/connectivitycheck.cbg-app.huawei.com/192.168.16.1 15 | address=/connect.rom.miui.com/192.168.16.1 16 | address=/wifi.vivo.com.cn/192.168.16.1 17 | address=/g.cn/192.168.16.1 18 | address=/cp.cloudflare.com/192.168.16.1 19 | 20 | interface=usb0 21 | listen-address=192.168.42.1 22 | dhcp-range=192.168.42.10,192.168.42.242,12h 23 | dhcp-option=3,192.168.42.1 24 | dhcp-option=6 25 | 26 | log-queries 27 | log-dhcp 28 | log-facility=/var/log/dnsmasq.log 29 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/fw_env.config: -------------------------------------------------------------------------------- 1 | # device name Device offset Env. size 2 | /dev/mmcblk0p2 0x0000 0x20000 3 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/hostapd_2g4.conf: -------------------------------------------------------------------------------- 1 | interface=wlan1 2 | driver=nl80211 3 | ssid=AUOK 4 | channel=6 5 | hw_mode=g 6 | ieee80211n=1 7 | wmm_enabled=1 8 | macaddr_acl=0 9 | auth_algs=1 10 | wpa=2 11 | wpa_passphrase=12345678 12 | wpa_key_mgmt=WPA-PSK 13 | wpa_pairwise=CCMP 14 | rsn_pairwise=CCMP 15 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/hostapd_5g.conf: -------------------------------------------------------------------------------- 1 | interface=wlan1 2 | driver=nl80211 3 | ssid=AUOK 4 | channel=44 5 | hw_mode=a 6 | ieee80211n=1 7 | ieee80211ac=1 8 | wmm_enabled=1 9 | macaddr_acl=0 10 | auth_algs=1 11 | wpa=2 12 | wpa_passphrase=12345678 13 | wpa_key_mgmt=WPA-PSK 14 | wpa_pairwise=CCMP 15 | rsn_pairwise=CCMP 16 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/hotplug/automount.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MOUNT_POINT=/tmp/sd 4 | LINK_POINT=/mnt/sd 5 | 6 | # echo "<<<<<<<<<<<<<$1 $2>>>>>>>>>>>>>" 7 | if [ "$1" == "mmcblk1p1" ]; then 8 | disk="/dev/$1" 9 | if [ "$2" = "add" ]; then 10 | mkdir -p $MOUNT_POINT 11 | umount $MOUNT_POINT 12 | mount $disk $MOUNT_POINT 13 | 14 | rootfs_rw on 15 | if [ -L $LINK_POINT ]; then 16 | rm $LINK_POINT 17 | fi 18 | ln -s $MOUNT_POINT /mnt/ 19 | rootfs_rw off 20 | else 21 | umount $MOUNT_POINT 22 | rootfs_rw on 23 | rm $LINK_POINT 24 | rootfs_rw off 25 | fi 26 | fi -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/init.d/S03node-red: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ### BEGIN INIT INFO 4 | # Provides: node-red 5 | # Required-Start: $all 6 | # Required-Stop: $all 7 | # Default-Start: 2 3 4 5 8 | # Default-Stop: 0 1 6 9 | # Short-Description: Start Node-RED at boot time 10 | # Description: Start Node-RED service. 11 | ### END INIT INFO 12 | 13 | DAEMON="/usr/bin/node-red-pi" 14 | DAEMON_OPTS="--max-old-space-size=64 --expose-gc" 15 | NAME=node-red 16 | DESC="Node-RED service" 17 | VARDIR=/userdata/.var 18 | PIDFILE=$VARDIR/$NAME.pid 19 | USER=recamera # Target user to switch to when running as root 20 | 21 | start() { 22 | if [ -f $PIDFILE ]; then 23 | pid=$(cat $PIDFILE) 24 | 25 | if [ -d /proc/$pid ]; then 26 | if [[ "$(cat /proc/$pid/comm)" = "node-red" || "$(cat /proc/$pid/comm)" = "node" ]]; then 27 | echo "$DESC: $NAME($pid) is already running." 28 | exit 0 29 | fi 30 | fi 31 | 32 | pid="`pidof node-red`" 33 | if [[ "$pid" ]]; then 34 | echo "$pid" > $PIDFILE 35 | echo "$DESC: $NAME($pid) is already running." 36 | exit 0 37 | fi 38 | rm -f $PIDFILE 39 | fi 40 | 41 | echo "Starting $DESC: $NAME" 42 | # USER=$(awk -F: 'BEGIN {f=0} $1!="root" && $2!="*" && !f {print $1; f=1; exit}' /etc/shadow) 43 | USER=$(cat /etc/passwd | grep /bin/sh | grep -v root | awk -F':' '{print $1}') 44 | 45 | # Check if the current user is root 46 | if [ $(id -u) -eq 0 ]; then 47 | # If root and the specified user exists, switch to that user 48 | if id "$USER" &>/dev/null; then 49 | DAEMON_USER=$USER 50 | DAEMON_OPTS="$DAEMON_OPTS --userDir /home/$DAEMON_USER/.node-red" 51 | echo "Switching to user: $DAEMON_USER" 52 | else 53 | DAEMON_USER=root 54 | echo "User $USER does not exist. Running as root." 55 | fi 56 | else 57 | # If not root, use the current user to run the service 58 | DAEMON_USER=$(whoami) 59 | DAEMON_OPTS="$DAEMON_OPTS --userDir /home/$DAEMON_USER/.node-red" 60 | echo "Running as user: $DAEMON_USER" 61 | fi 62 | 63 | su $DAEMON_USER -c "mkdir -p $VARDIR" 64 | su $DAEMON_USER -c "start-stop-daemon -S -q -m -b -p $PIDFILE --exec $DAEMON -- $DAEMON_OPTS" 65 | 66 | [ $? = 0 ] && echo "OK" || echo "FAIL" 67 | } 68 | 69 | stop() { 70 | echo "Stopping $DESC: $NAME" 71 | if [ -f $PIDFILE ]; then 72 | start-stop-daemon -K -q -p $PIDFILE 73 | rm -f $PIDFILE 74 | fi 75 | [ $? = 0 ] && echo "OK" || echo "FAIL" 76 | } 77 | 78 | restart() { 79 | stop 80 | start 81 | } 82 | 83 | status() { 84 | if [ -f $PIDFILE ]; then 85 | echo "$NAME is running." 86 | else 87 | echo "$NAME is not running." 88 | fi 89 | } 90 | 91 | case "$1" in 92 | start) 93 | start 94 | ;; 95 | stop) 96 | stop 97 | ;; 98 | restart) 99 | restart 100 | ;; 101 | status) 102 | status 103 | ;; 104 | *) 105 | echo "Usage: $0 {start|stop|restart|status}" 106 | exit 1 107 | ;; 108 | esac 109 | 110 | exit 0 111 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/init.d/S50nginx: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Start/stop nginx 4 | # 5 | exit 0 6 | NGINX=/usr/sbin/nginx 7 | PIDFILE=/var/run/nginx.pid 8 | 9 | case "$1" in 10 | start) 11 | echo "Starting nginx..." 12 | mkdir -p /var/log/nginx /var/cache/nginx 13 | start-stop-daemon -S -x "$NGINX" -p "$PIDFILE" 14 | ;; 15 | stop) 16 | echo "Stopping nginx..." 17 | start-stop-daemon -K -x "$NGINX" -p "$PIDFILE" -o 18 | ;; 19 | reload|force-reload) 20 | echo "Reloading nginx configuration..." 21 | "$NGINX" -s reload 22 | ;; 23 | restart) 24 | "$0" stop 25 | sleep 1 # Prevent race condition: ensure nginx stops before start. 26 | "$0" start 27 | ;; 28 | *) 29 | echo "Usage: $0 {start|stop|restart|reload|force-reload}" 30 | exit 1 31 | esac 32 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/init.d/S70hardware: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ${CVI_SHOPTS} 3 | # 4 | # Start firmware 5 | # 6 | 7 | export SYSTEMPATH=/mnt/system 8 | 9 | # sensor power 10 | function sensor_power() 11 | { 12 | if [ "$(cat /proc/device-tree/model)" = "Seeed reCamera" ]; then 13 | GPIO_SENSOR_PWR=358 14 | else 15 | GPIO_SENSOR_PWR=495 16 | fi 17 | if [ ! -d /sys/class/gpio/gpio$GPIO_SENSOR_PWR ]; then 18 | echo $GPIO_SENSOR_PWR > /sys/class/gpio/export 19 | echo "out" > /sys/class/gpio/gpio$GPIO_SENSOR_PWR/direction 20 | fi 21 | 22 | if [ -f /sys/class/gpio/gpio$GPIO_SENSOR_PWR/value ]; then 23 | echo $1 > /sys/class/gpio/gpio$GPIO_SENSOR_PWR/value 24 | fi 25 | } 26 | 27 | function setup_wlan1() 28 | { 29 | if [ -z "$(ifconfig wlan0 2>/dev/null)" ]; then 30 | return 31 | fi 32 | 33 | if [ -z "$(ifconfig wlan1 2> /dev/null)" ]; then 34 | iw dev wlan0 interface add wlan1 type __ap; 35 | fi 36 | } 37 | 38 | function config_ip() 39 | { 40 | local iface=$1 41 | local ip=$2 42 | if [ ! -z "$(ifconfig $iface 2> /dev/null)" ]; then 43 | ifconfig $iface $ip 44 | ifconfig $iface up 45 | fi 46 | } 47 | 48 | case "$1" in 49 | start) 50 | echo "init mpp system..." 51 | sensor_power 1 52 | if [ -d $SYSTEMPATH/ko ]; then 53 | sh $SYSTEMPATH/ko/loadsystemko.sh 54 | fi 55 | 56 | if [ -f $SYSTEMPATH/usb-net.sh ]; then 57 | . $SYSTEMPATH/usb-net.sh 58 | fi 59 | 60 | sleep 0.5 61 | 62 | setup_wlan1 63 | config_ip wlan1 192.168.16.1 64 | config_ip usb0 192.168.42.1 65 | ;; 66 | 67 | stop) 68 | sensor_power 0 69 | ;; 70 | 71 | restart|reload) 72 | ;; 73 | 74 | *) 75 | echo "Usage: $0 {start|stop|restart}" 76 | exit 1 77 | esac 78 | 79 | exit $? 80 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/init.d/S80dnsmasq: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CONF_FILE="/etc/dnsmasq/default.conf" 4 | if [ "$(cat /sys/devices/platform/4340000.usb/udc/4340000.usb/state)" = "configured" ]; then 5 | CONF_FILE="/etc/dnsmasq/usb_wlan1.conf" 6 | fi 7 | if [ -z "$(ifconfig wlan1 2>/dev/null)" ]; then 8 | CONF_FILE="/etc/dnsmasq/usb_only.conf" 9 | fi 10 | 11 | [ -f $CONF_FILE ] || exit 0 12 | 13 | case "$1" in 14 | start) 15 | printf "Starting dnsmasq: " 16 | start-stop-daemon -S -x /usr/sbin/dnsmasq -- -C $CONF_FILE 17 | [ $? = 0 ] && echo "OK" || echo "FAIL" 18 | ;; 19 | stop) 20 | printf "Stopping dnsmasq: " 21 | start-stop-daemon -K -q -x /usr/sbin/dnsmasq 22 | [ $? = 0 ] && echo "OK" || echo "FAIL" 23 | ;; 24 | restart|reload) 25 | $0 stop 26 | $0 start 27 | ;; 28 | *) 29 | echo "Usage: $0 {start|stop|restart}" 30 | exit 1 31 | esac 32 | 33 | exit 0 34 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/init.d/S91mdev: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ${CVI_SHOPTS} 3 | # 4 | # Start firmware 5 | # 6 | 7 | exit 0 8 | 9 | case "$1" in 10 | start) 11 | echo "Starting mdev..." 12 | echo /sbin/mdev > /proc/sys/kernel/hotplug 13 | mdev -s 14 | ;; 15 | 16 | stop) 17 | ;; 18 | 19 | restart|reload) 20 | ;; 21 | 22 | *) 23 | echo "Usage: $0 {start|stop|restart}" 24 | exit 1 25 | esac 26 | 27 | exit $? 28 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/init.d/S99user: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ${CVI_SHOPTS} 3 | # 4 | # Start firmware 5 | # 6 | export USERDATAPATH=/userdata 7 | export SYSTEMPATH=/mnt/system 8 | 9 | case "$1" in 10 | start) 11 | if [ -f $USERDATAPATH/auto.sh ]; then 12 | usleep 30000 13 | . $USERDATAPATH/auto.sh & 14 | exit 1 15 | fi 16 | if [ -f $SYSTEMPATH/auto.sh ]; then 17 | usleep 30000 18 | . $SYSTEMPATH/auto.sh & 19 | fi 20 | ;; 21 | 22 | stop) 23 | ;; 24 | restart|reload) 25 | ;; 26 | *) 27 | echo "Usage: $0 {start|stop|restart}" 28 | exit 1 29 | esac 30 | 31 | exit $? 32 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/inittab: -------------------------------------------------------------------------------- 1 | # /etc/inittab 2 | # 3 | # Copyright (C) 2001 Erik Andersen 4 | # 5 | # Note: BusyBox init doesn't support runlevels. The runlevels field is 6 | # completely ignored by BusyBox init. If you want runlevels, use 7 | # sysvinit. 8 | # 9 | # Format for each entry: ::: 10 | # 11 | # id == tty to run on, or empty for /dev/console 12 | # runlevels == ignored 13 | # action == one of sysinit, respawn, askfirst, wait, and once 14 | # process == program to run 15 | 16 | # Startup the system 17 | ::sysinit:/bin/mount -t proc proc /proc 18 | ::sysinit:/bin/mount -o remount,rw / 19 | ::sysinit:/bin/mkdir -p /dev/pts /dev/shm 20 | ::sysinit:/bin/mount -a 21 | 22 | # rootfs overlay 23 | ::sysinit:/mnt/system/rootfs_overlay.sh 24 | 25 | ::sysinit:/sbin/swapon -a 26 | null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd 27 | null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin 28 | null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout 29 | null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr 30 | ::sysinit:/bin/hostname -F /etc/hostname 31 | # now run any rc scripts 32 | ::sysinit:/etc/init.d/rcS 33 | 34 | # Put a getty on the serial port 35 | # console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL 36 | # console::respawn:/sbin/getty -L console 115200 vt100 -n -l /usr/local/bin/autologin 37 | ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 38 | 39 | # Stuff to do for the 3-finger salute 40 | #::ctrlaltdel:/sbin/reboot 41 | 42 | # Stuff to do before rebooting 43 | ::shutdown:/etc/init.d/rcK 44 | ::shutdown:/sbin/swapoff -a 45 | ::shutdown:/bin/umount -a -r 46 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/mdev.conf: -------------------------------------------------------------------------------- 1 | mmcblk[0-9]p[0-9] 0:0 0660 * /etc/hotplug/automount.sh $MDEV $ACTION 2 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/profile: -------------------------------------------------------------------------------- 1 | export PATH="/bin:/sbin" 2 | export PATH=$PATH:"/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin" 3 | export PATH=$PATH:"/mnt/data/bin:/mnt/data/sbin:/mnt/system/usr/bin:/mnt/system/usr/sbin" 4 | export LD_LIBRARY_PATH="/lib:/usr/lib:/usr/lib64" 5 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/mnt/system/lib:/mnt/system/usr/lib:/mnt/system/usr/lib/3rd" 6 | 7 | if [ "$PS1" ]; then 8 | if [ "`id -u`" -eq 0 ]; then 9 | export PS1='# ' 10 | else 11 | export PS1='$ ' 12 | fi 13 | fi 14 | 15 | export PAGER='/bin/more ' 16 | export EDITOR='/bin/vi' 17 | 18 | # Source configuration files from /etc/profile.d 19 | for i in /etc/profile.d/*.sh ; do 20 | if [ -r "$i" ]; then 21 | . $i 22 | fi 23 | unset i 24 | done 25 | 26 | export HOSTNAME="$(hostname)" 27 | export OLDPWD=/root 28 | 29 | if [ '$USER' == 'root' ]; then 30 | export PS1='[\u@\h]\w\# ' 31 | else 32 | export PS1='[\u@\h]\w\$ ' 33 | fi 34 | 35 | alias ll='ls -alF' 36 | alias la='ls -A' 37 | alias l='ls -CF' 38 | 39 | export TERM=vt100 40 | export TERMINFO=/usr/share/terminfo 41 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/ssh/sshd_config: -------------------------------------------------------------------------------- 1 | # $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $ 2 | 3 | # This is the sshd server system-wide configuration file. See 4 | # sshd_config(5) for more information. 5 | 6 | # This sshd was compiled with PATH=/bin:/sbin:/usr/bin:/usr/sbin 7 | 8 | # The strategy used for options in the default sshd_config shipped with 9 | # OpenSSH is to specify options with their default value where 10 | # possible, but leave them commented. Uncommented options override the 11 | # default value. 12 | 13 | #Port 22 14 | #AddressFamily any 15 | #ListenAddress 0.0.0.0 16 | #ListenAddress :: 17 | 18 | #HostKey /etc/ssh/ssh_host_rsa_key 19 | #HostKey /etc/ssh/ssh_host_ecdsa_key 20 | #HostKey /etc/ssh/ssh_host_ed25519_key 21 | 22 | # Ciphers and keying 23 | #RekeyLimit default none 24 | 25 | # Logging 26 | #SyslogFacility AUTH 27 | #LogLevel INFO 28 | 29 | # Authentication: 30 | 31 | #LoginGraceTime 2m 32 | PermitRootLogin yes 33 | #StrictModes yes 34 | #MaxAuthTries 6 35 | #MaxSessions 10 36 | 37 | #PubkeyAuthentication yes 38 | 39 | # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 40 | # but this is overridden so installations will only check .ssh/authorized_keys 41 | AuthorizedKeysFile .ssh/authorized_keys 42 | 43 | #AuthorizedPrincipalsFile none 44 | 45 | #AuthorizedKeysCommand none 46 | #AuthorizedKeysCommandUser nobody 47 | 48 | # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts 49 | #HostbasedAuthentication no 50 | # Change to yes if you don't trust ~/.ssh/known_hosts for 51 | # HostbasedAuthentication 52 | #IgnoreUserKnownHosts no 53 | # Don't read the user's ~/.rhosts and ~/.shosts files 54 | #IgnoreRhosts yes 55 | 56 | # To disable tunneled clear text passwords, change to no here! 57 | #PasswordAuthentication yes 58 | #PermitEmptyPasswords no 59 | 60 | # Change to no to disable s/key passwords 61 | #ChallengeResponseAuthentication yes 62 | 63 | # Kerberos options 64 | #KerberosAuthentication no 65 | #KerberosOrLocalPasswd yes 66 | #KerberosTicketCleanup yes 67 | #KerberosGetAFSToken no 68 | 69 | # GSSAPI options 70 | #GSSAPIAuthentication no 71 | #GSSAPICleanupCredentials yes 72 | 73 | # Set this to 'yes' to enable PAM authentication, account processing, 74 | # and session processing. If this is enabled, PAM authentication will 75 | # be allowed through the ChallengeResponseAuthentication and 76 | # PasswordAuthentication. Depending on your PAM configuration, 77 | # PAM authentication via ChallengeResponseAuthentication may bypass 78 | # the setting of "PermitRootLogin without-password". 79 | # If you just want the PAM account and session checks to run without 80 | # PAM authentication, then enable this but set PasswordAuthentication 81 | # and ChallengeResponseAuthentication to 'no'. 82 | #UsePAM no 83 | 84 | #AllowAgentForwarding yes 85 | #AllowTcpForwarding yes 86 | #GatewayPorts no 87 | #X11Forwarding no 88 | #X11DisplayOffset 10 89 | #X11UseLocalhost yes 90 | #PermitTTY yes 91 | #PrintMotd yes 92 | #PrintLastLog yes 93 | #TCPKeepAlive yes 94 | #PermitUserEnvironment no 95 | #Compression delayed 96 | #ClientAliveInterval 0 97 | #ClientAliveCountMax 3 98 | #UseDNS no 99 | #PidFile /var/run/sshd.pid 100 | #MaxStartups 10:30:100 101 | #PermitTunnel no 102 | #ChrootDirectory none 103 | #VersionAddendum none 104 | 105 | # no default banner path 106 | #Banner none 107 | 108 | # override default of no subsystems 109 | Subsystem sftp /usr/libexec/sftp-server 110 | 111 | # Example of overriding settings on a per-user basis 112 | #Match User anoncvs 113 | # X11Forwarding no 114 | # AllowTcpForwarding no 115 | # PermitTTY no 116 | # ForceCommand cvs server 117 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/sudoers.d/sudo_users: -------------------------------------------------------------------------------- 1 | Defaults env_keep += "PATH LD_LIBRARY_PATH" 2 | recamera ALL=(ALL:ALL) ALL 3 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/swupdate/conf.d/swupdate_extra_args.sh: -------------------------------------------------------------------------------- 1 | root_dev=$(mountpoint -n /) 2 | root_dev=${root_dev%% *} 3 | 4 | # clear boot_cnt 5 | if [ $(fw_printenv boot_cnt) != "boot_cnt=0" ]; then 6 | fw_setenv boot_cnt 0; 7 | fi 8 | 9 | # determine upgrade target 10 | if [ "$root_dev" = "$(realpath /dev/mmcblk0p4)" ]; then 11 | SWUPDATE_ARGS="$SWUPDATE_ARGS -e stable,b_write_a" 12 | else 13 | SWUPDATE_ARGS="$SWUPDATE_ARGS -e stable,a_write_b" 14 | fi -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/syslog-ng.conf: -------------------------------------------------------------------------------- 1 | @version: 3.31 2 | 3 | options { 4 | create_dirs(yes); 5 | }; 6 | 7 | source s_sys { 8 | system(); 9 | internal(); 10 | }; 11 | 12 | filter f_app { 13 | program("supervisor") and level(notice..emerg); 14 | }; 15 | 16 | destination d_all { 17 | file("/tmp/log/${YEAR}.${MONTH}.${DAY}/messages" 18 | template("${MONTH}/${DAY} ${HOUR}:${MIN}:${SEC} [${PROGRAM}][${LEVEL}] ${MESSAGE}\n") 19 | ); 20 | }; 21 | 22 | log { 23 | source(s_sys); 24 | filter(f_app); 25 | destination(d_all); 26 | }; 27 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/udev/rules.d/98-sd-auto-mount.rules: -------------------------------------------------------------------------------- 1 | ACTION=="add", KERNEL=="mmcblk[0-9]p[0-9]", RUN+="/etc/hotplug/automount.sh %k add" 2 | ACTION=="remove", KERNEL=="mmcblk[0-9]p[0-9]", RUN+="/etc/hotplug/automount.sh %k remove" 3 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/udev/rules.d/99-com.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="input", GROUP="input", MODE="0660" 2 | SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660" 3 | SUBSYSTEM=="spidev", GROUP="spi", MODE="0660" 4 | 5 | SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660" 6 | SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 'chgrp -R gpio /sys/class/gpio && chmod -R g=u /sys/class/gpio'" 7 | SUBSYSTEM=="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chgrp -R gpio /sys%p && chmod -R g=u /sys%p'" 8 | 9 | SUBSYSTEM=="leds", GROUP="led", MODE="0660" 10 | SUBSYSTEM=="leds", ACTION=="add", PROGRAM="/bin/sh -c 'chgrp -R led /sys/class/leds && chmod -R g=u /sys/class/leds'" 11 | SUBSYSTEM=="leds", ACTION=="add", PROGRAM="/bin/sh -c 'chgrp -R led /sys%p && chmod -R g=u /sys%p'" 12 | 13 | 14 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/uhubon.sh: -------------------------------------------------------------------------------- 1 | GPIO_HUBPORT_EN=449 2 | GPIO_ROLESEL=450 3 | GPIO_HUBRST=451 4 | SYS_GPIO=/sys/class/gpio 5 | 6 | hub_on() { 7 | echo "turn on usb hub" 8 | if [ ! -d $SYS_GPIO/gpio$GPIO_HUBPORT_EN ]; then 9 | echo $GPIO_HUBPORT_EN >/sys/class/gpio/export 10 | fi 11 | 12 | if [ ! -d $SYS_GPIO/gpio$GPIO_ROLESEL ]; then 13 | echo $GPIO_ROLESEL >/sys/class/gpio/export 14 | fi 15 | 16 | if [ ! -d $SYS_GPIO/gpio$GPIO_HUBRST ]; then 17 | echo $GPIO_HUBRST >/sys/class/gpio/export 18 | fi 19 | 20 | echo "out" >/sys/class/gpio/gpio$GPIO_HUBPORT_EN/direction 21 | echo "out" >/sys/class/gpio/gpio$GPIO_ROLESEL/direction 22 | echo "out" >/sys/class/gpio/gpio$GPIO_HUBRST/direction 23 | 24 | echo 1 >/sys/class/gpio/gpio$GPIO_HUBPORT_EN/value 25 | echo 0 >/sys/class/gpio/gpio$GPIO_ROLESEL/value 26 | echo 0 >/sys/class/gpio/gpio$GPIO_HUBRST/value 27 | } 28 | 29 | hub_off() { 30 | echo "turn off usb hub" 31 | if [ ! -d $SYS_GPIO/gpio$GPIO_HUBPORT_EN ]; then 32 | echo $GPIO_HUBPORT_EN >/sys/class/gpio/export 33 | fi 34 | 35 | if [ ! -d $SYS_GPIO/gpio$GPIO_ROLESEL ]; then 36 | echo $GPIO_ROLESEL >/sys/class/gpio/export 37 | fi 38 | 39 | if [ ! -d $SYS_GPIO/gpio$GPIO_HUBRST ]; then 40 | echo $GPIO_HUBRST >/sys/class/gpio/export 41 | fi 42 | 43 | echo "out" >/sys/class/gpio/gpio$GPIO_HUBPORT_EN/direction 44 | echo "out" >/sys/class/gpio/gpio$GPIO_ROLESEL/direction 45 | echo "out" >/sys/class/gpio/gpio$GPIO_HUBRST/direction 46 | 47 | echo 0 >/sys/class/gpio/gpio$GPIO_HUBPORT_EN/value 48 | echo 1 >/sys/class/gpio/gpio$GPIO_ROLESEL/value 49 | echo 1 >/sys/class/gpio/gpio$GPIO_HUBRST/value 50 | } 51 | 52 | inst_mod() { 53 | insmod /mnt/system/ko/configfs.ko 54 | insmod /mnt/system/ko/libcomposite.ko 55 | insmod /mnt/system/ko/u_serial.ko 56 | insmod /mnt/system/ko/usb_f_acm.ko 57 | insmod /mnt/system/ko/cvi_usb_f_cvg.ko 58 | insmod /mnt/system/ko/usb_f_uvc.ko 59 | insmod /mnt/system/ko/usb_f_fs.ko 60 | insmod /mnt/system/ko/u_audio.ko 61 | insmod /mnt/system/ko/usb_f_uac1.ko 62 | insmod /mnt/system/ko/usb_f_serial.ko 63 | insmod /mnt/system/ko/usb_f_mass_storage.ko 64 | insmod /mnt/system/ko/u_ether.ko 65 | insmod /mnt/system/ko/usb_f_ecm.ko 66 | insmod /mnt/system/ko/usb_f_eem.ko 67 | insmod /mnt/system/ko/usb_f_rndis.ko 68 | } 69 | 70 | case "$1" in 71 | host) 72 | insmod /mnt/system/ko/dwc2.ko 73 | echo host > /proc/cviusb/otg_role 74 | ;; 75 | device) 76 | echo device > /proc/cviusb/otg_role 77 | ;; 78 | *) 79 | echo "Usage: $0 host" 80 | echo "Usage: $0 device" 81 | exit 1 82 | esac 83 | exit $? 84 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/etc/wpa_supplicant.conf: -------------------------------------------------------------------------------- 1 | ctrl_interface=/var/run/wpa_supplicant 2 | update_config=1 3 | 4 | network={ 5 | key_mgmt=NONE 6 | } 7 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/lib/firmware/brcm/brcmfmac43012-sdio.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Seeed-Studio/reCamera-OS/89d24f67cf269f4858928d8810e36845298ab784/external/buildroot/board/cvitek/CV181X/overlay/lib/firmware/brcm/brcmfmac43012-sdio.bin -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/lib/firmware/brcm/brcmfmac43012-sdio.clm_blob: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Seeed-Studio/reCamera-OS/89d24f67cf269f4858928d8810e36845298ab784/external/buildroot/board/cvitek/CV181X/overlay/lib/firmware/brcm/brcmfmac43012-sdio.clm_blob -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/lib/firmware/brcm/brcmfmac43012-sdio.cvitek,cv181x.txt: -------------------------------------------------------------------------------- 1 | brcmfmac43012-sdio.txt -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/lib/firmware/brcm/brcmfmac43012-sdio.txt: -------------------------------------------------------------------------------- 1 | ##********************SUMMARY******************** 2 | ##Board Name: cyw943012wlref 3 | ##SSID: 0x085a 4 | ##macmid: 0x02bb 5 | ##Successfully made SSID entry in sromdefs.tcl. 6 | ##Successfully made macmid entry in sromdefs.tcl. 7 | ##Successfully made SSID entry in tblssid.py. 8 | ##************************************************* 9 | # 10 | # 11 | # Sample variables file for BCM943012 BU board 12 | NVRAMRev=$Rev: 723327 $ 13 | sromrev=11 14 | etmode=0x11 15 | cckdigfilttype=4 16 | bphyscale=0x20 17 | boardflags3=0x40000101 18 | vendid=0x14e4 19 | devid=0xA804 20 | manfid=0x2d0 21 | prodid=0x052e 22 | macaddr=00:90:4c:c5:12:38 23 | nocrc=1 24 | boardtype=0x085c 25 | boardrev=0x1206 26 | lpflags=0x00000 27 | xtalfreq=37400 28 | boardflags2=0xc0800000 29 | boardflags=0x00400001 30 | extpagain2g=2 31 | extpagain5g=2 32 | ccode=0 33 | regrev=0 34 | antswitch = 0 35 | rxgains2gelnagaina0=0 36 | rxgains2gtrisoa0=15 37 | rxgains2gtrelnabypa0=0 38 | rxgains5gelnagaina0=0 39 | rxgains5gtrisoa0=9 40 | rxgains5gtrelnabypa0=0 41 | pdgain5g=0 42 | pdgain2g=0 43 | tworangetssi2g=0 44 | tworangetssi5g=0 45 | rxchain=1 46 | txchain=1 47 | aa2g=1 48 | aa5g=1 49 | tssipos5g=0 50 | tssipos2g=0 51 | tssisleep_en=0x5 52 | femctrl=17 53 | subband5gver=4 54 | #pa2ga0=-100,5465,-653 55 | pa2ga0=-100,5260,-644 56 | #pa5ga0=-147,5658,-685,-124,5923,-699,-134,5801,-684,-148,5803,-716 57 | pa5ga0=-147,5942,-727,-124,6050,-709,-134,5953,-696,-148,6018,-734 58 | cckpwroffset0=2 59 | pdoffset40ma0=0 60 | pdoffset80ma0=0 61 | lowpowerrange2g=0 62 | lowpowerrange5g=0 63 | rssicorrnorm_c0=2,0 64 | rssicorrnorm5g_c0=-10,0,0,-15,0,0,-15,0,0,-15,0,0 65 | ed_thresh2g=-63 66 | ed_thresh5g=-63 67 | 68 | 69 | swctrlmap_2g=0x00000000,0x00400040, 0x00400040,0x000000,0x3e7 70 | swctrlmapext_2g=0x00020002,0x00000000, 0x00000000,0x000000,0x003 71 | swctrlmap_5g=0x00000000,0x00000000,0x00000000,0x000000,0x3af 72 | swctrlmapext_5g=0x00000000,0x00010001, 0x00000000,0x000000,0x001 73 | 74 | 75 | 76 | ulpnap=0 77 | ulpadc=1 78 | ssagc_en=0 79 | ds1_nap=0 80 | epacal2g=0 81 | epacal5g=0 82 | epacal2g_mask=0x3fff 83 | maxp2ga0=82 84 | ofdmlrbw202gpo=0x0077 85 | dot11agofdmhrbw202gpo=0x8888 86 | mcsbw202gpo=0x99999999 87 | mac_clkgating=1 88 | #mcsbw402gpo=0x99555533 89 | maxp5ga0=82,82,82,82 90 | mcsbw205glpo=0xffc97777 91 | mcsbw205gmpo=0xffc97777 92 | mcsbw205ghpo=0xffc97777 93 | #mcsbw405glpo=0x99555000 94 | #mcsbw405gmpo=0x99555000 95 | #mcsbw405ghpo=0x99555000 96 | #mcsbw805glpo=0x99555000 97 | #mcsbw805gmpo=0x99555000 98 | #mcsbw805ghpo=0x99555000 99 | 100 | txwbpapden=1 101 | femctrlwar=0 102 | use5gpllfor2g=1 103 | wb_rxattn=0x0303 104 | wb_txattn=0x0202 105 | #wb_txattn=0x0203 106 | wb_papdcalidx=0x1015 107 | wb_papdcalidx_5g=0x00101010 108 | wb_eps_offset=0x01bf01af 109 | wb_eps_offset_5g=0x01bf01bf 110 | wb_bbmult=0x67 111 | ##wb_bbmult_5g=0x00242424 112 | ##wb_bbmult_5g=0x003c3c3c 113 | wb_bbmult_5g=0x004f5052 114 | ##wb_calref_db=0x1C26 115 | wb_calref_db=0x1926 116 | wb_tia_gain_mode=0x0606 117 | wb_txbuf_offset=0x1e1e 118 | wb_frac_del=0x78ae 119 | ##wb_g_frac_bits=0xbb 120 | wb_g_frac_bits=0xaa 121 | 122 | ##fcbga setting 123 | #nb_rxattn=0x0303 124 | #nb_txattn=0x0303 125 | #nb_papdcalidx=0x1010 126 | #nb_eps_offset=0x01d301af 127 | #nb_bbmult=0x2054 128 | #nb_tia_gain_mode=0x0000 129 | #AvVmid_c0=6,100,7,70,7,70,7,70,7,70 130 | 131 | nb_rxattn=0x0403 132 | nb_txattn=0x0402 133 | nb_papdcalidx= 0x1405 134 | nb_eps_offset= 0x01d701ca 135 | nb_bbmult= 0x5A50 136 | nb_tia_gain_mode=0x0006 137 | AvVmid_c0=6,104,7,80,7,80,7,80,7,80 138 | 139 | 140 | lpo_select=4 141 | 142 | csml=0x10 143 | pt5db_gaintbl=0 144 | 145 | papdcck=0 146 | paprrmcsgamma2g=450,500,550,600,675,950,950,950,950,950,950,950 147 | paprrmcsgamma5g20=600,600,600,600,800,950,1100,1100,1100,1100,1100,1100 148 | lhlgpio_cfg=0x00000020,0x00000000 149 | 150 | muxenab=0x1 -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/usr/bin/rootfs_rw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | function usage() { 4 | if [ $# -ne 1 ]; then 5 | echo "Usage: $0 " 6 | exit 1 7 | fi 8 | } 9 | 10 | case $1 in 11 | on) 12 | if mount -o remount,rw /; then 13 | echo "Root filesystem remounted as read-write successfully." 14 | else 15 | echo "Failed to remount root filesystem as read-write." 16 | exit 1 17 | fi 18 | ;; 19 | off) 20 | if mount -o remount,ro /; then 21 | echo "Root filesystem remounted as read-only successfully." 22 | else 23 | echo "Failed to remount root filesystem as read-only." 24 | exit 1 25 | fi 26 | ;; 27 | *) 28 | usage 29 | ;; 30 | esac -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/overlay/usr/lib/node_modules/node-red/custom.css: -------------------------------------------------------------------------------- 1 | #red-ui-header { 2 | background-color: white; 3 | border-bottom: 1px solid #8FC31F; 4 | } 5 | 6 | #red-ui-header .red-ui-deploy-button { 7 | background: #8FC31F; 8 | } 9 | 10 | #red-ui-header .red-ui-deploy-button:hover { 11 | background: #8FC31F; 12 | } 13 | 14 | #red-ui-header #red-ui-header-button-deploy.disabled { 15 | background: var(--red-ui-tab-background-inactive); 16 | } 17 | 18 | #red-ui-header #red-ui-header-button-deploy.disabled+#red-ui-header-button-deploy-options { 19 | background: var(--red-ui-tab-background-inactive); 20 | } 21 | 22 | #red-ui-header .button { 23 | border-left: none; 24 | border-right: none; 25 | } 26 | -------------------------------------------------------------------------------- /external/buildroot/board/cvitek/CV181X/users_table.txt: -------------------------------------------------------------------------------- 1 | - -1 i2c -1 =i2c - 2 | - -1 spi -1 =gpio - 3 | - -1 led -1 =led - 4 | - -1 gpio -1 =gpio - 5 | recamera -1 recamera -1 =recamera /home/recamera /bin/sh i2c,spi,led,gpio,input,dialout,audio 6 | -------------------------------------------------------------------------------- /external/buildroot/package/busybox/busybox.fragment: -------------------------------------------------------------------------------- 1 | CONFIG_STATIC=y 2 | CONFIG_FEATURE_SEAMLESS_GZ=y 3 | CONFIG_FEATURE_TAR_AUTODETECT=y 4 | CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y -------------------------------------------------------------------------------- /external/buildroot/package/c-ares/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_C_ARES 2 | bool "c-ares" 3 | help 4 | C library for asynchronous DNS requests. 5 | 6 | http://c-ares.haxx.se/ 7 | -------------------------------------------------------------------------------- /external/buildroot/package/c-ares/c-ares.hash: -------------------------------------------------------------------------------- 1 | # Locally calculated after checking pgp signature 2 | sha256 072ff6b30b9682d965b87eb9b77851dc1cd8e6d8090f6821a56bd8fa89595061 c-ares-1.32.2.tar.gz 3 | 4 | # Hash for license file 5 | sha256 8a9994f85a8e531e1a3217ab7ba509787c6b93056aabe702137ce662db8321c2 LICENSE.md 6 | -------------------------------------------------------------------------------- /external/buildroot/package/c-ares/c-ares.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # c-ares 4 | # 5 | ################################################################################ 6 | 7 | C_ARES_VERSION = 1.32.2 8 | C_ARES_SITE = https://github.com/c-ares/c-ares/releases/download/v1.32.2 9 | C_ARES_INSTALL_STAGING = YES 10 | C_ARES_CONF_OPTS = --with-random=/dev/urandom 11 | C_ARES_LICENSE = MIT 12 | C_ARES_LICENSE_FILES = LICENSE.md 13 | C_ARES_CPE_ID_VENDOR = c-ares 14 | 15 | $(eval $(autotools-package)) 16 | $(eval $(host-autotools-package)) 17 | -------------------------------------------------------------------------------- /external/buildroot/package/icu/0001-dont-build-static-dynamic-twice.patch: -------------------------------------------------------------------------------- 1 | Don't build object files twice 2 | 3 | When passed --enable-static and --enable-shared, icu will generate 4 | both a shared and a static version of its libraries. 5 | 6 | However, in order to do so, it builds each and every object file 7 | twice: once with -fPIC (for the shared library), and once without 8 | -fPIC (for the static library). While admittedly building -fPIC for a 9 | static library generates a slightly suboptimal code, this is what all 10 | the autotools-based project are doing. They build each object file 11 | once, and they use it for both the static and shared libraries. 12 | 13 | icu builds the object files for the shared library as .o files, and 14 | the object files for static library as .ao files. By simply changing 15 | the suffix of object files used for static libraries to ".o", we tell 16 | icu to use the ones built for the shared library (i.e, with -fPIC), 17 | and avoid the double build of icu. 18 | 19 | On a fast build server, this brings the target icu build from 20 | 3m41.302s down to 1m43.926s (approximate numbers: some other builds 21 | are running on the system at the same time). 22 | 23 | Signed-off-by: Thomas Petazzoni 24 | 25 | Index: b/source/config/mh-linux 26 | =================================================================== 27 | --- a/source/config/mh-linux 28 | +++ b/source/config/mh-linux 29 | @@ -35,7 +35,7 @@ 30 | ## Shared object suffix 31 | SO = so 32 | ## Non-shared intermediate object suffix 33 | -STATIC_O = ao 34 | +STATIC_O = o 35 | 36 | ## Compilation rules 37 | %.$(STATIC_O): $(srcdir)/%.c 38 | -------------------------------------------------------------------------------- /external/buildroot/package/icu/0002-workaround-toolchain-bugs.patch: -------------------------------------------------------------------------------- 1 | Workaround toolchain bugs 2 | 3 | Many of ARM Sourcery CodeBench toolchain have a bug when compiling 4 | icu's translit.cpp source file. The bug is trigerred when there is a 5 | combination of "-W -Wall" and "-Os", and causes an internal compiler 6 | error. The bug has been reported to Mentor Graphics. 7 | 8 | Even though it is clearly a toolchain bug, having a workaround for it 9 | is trivial in this case. So it will avoid our users falling into this 10 | internal compiler error, and allow our autobuilders to test more 11 | packages using this Sourcery CodeBench toolchain.qq 12 | 13 | [Gustavo: update for ICU4C 54.1] 14 | Signed-off-by: Thomas Petazzoni 15 | Signed-off-by: Gustavo Zacarias 16 | 17 | diff -Nura icu.orig/source/configure icu/source/configure 18 | --- icu.orig/source/configure 2014-12-18 15:49:43.038628644 -0300 19 | +++ icu/source/configure 2014-12-18 15:51:23.183083232 -0300 20 | @@ -4323,7 +4323,7 @@ 21 | ;; 22 | esac 23 | 24 | - CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" 25 | + CFLAGS="$CFLAGS -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" 26 | else 27 | case "${host}" in 28 | *-*-cygwin) 29 | @@ -4337,7 +4337,7 @@ 30 | fi 31 | if test "$GXX" = yes 32 | then 33 | - CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" 34 | + CXXFLAGS="$CXXFLAGS -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" 35 | else 36 | case "${host}" in 37 | *-*-cygwin) 38 | -------------------------------------------------------------------------------- /external/buildroot/package/icu/0003-link-icudata-as-data-only.patch: -------------------------------------------------------------------------------- 1 | From d5d0c4bb7cc9aa4a132ec0bea13255aee50c1cf9 Mon Sep 17 00:00:00 2001 2 | From: Maxime Hadjinlian 3 | Date: Fri, 6 Jun 2014 14:55:58 +0200 4 | Subject: [PATCH] Don't link icudata as a data only library 5 | 6 | This patch cames straight from Debian. It fixes an issue when 7 | libicudata would not have some flags indicating it's EABIhf, causing 8 | applications linked against libicudata to not start on EABIhf 9 | systems. Getting rid of the -nodefaultlibs -nostdlib flags solves the 10 | problem, and is the solution that is used by Debian, see 11 | https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653457. 12 | 13 | Signed-off-by: Maxime Hadjinlian 14 | --- 15 | source/config/mh-linux | 4 +++- 16 | 1 file changed, 3 insertions(+), 1 deletion(-) 17 | 18 | diff --git a/source/config/mh-linux b/source/config/mh-linux 19 | index 531a3b2..5a2a7c4 100644 20 | --- a/source/config/mh-linux 21 | +++ b/source/config/mh-linux 22 | @@ -21,7 +21,9 @@ LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN 23 | LD_RPATH_PRE = -Wl,-rpath, 24 | 25 | ## These are the library specific LDFLAGS 26 | -LDFLAGSICUDT=-nodefaultlibs -nostdlib 27 | +#LDFLAGSICUDT=-nodefaultlibs -nostdlib 28 | +# Debian change: linking icudata as data only causes too many problems. 29 | +LDFLAGSICUDT= 30 | 31 | ## Compiler switch to embed a library name 32 | # The initial tab in the next line is to prevent icu-config from reading it. 33 | -- 34 | 2.0.0.rc2 35 | 36 | -------------------------------------------------------------------------------- /external/buildroot/package/icu/0004-fix-static-linking-with-icu-uc.patch: -------------------------------------------------------------------------------- 1 | From ffff12fd321c7a056e796e74cc508726b0626ae0 Mon Sep 17 00:00:00 2001 2 | From: Romain Naour 3 | Date: Wed, 22 Jul 2015 22:43:25 +0200 4 | Subject: [PATCH] fix static linking with icu-uc 5 | 6 | During static linking with a C application and libicuuc.a, 7 | -lstdc++ is required. 8 | 9 | Add -lstdc++ in Libs.private of icu-uc.pc. 10 | 11 | Fixes: 12 | http://autobuild.buildroot.net/results/210/2107f9dfb39eeb6559fb4271c7af8b39aef521ca/ 13 | 14 | Signed-off-by: Romain Naour 15 | --- 16 | source/Makefile.in | 2 +- 17 | 1 file changed, 1 insertion(+), 1 deletion(-) 18 | 19 | diff --git a/source/Makefile.in b/source/Makefile.in 20 | index 9db6c52..ca48e16 100644 21 | --- a/source/Makefile.in 22 | +++ b/source/Makefile.in 23 | @@ -264,7 +264,7 @@ config/icu-uc.pc: config/icu.pc Makefile icudefs.mk 24 | @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Common and Data libraries" >> $@ 25 | @echo "Name: $(PACKAGE)-uc" >> $@ 26 | @echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" >> $@ 27 | - @echo "Libs.private:" '$${baselibs}' >> $@ 28 | + @echo "Libs.private:" '$${baselibs}' -lstdc++ >> $@ 29 | @echo $@ updated. 30 | 31 | config/icu-i18n.pc: config/icu.pc Makefile icudefs.mk 32 | -- 33 | 2.4.3 34 | 35 | -------------------------------------------------------------------------------- /external/buildroot/package/icu/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_ICU 2 | bool "icu" 3 | depends on BR2_INSTALL_LIBSTDCPP 4 | depends on BR2_USE_WCHAR 5 | depends on BR2_HOST_GCC_AT_LEAST_4_9 # C++11 PR56019 6 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11 PR56019 7 | depends on BR2_TOOLCHAIN_HAS_THREADS 8 | # icu does some funky things by generating by itself an ELF 9 | # file, and it cannot easily be changed to generate FLAT 10 | # format. 11 | depends on !BR2_BINFMT_FLAT 12 | help 13 | International Components for Unicode. 14 | 15 | https://icu.unicode.org/ 16 | 17 | if BR2_PACKAGE_ICU 18 | 19 | config BR2_PACKAGE_ICU_CUSTOM_DATA_PATH 20 | string "Path to custom data library file" 21 | help 22 | This option allows to define the path to a custom data 23 | library generated with http://apps.icu-project.org/datacustom/ 24 | Make sure you select the appropiate version to match the one 25 | provided by buildroot. 26 | Leave empty to not use this functionality. 27 | 28 | endif 29 | 30 | comment "icu needs a toolchain w/ C++, wchar, threads, gcc >= 4.9, host gcc >= 4.9" 31 | depends on !BR2_BINFMT_FLAT 32 | depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ 33 | !BR2_TOOLCHAIN_HAS_THREADS || \ 34 | !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ 35 | !BR2_HOST_GCC_AT_LEAST_4_9 36 | -------------------------------------------------------------------------------- /external/buildroot/package/icu/icu.hash: -------------------------------------------------------------------------------- 1 | # Locally computed 2 | sha256 818a80712ed3caacd9b652305e01afc7fa167e6f2e94996da44b90c2ab604ce1 icu4c-73_2-src.tgz 3 | sha256 f3005e195ff74d8812cc1f182a1c446fab678d70a10e3dada497585befee5416 LICENSE 4 | -------------------------------------------------------------------------------- /external/buildroot/package/icu/icu.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # icu 4 | # 5 | ################################################################################ 6 | 7 | # Git tags (and therefore versions on release-monitoring.org) use the 8 | # XX-Y format, but the tarballs are named XX_Y and the containing 9 | # directories XX.Y. 10 | ICU_VERSION = 73-2 11 | ICU_SOURCE = icu4c-$(subst -,_,$(ICU_VERSION))-src.tgz 12 | ICU_SITE = \ 13 | https://github.com/unicode-org/icu/releases/download/release-$(ICU_VERSION) 14 | ICU_LICENSE = ICU License 15 | ICU_LICENSE_FILES = LICENSE 16 | ICU_CPE_ID_VENDOR = icu-project 17 | ICU_CPE_ID_PRODUCT = international_components_for_unicode 18 | ICU_CPE_ID_VERSION = $(subst -,.,$(ICU_VERSION)) 19 | 20 | ICU_DEPENDENCIES = host-icu 21 | ICU_INSTALL_STAGING = YES 22 | ICU_CONFIG_SCRIPTS = icu-config 23 | ICU_CONF_OPTS = \ 24 | --with-cross-build=$(HOST_ICU_DIR)/source \ 25 | --disable-samples \ 26 | --disable-tests 27 | 28 | # the icu build process breaks if the TARGET environment variable is 29 | # non-empty 30 | ICU_CONF_ENV += TARGET="" 31 | ICU_MAKE_ENV += TARGET="" 32 | HOST_ICU_CONF_ENV += TARGET="" 33 | HOST_ICU_MAKE_ENV += TARGET="" 34 | 35 | # When available, icu prefers to use C++11 atomics, which rely on the 36 | # __atomic builtins. On certain architectures, this requires linking 37 | # with libatomic starting from gcc 4.8. 38 | ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) 39 | ICU_CONF_ENV += LIBS="-latomic" 40 | endif 41 | 42 | # strtod_l() is not supported by musl; also xlocale.h is missing 43 | ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) 44 | ICU_CONF_ENV += ac_cv_func_strtod_l=no 45 | endif 46 | 47 | HOST_ICU_CONF_OPTS = \ 48 | --disable-samples \ 49 | --disable-tests \ 50 | --disable-extras \ 51 | --disable-icuio \ 52 | --disable-layout 53 | ICU_SUBDIR = source 54 | HOST_ICU_SUBDIR = source 55 | 56 | # ICU build scripting adds paths to LD_LIBRARY_PATH using 57 | # LD_LIBRARY_PATH="custom-path:${LD_LIBRARY_PATH}" 58 | # which, if LD_LIBRARY_PATH was empty, causes the last search directory 59 | # to be the working directory, causing the build to try to load target 60 | # libraries, possibly crashing the build due to ABI mismatches. 61 | # Workaround by ensuring LD_LIBRARY_PATH is never empty. 62 | # https://unicode-org.atlassian.net/browse/ICU-21417 63 | ifeq ($(LD_LIBRARY_PATH),) 64 | ICU_MAKE_ENV += LD_LIBRARY_PATH=/dev/null 65 | endif 66 | 67 | ICU_CUSTOM_DATA_PATH = $(call qstrip,$(BR2_PACKAGE_ICU_CUSTOM_DATA_PATH)) 68 | 69 | ifneq ($(ICU_CUSTOM_DATA_PATH),) 70 | define ICU_COPY_CUSTOM_DATA 71 | cp $(ICU_CUSTOM_DATA_PATH) $(@D)/source/data/in/ 72 | endef 73 | ICU_POST_PATCH_HOOKS += ICU_COPY_CUSTOM_DATA 74 | endif 75 | 76 | define ICU_REMOVE_DEV_FILES 77 | rm -f $(addprefix $(TARGET_DIR)/usr/bin/,derb genbrk gencfu gencnval gendict genrb icuinfo makeconv uconv) 78 | rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,genccode gencmn gennorm2 gensprep icupkg) 79 | rm -rf $(TARGET_DIR)/usr/share/icu 80 | endef 81 | ICU_POST_INSTALL_TARGET_HOOKS += ICU_REMOVE_DEV_FILES 82 | 83 | $(eval $(autotools-package)) 84 | $(eval $(host-autotools-package)) 85 | -------------------------------------------------------------------------------- /external/buildroot/package/libuv/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_LIBUV 2 | bool "libuv" 3 | depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # pthread_barrier_* 4 | depends on BR2_USE_MMU # fork() 5 | depends on !BR2_STATIC_LIBS 6 | depends on BR2_TOOLCHAIN_HAS_SYNC_4 7 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h 8 | help 9 | libuv is a multi-platform support library with a focus 10 | on asynchronous I/O. 11 | 12 | https://github.com/libuv/libuv 13 | 14 | comment "libuv needs a toolchain w/ NPTL, dynamic library, gcc >= 4.9" 15 | depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \ 16 | || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 17 | depends on BR2_USE_MMU 18 | depends on BR2_TOOLCHAIN_HAS_SYNC_4 19 | -------------------------------------------------------------------------------- /external/buildroot/package/libuv/libuv.hash: -------------------------------------------------------------------------------- 1 | # Locally calculated 2 | sha256 c593139feb9061699fdd2f7fde47bb6c1ca77761ae9ec04f052083f1ef46c13b libuv-v1.48.0-dist.tar.gz 3 | sha256 16de0c32b265cb7d46a6d3bd614f259dd4d693a5e26b3407b04aae8d73041f0c LICENSE 4 | sha256 262c44bd2cdba037e6d2a82fba15f5800d292bc993a6f5d6b6ea487744d02836 LICENSE-extra 5 | -------------------------------------------------------------------------------- /external/buildroot/package/libuv/libuv.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # libuv 4 | # 5 | ################################################################################ 6 | 7 | # When bumping libuv, check if a new version of uvw is available 8 | # and bump it too. 9 | LIBUV_VERSION = 1.48.0 10 | LIBUV_SOURCE = libuv-v$(LIBUV_VERSION)-dist.tar.gz 11 | LIBUV_SITE = https://dist.libuv.org/dist/v$(LIBUV_VERSION) 12 | LIBUV_DEPENDENCIES = host-pkgconf 13 | LIBUV_INSTALL_STAGING = YES 14 | LIBUV_LICENSE = BSD-2-Clause, BSD-3-Clause, ISC, MIT 15 | LIBUV_LICENSE_FILES = LICENSE LICENSE-extra 16 | LIBUV_CPE_ID_VENDOR = libuv 17 | 18 | $(eval $(autotools-package)) 19 | -------------------------------------------------------------------------------- /external/buildroot/package/nodejs/0001-add-qemu_wrapper-support.patch: -------------------------------------------------------------------------------- 1 | From 27651ecb2d80bfe7c799e4dd3cf35c08303750da Mon Sep 17 00:00:00 2001 2 | From: mingzq 3 | Date: Fri, 13 Sep 2024 01:34:44 +0000 4 | Subject: [PATCH 1/3] add-qemu_wrapper-support 5 | 6 | --- 7 | node.gyp | 6 ++++-- 8 | tools/v8_gypfiles/v8.gyp | 27 ++++++++++++++++++++++----- 9 | 2 files changed, 26 insertions(+), 7 deletions(-) 10 | 11 | diff --git a/node.gyp b/node.gyp 12 | index a2ba04a0c7..c11ac7d125 100644 13 | --- a/node.gyp 14 | +++ b/node.gyp 15 | @@ -715,7 +715,7 @@ 16 | 'action_name': 'node_mksnapshot', 17 | 'process_outputs_as_sources': 1, 18 | 'inputs': [ 19 | - '<(node_mksnapshot_exec)', 20 | + @MAYBE_WRAPPER@ '<(node_mksnapshot_exec)', 21 | '<(node_snapshot_main)', 22 | ], 23 | 'outputs': [ 24 | @@ -735,7 +735,7 @@ 25 | 'action_name': 'node_mksnapshot', 26 | 'process_outputs_as_sources': 1, 27 | 'inputs': [ 28 | - '<(node_mksnapshot_exec)', 29 | + @MAYBE_WRAPPER@ '<(node_mksnapshot_exec)', 30 | ], 31 | 'outputs': [ 32 | '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc', 33 | @@ -1024,6 +1024,7 @@ 34 | 'action_name': 'node_js2c', 35 | 'process_outputs_as_sources': 1, 36 | 'inputs': [ 37 | + @MAYBE_WRAPPER@ 38 | '<(node_js2c_exec)', 39 | '<@(library_files)', 40 | '<@(deps_files)', 41 | @@ -1033,6 +1034,7 @@ 42 | '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc', 43 | ], 44 | 'action': [ 45 | + @MAYBE_WRAPPER@ 46 | '<(node_js2c_exec)', 47 | '<@(_outputs)', 48 | 'lib', 49 | diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp 50 | index 9d385515a2..65bbb9a476 100644 51 | --- a/tools/v8_gypfiles/v8.gyp 52 | +++ b/tools/v8_gypfiles/v8.gyp 53 | @@ -81,7 +81,7 @@ 54 | { 55 | 'action_name': 'run_torque_action', 56 | 'inputs': [ # Order matters. 57 | - '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', 58 | + @MAYBE_WRAPPER@ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', 59 | '<@(torque_files)', 60 | ], 61 | 'outputs': [ 62 | @@ -112,7 +112,7 @@ 63 | '<@(torque_outputs_inc)', 64 | ], 65 | 'action': [ 66 | - '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', 67 | + @MAYBE_WRAPPER@ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', 68 | '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated', 69 | '-v8-root', '<(V8_ROOT)', 70 | '<@(torque_files_without_v8_root)', 71 | @@ -224,7 +224,7 @@ 72 | { 73 | 'action_name': 'generate_bytecode_builtins_list_action', 74 | 'inputs': [ 75 | - '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)bytecode_builtins_list_generator<(EXECUTABLE_SUFFIX)', 76 | + @MAYBE_WRAPPER@ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)bytecode_builtins_list_generator<(EXECUTABLE_SUFFIX)', 77 | ], 78 | 'outputs': [ 79 | '<(generate_bytecode_builtins_list_output)', 80 | @@ -411,7 +411,7 @@ 81 | ], 82 | }, 83 | 'inputs': [ 84 | - '<(mksnapshot_exec)', 85 | + @MAYBE_WRAPPER@ '<(mksnapshot_exec)', 86 | ], 87 | 'outputs': [ 88 | '<(INTERMEDIATE_DIR)/snapshot.cc', 89 | @@ -1168,6 +1168,23 @@ 90 | 'sources': [ 91 | ' 3 | Date: Fri, 13 Sep 2024 01:37:41 +0000 4 | Subject: [PATCH 2/3] include-obj-name-in-shared-intermediate 5 | 6 | --- 7 | tools/gyp/pylib/gyp/generator/ninja.py | 7 ++++++- 8 | 1 file changed, 6 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/tools/gyp/pylib/gyp/generator/ninja.py b/tools/gyp/pylib/gyp/generator/ninja.py 11 | index 0146c49962..0f19088d7b 100644 12 | --- a/tools/gyp/pylib/gyp/generator/ninja.py 13 | +++ b/tools/gyp/pylib/gyp/generator/ninja.py 14 | @@ -43,7 +43,7 @@ generator_default_variables = { 15 | # the start of a string, while $| is used for variables that can appear 16 | # anywhere in a string. 17 | "INTERMEDIATE_DIR": "$!INTERMEDIATE_DIR", 18 | - "SHARED_INTERMEDIATE_DIR": "$!PRODUCT_DIR/gen", 19 | + "SHARED_INTERMEDIATE_DIR": "$!PRODUCT_DIR/$|OBJ/gen", 20 | "PRODUCT_DIR": "$!PRODUCT_DIR", 21 | "CONFIGURATION_NAME": "$|CONFIGURATION_NAME", 22 | # Special variables that may be used by gyp 'rule' targets. 23 | @@ -286,6 +286,11 @@ class NinjaWriter: 24 | CONFIGURATION_NAME = "$|CONFIGURATION_NAME" 25 | path = path.replace(CONFIGURATION_NAME, self.config_name) 26 | 27 | + obj = "obj" 28 | + if self.toolset != "target": 29 | + obj += "." + self.toolset 30 | + path = path.replace("$|OBJ", obj) 31 | + 32 | return path 33 | 34 | def ExpandRuleVariables(self, path, root, dirname, source, ext, name): 35 | -- 36 | 2.25.1 37 | 38 | -------------------------------------------------------------------------------- /external/buildroot/package/nodejs/0003-lib-internal-modules-cjs-loader.js-adjust-default-pa.patch: -------------------------------------------------------------------------------- 1 | From 5df4fdb0a9977610b5fd891c7ab25200490168fb Mon Sep 17 00:00:00 2001 2 | From: mingzq 3 | Date: Fri, 13 Sep 2024 01:38:40 +0000 4 | Subject: [PATCH 3/3] lib-internal-modules-cjs-loader.js-adjust-default-pa 5 | 6 | --- 7 | lib/internal/modules/cjs/loader.js | 3 ++- 8 | 1 file changed, 2 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js 11 | index 451b7c2195..c84b6302e8 100644 12 | --- a/lib/internal/modules/cjs/loader.js 13 | +++ b/lib/internal/modules/cjs/loader.js 14 | @@ -1781,7 +1781,8 @@ Module._initPaths = function() { 15 | path.resolve(process.execPath, '..') : 16 | path.resolve(process.execPath, '..', '..'); 17 | 18 | - const paths = [path.resolve(prefixDir, 'lib', 'node')]; 19 | + const paths = [path.resolve(prefixDir, 'lib', 'node'), 20 | + path.resolve(prefixDir, 'lib', 'node_modules')]; 21 | 22 | if (homeDir) { 23 | ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries')); 24 | -- 25 | 2.25.1 26 | 27 | -------------------------------------------------------------------------------- /external/buildroot/package/nodejs/0005-fix-WebAssembly-is-not-defined.patch: -------------------------------------------------------------------------------- 1 | From e6defc53214438a02229840cd2d67c2699f41c6f Mon Sep 17 00:00:00 2001 2 | From: mingzq 3 | Date: Fri, 25 Oct 2024 02:25:24 +0000 4 | Subject: [PATCH 1/1] fix: WebAssembly is not defined 5 | 6 | --- 7 | deps/undici/src/lib/dispatcher/client.js | 2 +- 8 | deps/undici/undici.js | 4 ++-- 9 | 2 files changed, 3 insertions(+), 3 deletions(-) 10 | 11 | diff --git a/deps/undici/src/lib/dispatcher/client.js b/deps/undici/src/lib/dispatcher/client.js 12 | index cb61206b..e314031e 100644 13 | --- a/deps/undici/src/lib/dispatcher/client.js 14 | +++ b/deps/undici/src/lib/dispatcher/client.js 15 | @@ -57,7 +57,7 @@ const { 16 | kMaxConcurrentStreams, 17 | kResume 18 | } = require('../core/symbols.js') 19 | -const connectH1 = require('./client-h1.js') 20 | +const connectH1 = require('./client-h2.js') 21 | const connectH2 = require('./client-h2.js') 22 | let deprecatedInterceptorWarned = false 23 | 24 | diff --git a/deps/undici/undici.js b/deps/undici/undici.js 25 | index acbece91..416e1874 100644 26 | --- a/deps/undici/undici.js 27 | +++ b/deps/undici/undici.js 28 | @@ -5512,7 +5512,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r 29 | 30 | // lib/dispatcher/client-h1.js 31 | var require_client_h1 = __commonJS({ 32 | - "lib/dispatcher/client-h1.js"(exports2, module2) { 33 | + "lib/dispatcher/client-h2.js"(exports2, module2) { 34 | "use strict"; 35 | var assert = require("node:assert"); 36 | var util = require_util(); 37 | @@ -7306,7 +7306,7 @@ var require_client = __commonJS({ 38 | kMaxConcurrentStreams, 39 | kResume 40 | } = require_symbols(); 41 | - var connectH1 = require_client_h1(); 42 | + var connectH1 = require_client_h2(); 43 | var connectH2 = require_client_h2(); 44 | var deprecatedInterceptorWarned = false; 45 | var kClosedResolve = Symbol("kClosedResolve"); 46 | -- 47 | 2.25.1 48 | 49 | -------------------------------------------------------------------------------- /external/buildroot/package/nodejs/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_NODEJS_ARCH_SUPPORTS 2 | bool 3 | # On ARM, at least ARMv6+ with VFPv2+ is needed 4 | default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2 5 | default y if BR2_aarch64 || BR2_i386 || BR2_x86_64 6 | default y if BR2_RISCV_64 7 | # libuv 8 | depends on BR2_TOOLCHAIN_HAS_SYNC_4 9 | depends on BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS 10 | 11 | comment "nodejs needs a toolchain w/ C++, dynamic library, NPTL, gcc >= 7, wchar, host gcc >= 8" 12 | depends on BR2_USE_MMU 13 | depends on BR2_PACKAGE_NODEJS_ARCH_SUPPORTS 14 | depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ 15 | !BR2_HOST_GCC_AT_LEAST_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || !BR2_USE_WCHAR 16 | 17 | config BR2_PACKAGE_NODEJS 18 | bool "nodejs" 19 | depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv 20 | depends on BR2_INSTALL_LIBSTDCPP 21 | depends on BR2_PACKAGE_NODEJS_ARCH_SUPPORTS 22 | depends on BR2_HOST_GCC_AT_LEAST_8 # qemu 23 | depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 24 | depends on BR2_USE_WCHAR 25 | # uses fork() 26 | depends on BR2_USE_MMU 27 | # uses dlopen(). On ARMv5, we could technically support static 28 | # linking, but that's too much of a corner case to support it. 29 | depends on !BR2_STATIC_LIBS 30 | select BR2_PACKAGE_HOST_NODEJS if BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL != "" 31 | select BR2_PACKAGE_HOST_PYTHON3 32 | select BR2_PACKAGE_HOST_PYTHON3_BZIP2 33 | select BR2_PACKAGE_HOST_PYTHON3_SSL 34 | select BR2_PACKAGE_HOST_QEMU 35 | select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE 36 | select BR2_PACKAGE_C_ARES 37 | select BR2_PACKAGE_LIBUV 38 | select BR2_PACKAGE_ZLIB 39 | select BR2_PACKAGE_NGHTTP2 40 | help 41 | Event-driven I/O server-side JavaScript environment based on 42 | V8. 43 | 44 | http://nodejs.org/ 45 | 46 | if BR2_PACKAGE_NODEJS 47 | 48 | config BR2_PACKAGE_NODEJS_NPM 49 | bool "NPM for the target" 50 | select BR2_PACKAGE_OPENSSL 51 | help 52 | NPM is the package manager for the Node JavaScript platform. 53 | Note that enabling NPM on the target also selects OpenSSL 54 | for the target. 55 | 56 | http://www.npmjs.org 57 | 58 | Note that NPM is always built for the buildroot host. 59 | 60 | config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL 61 | string "Additional modules" 62 | help 63 | List of space-separated nodejs modules to install via npm. 64 | See https://npmjs.org/ to find modules and 'npm help install' 65 | for available installation methods. For repeatable builds, 66 | download and save tgz files or clone git repos for the 67 | components you care about. 68 | 69 | Example: 70 | serialport uglify-js@1.3.4 /my/module/mymodule.tgz \ 71 | git://github.com/someuser/somemodule.git#v1.2 72 | 73 | This would install the serialport module (at the newest 74 | version), the uglify-js module at 1.3.4, a module from a 75 | filesystem path, and a module from a git repository. 76 | 77 | config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS 78 | string "Additional module dependencies" 79 | help 80 | List of space-separated buildroot recipes which must be 81 | built before your npms can be installed. For example, if in 82 | 'Additional modules' you specified 'node-curl' (see: 83 | https://github.com/jiangmiao/node-curl), you could then 84 | specify 'libcurl' here, to ensure that buildroot builds the 85 | libcurl package, and does so before building your node 86 | modules. 87 | 88 | endif 89 | -------------------------------------------------------------------------------- /external/buildroot/package/nodejs/Config.in.host: -------------------------------------------------------------------------------- 1 | comment "host nodejs needs a host gcc >= 8" 2 | depends on !BR2_HOST_GCC_AT_LEAST_8 3 | 4 | config BR2_PACKAGE_HOST_NODEJS 5 | bool "host nodejs" 6 | depends on BR2_HOST_GCC_AT_LEAST_8 7 | select BR2_PACKAGE_HOST_PYTHON3 8 | select BR2_PACKAGE_HOST_PYTHON3_BZIP2 9 | select BR2_PACKAGE_HOST_PYTHON3_SSL 10 | help 11 | Event-driven I/O server-side JavaScript environment based on 12 | V8. 13 | 14 | http://nodejs.org/ 15 | 16 | if BR2_PACKAGE_HOST_NODEJS 17 | 18 | config BR2_PACKAGE_HOST_NODEJS_COREPACK 19 | bool "Corepack" 20 | help 21 | Enable Corepack with host nodejs. 22 | 23 | Corepack is a zero-runtime-dependency Node.js script that 24 | acts as a bridge between Node.js projects and the package 25 | managers they are intended to be used with during 26 | development. In practical terms, Corepack will let you use 27 | Yarn and pnpm without having to install them - just like 28 | what currently happens with npm, which is shipped by Node.js 29 | by default. 30 | 31 | endif 32 | -------------------------------------------------------------------------------- /external/buildroot/package/nodejs/nodejs.hash: -------------------------------------------------------------------------------- 1 | # From https://nodejs.org/dist/v22.8.0/SHASUMS256.txt 2 | sha256 f130e82176d1ee0702d99afc1995d0061bf8ed357c38834a32a08c9ef74f1ac7 node-v22.8.0.tar.xz 3 | -------------------------------------------------------------------------------- /external/buildroot/package/nodejs/v8-qemu-wrapper.in: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Pass -r to qemu-user as to trick glibc into not errorings out if the host kernel 4 | # is older than the target kernel. 5 | exec @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ \ 6 | @QEMU_USERMODE_ARGS@ \ 7 | -L "${STAGING_DIR}/" \ 8 | -E LD_LIBRARY_PATH="${STAGING_DIR}/lib:${STAGING_DIR}/usr/lib/" \ 9 | "$@" 10 | 11 | -------------------------------------------------------------------------------- /external/buildroot/package/openssh/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_OPENSSH 2 | bool "openssh" 3 | depends on BR2_USE_MMU # fork() 4 | select BR2_PACKAGE_OPENSSL 5 | select BR2_PACKAGE_ZLIB 6 | help 7 | A free version of the SSH protocol suite of network 8 | connectivity tools. The standard 'ssh', 'sshd', 'scp', and 9 | friends. 10 | 11 | http://www.openssh.com/ 12 | 13 | if BR2_PACKAGE_OPENSSH 14 | 15 | config BR2_PACKAGE_OPENSSH_CLIENT 16 | bool "client" 17 | default y 18 | help 19 | Client programs: ssh, scp, sftp, ssh-agent, ssh-add, 20 | ssh-copy-id. 21 | 22 | config BR2_PACKAGE_OPENSSH_SERVER 23 | bool "server" 24 | default y 25 | select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC 26 | help 27 | Server programs: sshd, sftp-server 28 | 29 | config BR2_PACKAGE_OPENSSH_KEY_UTILS 30 | bool "key utilities" 31 | default y 32 | help 33 | Key utilities: ssh-keygen, ssh-keyscan. 34 | 35 | config BR2_PACKAGE_OPENSSH_SANDBOX 36 | bool "use sandboxing" 37 | default y 38 | help 39 | Use sandboxing for extra privilege protection of processes. 40 | 41 | This is normally preferable, but may cause seccomp problems 42 | for certain combinations of C libraries and kernel versions. 43 | endif 44 | -------------------------------------------------------------------------------- /external/buildroot/package/openssh/S50sshd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # sshd Starts sshd. 4 | # 5 | 6 | DAEMON="sshd" 7 | PIDFILE="/var/run/$DAEMON.pid" 8 | 9 | # Make sure the ssh-keygen program exists 10 | [ -f /usr/bin/ssh-keygen ] || exit 0 11 | 12 | umask 077 13 | 14 | start() { 15 | # Create any missing keys 16 | /usr/bin/ssh-keygen -A 17 | 18 | printf "Starting %s: " "$DAEMON" 19 | start-stop-daemon --start --pidfile "$PIDFILE" \ 20 | --exec "/usr/sbin/$DAEMON" 21 | status=$? 22 | if [ "$status" -eq 0 ]; then 23 | echo "OK" 24 | else 25 | echo "FAIL" 26 | fi 27 | return "$status" 28 | } 29 | 30 | stop() { 31 | printf "Stopping %s: " "$DAEMON" 32 | start-stop-daemon --stop --pidfile "$PIDFILE" \ 33 | --exec "/usr/sbin/$DAEMON" 34 | status=$? 35 | if [ "$status" -eq 0 ]; then 36 | echo "OK" 37 | else 38 | echo "FAIL" 39 | fi 40 | # sshd deletes its PID file on exit, wait for it to be gone 41 | while [ -f "$PIDFILE" ]; do 42 | sleep 0.1 43 | done 44 | return "$status" 45 | } 46 | 47 | restart() { 48 | stop 49 | start 50 | } 51 | 52 | reload() { 53 | printf "Reloading %s config: " "$DAEMON" 54 | start-stop-daemon --stop --signal HUP -q --pidfile "$PIDFILE" \ 55 | --exec "/usr/sbin/$DAEMON" 56 | status=$? 57 | if [ "$status" -eq 0 ]; then 58 | echo "OK" 59 | else 60 | echo "FAIL" 61 | fi 62 | return "$status" 63 | } 64 | 65 | case "$1" in 66 | start) 67 | start 68 | ;; 69 | stop) 70 | stop 71 | ;; 72 | restart) 73 | restart 74 | ;; 75 | reload) 76 | reload 77 | ;; 78 | *) 79 | echo "Usage: $0 {start|stop|restart|reload}" 80 | exit 1 81 | esac 82 | 83 | exit $? 84 | -------------------------------------------------------------------------------- /external/buildroot/package/openssh/openssh.hash: -------------------------------------------------------------------------------- 1 | # From https://www.openssh.com/txt/release-9.9p2 2 | sha256 91aadb603e08cc285eddf965e1199d02585fa94d994d6cae5b41e1721e215673 openssh-9.9p2.tar.gz 3 | # Locally calculated 4 | sha256 5bb5b160726ef5756e4f32fe95b35249c294962419650f48d05134b486d27ccb LICENCE 5 | -------------------------------------------------------------------------------- /external/buildroot/package/openssh/openssh.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # openssh 4 | # 5 | ################################################################################ 6 | 7 | OPENSSH_VERSION_MAJOR = 9.9 8 | OPENSSH_VERSION_MINOR = p2 9 | OPENSSH_VERSION = $(OPENSSH_VERSION_MAJOR)$(OPENSSH_VERSION_MINOR) 10 | OPENSSH_CPE_ID_VERSION = $(OPENSSH_VERSION_MAJOR) 11 | OPENSSH_CPE_ID_UPDATE = $(OPENSSH_VERSION_MINOR) 12 | OPENSSH_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable 13 | OPENSSH_LICENSE = BSD-3-Clause, BSD-2-Clause, Public Domain 14 | OPENSSH_LICENSE_FILES = LICENCE 15 | 16 | OPENSSH_CONF_ENV = \ 17 | LD="$(TARGET_CC)" \ 18 | LDFLAGS="$(TARGET_CFLAGS)" \ 19 | LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl` 20 | OPENSSH_CPE_ID_VENDOR = openbsd 21 | OPENSSH_CONF_OPTS = \ 22 | --sysconfdir=/etc/ssh \ 23 | --with-default-path=$(BR2_SYSTEM_DEFAULT_PATH) \ 24 | $(if $(BR2_PACKAGE_OPENSSH_SANDBOX),--with-sandbox,--without-sandbox) \ 25 | --disable-lastlog \ 26 | --disable-utmp \ 27 | --disable-utmpx \ 28 | --disable-wtmp \ 29 | --disable-wtmpx \ 30 | --disable-strip 31 | 32 | OPENSSH_SELINUX_MODULES = ssh 33 | 34 | define OPENSSH_PERMISSIONS 35 | /var/empty d 755 root root - - - - - 36 | endef 37 | 38 | ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_110934),y) 39 | OPENSSH_CONF_OPTS += --without-hardening 40 | endif 41 | 42 | ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),) 43 | OPENSSH_CONF_OPTS += --without-pie 44 | endif 45 | 46 | OPENSSH_DEPENDENCIES = host-pkgconf zlib openssl 47 | 48 | # crypt() in libcrypt only required for sshd. 49 | ifeq ($(BR2_PACKAGE_OPENSSH_SERVER)$(BR2_PACKAGE_LIBXCRYPT),yy) 50 | OPENSSH_DEPENDENCIES += libxcrypt 51 | endif 52 | 53 | ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y) 54 | OPENSSH_DEPENDENCIES += cryptodev-linux 55 | OPENSSH_CONF_OPTS += --with-ssl-engine 56 | else 57 | OPENSSH_CONF_OPTS += --without-ssl-engine 58 | endif 59 | 60 | ifeq ($(BR2_PACKAGE_AUDIT),y) 61 | OPENSSH_DEPENDENCIES += audit 62 | OPENSSH_CONF_OPTS += --with-audit=linux 63 | else 64 | OPENSSH_CONF_OPTS += --without-audit 65 | endif 66 | 67 | ifeq ($(BR2_PACKAGE_LINUX_PAM),y) 68 | define OPENSSH_INSTALL_PAM_CONF 69 | $(INSTALL) -D -m 644 $(@D)/contrib/sshd.pam.generic $(TARGET_DIR)/etc/pam.d/sshd 70 | $(SED) '\%password required /lib/security/pam_cracklib.so%d' $(TARGET_DIR)/etc/pam.d/sshd 71 | $(SED) 's/\#UsePAM no/UsePAM yes/' $(TARGET_DIR)/etc/ssh/sshd_config 72 | endef 73 | 74 | OPENSSH_DEPENDENCIES += linux-pam 75 | OPENSSH_CONF_OPTS += --with-pam 76 | OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_PAM_CONF 77 | else 78 | OPENSSH_CONF_OPTS += --without-pam 79 | endif 80 | 81 | ifeq ($(BR2_PACKAGE_LIBSELINUX),y) 82 | OPENSSH_DEPENDENCIES += libselinux 83 | OPENSSH_CONF_OPTS += --with-selinux 84 | else 85 | OPENSSH_CONF_OPTS += --without-selinux 86 | endif 87 | 88 | ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y) 89 | define OPENSSH_INSTALL_SYSTEMD_SYSUSERS 90 | $(INSTALL) -m 0644 -D package/openssh/sshd-sysusers.conf \ 91 | $(TARGET_DIR)/usr/lib/sysusers.d/sshd.conf 92 | endef 93 | else 94 | define OPENSSH_USERS 95 | sshd -1 sshd -1 * /var/empty - - SSH drop priv user 96 | endef 97 | endif 98 | 99 | # Let the default install rule only install the configuration file. 100 | # The programs will be installed based on the config options selected. 101 | OPENSSH_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-sysconf 102 | 103 | ifeq ($(BR2_PACKAGE_OPENSSH_CLIENT),y) 104 | define OPENSSH_INSTALL_CLIENT_PROGRAMS 105 | $(INSTALL) -D -m 0755 $(@D)/ssh $(TARGET_DIR)/usr/bin/ssh 106 | $(INSTALL) -D -m 0755 $(@D)/scp $(TARGET_DIR)/usr/bin/scp 107 | $(INSTALL) -D -m 0755 $(@D)/sftp $(TARGET_DIR)/usr/bin/sftp 108 | $(INSTALL) -D -m 0755 $(@D)/ssh-agent $(TARGET_DIR)/usr/bin/ssh-agent 109 | $(INSTALL) -D -m 0755 $(@D)/ssh-add $(TARGET_DIR)/usr/bin/ssh-add 110 | $(INSTALL) -D -m 4711 $(@D)/ssh-keysign $(TARGET_DIR)/usr/libexec/ssh-keysign 111 | $(INSTALL) -D -m 0755 $(@D)/ssh-pkcs11-helper $(TARGET_DIR)/usr/libexec/ssh-pkcs11-helper 112 | $(INSTALL) -D -m 0755 $(@D)/contrib/ssh-copy-id $(TARGET_DIR)/usr/bin/ssh-copy-id 113 | endef 114 | OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_CLIENT_PROGRAMS 115 | endif 116 | 117 | ifeq ($(BR2_PACKAGE_OPENSSH_SERVER),y) 118 | define OPENSSH_INSTALL_SERVER_PROGRAMS 119 | $(INSTALL) -D -m 0755 $(@D)/sshd $(TARGET_DIR)/usr/sbin/sshd 120 | $(INSTALL) -D -m 0755 $(@D)/sshd-session $(TARGET_DIR)/usr/libexec/sshd-session 121 | $(INSTALL) -D -m 0755 $(@D)/sftp-server $(TARGET_DIR)/usr/libexec/sftp-server 122 | endef 123 | OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_SERVER_PROGRAMS 124 | 125 | define OPENSSH_INSTALL_INIT_SYSTEMD 126 | $(INSTALL) -D -m 644 package/openssh/sshd.service \ 127 | $(TARGET_DIR)/usr/lib/systemd/system/sshd.service 128 | $(OPENSSH_INSTALL_SYSTEMD_SYSUSERS) 129 | endef 130 | 131 | define OPENSSH_INSTALL_INIT_SYSV 132 | $(INSTALL) -D -m 755 package/openssh/S50sshd \ 133 | $(TARGET_DIR)/etc/init.d/disabled/S50sshd 134 | endef 135 | endif 136 | 137 | ifeq ($(BR2_PACKAGE_OPENSSH_KEY_UTILS),y) 138 | define OPENSSH_INSTALL_KEY_UTILS 139 | $(INSTALL) -D -m 0755 $(@D)/ssh-keygen $(TARGET_DIR)/usr/bin/ssh-keygen 140 | $(INSTALL) -D -m 0755 $(@D)/ssh-keyscan $(TARGET_DIR)/usr/bin/ssh-keyscan 141 | endef 142 | OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_KEY_UTILS 143 | endif 144 | 145 | $(eval $(autotools-package)) 146 | -------------------------------------------------------------------------------- /external/buildroot/package/openssh/sshd-sysusers.conf: -------------------------------------------------------------------------------- 1 | u sshd - "SSH drop priv user" /var/empty 2 | -------------------------------------------------------------------------------- /external/buildroot/package/openssh/sshd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OpenSSH server daemon 3 | After=syslog.target network.target auditd.service 4 | 5 | [Service] 6 | ExecStartPre=/usr/bin/ssh-keygen -A 7 | ExecStart=/usr/sbin/sshd -D -e 8 | ExecReload=/bin/kill -HUP $MAINPID 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/10-mongoose-args: -------------------------------------------------------------------------------- 1 | SWUPDATE_WEBSERVER_ARGS="-r /var/www/swupdate ${SWUPDATE_MONGOOSE_EXTRA_ARGS:--p 8080}" 2 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/90-start-progress: -------------------------------------------------------------------------------- 1 | exec /usr/bin/swupdate-progress -w -r & 2 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_SWUPDATE 2 | bool "swupdate" 3 | depends on !BR2_STATIC_LIBS 4 | depends on BR2_TOOLCHAIN_HAS_THREADS 5 | depends on BR2_USE_MMU # fork() 6 | # swupdate requires a parser and uses libconfig as default 7 | select BR2_PACKAGE_LIBCONFIG if !BR2_PACKAGE_JSON_C && \ 8 | !BR2_PACKAGE_HAS_LUAINTERPRETER 9 | help 10 | swupdate provides a reliable way to update the software on 11 | an embedded system. 12 | 13 | swupdate is highly configurable to fit the targets 14 | requirements and to minimize the footprint. The provided 15 | default configuration file BR2_PACKAGE_SWUPDATE_CONFIG will 16 | enable swupdate with an embedded webserver, a parser and a 17 | handler for raw NAND or NOR flash. 18 | 19 | The default configuration file builds a reasonable firmware 20 | update system with minimal external dependencies in mind. 21 | If you like to use your own modified configuration, 22 | you have to select the necessary packages manually: 23 | 24 | * Select BR2_PACKAGE_LUA or BR2_PACKAGE_LUAJIT if you want 25 | want to have Lua support. 26 | * Select BR2_PACKAGE_LIBCURL if you want to use the download 27 | feature. 28 | * Select BR2_PACKAGE_OPENSSL or BR2_PACKAGE_MBEDTLS if you 29 | want to add encryption support. 30 | * Select BR2_PACKAGE_MTD if you want to use swupdate with 31 | UBI partitions. 32 | * Select BR2_PACKAGE_ZLIB if you want to deal with gzip 33 | compressed archives. 34 | * Select BR2_PACKAGE_ZSTD if you want to deal with zstd 35 | compressed archives. 36 | * Select BR2_PACKAGE_ZEROMQ to add support for using a 37 | remote handler. 38 | * Select BR2_PACKAGE_LIBRSYNC to add support for using 39 | rdiff handler. 40 | * Select BR2_PACKAGE_LIBUBOOTENV to add support for setting 41 | the U-Boot environment. 42 | * Select BR2_PACKAGE_LIBGPIOD to add support for 43 | microcontroller firmware update. 44 | * Select BR2_PACKAGE_EFIBOOTMGR to add support for EFI Boot 45 | Guard. 46 | * Select BR2_PACKAGE_LIBCURL, BR2_PACKAGE_JSON_C, 47 | BR2_PACKAGE_LIBWEBSOCKETS, and BR2_PACKAGE_LIBURIPARSER 48 | to add support for the SWU forwarder. 49 | 50 | https://sbabic.github.io/swupdate 51 | 52 | if BR2_PACKAGE_SWUPDATE 53 | 54 | config BR2_PACKAGE_SWUPDATE_CONFIG 55 | string "swupdate configuration file" 56 | default "package/swupdate/swupdate.config" 57 | help 58 | Path to the swupdate configuration file. 59 | 60 | I you wish to use your own modified swupdate configuration 61 | file specify the config file location with this option. 62 | 63 | config BR2_PACKAGE_SWUPDATE_USB 64 | bool "swupdate usb" 65 | depends on BR2_PACKAGE_SYSTEMD 66 | help 67 | Enable update from USB disk. 68 | 69 | comment "swupdate usb needs systemd" 70 | depends on !BR2_PACKAGE_SYSTEMD 71 | 72 | config BR2_PACKAGE_SWUPDATE_WEBSERVER 73 | bool "swupdate webserver" 74 | default y 75 | help 76 | Enable update from remote using a web server on the target. 77 | 78 | config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE 79 | bool "install default website" 80 | default y 81 | depends on BR2_PACKAGE_SWUPDATE_WEBSERVER 82 | help 83 | Install the provided website to /var/www/swupdate. 84 | 85 | This is necessary if you want to run swupdate with the 86 | embedded webserver and do not provide an own website to be 87 | installed to /var/www/swupdate. 88 | endif 89 | 90 | comment "swupdate needs a toolchain w/ dynamic library, threads" 91 | depends on BR2_USE_MMU 92 | depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS 93 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/S80swupdate: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DAEMON="swupdate" 4 | DAEMON_WRAPPER="/usr/lib/swupdate/swupdate.sh" 5 | PIDFILE="/var/run/$DAEMON.pid" 6 | 7 | start() { 8 | printf 'Starting %s: ' "$DAEMON" 9 | start-stop-daemon -S -q -b -m -p "$PIDFILE" -x $DAEMON_WRAPPER 10 | status=$? 11 | if [ "$status" -eq 0 ]; then 12 | echo "OK" 13 | else 14 | echo "FAIL" 15 | fi 16 | return "$status" 17 | } 18 | 19 | stop() { 20 | printf 'Stopping %s: ' "$DAEMON" 21 | start-stop-daemon -K -q -p "$PIDFILE" 22 | status=$? 23 | if [ "$status" -eq 0 ]; then 24 | echo "OK" 25 | else 26 | echo "FAIL" 27 | fi 28 | return "$status" 29 | } 30 | 31 | restart() { 32 | stop 33 | sleep 1 34 | start 35 | } 36 | 37 | case "$1" in 38 | start|stop|restart) 39 | # "$1" 40 | ;; 41 | reload) 42 | # Restart, since there is no true "reload" feature (does not 43 | # reconfigure/restart on SIGHUP, just closes all open files). 44 | # restart 45 | ;; 46 | *) 47 | echo "Usage: $0 {start|stop|restart|reload}" 48 | exit 1 49 | esac 50 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/swupdate-progress.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=swupdate progress service 3 | After=swupdate.service 4 | 5 | [Service] 6 | ExecStart=/usr/bin/swupdate-progress -r -w 7 | 8 | [Install] 9 | WantedBy=swupdate.service 10 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/swupdate-usb.rules: -------------------------------------------------------------------------------- 1 | ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block", ENV{ID_BUS}=="usb", ENV{ID_FS_USAGE}=="filesystem", TAG+="systemd", ENV{SYSTEMD_WANTS}+="swupdate-usb@%k.service" 2 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/swupdate-usb@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=usb media swupdate service 3 | Requires=swupdate.service 4 | Requires=swupdate-progress.service 5 | 6 | [Service] 7 | ExecStartPre=/bin/mount /dev/%I /mnt 8 | ExecStart=/bin/sh -c "swupdate-client -v /mnt/*.swu" 9 | ExecStopPost=/bin/umount /mnt 10 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/swupdate.config: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file; DO NOT EDIT. 3 | # Swupdate Configuration 4 | # 5 | CONFIG_HAVE_DOT_CONFIG=y 6 | 7 | # 8 | # Swupdate Settings 9 | # 10 | 11 | # 12 | # General Configuration 13 | # 14 | # CONFIG_CURL is not set 15 | # CONFIG_CURL_SSL is not set 16 | # CONFIG_SYSTEMD is not set 17 | CONFIG_DEFAULT_CONFIG_FILE="/etc/swupdate.cfg" 18 | CONFIG_SCRIPTS=y 19 | # CONFIG_HW_COMPATIBILITY is not set 20 | CONFIG_SW_VERSIONS_FILE="/etc/issue" 21 | 22 | # 23 | # Socket Paths 24 | # 25 | CONFIG_SOCKET_CTRL_PATH="/tmp/sockinstctrl" 26 | CONFIG_SOCKET_PROGRESS_PATH="/tmp/swupdateprog" 27 | CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/" 28 | 29 | # 30 | # MTD support needs libmtd 31 | # 32 | 33 | # 34 | # Lua support needs a Lua interpreter 35 | # 36 | # CONFIG_FEATURE_SYSLOG is not set 37 | 38 | # 39 | # Build Options 40 | # 41 | CONFIG_CROSS_COMPILE="" 42 | CONFIG_SYSROOT="" 43 | CONFIG_EXTRA_CFLAGS="" 44 | CONFIG_EXTRA_LDFLAGS="" 45 | CONFIG_EXTRA_LDLIBS="" 46 | 47 | # 48 | # Debugging Options 49 | # 50 | # CONFIG_DEBUG is not set 51 | # CONFIG_WERROR is not set 52 | # CONFIG_NOCLEANUP is not set 53 | 54 | # 55 | # EFI Boot Guard needs libebgenv and libz 56 | # 57 | CONFIG_BOOTLOADER_NONE=y 58 | # CONFIG_BOOTLOADER_GRUB is not set 59 | 60 | # 61 | # U-Boot support needs libubootenv, libz 62 | # 63 | CONFIG_SSL_IMPL_NONE=y 64 | 65 | # 66 | # Image downloading support needs libcurl 67 | # 68 | 69 | # 70 | # Hash checking needs an SSL implementation 71 | # 72 | 73 | # 74 | # Image signature verification needs an SSL implementation 75 | # 76 | 77 | # 78 | # Image encryption needs an SSL implementation 79 | # 80 | # CONFIG_SURICATTA is not set 81 | CONFIG_WEBSERVER=y 82 | CONFIG_MONGOOSE=y 83 | CONFIG_MONGOOSEIPV6=y 84 | 85 | # 86 | # SSL support needs an SSL implementation 87 | # 88 | 89 | # 90 | # Parser Features 91 | # 92 | CONFIG_LIBCONFIG=y 93 | CONFIG_PARSERROOT="" 94 | 95 | # 96 | # JSON config parser support needs json-c 97 | # 98 | # CONFIG_SETSWDESCRIPTION is not set 99 | 100 | # 101 | # Image Handlers 102 | # 103 | 104 | # 105 | # ubivol support needs libubi 106 | # 107 | # CONFIG_DISKPART is not set 108 | CONFIG_RAW=y 109 | # CONFIG_RDIFFHANDLER is not set 110 | # CONFIG_SHELLSCRIPTHANDLER is not set 111 | 112 | # 113 | # archive support needs libarchive 114 | # 115 | 116 | # 117 | # remote handler needs zeromq 118 | # 119 | 120 | # 121 | # swuforward handler needs json-c and curl 122 | # 123 | 124 | # 125 | # SWU forwarder requires libcurl 126 | # 127 | 128 | # 129 | # swuforward handler needs json-c and curl 130 | # 131 | CONFIG_BOOTLOADERHANDLER=y 132 | CONFIG_UBOOT=y 133 | CONFIG_BOOTLOADER_DEFAULT_UBOOT=y 134 | CONFIG_UBOOT_DEFAULTENV="/dev/mmcblk0p2" 135 | 136 | # 137 | # Microcontroller handler depends on libgpiod 138 | # 139 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/swupdate.hash: -------------------------------------------------------------------------------- 1 | # Locally calculated 2 | sha256 e6335e87812a98a87f1c55df03c9f4e4ef042789570002c5db120b09f64b0d86 swupdate-2022.12.tar.gz 3 | sha256 4cf04ed34ff0ebbf5c71345b56e6af5093fc17206364cca0ebbae92ef3940683 LICENSES/BSD-1-Clause.txt 4 | sha256 e27a3e87706b3aa5ff2e50eaafe2e6ed5397fbf2d7679eaf444a6d000518a3a6 LICENSES/BSD-3-Clause.txt 5 | sha256 0558101984550fa84d1d13c2af11d116c20079d2be58711e8d99cadce7009192 LICENSES/CC0-1.0.txt 6 | sha256 cde7883b9050a1104f4ac19a1572aafd6e5d7323b68351aaf51fbf4beba54966 LICENSES/CC-BY-SA-4.0.txt 7 | sha256 5d51b52a40391a26cbb2accf5dc5d1c165de49a022d9d5efb50b22204d2682ec LICENSES/GPL-2.0-only.txt 8 | sha256 43fd695e9b198a9a4997cc2d02e10d26cae937e2c4930b9eff9c6d349c85cd32 LICENSES/GPL-2.0-or-later.txt 9 | sha256 492e801f1b0632185431472f148885a4fe8e990b10da57b4986a8bcf140a5374 LICENSES/ISC.txt 10 | sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LICENSES/LGPL-2.1-or-later.txt 11 | sha256 89807acf2309bd285f033404ee78581602f3cd9b819a16ac2f0e5f60ff4a473e LICENSES/MIT.txt 12 | sha256 8f2368a292194be10b1223a8875815240a9208bb30785cb13d8849eb6a750fe9 LICENSES/OFL-1.1.txt 13 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/swupdate.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=SWUpdate daemon 3 | Documentation=https://github.com/sbabic/swupdate 4 | Documentation=https://sbabic.github.io/swupdate 5 | 6 | [Service] 7 | Type=notify 8 | ExecStart=/usr/lib/swupdate/swupdate.sh 9 | KillMode=mixed 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/swupdate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Based on example script created by Adrian Freihofer 4 | # https://github.com/sbabic/meta-swupdate/blob/master/recipes-support/swupdate/swupdate/swupdate.sh 5 | 6 | # Override these variables in sourced script(s) located 7 | # in /usr/lib/swupdate/conf.d or /etc/swupdate/conf.d 8 | # NOTE: There are substrings used in some swupdate commands which will 9 | # need to be wrapped in a script to prevent tokenizing 10 | # ( -p/-P post/pre cmds are good examples) 11 | SWUPDATE_ARGS="-v ${SWUPDATE_EXTRA_ARGS}" 12 | SWUPDATE_WEBSERVER_ARGS="" 13 | SWUPDATE_SURICATTA_ARGS="" 14 | 15 | # source all files from /etc/swupdate/conf.d and /usr/lib/swupdate/conf.d/ 16 | # A file found in /etc replaces the same file in /usr 17 | for f in `(test -d /usr/lib/swupdate/conf.d/ && ls -1 /usr/lib/swupdate/conf.d/; test -d /etc/swupdate/conf.d && ls -1 /etc/swupdate/conf.d) | sort -u`; do 18 | if [ -f /etc/swupdate/conf.d/$f ]; then 19 | . /etc/swupdate/conf.d/$f 20 | else 21 | . /usr/lib/swupdate/conf.d/$f 22 | fi 23 | done 24 | 25 | if [ "$SWUPDATE_WEBSERVER_ARGS" != "" -a "$SWUPDATE_SURICATTA_ARGS" != "" ]; then 26 | exec /usr/bin/swupdate $SWUPDATE_ARGS -w "$SWUPDATE_WEBSERVER_ARGS" -u "$SWUPDATE_SURICATTA_ARGS" 27 | elif [ "$SWUPDATE_WEBSERVER_ARGS" != "" ]; then 28 | exec /usr/bin/swupdate $SWUPDATE_ARGS -w "$SWUPDATE_WEBSERVER_ARGS" 29 | elif [ "$SWUPDATE_SURICATTA_ARGS" != "" ]; then 30 | exec /usr/bin/swupdate $SWUPDATE_ARGS -u "$SWUPDATE_SURICATTA_ARGS" 31 | else 32 | exec /usr/bin/swupdate $SWUPDATE_ARGS 33 | fi 34 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/swupdate.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=SWUpdate socket listener 3 | Documentation=https://github.com/sbabic/swupdate 4 | Documentation=https://sbabic.github.io/swupdate 5 | 6 | [Socket] 7 | ListenStream=/tmp/sockinstctrl 8 | ListenStream=/tmp/swupdateprog 9 | 10 | [Install] 11 | WantedBy=sockets.target 12 | -------------------------------------------------------------------------------- /external/buildroot/package/swupdate/tmpfiles-swupdate.conf: -------------------------------------------------------------------------------- 1 | X /tmp/datadst 2 | X /tmp/scripts 3 | -------------------------------------------------------------------------------- /external/configs/sg2002_recamera_emmc_defconfig: -------------------------------------------------------------------------------- 1 | ../build/boards/cv181x/sg2002_recamera_emmc/sg2002_recamera_emmc_defconfig -------------------------------------------------------------------------------- /external/configs/sg2002_recamera_sd_defconfig: -------------------------------------------------------------------------------- 1 | ../build/boards/cv181x/sg2002_recamera_sd/sg2002_recamera_sd_defconfig -------------------------------------------------------------------------------- /external/configs/sg2002_xiao_sd_defconfig: -------------------------------------------------------------------------------- 1 | ../build/boards/cv181x/sg2002_xiao_sd/sg2002_xiao_sd_defconfig -------------------------------------------------------------------------------- /external/isp_tuning/cv181x/src/ov_ov5647/ov_ov5647_sdr.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Seeed-Studio/reCamera-OS/89d24f67cf269f4858928d8810e36845298ab784/external/isp_tuning/cv181x/src/ov_ov5647/ov_ov5647_sdr.bin -------------------------------------------------------------------------------- /external/ramdisk/rootfs/overlay/cv181x_musl_riscv64/system/auto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ${CVI_SHOPTS} 3 | 4 | # boot success, clean boot_cnt 5 | if [ $(fw_printenv boot_cnt) != "boot_cnt=0" ]; then 6 | fw_setenv boot_cnt 0; 7 | fi 8 | 9 | # rootfs read only 10 | rootfs_rw off > /dev/null 2>&1 11 | 12 | # default app 13 | if [ ! -f "/tmp/evb_init" ]; then 14 | echo 1 > /tmp/evb_init 15 | DEFAULT_APP=/mnt/system/default_app 16 | if [ -x $DEFAULT_APP ]; then 17 | $DEFAULT_APP > /dev/null 2>&1 & 18 | echo "$(realpath $DEFAULT_APP) started" 19 | fi 20 | fi 21 | -------------------------------------------------------------------------------- /external/ramdisk/rootfs/overlay/cv181x_musl_riscv64/system/auto_download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | URL_DEFAULT="https://github.com/Seeed-Studio/reCamera-OS/releases/latest" 4 | URL_BAKEUP1="" 5 | 6 | URL_LIST=("$URL_DEFAULT" "$URL_BAKEUP1") 7 | 8 | UPGRADE="/mnt/system/upgrade.sh" 9 | function get_latest() { 10 | local url=$1 11 | $UPGRADE latest "$url" > /dev/null 2>&1 12 | $UPGRADE latest q 13 | } 14 | 15 | function get_download() { 16 | local url=$1 17 | $UPGRADE download > /dev/null 2>&1 18 | $UPGRADE download q 19 | } 20 | 21 | DEFAULT_SLEEP=60 22 | 23 | # clean all 24 | $UPGRADE clean > /dev/null 2>&1 25 | 26 | while true; do 27 | # check custom url 28 | custom_url="$(cat /etc/upgrade 2>&1)" 29 | if [ ! -z "$custom_url" ]; then 30 | custom=$(echo "$custom_url" | awk -F',' '{print $1}') 31 | url=$(echo "$custom_url" | awk -F',' '{print $2}') 32 | fi 33 | if [ $custom -eq "1" ]; then 34 | result=$(get_latest "$url") 35 | ret=$(echo "$result" | awk '{print $1}') 36 | if [ "$ret" == "error" ]; then 37 | continue; 38 | fi 39 | need_download=$(echo "$ret" | awk -F',' '{print $1}') 40 | else 41 | # get latest 42 | for url in "${URL_LIST[@]}"; do 43 | if [ -z "$url" ]; then continue; fi 44 | 45 | result=$(get_latest "$url") 46 | ret=$(echo "$result" | awk '{print $1}') 47 | if [ "$ret" == "error" ]; then 48 | continue; 49 | fi 50 | 51 | need_download=$(echo "$ret" | awk -F',' '{print $1}') 52 | if [ ! -z $need_download ] && [ "$need_download" != "0" ]; then 53 | break; 54 | fi 55 | done 56 | fi 57 | if [ ! -z $need_download ] && [ "$need_download" != "0" ]; then 58 | break; 59 | fi 60 | 61 | sleep $DEFAULT_SLEEP 62 | done 63 | 64 | while true; do 65 | result=$(get_download) 66 | if [ "$result" = "ready" ]; then 67 | break; 68 | fi 69 | 70 | sleep $DEFAULT_SLEEP 71 | done 72 | 73 | exit 0 -------------------------------------------------------------------------------- /external/ramdisk/rootfs/overlay/cv181x_musl_riscv64/system/ko/loadsystemko.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ${CVI_SHOPTS} 3 | # 4 | # Start to insert kernel modules 5 | # 6 | insmod /mnt/system/ko/cv181x_sys.ko 7 | insmod /mnt/system/ko/cv181x_base.ko 8 | insmod /mnt/system/ko/cv181x_rtos_cmdqu.ko 9 | insmod /mnt/system/ko/cv181x_fast_image.ko 10 | insmod /mnt/system/ko/cvi_mipi_rx.ko 11 | insmod /mnt/system/ko/snsr_i2c.ko 12 | insmod /mnt/system/ko/cv181x_vi.ko vi_log_lv=1 13 | insmod /mnt/system/ko/cv181x_vpss.ko vpss_log_lv=1 14 | insmod /mnt/system/ko/cv181x_dwa.ko 15 | insmod /mnt/system/ko/cv181x_vo.ko vo_log_lv=1 16 | insmod /mnt/system/ko/cv181x_mipi_tx.ko 17 | insmod /mnt/system/ko/cv181x_rgn.ko 18 | 19 | #insmod /mnt/system/ko/cv181x_wdt.ko 20 | insmod /mnt/system/ko/cv181x_clock_cooling.ko 21 | 22 | insmod /mnt/system/ko/cv181x_tpu.ko 23 | insmod /mnt/system/ko/cv181x_vcodec.ko 24 | insmod /mnt/system/ko/cv181x_jpeg.ko 25 | insmod /mnt/system/ko/cvi_vc_driver.ko MaxVencChnNum=9 MaxVdecChnNum=9 26 | #insmod /mnt/system/ko/cv181x_rtc.ko 27 | insmod /mnt/system/ko/cv181x_ive.ko 28 | 29 | insmod /mnt/system/ko/cfg80211.ko 30 | insmod /mnt/system/ko/brcmutil.ko 31 | insmod /mnt/system/ko/brcmfmac.ko 32 | 33 | echo 3 > /proc/sys/vm/drop_caches 34 | dmesg -n 4 35 | 36 | if [ ! -e /dev/mmcblk1 ] && [ -x /usr/bin/gimbal ]; then 37 | /usr/bin/gimbal init > /dev/null 38 | /usr/bin/gimbal cali > /dev/null& 39 | fi 40 | 41 | #usb hub control 42 | #/etc/uhubon.sh host 43 | 44 | exit $? 45 | -------------------------------------------------------------------------------- /external/ramdisk/rootfs/overlay/cv181x_musl_riscv64/system/rootfs_overlay.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | OVERLAY_PATH="" 4 | OVERLAY_WORK_PATH="" 5 | 6 | # file permissions 7 | if [ -f /usr/bin/fw_setenv ]; then 8 | chmod 500 /usr/bin/fw_setenv 9 | fi 10 | 11 | # swap 12 | function setup_swap() { 13 | local swapfile="/userdata/.swapfile" 14 | if [ ! -f $swapfile ]; then 15 | fallocate -l 256M $swapfile 16 | chmod 600 $swapfile 17 | mkswap $swapfile 18 | fi 19 | swapon $swapfile 20 | } 21 | 22 | # rootfs_overlay 23 | function mount_dir() { 24 | local lower=$1 25 | local upper=${OVERLAY_PATH}${lower} 26 | local work=${OVERLAY_WORK_PATH}${lower} 27 | mkdir -p $upper $work 28 | mount -t overlay overlay -o lowerdir=$lower,upperdir=$upper,workdir=$work $lower 29 | echo "overlay $lower on $upper" 30 | } 31 | 32 | function rootfs_overlay() { 33 | OVERLAY_PATH=$1/.overlay_fs 34 | OVERLAY_WORK_PATH=$OVERLAY_PATH/.work 35 | 36 | if [ ! -d $OVERLAY_PATH ]; then 37 | mkdir -p $OVERLAY_PATH $OVERLAY_WORK_PATH 38 | fi 39 | if [ ! -d $OVERLAY_PATH ]; then 40 | echo "$OVERLAY_PATH not exist" 41 | exit 1 42 | fi 43 | 44 | # mount overlay directories 45 | mount_dir /bin 46 | mount_dir /etc 47 | mount_dir /lib 48 | mount_dir /home 49 | mount_dir /root 50 | mount_dir /usr 51 | mount_dir /var 52 | 53 | mount -a 54 | } 55 | 56 | function force_remove() { 57 | local file="/userdata/.overlay_fs/etc/issue" 58 | if [ -f $file ]; then 59 | rm -f $file 60 | fi 61 | 62 | file="/userdata/.overlay_fs/etc/CHANGELOG.md" 63 | if [ -f $file ]; then 64 | rm -f $file 65 | fi 66 | } 67 | 68 | USERDATA_PARTITION="/dev/mmcblk0p6" 69 | 70 | # force write boot 71 | BOOT_OTA="/mnt/system/resources/boot_ota.zip" 72 | if [ -f $BOOT_OTA ]; then 73 | /mnt/system/upgrade.sh start $BOOT_OTA 74 | rootfs_rw on 75 | rm -rf $BOOT_OTA 76 | rootfs_rw off 77 | reboot 78 | fi 79 | 80 | # reset factory 81 | if [ ! -d /sys/class/gpio/gpio510 ]; then 82 | echo "510" > /sys/class/gpio/export 83 | fi 84 | if [ -d /sys/class/gpio/gpio510 ]; then 85 | echo "in" > /sys/class/gpio/gpio510/direction 86 | if [ $(cat /sys/class/gpio/gpio510/value) == "0" ]; then 87 | sleep 1 88 | if [ $(cat /sys/class/gpio/gpio510/value) == "0" ]; then 89 | /mnt/system/upgrade.sh recovery 90 | fi 91 | fi 92 | fi 93 | 94 | if [ $(fw_printenv factory_reset) == "factory_reset=1" ]; then 95 | echo "factory reset" 96 | echo none > /sys/devices/platform/leds/leds/red/trigger 97 | echo 255 > /sys/devices/platform/leds/leds/red/brightness 98 | 99 | # step1: recovery rootfs 100 | /mnt/system/upgrade.sh start 101 | # step2: erase userdata partition 102 | dd if=/dev/zero of=$USERDATA_PARTITION bs=1M count=5 103 | # step3: clear flag 104 | fw_setenv factory_reset 105 | sync 106 | reboot 107 | fi 108 | 109 | # mount userdata partition 110 | if [ -e $USERDATA_PARTITION ]; then 111 | USERDATA_MOUNTPOINT="/userdata" 112 | MKFS_FLAG="N" 113 | fs_type=$(/sbin/blkid -o value -s TYPE $USERDATA_PARTITION) 114 | echo "userdata partition type: ${fs_type}" 115 | if [ "$fs_type" == "" ]; then 116 | mkfs.ext4 $USERDATA_PARTITION 117 | MKFS_FLAG="Y" 118 | fs_type=$(blkid -o value -s TYPE $USERDATA_PARTITION) 119 | fi 120 | if [ "$fs_type" != "" ]; then 121 | if [ ! -d $USERDATA_MOUNTPOINT ]; then 122 | mkdir -p $USERDATA_MOUNTPOINT 123 | fi 124 | 125 | mp=$(mountpoint -n $USERDATA_MOUNTPOINT | awk '{print $1}') 126 | echo "mountpoint=$mp" 127 | if [ $mp != $USERDATA_PARTITION ]; then 128 | mount $USERDATA_PARTITION $USERDATA_MOUNTPOINT 129 | fi 130 | mp=$(mountpoint -n $USERDATA_MOUNTPOINT | awk '{print $1}') 131 | if [ $mp == $USERDATA_PARTITION ]; then 132 | echo "userdata partition mounted successfully" 133 | if [ $MKFS_FLAG == "Y" ]; then 134 | chown -R recamera:recamera $USERDATA_MOUNTPOINT 135 | rm -rf $USERDATA_MOUNTPOINT/* 136 | 137 | fi 138 | setup_swap 139 | force_remove 140 | rootfs_overlay $USERDATA_MOUNTPOINT 141 | fi 142 | fi 143 | fi 144 | -------------------------------------------------------------------------------- /external/ramdisk/rootfs/overlay/cv181x_musl_riscv64/system/usb-ncm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | /etc/uhubon.sh device >> /tmp/ncm.log 2>&1 4 | /etc/run_usb.sh probe ncm >> /tmp/ncm.log 2>&1 5 | /etc/run_usb.sh start ncm >> /tmp/ncm.log 2>&1 6 | 7 | # sleep 0.5 8 | # ifconfig usb0 192.168.42.1 9 | 10 | # count=`ps | grep dnsmasq | grep -v grep | wc -l` 11 | # if [ ${count} -lt 1 ] ;then 12 | # echo "/etc/init.d/S80dnsmasq start" >> /tmp/ncm.log 2>&1 13 | # /etc/init.d/S80dnsmasq start >> /tmp/ncm.log 2>&1 14 | # fi 15 | -------------------------------------------------------------------------------- /external/ramdisk/rootfs/overlay/cv181x_musl_riscv64/system/usb-net.sh: -------------------------------------------------------------------------------- 1 | ./usb-ncm.sh -------------------------------------------------------------------------------- /external/ramdisk/rootfs/overlay/cv181x_musl_riscv64/system/usb-rndis.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | /etc/uhubon.sh device >> /tmp/rndis.log 2>&1 4 | /etc/run_usb.sh probe rndis >> /tmp/rndis.log 2>&1 5 | /etc/run_usb.sh start rndis >> /tmp/rndis.log 2>&1 6 | 7 | sleep 0.5 8 | ifconfig usb0 192.168.42.1 9 | 10 | count=`ps | grep dnsmasq | grep -v grep | wc -l` 11 | if [ ${count} -lt 1 ] ;then 12 | echo "/etc/init.d/S80dnsmasq start" >> /tmp/rndis.log 2>&1 13 | /etc/init.d/S80dnsmasq start >> /tmp/rndis.log 2>&1 14 | fi 15 | -------------------------------------------------------------------------------- /external/setenv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function rsync_dir() 4 | { 5 | if [ ! -d $1 ]; then 6 | echo "$1 not exist" 7 | return 8 | fi 9 | mkdir -p $PROJECT_OUT/$2 10 | echo "rsync $1 -> $PROJECT_OUT/$2"; rsync -a --exclude='.git' $1 $PROJECT_OUT/$2 || exit 1 11 | } 12 | 13 | ################################### 14 | # rsync codes 15 | ################################### 16 | mkdir -p $PROJECT_OUT 17 | rsync_dir ./build 18 | rsync_dir ./freertos 19 | rsync_dir ./FreeRTOS-Kernel/ freertos/Source/ 20 | rsync_dir ./Lab-Project-FreeRTOS-POSIX/ freertos/Source/FreeRTOS-Plus-POSIX/ 21 | rsync_dir ./fsbl 22 | rsync_dir ./opensbi 23 | rsync_dir ./$UBOOT_DIR 24 | rsync_dir ./$LINUX_DIR 25 | rsync_dir ./ramdisk 26 | rsync_dir ./osdrv 27 | rsync_dir ./cvi_mpi 28 | rsync_dir ./oss 29 | rsync_dir ./SensorSupportList/ cvi_mpi/component/isp 30 | rsync_dir ./$BUILDROOT_DIR 31 | rsync_dir ./cnpy 32 | rsync_dir ./cvibuilder 33 | rsync_dir ./cvikernel 34 | rsync_dir ./cvimath 35 | rsync_dir ./cviruntime 36 | rsync_dir ./flatbuffers 37 | rsync_dir ./tdl_sdk 38 | rsync_dir ./cvi_rtsp 39 | 40 | ################################### 41 | # patch externals 42 | ################################### 43 | rsync_dir $EXTERNAL/build . 44 | rsync_dir $EXTERNAL/buildroot/ $BUILDROOT_DIR/ 45 | rsync_dir $EXTERNAL/isp_tuning . 46 | rsync_dir $EXTERNAL/ramdisk/ ramdisk/ 47 | rsync_dir $EXTERNAL/u-boot/ $UBOOT_DIR/ 48 | 49 | # driver: sg200x is soft link to cv182x 50 | rsync -av $EXTERNAL/SensorSupportList/ $PROJECT_OUT/cvi_mpi/component/isp/ 51 | 52 | # patch buildroot packages 53 | for subdir in $EXTERNAL/buildroot/package/*; do 54 | if [ -d $subdir ]; then 55 | pkg_name=$(basename $subdir) 56 | if [ -f $subdir/Config.in ]; then 57 | rsync -av --delete $subdir/ $PROJECT_OUT/$BUILDROOT_DIR/package/$pkg_name/ 58 | else 59 | rsync -av $subdir/ $PROJECT_OUT/$BUILDROOT_DIR/package/$pkg_name/ 60 | fi 61 | fi 62 | done 63 | 64 | ln -sf $TOPDIR/host-tools $PROJECT_OUT/ 65 | 66 | if [ ! -e "$PROJECT_OUT/cvi_rtsp/.git" ]; then 67 | ln -s ../../../.git/modules/cvi_rtsp/ $PROJECT_OUT/cvi_rtsp/.git 68 | ls -l $PROJECT_OUT/cvi_rtsp/.git 69 | fi 70 | 71 | if [ ! -e "$PROJECT_OUT/cvi_mpi/.git" ]; then 72 | ln -s ../../../.git/modules/cvi_mpi/ $PROJECT_OUT/cvi_mpi/.git 73 | ls -l $PROJECT_OUT/cvi_mpi/.git 74 | fi 75 | 76 | ################################### 77 | # modify build/Makefile 78 | ################################### 79 | sed -i 's/${Q}$(MAKE) -C $(BR_DIR).*/${Q}$(MAKE) -C $(BR_DIR) $(BR_DEFCONFIG) BR2_TOOLCHAIN_EXTERNAL_PATH=$(CROSS_COMPILE_PATH) O=$(TARGET_OUTPUT_DIR)/' \ 80 | $PROJECT_OUT/build/Makefile 81 | sed -i 's/${Q}$(MAKE) -j${NPROC} -C $(BR_DIR).*/${Q}$(MAKE) -j${NPROC} -C $(BR_DIR) O=$(TARGET_OUTPUT_DIR)/' \ 82 | $PROJECT_OUT/build/Makefile 83 | 84 | sed -i '/EXTRA_LDFLAGS = $(LIBS).*/aEXTRA_LDFLAGS += -latomic' \ 85 | $PROJECT_OUT/cvi_mpi/sample/venc/Makefile 86 | 87 | ################################### 88 | # modify cvisetup.sh 89 | ################################### 90 | sed -i 's/^TOP_DIR=$(.*)/TOP_DIR=$PROJECT_OUT/' $PROJECT_OUT/build/cvisetup.sh 91 | echo "INFO: Change TOP_DIR to \"$PROJECT_OUT in cvisetup.sh"\" 92 | 93 | sed -i 's/CVI_TARGET_PACKAGES_LIBDIR=.*/CVI_TARGET_PACKAGES_LIBDIR=$(make --no-print-directory print-target-packages-libdir)/' \ 94 | $PROJECT_OUT/build/cvisetup.sh 95 | sed -i 's/CVI_TARGET_PACKAGES_INCLUDE=.*/CVI_TARGET_PACKAGES_INCLUDE=$(make --no-print-directory print-target-packages-include)/' \ 96 | $PROJECT_OUT/build/cvisetup.sh 97 | echo "INFO: Fixed CVI_TARGET_PACKAGES_LIBDIR & CVI_TARGET_PACKAGES_INCLUDE in cvisetup.sh"\" 98 | 99 | # overide build_middleware function 100 | sed -i 's/function build_middleware()/function _build_middleware_()/g' $PROJECT_OUT/build/cvisetup.sh 101 | sed -i 's/function pack_cfg/function _pack_cfg_/g' $PROJECT_OUT/build/common_functions.sh 102 | sed -i 's/function pack_rootfs/function _pack_rootfs_/g' $PROJECT_OUT/build/common_functions.sh 103 | 104 | # build flatbuffers 105 | sed -i 's/cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$FLATBUFFERS_HOST_PATH/cmake -G Ninja -DFLATBUFFERS_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$FLATBUFFERS_HOST_PATH/g' $PROJECT_OUT/cviruntime/build_tpu_sdk.sh 106 | 107 | # move libcvi_rtsp.so to /mnt/system/lib 108 | echo 'install(FILES ${CVI_RTSP_LIBPATH} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)' >> $PROJECT_OUT/tdl_sdk/cmake/cvi_rtsp.cmake 109 | 110 | # source cvisetup.sh 111 | TPU_REL=1 112 | source $PROJECT_OUT/build/cvisetup.sh 113 | 114 | ################################### 115 | # overwrite cvisetup.sh functions 116 | ################################### 117 | function build_middleware() 118 | {( 119 | print_notice "Run ${FUNCNAME[0]}() overided by $0" 120 | 121 | _build_middleware_ || return $? 122 | 123 | pushd "$MW_PATH" 124 | cp -fv sample/audio/sample_audio* ${SYSTEM_OUT_DIR}/usr/bin 125 | popd 126 | 127 | # ramdisk/rootfs/public/pinmux/musl_riscv64/usr/sbin/cvi_pinmux 128 | cp -fv ${RAMDISK_PATH}/rootfs/public/pinmux/${SDK_VER}/usr/sbin/cvi_pinmux ${SYSTEM_OUT_DIR}/usr/bin 129 | )} 130 | 131 | function pack_cfg 132 | {( 133 | print_notice "Run ${FUNCNAME[0]}() overided by $0" 134 | 135 | # isp parameter 136 | cp -v $TOPDIR/isp_tuning/copyBin.sh $ISP_TUNING_PATH 137 | 138 | _dir="$OUTPUT_DIR/rootfs/mnt/cfg/param" 139 | mkdir -p $_dir 140 | 141 | pushd $ISP_TUNING_PATH 142 | ./copyBin.sh $_dir $SENSOR_TUNING_PARAM 143 | popd 144 | 145 | mkdir -p $BR_OVERLAY_DIR/mnt 146 | cp -arf $OUTPUT_DIR/rootfs/mnt/cfg $BR_OVERLAY_DIR/mnt/ 147 | )} 148 | 149 | function gen_boot_zip() 150 | { 151 | echo "Run ${FUNCNAME[0]}" 152 | 153 | local targets="fip.bin boot.emmc" 154 | 155 | pushd $OUTPUT_DIR/rawimages 156 | rm -rfv ../*rawimages.zip 157 | cp -fv ../fip.bin . || exit 1 158 | md5sum $targets > md5sum.txt 159 | zip -j rawimages.zip $targets md5sum.txt || exit 1 160 | rm -rf fip.bin 161 | mv -fv rawimages.zip ../${1}.zip 162 | popd 163 | 164 | echo "${FUNCNAME[0]} ok" 165 | } 166 | 167 | function pack_rootfs 168 | {( 169 | print_notice "Run ${FUNCNAME[0]}() overided by $0" 170 | 171 | gen_boot_zip boot_ota || exit 1 172 | mkdir -p $SYSTEM_OUT_DIR/resources/ 173 | mv $OUTPUT_DIR/boot_ota.zip $SYSTEM_OUT_DIR/resources/ 174 | 175 | _pack_rootfs_ || return $? 176 | )} 177 | -------------------------------------------------------------------------------- /external/subtree.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /scripts/git_version_v4.1.6.txt: -------------------------------------------------------------------------------- 1 | project_name: flatbuffers 2 | commit_id: 6da1cf79d90eb242e7da5318241d42279a3df3ba [rust] Add use declarations to Rust-generated bindings for imported FB definitions (#5645) 3 | 4 | project_name: u-boot-2021.10 5 | commit_id: c8d23960e0bd34152e950cda0d09ae1526a0c965 u-boot-2021.10: weekly rls 2024.07.20 6 | 7 | project_name: opensbi 8 | commit_id: ab9b8f8d10f3730ee880781c00d2bc3a317e8373 opensbi: weekly rls 2024.07.20 9 | 10 | project_name: Lab-Project-FreeRTOS-POSIX 11 | commit_id: 5042bfd07b1a176d25e24424c4751a497e3bf83a sg200x C906/CA53 cpu boot up. 12 | 13 | project_name: FreeRTOS-Kernel 14 | commit_id: d52c1b6e6193e0ab08950120068a3f8fe6beab1c sg200x C906/CA53 cpu boot up. 15 | 16 | project_name: freertos 17 | commit_id: eb9faf5fe6e63968bc47cb15eca87616445db8f3 freertos: weekly rls 2024.06.6 18 | 19 | project_name: cvikernel 20 | commit_id: 9f1f57a19c3c281a931dfc71b318494487193d56 [feat] cvikernel opensource for cv18xx soc. 21 | 22 | project_name: host-tools 23 | commit_id: bd66fcc8ed918eac4d6ac076ff8b1da7290b66cb (libc): Using Vector to Implement Memcpy. [description ]:Using Vector to Implement Memcpy 24 | 25 | project_name: fsbl 26 | commit_id: ca989deb0a36329d2b1799a2295f6544524159c2 fsbl: weekly rls 2024.08.07 27 | 28 | project_name: osdrv 29 | commit_id: 3639eb492944cff9c398afafa7b8446d377d7119 osdrv: weekly rls 2024.08.07 30 | 31 | project_name: build 32 | commit_id: 232c8e1fd06a7424dbdf6fa2e0a4618ee926d85c build: weekly rls 2024.08.07 33 | 34 | project_name: buildroot-2021.05 35 | commit_id: 5b7acd1bf99574b818f9ec1f61232c69f6150202 (master):Support Xuantie toolchains, and modify the defconfigs. 36 | 37 | project_name: oss 38 | commit_id: a9d88d33c403c652e4d4eadbfe69b48942591d0a (sg200x-dev):add oss_release_tarbar for glibc_riscv64 39 | 40 | project_name: cviruntime 41 | commit_id: 3f4938648950a7f3bf9a19c320ca9fae7c52de20 [feat] cviruntime opensource for cv18xx soc. 42 | 43 | project_name: cvi_rtsp 44 | commit_id: c55729e6e1ba3f8b9134085deacc4713c8b041f1 upload 1.7 45 | 46 | project_name: cvibuilder 47 | commit_id: 4309f2a649fc7cfe7160389d52a81c469dbdd7bc [feat] cvibuilder opensource for cv18xx soc. 48 | 49 | project_name: cvimath 50 | commit_id: ce8705f49da5e5f59c2ddb3253ef88323a0cd9c4 [feat] cvimath opensource for cv18xx soc. 51 | 52 | project_name: ramdisk 53 | commit_id: 79e8aa19e2c7c0b936aa5370f3dc3a20cfcb50e9 ramdisk: weekly rls 2024.08.07 54 | 55 | project_name: isp_tuning 56 | commit_id: 455df99256d6a70df2460f253ce2629c70ca0c61 isp_tuning: weekly rls 2024.07.20 57 | 58 | project_name: tdl_sdk 59 | commit_id: eeecc4ffdee29975440f4dd1445f193e5227b785 fit new cvi_mpi repository 60 | 61 | project_name: ive 62 | commit_id: 87cf68fddfb69fa236ddf2d413d04195454dea8f Merge pull request #1 from enemy1205/main 63 | 64 | project_name: linux_5.10 65 | commit_id: 085eec53fc4d1935e6736ddad1d6dce5f755dc20 linux_5.10: weekly rls 2024.08.07 66 | 67 | project_name: cnpy 68 | commit_id: 2f56f4c23ea840f9d15c43801368cf4a089efa84 [feat] cnpy opensource for cv18xx soc. 69 | 70 | project_name: SensorSupportList 71 | commit_id: 2c5adff820508319bc84f04552a53b8376d09c5d SensorSupportList: weekly rls 2024.08.07 72 | 73 | project_name: cvi_mpi 74 | commit_id: 6b01494682464c0f0649ac89c25df5ce15bde3ed isp: weekly rls 2024.08.07 75 | 76 | -------------------------------------------------------------------------------- /scripts/repo_clone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # [Usage-Example] : ./scripts/repo_clone.sh --gitclone subtree.xml 4 | # [Usage-Example] : ./scripts/repo_clone.sh --gitpull subtree.xml 5 | # [Usage-Example] : ./scripts/repo_clone.sh --gitclone subtree.xml --normal 6 | # [Usage-Example] : ./scripts/repo_clone.sh --gitclone subtree.xml --reproduce git_version_2023-08-18.txt 7 | 8 | function print_usage { 9 | echo "Usage: $0 arg1 arg2 [arg3] [arg4] [arg5 arg6]" 10 | echo "arg1: --gitclone or --gitpull(DEFAULT: git clone)" 11 | echo "arg2: xxx.xml" 12 | echo "arg3: --normal(DEFAULT: clone single branch)" 13 | echo "arg4: --reproduce" 14 | echo "arg5: git_version.txt" 15 | } 16 | 17 | # 打印等级及颜色设置 18 | YELLOW='\033[1;33m' 19 | NC='\033[0m' # No Color 20 | 21 | # 判断传参数目是否合法 22 | if [[ $# -lt 2 ]]; then 23 | printusage 24 | exit 1 25 | fi 26 | 27 | # 获取 User Name 28 | function get_user_name { 29 | USERNAME=$(git config --global user.name) 30 | } 31 | get_user_name 32 | 33 | # git clone enable 34 | DOWNLOAD=0 35 | 36 | # normal clone enable 37 | NORMAL=0 38 | 39 | # reproduce enable 40 | REPRODUCE=0 41 | 42 | # 传入参数并赋值 43 | while [[ $# -gt 0 ]]; do 44 | case $1 in 45 | --gitclone) 46 | shift 47 | xml_file=$1 48 | REMOTE_URL=$(grep -o '' ${xml_file} | sed 's/.*fetch="\([^"]*\)".*/\1/' | sed "s/ssh:\/\/\(.*\)/ssh:\/\/$USERNAME@\1/") 49 | shift 50 | ;; 51 | --gitpull) 52 | shift 53 | xml_file=$1 54 | DOWNLOAD=1 55 | shift 56 | ;; 57 | --normal) 58 | NORMAL=1 59 | shift 60 | ;; 61 | --reproduce) 62 | shift 63 | gitver_txt=$1 64 | REPRODUCE=1 65 | shift 66 | ;; 67 | *) 68 | print_usage 69 | exit 1 70 | ;; 71 | esac 72 | done 73 | 74 | # 设置全局变量 75 | REMOTE_NAME=$(grep -o '' ${xml_file} | sed 's/.*name="\([^"]*\)".*/\1/') 76 | DEFAULT_REVISION=$(grep -o '' ${xml_file} | sed 's/.*revision="\([^"]*\)".*/\1/') 77 | PARAMETERS="--single-branch --depth 200" 78 | 79 | # 获取xml文件中所有的project name 80 | repo_list=$(grep -o ' 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | --------------------------------------------------------------------------------