Difference between revisions of "Porting/Chromium (Old)"

From RCS Wiki
Jump to navigation Jump to search
m (Add 6 more patches)
(Added more needed packages)
Line 39: Line 39:
 
sudo apt update
 
sudo apt update
 
sudo apt full-upgrade
 
sudo apt full-upgrade
sudo apt install python libcups2-dev pkg-config libnss3-dev libssl-dev libglib2.0-dev libgnome-keyring-dev libpango1.0-dev libdbus-1-dev libatk1.0-dev libatk-bridge2.0-dev libgtk-3-dev re2c subversion curl libasound2-dev
+
sudo apt install python libcups2-dev pkg-config libnss3-dev libssl-dev libglib2.0-dev libgnome-keyring-dev libpango1.0-dev libdbus-1-dev libatk1.0-dev libatk-bridge2.0-dev libgtk-3-dev re2c subversion curl libasound2-dev libpci-dev mesa-common-dev gperf bison
  
 
cd
 
cd

Revision as of 12:58, 10 August 2018

DRAFT

  • What to port to ppc
    • crashpad
    • sandbox
    • webrtc
    • nacl
    • more??

# Install Ubuntu 16 LTS ppc64le in VM with good amount of CPUs and ~16GB RAM, the more CPUs the more RAM, and around 200GB disk space

sudo apt update
sudo apt full-upgrade
sudo apt install python libcups2-dev pkg-config libnss3-dev libssl-dev libglib2.0-dev libgnome-keyring-dev libpango1.0-dev libdbus-1-dev libatk1.0-dev libatk-bridge2.0-dev libgtk-3-dev re2c subversion curl libasound2-dev libpci-dev mesa-common-dev gperf bison

cd
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

export PATH=$PATH:$(pwd)/ninja
export PATH=$PATH:$(pwd)/depot_tools
export VPYTHON_BYPASS="manually managed python not supported by chrome operations"
export GYP_DEFINES="disable_nacl=1"

git clone git://github.com/ninja-build/ninja.git
cd ninja
git checkout release
./configure.py --bootstrap
which ninja # ensure it is right ninja bin, else figure out a way so it is the right one that comes up


cd
git clone https://gn.googlesource.com/gn

export CC=gcc
export CXX=g++
export AR=ar

cd gn
python build/gen.py --no-sysroot
cat out/build.ninja | sed s/-stdlib=libstdc++//g | tee out/build.ninja
ninja -C out

unset CXX
unset CC
unset AR


cd
mkdir chromium
cd chromium

fetch --no-history --nohooks chromium

curl "https://wiki.raptorcs.com/w/images/4/45/Src-DEPS.patch" | patch -p1 src/DEPS # If this patchfile stops working, ignore the error, see "Patchfiles uploaded"
curl "https://wiki.raptorcs.com/w/images/1/10/Binutils-download.py-PPC.patch" | patch -p1 src/third_party/binutils/download.py

gclient sync
gclient runhooks

mv src/buildtools/linux64/gn src/buildtools/linux64/gn.old
ln -s $HOME/gn/out/gn src/buildtools/linux64/gn

cd src

# build system patches
curl "https://wiki.raptorcs.com/w/images/6/69/Buildtools-third_party-libc%2B%2B-trunk-include-thread-PPC.patch" | patch -p1 buildtools/third_party/libc++/trunk/include/thread

# webrtc patches
curl "https://wiki.raptorcs.com/w/images/b/b2/Rtc_base-system-arch.h-PPC.patch" | patch -p1 third_party/webrtc/rtc_base/system/arch.h
curl "https://wiki.raptorcs.com/w/images/9/96/Modules-desktop_capture-differ_block.cc-PPC.patch" | patch -p1 third_party/webrtc/modules/desktop_capture/differ_block.cc

# sandbox patches
curl "https://wiki.raptorcs.com/w/images/a/ab/0001-sandbox-linux-bpf_dsl-Update-syscall-ranges-for-ppc6.patch" | patch -p1
curl "https://wiki.raptorcs.com/w/images/3/30/0002-sandbox-linux-bpf_dsl-Modify-seccomp_macros-to-add-s.patch" | patch -p1
curl "https://wiki.raptorcs.com/w/images/6/60/0003-sandbox-linux-system_headers-Update-linux-seccomp-he.patch" | patch -p1
curl "https://wiki.raptorcs.com/w/images/e/ec/0004-sandbox-linux-system_headers-Update-linux-signal-hea.patch" | patch -p1
curl "https://wiki.raptorcs.com/w/images/b/b3/0005-sandbox-linux-seccomp-bpf-Add-ppc64-syscall-stub.patch"     | patch -p1
curl "https://wiki.raptorcs.com/w/images/f/f5/Sandbox-linux-services-credentials.cc-PPC.patch"                 | patch -p1
curl "https://wiki.raptorcs.com/w/images/b/be/0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch"                 | patch -p1
curl "https://wiki.raptorcs.com/w/images/3/38/0001-sandbox-linux-Implement-partial-support-for-ppc64-sy.patch" | patch -p1
curl "https://wiki.raptorcs.com/w/images/b/bb/0001-sandbox-linux-seccomp-bpf-helpers-Fix-TCGETS-declara.patch" | patch -p1
curl "https://wiki.raptorcs.com/w/images/e/e7/0001-sandbox-linux-seccomp-bpf-helpers-Skip-vserver-sysca.patch" | patch -p1

# service_manager patches
curl "https://wiki.raptorcs.com/w/images/c/c9/0001-services-service_manager-sandbox-linux-Fix-TCGETS-de.patch" | patch -p1

# third_party patches
curl "https://wiki.raptorcs.com/w/images/8/8a/0001-third_party-angle-Include-missing-header-cstddef-in-.patch" | patch -p1
curl "https://wiki.raptorcs.com/w/images/f/fc/0001-third_party-lss-Don-t-look-for-mmap2-on-ppc64.patch"        | patch -p1


gn args out/Default

# PASTE IN EDITOR

enable_nacl=false
treat_warnings_as_errors=false

# END PASTE Save file and it will generate build configuration

ninja -C out/Default chrome