설명 없음

Rebecca Chang Swee Fun 3f06dbf981 Delete debian_sid_riscv64-sysroot directory 1 년 전
third_party 85d77867a7 update patch set for third_party components 1 년 전
.gitattributes 09788fdf84 initialize git lfs for sysroot tarball 2 년 전
0001-sandbox-add-riscv-arch-definition-and-define-syscall.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0002-chrome-installer-add-riscv64-as-one-of-the-target-ar.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0003-components-update_client-add-riscv64-arch-definition.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0004-skia-add-riscv64-architecture-detection.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0005-sql-make-VirtualCursor-standard-layout-type.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0006-tflite_support-add-cflags-to-resolve-build-issues.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0007-tflite_support-fix-absolute-value-function-abs-when-.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0008-tflite_support-fix-Wdefaulted-function-deleted-warni.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0009-tools-clang-scripts-add-RISCV-as-one-of-the-llvm-tar.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0010-tools-clang-script-add-atomic-build-flag-for-native-.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0011-tools-clang-scripts-update-clang-triple-for-riscv64.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0012-ui-gl-enable-swiftshader-for-riscv64.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0013-third_party-dav1d-enable-riscv64-build.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0014-third_party-boringssl-update-gn-for-latest-src-tree.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0015-third_party-libaom-enable-riscv64-build-as-generic.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0016-DEPS-bump-swiftshader-to-latest.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0017-DEPS-update-boringssl-to-latest-HEAD.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0018-base-process-add-riscv64-arch-definition.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0019-DEPS-change-some-third_party-repos-to-fetch-from-dev.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0020-DEPS-update-lss-to-latest.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0021-DEPS-use-DEPS-to-pull-in-v8-source-tree.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0022-DEPS-use-DEPS-to-pull-in-nwjs-forked-repo.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0023-DEPS-update-commit-hash-for-ffmpeg.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0024-build-config-linux-workaround-for-files-not-found-wi.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0025-build-config-compiler-add-build-flags-for-clang.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0026-build-config-compiler-set-generic-riscv64-flags.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0027-build-toolchain-linux-enable-clang-toolchain-for-ris.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0028-build-config-BUILD.gn-add-atomic-build-flag.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0029-build-config-compiler-skip-warnings-treated-as-error.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0030-build-config-add-v8-target-cpu-for-riscv64.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0031-build-toolchain-linux-do-not-use-lld-by-default.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0032-reduce-warnings-flag-as-error.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0033-build-config-compiler-skip-warning-for-ffmpeg.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0034-third_party-libzip-resolve-macro-redefined-issue.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0035-third_party-pffft-add-riscv64-arch-detection.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0036-BUILD.gn-disable-chrome-related-test.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0037-add-workaround-to-avoid-rebuild-sysroot.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0038-add-path-to-riscv64-sysroot.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0039-pkg-config.py-add-riscv-sysroot-path-to-system_libdi.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0040-GN-Wayland-build-overrides.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0041-DEPS-update-commit-hash-for-angle.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0042-third_party-crashpad-port-for-RISC-V.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0043-BUILD.gn-remove-dependency-to-breakpad.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0044-tools-perf-chrome_telemetry_build-remove-dependency-.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0045-chrome-test-remove-dependency-to-breakpad.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0046-content-shell-remove-dependency-to-breakpad.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0047-third_party-libvpx-enable-riscv64-build-as-generic.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0048-DEPS-update-commit-hash-for-ffmpeg.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0049-third_party-breakpad-fix-undefined-reference.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0050-build-config-compiler-add-march-for-riscv64.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
0051-build-config-compiler-add-rpath-link-for-rv64.patch b09ffc7feb rebase to Chromium 101.0.4951.67 1 년 전
README.md bea0bb6cb0 README.md: update sysroot decompress using unxz 1 년 전

README.md

NW.js Development / Porting for RISC-V

Build host

Ubuntu 20.04.4 LTS Debian 11

Get the code

  1. Setup depot_tools.

    cd $HOME
    git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    export PATH=$PATH:${HOME}/depot_tools
    
  2. Download a custom .gclient file for NW.js build.

    mkdir nwjs && cd nwjs
    wget https://raw.githubusercontent.com/rebeccasf/nwjs.config/master/gclient -O .gclient
    
  3. Sync all source code.

    cd src
    gclient sync --with_branch_heads
    
  4. Unpack the sysroot tarball into a specific folder path.

    pushd build/linux
    unxz $HOME/riscv-chromium-patch/debian_sid_riscv64-sysroot/debian_starfive_chroot.tar.xz
    tar xf $HOME/riscv-chromium-patch/debian_sid_riscv64-sysroot/debian_starfive_chroot.tar
    popd
    
  5. Run GN.

    gn gen out/nw --args='target_cpu="riscv64" target_os="linux" is_debug=false is_component_ffmpeg=true symbol_level=1 blink_symbol_level=0 use_gnome_keyring=false is_clang=true use_lld=false use_gold=false'
    
  6. Build the llvm/clang for RISCV.

    pushd tools/clang/scripts
    ./build.py --without-android --without-fuchsia
    popd
    
  7. Configure for NW.js.

    export GYP_DEFINES="target_arch=riscv64"
    GYP_CHROMIUM_NO_ACTION=0 ./build/gyp_chromium -I third_party/node-nw/common.gypi -D building_nw=1 -D clang=1 third_party/node-nw/node.gyp
    
  8. Start ninja-build.

    ninja -C out/nw nwjs -j128 -k0
    
  9. Build libnode for NW.js.

    ninja -C out/Release node -k0
    ninja -C out/nw copy_node
    

Misc

  1. Generate dependency tree from GN.

    $ gn desc out/risc64 chrome --tree
    
  2. Launch chromium browser on headless server.

    # Print screenshot and save as PDF
    $ chrome --headless --disable-gpu --print-to-pdf https://www.google.com
    
    # Capture screenshot
    $ chrome --headless --disable-gpu --screenshot https://www.google.com
    

Note: Running with –screenshot will produce a file named screenshot.png in the current working directory.

Credits

  1. PPC Porting Guide: https://wiki.raptorcs.com/wiki/Porting/Chromium
  2. SUSE Chromium Port: https://build.opensuse.org/package/show/network:chromium/chromium?expand=1
  3. Fedora rawhide Chromium Port: https://src.fedoraproject.org/rpms/chromium/tree/rawhide
  4. Github User: https://github.com/felixonmars/archriscv-packages/tree/master/chromium