No Description

Rebecca Chang Swee Fun d1ec23cafd README.md: update additional information to get test features 1 year ago
third_party 85d77867a7 update patch set for third_party components 1 year ago
.gitattributes 09788fdf84 initialize git lfs for sysroot tarball 1 year ago
0001-DEPS-use-custom-angle-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0002-DEPS-use-custom-breakpad-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0003-DEPS-use-custom-node-nw-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0004-DEPS-use-custom-v8-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0005-DEPS-use-custom-skia-and-highway-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0006-DEPS-use-custom-perfetto-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0007-DEPS-use-custom-pdfium-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0008-DEPS-use-custom-webrtc-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0009-DEPS-use-custom-dawn-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0010-sandbox-add-riscv-arch-definition-and-define-syscall.patch 5a9eb25924 nw65: update patchset 1 year ago
0011-chrome-installer-add-riscv64-as-one-of-the-target-ar.patch 5a9eb25924 nw65: update patchset 1 year ago
0012-components-update_client-add-riscv64-arch-definition.patch 5a9eb25924 nw65: update patchset 1 year ago
0013-skia-add-riscv64-architecture-detection.patch 5a9eb25924 nw65: update patchset 1 year ago
0014-sql-make-VirtualCursor-standard-layout-type.patch 5a9eb25924 nw65: update patchset 1 year ago
0015-tflite_support-add-cflags-to-resolve-build-issues.patch 5a9eb25924 nw65: update patchset 1 year ago
0016-tflite_support-fix-absolute-value-function-abs-when-.patch 5a9eb25924 nw65: update patchset 1 year ago
0017-tflite_support-fix-Wdefaulted-function-deleted-warni.patch 5a9eb25924 nw65: update patchset 1 year ago
0018-tools-clang-scripts-add-RISCV-default-target-triple.patch 5a9eb25924 nw65: update patchset 1 year ago
0019-tools-clang-script-add-atomic-build-flag-for-native-.patch 5a9eb25924 nw65: update patchset 1 year ago
0020-tools-clang-scripts-update-clang-triple-for-riscv64.patch 5a9eb25924 nw65: update patchset 1 year ago
0021-ui-gl-enable-swiftshader-for-riscv64.patch 5a9eb25924 nw65: update patchset 1 year ago
0022-third_party-dav1d-enable-riscv64-build.patch 5a9eb25924 nw65: update patchset 1 year ago
0023-third_party-libaom-enable-riscv64-build-as-generic.patch 5a9eb25924 nw65: update patchset 1 year ago
0024-base-process-add-riscv64-arch-definition.patch 5a9eb25924 nw65: update patchset 1 year ago
0025-DEPS-use-custom-nw-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0026-build-config-linux-workaround-for-files-not-found-wi.patch 5a9eb25924 nw65: update patchset 1 year ago
0027-DEPS-update-lss-to-latest.patch 5a9eb25924 nw65: update patchset 1 year ago
0028-build-config-compiler-add-build-flags-for-clang.patch 5a9eb25924 nw65: update patchset 1 year ago
0029-build-config-compiler-set-generic-riscv64-flags.patch 5a9eb25924 nw65: update patchset 1 year ago
0030-build-config-BUILD.gn-add-atomic-build-flag.patch 5a9eb25924 nw65: update patchset 1 year ago
0031-build-config-compiler-skip-warnings-treated-as-error.patch 5a9eb25924 nw65: update patchset 1 year ago
0032-build-config-add-v8-target-cpu-for-riscv64.patch 5a9eb25924 nw65: update patchset 1 year ago
0033-build-toolchain-linux-do-not-use-lld-by-default.patch 5a9eb25924 nw65: update patchset 1 year ago
0034-reduce-warnings-flag-as-error.patch 5a9eb25924 nw65: update patchset 1 year ago
0035-build-config-compiler-skip-warning-for-ffmpeg.patch 5a9eb25924 nw65: update patchset 1 year ago
0036-third_party-libzip-resolve-macro-redefined-issue.patch 5a9eb25924 nw65: update patchset 1 year ago
0037-third_party-pffft-add-riscv64-arch-detection.patch 5a9eb25924 nw65: update patchset 1 year ago
0038-BUILD.gn-disable-chromedriver_unittests.patch 5a9eb25924 nw65: update patchset 1 year ago
0039-add-workaround-to-avoid-rebuild-sysroot.patch 5a9eb25924 nw65: update patchset 1 year ago
0040-add-path-to-riscv64-sysroot.patch 5a9eb25924 nw65: update patchset 1 year ago
0041-pkg-config.py-add-riscv-sysroot-path-to-system_libdi.patch 5a9eb25924 nw65: update patchset 1 year ago
0042-GN-Wayland-build-overrides.patch 5a9eb25924 nw65: update patchset 1 year ago
0043-third_party-crashpad-port-for-RISC-V.patch 5a9eb25924 nw65: update patchset 1 year ago
0044-BUILD.gn-remove-dependency-to-breakpad.patch 5a9eb25924 nw65: update patchset 1 year ago
0045-tools-perf-chrome_telemetry_build-remove-dependency-.patch 5a9eb25924 nw65: update patchset 1 year ago
0046-chrome-test-remove-dependency-to-breakpad.patch 5a9eb25924 nw65: update patchset 1 year ago
0047-content-shell-remove-dependency-to-breakpad.patch 5a9eb25924 nw65: update patchset 1 year ago
0048-third_party-libvpx-enable-riscv64-build-as-generic.patch 5a9eb25924 nw65: update patchset 1 year ago
0049-third_party-breakpad-fix-undefined-reference.patch 5a9eb25924 nw65: update patchset 1 year ago
0050-build-config-compiler-add-march-for-riscv64.patch 5a9eb25924 nw65: update patchset 1 year ago
0051-build-config-compiler-add-rpath-link-for-rv64.patch 5a9eb25924 nw65: update patchset 1 year ago
0052-DEPS-fix-webrtc-repo-name.patch 5a9eb25924 nw65: update patchset 1 year ago
0053-tools-clang-scripts-fix-riscv-target-triple.patch 5a9eb25924 nw65: update patchset 1 year ago
0054-DEPS-use-custom-ffmpeg-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0055-DEPS-use-latest-breakpad-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0056-DEPS-use-latest-ffmpeg-repo.patch 5a9eb25924 nw65: update patchset 1 year ago
0057-Revert-tools-clang-scripts-fix-riscv-target-triple.patch 5a9eb25924 nw65: update patchset 1 year ago
0058-enable-RISCV-as-target-to-build-for-clang.patch 5a9eb25924 nw65: update patchset 1 year ago
0059-ignore-unreachable-code-break.patch 5a9eb25924 nw65: update patchset 1 year ago
0060-DEPS-update-v8-commit-hash.patch 5a9eb25924 nw65: update patchset 1 year ago
0061-Revert-content-shell-remove-dependency-to-breakpad.patch 5a9eb25924 nw65: update patchset 1 year ago
0062-Revert-chrome-test-remove-dependency-to-breakpad.patch 5a9eb25924 nw65: update patchset 1 year ago
0063-Revert-tools-perf-chrome_telemetry_build-remove-depe.patch 5a9eb25924 nw65: update patchset 1 year ago
0064-Revert-BUILD.gn-remove-dependency-to-breakpad.patch 5a9eb25924 nw65: update patchset 1 year ago
0065-DEPS-update-commit-hash-for-node-nw.patch 5a9eb25924 nw65: update patchset 1 year ago
0066-DEPS-resolve-libnode-release-mode-issue.patch 5a9eb25924 nw65: update patchset 1 year ago
0067-third_party-breakpad-include-missing-minidump_format.patch 5a9eb25924 nw65: update patchset 1 year ago
0068-DEPS-update-nwjs-repo-commit-hash.patch 5a9eb25924 nw65: update patchset 1 year ago
README.md d1ec23cafd README.md: update additional information to get test features 1 year ago

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 is_component_build=false'
    
  6. Build the llvm/clang for RISCV.

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

    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 -D target_arch=riscv64 -D nwjs_sdk=1 -D disable_nacl=0 -D buildtype=Official
    
  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
    
  10. Build optional features, i.e. chromedriver, browser_tests, etc.

    ninja -C out/nw chromedriver
    
    ninja -C out/nw browser_tests
    
    ninja -C out/nw -t clean v8:nwjc
    ninja -C out/nw v8:nwjc
    
    ninja -C out/nw minidump_stackwalk
    
    ninja -C out/nw third_party/breakpad:dump_syms
    
    ninja -C out/nw dist
    

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