Compiled on {PI4B4G, RPI3B} cluster with 5.10.77-piCore-v8 via crossover cable on external SSD using F2FS filesystem To setup such cluster, you'll need a crossover cable, just link them together. References: Crossover connection https://www.linuxquestions.org/questions/linux-networking-3/howto-crossover-connection-between-two-linux-machines-110270/#post569094 Firefox options https://wiki.mozilla.org/Linux/Compiler_Options Distcc setup (Important: 'mk_add_options MOZ_MAKE_FLAGS="CFLAGS=..."' doesn't work) https://wiki.cdot.senecacollege.ca/wiki/Distcc_mozilla_tutorial This FLAG helps in size, defined in mozxonfig (-finline-limit=64) https://pcxfirefox.wordpress.com/2016/04/16/firefox-on-android-some-compiler-and-linker-switch-onoff/ Tell Rust to optimize for size https://firefox-source-docs.mozilla.org/setup/configuring_build_options.html https://doc.rust-lang.org/rustc/codegen-options/index.html#opt-level In my case, setup crossover cluster: pi3 - $ sudo ifconfig eth0 10.0.0.1 pi4 - $ sudo ifconfig eth0 10.0.0.2 Swap space: pi3: 4G pi4: 10G Distcc setup: pi3 is volunteer, pi4 is worker On pi3 (Server machine) # kill the running daemon sudo pkill distccd # make sure to remove it, not sure why, but it may not log if you don't delete it sudo rm /var/log/distccd.log sudo touch /var/log/distccd.log sudo chmod 666 /var/log/distccd.log # export compile flags before you start the demon # They should be passed by distcc, but just in case CFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os' CXXFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os' LDFLAGS='-Wl,-O1' export CFLAGS CXXFLAGS LDFLAGS # start the daemon sudo distccd --daemon --user tc --allow 10.0.0.2 --jobs 4 --verbose --log-file=/var/log/distccd.log # You should see something like this distccd[8221] (dcc_discard_root) successfully set no_new_privs distccd[8221] (dcc_discard_root) discarded root privileges, changed to uid=1001 gid=50 On pi4 (Client machine) # kill the running daemon sudo pkill distccd # edit ~/.distcc/hosts # 4 jobs each will not do # pi3 is the bottle neck, the ram clot up easily # by the time pi3 finally complete, pi4 already move on to the next target localhost/4 10.0.0.1/3 # verify distcc --show-hosts Compile Flags: ('-Os' is passed in mozconfig, '-pipe' is added automatically) CC='gcc -march=armv8-a+crc -mtune=cortex-a72' CXX='g++ -march=armv8-a+crc -mtune=cortex-a72' LDFLAGS='-Wl,-O1' export CC CXX LDFLAGS Dependencies: (better to load on both machines) # before loading dependencies, block icu just in case $ touch /usr/local/tce.installed/icu $ tce-load -i ... distcc autoconf cbindgen dbus-glib-dev libevent-dev llvm-dev gtk3-dev libnotify-dev icu70-dev node-dev nss-dev libasound-dev alsa alsa-utils startup-notification-dev zip unzip libwebp-dev clang libXt-dev curl-dev tar pixz Commands: # Both machines sudo /usr/local/bin/ln -s /tmp/tcloop/nss-dev/usr/local/include/nss/* -t /usr/local/include # from now on, do everything on pi4 time tar -I pixz -xf firefox-91.7.0esr.source.tar.xz real 1m 20.65s user 0m 57.63s sys 0m 40.35s cd firefox-91.7.0 # You won't need firefox-91.5.1esr-buildfix-1.patch # It has already been patched # firefox-91.6.0esr-disable_rust_test-1.patch # We can pass this test, so it's not really that necessary # It'll probably save some time, but I'm not applying cp ../mozconfig.distcc mozconfig # export variables # Tell Rust to optimize for size export RUSTC_OPT_LEVEL='s' export MOZBUILD_STATE_PATH="${PWD}/mozbuild" export MACH_USE_SYSTEM_PYTHON='1' export PATH='/usr/lib/distcc:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' # make sure you have export the 'Compile Flags' above # just in case, a 'make clean' equivalent time ./mach clobber real 0m 8.13s user 0m 6.23s sys 0m 1.44s # configure time ./mach configure 1:35.68 Total wall time: 47.19s; CPU time: 37.85s; Efficiency: 80%; Untracked: 1.06s Configure complete! Be sure to run |mach build| to pick up any changes real 1m 38.25s user 1m 10.03s sys 0m 21.60s # make # if you need verbose output --> time ./mach -v build time ./mach build 437:11.11 If you are building Firefox often, SCCache can save you a lot of time. You can learn more here: https://firefox-source-docs.mozilla.org/setup/configuring_build_options.html#sccache To take your build for a test drive, run: |mach run| For more information on what to do now, see https://firefox-source-docs.mozilla.org/setup/contributing_code.html real 7h 17m 13s user 25h 11m 24s sys 42m 20.22s sudo DESTDIR=/tmp/packing-firefox MACH_USE_SYSTEM_PYTHON=1 time ./mach -v install real 1m 8.71s user 0m 35.14s sys 0m 13.00s unsquashfs old-firefox.tcz usr/local/share sudo cp -r squashfs-root/usr/local/share /tmp/packing-firefox/usr/local/ cd /tmp mksquashfs packing-firefox/ /mnt/mmcblk0p2/tce/optional/upgrade/firefox.tcz -quiet