Skip to content

Instantly share code, notes, and snippets.

@okere-prince
Forked from obfusk/README.md
Created October 17, 2021 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okere-prince/638f4ab647137337ad528563370e82c1 to your computer and use it in GitHub Desktop.
Save okere-prince/638f4ab647137337ad528563370e82c1 to your computer and use it in GitHub Desktop.
building chromium (on ubuntu 12.04) w/ extra ffmpeg codecs

VM

$ mkdir -p ~/tmp/build/chromium-vagrant && cd ~/tmp/build/chromium-vagrant
$ vim Vagrantfile

$ vagrant up && vagrant halt
# use virtualbox to add 20GB swap (/dev/sdb)

$ vagrant up && vagrant ssh

vm$ sudo aptitude update && sudo aptitude safe-upgrade
vm$ sudo aptitude install git vim byobu grc htop tree build-essential
vm$ sudo vim /etc/fstab  # /dev/sdb none swap sw 0 0
vm$ sudo mkswap /dev/sdb
vm$ sudo swapon -a

Prepare

vm$ mkdir ~/build && cd ~/build
vm$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
vm$ export PATH=$HOME/build/depot_tools:$PATH

You should check https://chromium-build.appspot.com/p/chromium/console first.

vm$ mkdir ~/build/chromium && cd ~/build/chromium
vm$ fetch chromium --nosvn=True           # took ~ 4hrs w/ 1MB/s internet connection

Build

vm$ cd ~/build/chromium/src
vm$ ./build/install-build-deps.sh --no-chromeos-fonts
vm$ export GYP_DEFINES="ffmpeg_branding=Chrome proprietary_codecs=1"
vm$ gclient runhooks
vm$ time make chrome BUILDTYPE=Release    # took ~ 2hrs on quadcore i5 (3.10GHz) host
Vagrant::Config.run do |config|
config.vm.box = 'precise64'
config.vm.customize ['modifyvm', :id, '--memory', 2048]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment