diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..bf750c29cd --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,111 @@ +name: Compile Sophgo CV18XX Image +on: + workflow_dispatch: + push: + branches: + - vizos + paths: + - 'build/Tianling_source/start-up/start' + + schedule: + - cron: 0 17 * * 5 + +env: + Github: https://github.com/${{github.repository}} + Author: ${{github.actor}} + Apidz: ${{github.repository}} + Run_number: ${{github.run_number}} + Run_workflow: ${{github.workflow}} + REPO_TOKEN: ${{ secrets.REPO_TOKEN }} + TZ: Asia/Shanghai + +jobs: + build: + runs-on: ubuntu-latest + if: github.event.repository.owner.id == github.event.sender.id + + name: Compile "${{matrix.target}}" + strategy: + fail-fast: false + matrix: + target: [OpenWrt_source] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + + - name: Prepare build env + env: + DEBIAN_FRONTEND: noninteractive + run: | + docker rmi `docker images -q` + sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android + sudo -E apt-mark hold grub-efi-amd64-signed + sudo -E apt update + sudo -E apt -y purge azure-cli* docker* ghc* zulu* llvm* firefox google* dotnet* powershell* openjdk* mysql* php* mongodb* dotnet* snap* + sudo -E apt -y full-upgrade + sudo -E apt -y install ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python3 python3-pip libpython3-dev qemu-utils rsync rename scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev + sudo -E systemctl daemon-reload + sudo -E apt -y autoremove --purge + sudo -E apt clean + sudo -E timedatectl set-timezone "Asia/Shanghai" + echo "=================================================" + echo "文件系统 类型 容量 已用 可用 使用% 挂载点" + df -hT $PWD + sudo timedatectl set-timezone "$TZ" + sudo mkdir -p /${{matrix.target}} + sudo chown $USER:$GROUPS /${{matrix.target}} + wget https://sophon-file.sophon.cn/sophon-prod-s3/drive/23/03/07/16/host-tools.tar.gz + tar xf host-tools.tar.gz + sudo mv host-tools /opt/host-tools + + wget https://mirrors.sdu.edu.cn/ubuntu/ubuntu/pool/universe/g/genimage/genimage_16-2_amd64.deb + sudo apt install libconfuse2 genext2fs + sudo dpkg -i genimage_16-2_amd64.deb + rm genimage_16-2_amd64.deb + + - name: Compile Milk-V Duo Image + id: compile-milk-v-duo + working-directory: /${{matrix.target}} + run: | + git clone -b vizos --single-branch https://github.com/Pillar1989/VizOS feeds-vizos + git clone https://github.com/Pillar1989/openwrt --single-branch + echo "src-link vizos ${PWD}/feeds-vizos" >> openwrt/feeds.conf.default + cd openwrt + cat feeds.conf.default + ./scripts/feeds update vizos + ./scripts/feeds install vizos + ./scripts/feeds install -f sophgo + ./scripts/feeds install -f uboot-sophgo + + cp ../feeds-vizos/configs/cv180x-config .config + echo -e "$(nproc) thread compile" + make -j$(nproc) || make package/feeds/vizos/uboot-sophgo/compile V=s + make -j1 V=s + echo "::set-output name=status::success" + + - name: Upload Milk-V Duo Image + if: steps.compile-milk-v-duo.outputs.status == 'success' + uses: actions/upload-artifact@v3 + with: + name: milk-v-duo-image + path: /${{matrix.target}}/openwrt/bin/targets/cv180x + + + - name: Compile HuashanPi Image + id: compile-huashanpi + run: | + cd /${{matrix.target}}/openwrt + cp ../feeds-vizos/configs/cv181x-config .config + echo -e "$(nproc) thread compile" + make -j$(nproc) || make package/feeds/vizos/uboot-sophgo/compile V=s + make -j1 V=s + echo "::set-output name=status::success" + + - name: Upload Huashan Pi Image + if: steps.compile-huashanpi.outputs.status == 'success' + uses: actions/upload-artifact@v3 + with: + name: huashanpi-image + path: /${{matrix.target}}/openwrt/bin/targets/cv181x diff --git a/README.md b/README.md index fac7a64289..7b6bbf6b30 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# *VizOS is a open source IP Camera OS base Openwrt* \ No newline at end of file +## *VizOS is an open-source IP Camera OS based on OpenWrt* \ No newline at end of file diff --git a/boot/uboot-sophgo/Makefile b/boot/uboot-sophgo/Makefile index e819ef22fe..9cba5da836 100644 --- a/boot/uboot-sophgo/Makefile +++ b/boot/uboot-sophgo/Makefile @@ -73,6 +73,7 @@ UBOOT_TARGETS := \ define Build/InstallDev $(INSTALL_DIR) $(BIN_DIR) + mkdir -p $(STAGING_DIR_IMAGE) $(CP) $(PKG_BUILD_DIR)/u-boot.bin $(STAGING_DIR_IMAGE)/u-boot.bin endef diff --git a/configs/cv180x-config b/configs/cv180x-config index 1fa21935be..936d96e845 100644 --- a/configs/cv180x-config +++ b/configs/cv180x-config @@ -429,7 +429,7 @@ CONFIG_FEED_packages=y CONFIG_FEED_luci=y CONFIG_FEED_routing=y CONFIG_FEED_telephony=y -CONFIG_FEED_sophgo=y +CONFIG_FEED_vizos=y # # Base system @@ -1557,7 +1557,7 @@ CONFIG_PACKAGE_libc=y # # Configuration # -CONFIG_LIBC_ROOT_DIR="/home/baozhu/storage/cv181x/cvi_mmf_sdk/host-tools/gcc/riscv64-linux-musl-x86_64" +CONFIG_LIBC_ROOT_DIR="/opt/host-tools/gcc/riscv64-linux-musl-x86_64" CONFIG_LIBC_FILE_SPEC="./sysroot/lib/ld-musl-riscv64-sf.so.1 ./sysroot/lib/ld-musl-riscv64.so.1 ./sysroot/lib/ld-musl-riscv64v0p7_xthead.so.1 ./sysroot/lib/ld-musl-riscv64v_xthead.so.1 ./sysroot/lib/ld-musl-riscv64xthead-sf.so.1 ./sysroot/lib/ld-musl-riscv64xthead.so.1 ./sysroot/usr/lib64/lp64d/libc.so ./sysroot/usr/lib64xthead/lp64d/libc.so" # end of Configuration @@ -1566,7 +1566,7 @@ CONFIG_PACKAGE_libgcc=y # # Configuration # -CONFIG_LIBGCC_ROOT_DIR="/home/baozhu/storage/cv181x/cvi_mmf_sdk/host-tools/gcc/riscv64-linux-musl-x86_64" +CONFIG_LIBGCC_ROOT_DIR="/opt/host-tools/gcc/riscv64-linux-musl-x86_64" CONFIG_LIBGCC_FILE_SPEC="./riscv64-unknown-linux-musl/lib64xthead/lp64d/libgcc_s.so ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libgcc_s.so.1 ./sysroot/lib64/lp64d/libgcc_s.so ./sysroot/lib64/lp64d/libgcc_s.so.1 ./sysroot/lib64xthead/lp64d/libgcc_s.so ./sysroot/lib64xthead/lp64d/libgcc_s.so.1" # end of Configuration @@ -1575,7 +1575,7 @@ CONFIG_PACKAGE_libgomp=y # # Configuration # -CONFIG_LIBGOMP_ROOT_DIR="/home/baozhu/storage/cv181x/cvi_mmf_sdk/host-tools/gcc/riscv64-linux-musl-x86_64" +CONFIG_LIBGOMP_ROOT_DIR="/opt/host-tools/gcc/riscv64-linux-musl-x86_64" CONFIG_LIBGOMP_FILE_SPEC="./riscv64-unknown-linux-musl/lib64xthead/lp64d/libgomp.so ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libgomp.so.1 ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libgomp.so.1.0.0 ./sysroot/lib64/lp64d/libgomp.so ./sysroot/lib64/lp64d/libgomp.so.1 ./sysroot/lib64/lp64d/libgomp.so.1.0.0 ./sysroot/lib64xthead/lp64d/libgomp.so ./sysroot/lib64xthead/lp64d/libgomp.so.1 ./sysroot/lib64xthead/lp64d/libgomp.so.1.0.0" # end of Configuration @@ -1584,7 +1584,7 @@ CONFIG_PACKAGE_libpthread=y # # Configuration # -CONFIG_LIBPTHREAD_ROOT_DIR="/home/baozhu/storage/cv181x/cvi_mmf_sdk/host-tools/gcc/riscv64-linux-musl-x86_64" +CONFIG_LIBPTHREAD_ROOT_DIR="/opt/host-tools/gcc/riscv64-linux-musl-x86_64" CONFIG_LIBPTHREAD_FILE_SPEC="./lib/libpthread{-*.so,.so.*}" # end of Configuration @@ -1594,7 +1594,7 @@ CONFIG_PACKAGE_libstdcpp=y # # Configuration # -CONFIG_LIBSTDCPP_ROOT_DIR="/home/baozhu/storage/cv181x/cvi_mmf_sdk/host-tools/gcc/riscv64-linux-musl-x86_64" +CONFIG_LIBSTDCPP_ROOT_DIR="/opt/host-tools/gcc/riscv64-linux-musl-x86_64" CONFIG_LIBSTDCPP_FILE_SPEC="./riscv64-unknown-linux-musl/lib64xthead/lp64d/libstdc++.so ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libstdc++.so.6 ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libstdc++.so.6.0.28 ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libstdc++.so.6.0.28-gdb.py ./sysroot/lib64/lp64d/libstdc++.so ./sysroot/lib64/lp64d/libstdc++.so.6 ./sysroot/lib64/lp64d/libstdc++.so.6.0.28 ./sysroot/lib64/lp64d/libstdc++.so.6.0.28-gdb.py ./sysroot/lib64xthead/lp64d/libstdc++.so ./sysroot/lib64xthead/lp64d/libstdc++.so.6 ./sysroot/lib64xthead/lp64d/libstdc++.so.6.0.28 ./sysroot/lib64xthead/lp64d/libstdc++.so.6.0.28-gdb.py" # end of Configuration diff --git a/configs/cv181x-config b/configs/cv181x-config index de5dfabba1..87c6281344 100644 --- a/configs/cv181x-config +++ b/configs/cv181x-config @@ -429,7 +429,7 @@ CONFIG_FEED_packages=y CONFIG_FEED_luci=y CONFIG_FEED_routing=y CONFIG_FEED_telephony=y -CONFIG_FEED_sophgo=y +CONFIG_FEED_vizos=y # # Base system @@ -1557,7 +1557,7 @@ CONFIG_PACKAGE_libc=y # # Configuration # -CONFIG_LIBC_ROOT_DIR="/home/baozhu/storage/cv181x/cvi_mmf_sdk/host-tools/gcc/riscv64-linux-musl-x86_64" +CONFIG_LIBC_ROOT_DIR="/opt/host-tools/gcc/riscv64-linux-musl-x86_64" CONFIG_LIBC_FILE_SPEC="./sysroot/lib/ld-musl-riscv64-sf.so.1 ./sysroot/lib/ld-musl-riscv64.so.1 ./sysroot/lib/ld-musl-riscv64v0p7_xthead.so.1 ./sysroot/lib/ld-musl-riscv64v_xthead.so.1 ./sysroot/lib/ld-musl-riscv64xthead-sf.so.1 ./sysroot/lib/ld-musl-riscv64xthead.so.1 ./sysroot/usr/lib64/lp64d/libc.so ./sysroot/usr/lib64xthead/lp64d/libc.so" # end of Configuration @@ -1566,7 +1566,7 @@ CONFIG_PACKAGE_libgcc=y # # Configuration # -CONFIG_LIBGCC_ROOT_DIR="/home/baozhu/storage/cv181x/cvi_mmf_sdk/host-tools/gcc/riscv64-linux-musl-x86_64" +CONFIG_LIBGCC_ROOT_DIR="/opt/host-tools/gcc/riscv64-linux-musl-x86_64" CONFIG_LIBGCC_FILE_SPEC="./riscv64-unknown-linux-musl/lib64xthead/lp64d/libgcc_s.so ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libgcc_s.so.1 ./sysroot/lib64/lp64d/libgcc_s.so ./sysroot/lib64/lp64d/libgcc_s.so.1 ./sysroot/lib64xthead/lp64d/libgcc_s.so ./sysroot/lib64xthead/lp64d/libgcc_s.so.1" # end of Configuration @@ -1575,7 +1575,7 @@ CONFIG_PACKAGE_libgomp=y # # Configuration # -CONFIG_LIBGOMP_ROOT_DIR="/home/baozhu/storage/cv181x/cvi_mmf_sdk/host-tools/gcc/riscv64-linux-musl-x86_64" +CONFIG_LIBGOMP_ROOT_DIR="/opt/host-tools/gcc/riscv64-linux-musl-x86_64" CONFIG_LIBGOMP_FILE_SPEC="./riscv64-unknown-linux-musl/lib64xthead/lp64d/libgomp.so ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libgomp.so.1 ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libgomp.so.1.0.0 ./sysroot/lib64/lp64d/libgomp.so ./sysroot/lib64/lp64d/libgomp.so.1 ./sysroot/lib64/lp64d/libgomp.so.1.0.0 ./sysroot/lib64xthead/lp64d/libgomp.so ./sysroot/lib64xthead/lp64d/libgomp.so.1 ./sysroot/lib64xthead/lp64d/libgomp.so.1.0.0" # end of Configuration @@ -1584,7 +1584,7 @@ CONFIG_PACKAGE_libpthread=y # # Configuration # -CONFIG_LIBPTHREAD_ROOT_DIR="/home/baozhu/storage/cv181x/cvi_mmf_sdk/host-tools/gcc/riscv64-linux-musl-x86_64" +CONFIG_LIBPTHREAD_ROOT_DIR="/opt/host-tools/gcc/riscv64-linux-musl-x86_64" CONFIG_LIBPTHREAD_FILE_SPEC="./lib/libpthread{-*.so,.so.*}" # end of Configuration @@ -1594,7 +1594,7 @@ CONFIG_PACKAGE_libstdcpp=y # # Configuration # -CONFIG_LIBSTDCPP_ROOT_DIR="/home/baozhu/storage/cv181x/cvi_mmf_sdk/host-tools/gcc/riscv64-linux-musl-x86_64" +CONFIG_LIBSTDCPP_ROOT_DIR="/opt/host-tools/gcc/riscv64-linux-musl-x86_64" CONFIG_LIBSTDCPP_FILE_SPEC="./riscv64-unknown-linux-musl/lib64xthead/lp64d/libstdc++.so ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libstdc++.so.6 ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libstdc++.so.6.0.28 ./riscv64-unknown-linux-musl/lib64xthead/lp64d/libstdc++.so.6.0.28-gdb.py ./sysroot/lib64/lp64d/libstdc++.so ./sysroot/lib64/lp64d/libstdc++.so.6 ./sysroot/lib64/lp64d/libstdc++.so.6.0.28 ./sysroot/lib64/lp64d/libstdc++.so.6.0.28-gdb.py ./sysroot/lib64xthead/lp64d/libstdc++.so ./sysroot/lib64xthead/lp64d/libstdc++.so.6 ./sysroot/lib64xthead/lp64d/libstdc++.so.6.0.28 ./sysroot/lib64xthead/lp64d/libstdc++.so.6.0.28-gdb.py" # end of Configuration diff --git a/sophgo/image/Makefile b/sophgo/image/Makefile index c98aa366dc..a8b94fec86 100644 --- a/sophgo/image/Makefile +++ b/sophgo/image/Makefile @@ -49,8 +49,8 @@ define Image/Build mkimage -f ${STAGING_DIR_IMAGE}/multi.its ${STAGING_DIR_IMAGE}/boot.sd # ${PWD}/image/genimage.sh -c ${PWD}/image/genimage.cfg - genimage --rootpath $(call mkfs_target_dir,$(1)) --inputpath $(STAGING_DIR_IMAGE) --outputpath $(BIN_DIR) --config ${PWD}/image/genimage.cfg rm -rf ${PWD}/image/tmp || true + genimage --rootpath $(call mkfs_target_dir,$(1)) --inputpath $(STAGING_DIR_IMAGE) --outputpath $(BIN_DIR) --config ${PWD}/image/genimage.cfg endef