Repository navigation
Freedreno over Android x86
The android build uses a prebuilt i686 toolchain. But it depends on some i686 base libs to be installed:
sudo dnf install libstdc++.i686 libgcc.i686 zlib.i686 glibc.i686
-
Get the source. Shallow syncing to save space (full source >30G):
mkdir android-x86 cd android-x86 repo init --depth=1 -u http://git.android-x86.org/manifest -b kitkat-x86 -g default,arm,pdk,-darwin repo sync -j16 -
git clone https://github.com/varadgautam/qualcomm-android-init.git -
git clone https://github.com/varadgautam/mesa.git -
git clone https://github.com/varadgautam/drm_gralloc.git -
git clone http://anongit.freedesktop.org/git/mesa/drm.git -
edit qualcomm-android-init/local_manifests/ms.xml to point to cloned mesa, drm_gralloc and drm, move local_manifests to android-x86/.repo
-
repo syncagain to get mesa, drm_gralloc and drm under android-x86 directory -
clone integration-linux-qcomlt (4.2; 5a8a0b0 tested)
- apply
qualcomm-android-init/kernel-*over kernel to disable GPU auth and get logger. - apply
qualcomm-android-init/kitkat-x86-hacks-ifc6410.patchto android-x86 (use this) - apply
qualcomm-android-init/libpixelflinger*to android-x86/system/core
- make kernel + dtb. toolchain comes with android-x86.
cd kernel
make ARCH=arm CROSS_COMPILE=~/devel/android-x86/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- qcom_defconfig
make ARCH=arm CROSS_COMPILE=~/devel/android-x86/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- -j16 zImage dtbs
cat arch/arm/boot/zImage arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb > zImage-dtb
(NOTE: replace ~/devel/android-x86 with path to your android-x86 checkout)
takes time (~8h for me).
export USE_CCACHE=1
cd android-x86
source build/envsetup.sh
lunch mini_armv7a_neon-userdebug
make -j8 TARGET_PREBUILT_KERNEL=<path-to-zImage-dtb> BOARD_GPU_DRIVERS=freedreno
make -j8 TARGET_PREBUILT_KERNEL=<path-to-zImage-dtb> BOARD_GPU_DRIVERS=freedreno libGLES_mesa gralloc.drm
mv qualcomm-android-init/init* android-x86/out/target/product/armv7-a-neon/root
mv qualcomm-android-init/fstab* android-x86/out/target/product/armv7-a-neon/root
make initrd:
TODO: android init seems picky about file permisions (with good reason).. you might need to fix things up so that *.prop and *.rc have permissions 0644.
cd android-x86/out/target/product/armv7-a-neon/root
find . | cpio -o -H newc | gzip > ../qcom-ramdisk.img
from android-x86/out/target/product/armv7-a-neon/, run
abootimg --create qcom-boot.img -k <zImage-dtb> -r qcom-ramdisk.img -f <qualcomm-android-init/bootimg.cfg>
This creates qcom-boot.img
TODO: gralloc.drm.so ends up in /system/lib but needs to be moved to /system/lib/hw
call qualcomm-android-init/mksystem.sh from android-x86/out/target/product/armv7-a-neon/
Boot IFC6410 into fastboot mode by holding SW4 during power up.
fastboot flash boot qcom-boot.img
fastboot flash system system_ext4.img
Reboot with a UART cable attached to get serial console.