- Prepare a clean Ubuntu 22 host.
- Install some dependencies:
apt install -y fonts-liberation devscripts equivs software-properties-common libmpfr-dev libgmp3-dev libmpc-dev libstdc++-12-dev clang avahi-daemon libavahi-client-dev libnss-mdns qtbase5-dev libqt5widgets5 libx11-xcb-dev
- Check the compilation steps provided by Google here. Skip a few steps, you just need to follow these:
-
Tip: If you want to cross-compile the ARM binary, in this step you need to execute:
./build/linux/sysroot_scripts/install-sysroot.py --arch=arm
Reference Link: Linux Chromium Arm Recipes
- It's important at this point: please open your
src/out/Default/args.gn
and use here to replace this file. As you can see, I have set some switches to make the compilation process smoother. You can make your own changes to these switches if you need to. Refer GN build configuration. - The whole compilation process is very long, so please prepare a high-performance computer. If you want to speed up the build, please refer to: https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md#faster-builds
- At this point it's all set up and ready to compile: Build Chromium.
- Go to
src/out/Default
and you can see that thechrome
executable is already lying there quietly.