# Pastebin VG2lHBVP # Enlist in B2G (requires a LOT of space and time) git clone https://github.com/mozilla-b2g/B2G ./config.sh flame-kk # Connect flame and build necessary B2G bits (NOTE: on OSX you will need the 10.8 SDK, which no longer ships with XCode. Can download XCode 5.1 and manually copy. On OSX you will *also* have to comment out the portions of the makefile that check for case-sensitivity; you’ll see the error and line numbers when you build the first time.) - Disable the screen timeout (it will drop the adb connection during the build) - Connect to wifi (you cannot do so with th B2S bits) ./build.sh libssl libsuspend libz libGLESv2 toolbox # Globally install rust & cargo cd ~/.servo/ sudo # set env variables export GONKDIR=/home/larsberg/B2G export GONK_PRODUCT=flame export CC=arm-linux-androideabi-gcc export ARCH_DIR=arch-arm export CPPFLAGS="-DANDROID -DGR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE=1 -isystem $GONKDIR/bionic/libc/$ARCH_DIR/include -isystem $GONKDIR/bionic/libc/include/ -isystem $GONKDIR/bionic/libc/kernel/common -isystem $GONKDIR/bionic/libc/kernel/$ARCH_DIR -isystem $GONKDIR/bionic/libm/include -I$GONKDIR/system -I$GONKDIR/system/core/include -isystem $GONKDIR/bionic -I$GONKDIR/frameworks/native/opengl/include -I$GONKDIR/external/zlib" export CXXFLAGS="-O2 -mandroid -fPIC $CPPFLAGS -I$GONKDIR/ndk/sources/cxx-stl/stlport/stlport -I$GONKDIR/ndk/sources/cxx-stl/system/include" export CFLAGS="-O2 -mandroid -fPIC $CPPFLAGS -I$GONKDIR/ndk/sources/cxx-stl/stlport/stlport -I$GONKDIR/ndk/sources/cxx-stl/system/include" export ANDROID_NDK=/home/larsberg/android-ndk-r9d export ANDROID_TOOLCHAIN=/home/larsberg/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64 export PATH=$GONKDIR/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:$PATH export LDFLAGS="-mandroid -L$GONKDIR/out/target/product/$GONK_PRODUCT/obj/lib -Wl,-rpath-link=$GONKDIR/out/target/product/$GONK_PRODUCT/obj/lib --sysroot=$GONKDIR/out/target/product/$GONK_PRODUCT/obj/" export OPENSSL_PATH=$GONKDIR/out/target/product/$GONK_PRODUCT/obj/lib # Build in the Gonk directory cd ports/gonk cargo build --target arm-linux-androideabi Last linking step will fail, but the link args are in the PR On the final link step, -C link-args="$LDFLAGS -lGLESv2" needs to be added to the rustc command to successfully build. Copy mozjs to /system/lib (strip first) Copy b2s to /system/bin adb shell stop b2g adb shell "echo 127 > /sys/class/leds/lcd-backlight/brightness” adb shell start b2g Then, run b2s, but make sure WIFI is set up first