Changes

Jump to: navigation, search

KaiOS

846 bytes removed, 09:11, 2 December 2020
Updated the build instructions to reflect the native b2g bootstrap and modified the default mozconfig file
<pre>hg clone https://hg.mozilla.org/projects/kaios</pre>
Bootstrap your build environment via mach
<pre>export LOCAL_NDK_BASE_URL='ftp://ftp.kaiostech.com/ndk/android-ndk' ./mach bootstrap --application-choice='GeckoView/Firefox for AndroidBoot2Gecko'</pre>Download the b2g sysroot using <code>mach</code>:<pre>./mach artifact toolchain --from-build toolchain-linux64-b2g-sysrootrm -rf ~/.mozbuild/b2g-sysrootmv b2g-sysroot ~/.mozbuild</pre>
Add a suitable mozconfig file, you can use the following one for the time being
<pre>
ac_add_options --with-android-version=29
ac_add_options --target=x86_64-linux-android
ac_add_options --with-target-arch-name=x86_64
# Compiler options
CC="$HOME/.mozbuild/clang/bin/clang"
CXX="$HOME/.mozbuild/clang/bin/clang++"
ac_add_options --with-android-ndk="$HOME/.mozbuild/android-ndk-r20b-canary"
mk_add_options "export LD_LIBRARY_PATH=$HOME/.mozbuild/clang/lib"
 
# Use sccache
ac_add_options --with-ccache=sccache
# B2G-specific options
ac_add_options --enable-b2g-fm
ac_add_options --enable-forkserver
 
# We don't use the profiler
ac_add_options --disable-profiling
# Only for x86-64
ac_add_options --enable-wasm-simd
# sandbox includes non existent arm64 filesSandbox & profiler are not supported yetac_add_options --disable-profiling
ac_add_options --disable-sandbox
ac_add_options --enable-linker=lld
ac_add_options --disable-elf-hack
 
export CFLAGS="-Wno-nullability-completeness"
 
export CPPFLAGS="-DANDROID -DTARGET_OS_GONK \
-DJE_FORCE_SYNC_COMPARE_AND_SWAP_4=1 \
-D_USING_LIBCXX \
-DGR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE=1 \
-isystem $ANDROID_NDK/platforms/$ANDROID_PLATFORM/$ARCH_DIR/usr/include"
 
export LDFLAGS="--sysroot=$HOME/.mozbuild/android-ndk-r20b-canary/platforms/android-29/arch-x86_64/"
</pre>
Build as usual with <code>./mach build</code>
<pre>export LOCAL_NDK_BASE_URL='ftp://ftp.kaiostech.com/ndk/android-ndk'</pre>
Install Gecko dependencies
<pre>cd gecko && ./mach bootstrap --application-choice mobileBoot2Gecko</pre>
Build by invoking the <code>build.sh</code> script in the top-level directory. Depending on your machine this step can take anywhere from 30 minutes to several hours
<pre>./build.sh</pre>
Confirm
384
edits

Navigation menu