How to build Firefox for Linux/riscv64 on Ubuntu 22.10 + Unmatched

A people asks me about how to build Firefox/riscv64. Since all patches to build it are merged, so the instruction is updated from previous. The following instruction is on Ubuntu 22.10 on riscv64gc

  1. Clone firefox code from mozilla official repository
    • hg clone https://hg.mozilla.org/mozilla-central (Mercurial)
    • git clone https://github.com/mozilla/gecko-dev (git).
  2. Change current directory to cloned directory
    • cd mozilla-central (if using mercurial)
    • cd gecko-dev (if using git)
  3. Create mozconfig file in current dicrectory. File content is the following
    mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir
    mk_add_options AUTOCLOBBER=1
    ac_add_options --enable-application=browser
    ac_add_options --disable-debug
    ac_add_options --enable-optimize
    ac_add_options --disable-tests
    ac_add_options --without-wasm-sandboxed-libraries
  4. Install rust. See rustup.rs
  5. Install clang and nodejs
    • sudo apt install clang nodejs
  6. Run ./mach bootstrap and select "2. Firefox for Desktop"
  7. Run ./mach configure
  8. Run ./mach build. It spends 8-9 hours.


0 件のコメント: