[ZenFone 2 General] ycavan:
Arch Linux x86_64 for ZF2 with llvm supported gl & gles:

I mainly use Arch linux, so this post will focus on getting this particular distro running. This will not be very detailed since most of the stuff is covered in the OP.

1. Root your phone

2. Unlock your boot loader

2a. *optional* Install a custom kernel, ie one that supports KVM. You can grab one from my Google Drive ZF2 folder ( boot_fhd_kvm_20150911.img )

3. Install Linux Deploy from the Play Store

4. *optional* Install XServer-XSDL from the Play Store

5. Start Linux Deploy

6. Select: Arch Linux from Distribution list

7. Distribution suite should be: latest

8. Select: x86_64 from Architecture

9. Make sure SSH is checked

10. for now, make sure GUI is unchecked ( we only want ssh )

11. *optional* Mount Points

11a. /storage/emulated/0

11b. /Removable/MicroSD

11c. /system

11d. /data

11e. /data/data/x.org.server/files/img/tmp

12. Click Install to let Linux Deploy set up the base Arch linux distro

13. log into linux via ssh

14. sudo nano /etc/pacman.conf

15. uncomment the lines related to multilib ( delete the #'s )

16. sudo pacman -Syu ( update the pacman database; you'll do this regularly since Arch is updated frequently )

Now that Arch is installed and working for multilib, I'll list the packages I like to use w/ the ZF2. Generally, you install packages with: sudo pacman -S <package>

I've compiled files and saved them to my Google Drive ZF2 folder: http://bit.ly/1Onvzyt

1. llvm - needs to be modified to take advantage of our phones

1a. sudo pacman -S llvm ( let pacman install the normal llvm )

1b. download and install the llvm packages that I compiled in my Google Drive ZF2 folder: ( using sudo pacman -U <filename> )

1c. llvm-3.6.2-4-x86_64.pkg.tar.xz

1d. llvm-libs-3.6.2-4-x86_64.pkg.tar.xz

1e. llvm-ocaml-3.6.2-4-x86_64.pkg.tar.xz

1f. lldb-3.6.2-4-x86_64.pkg.tar.xz

1g. clang-3.6.2-4-x86_64.pkg.tar.xz

1h. clang-analyzer-3.6.2-4-x86_64.pkg.tar.xz

1i. clang-tools-extra-3.6.2-4-x86_64.pkg.tar.xz

2. mesa

3. mesa-demos ( to test gl & gles using glxgears & es2gears_x11 )

4. xorg

5. base-devel

6. xfce4 ( I prefer this window manager )

7. turbojpeg

8. virtualgl

9. turbovnc ( download this from my Google Drive ZF2 folder and install using: sudo pacman -U <filename> )

10. pulseaudio

11. pulseaudio-alsa

12. chromium

I highly recommend turbovnc as your graphics environment and using a turbo vnc client to view it. I prefer starting it up with: vncserver -geometry 1024x768 -depth 24 -noauth

Inside the turbovnc graphics environment, I start up Xfce4 using: startxfce4

You should be able to verify gles is working inside turbovnc by typing: es2gears_x11

You should see the gears grinding around 90-100 fps depending on your phone's processor.

Here's the fun part of running Xfce4... you can start a console window and connect to your phone's video card's framebuffer using: sudo X

Nothing will happen on the phone, but you are indeed connected to the video card's framebuffer. You can verify by typing: vglrun glxgears

This should see the gears running around 60-100 fps depending on your phone.

Developers can also grab the fhd_20150920.tgz file from my Google Drive's ZF2 folder if you are using the kernel boot_fhd_kvm_20150911.img.

untar it in the android home directory. This will contain the current kernel and modules. To get the full source, I'd recommend downloading a couple of files from Asus's website:

1. ZF2 2.12 source code: http://dlcdnet.asus.com/pub/ASUS/ZenFone/ZE550ML/zenfone2_2_12_40.zip

2. ZF2 2.20 source code: http://dlcdnet.asus.com/pub/ASUS/ZenFone/ZE551ML/zenfone2_2_20_40.zip

in the android folder ( after you untar'd the fhd_20150920.tgz file ) unzip the 2 source code files. The reason you need both is because Asus got lazy with source after 2.12... the zip files are missing critical files.

so you should have the following in your /home/android/android directory:

device external KernelMakefile linux out README

sudo mkdir /lib/modules

sudo ln -s /home/android/android/out/target/product/fhd/linux/modules_install/lib/modules/3.10.20-x86_64_moor

Now you should have a fairly functional Arch linux distro on your ZF2 with halfway accelerated graphics.