User:Jonkerj

From linux-sunxi.org
Jump to navigation Jump to search

Personal Hardware

Mainline on Orange Pi Plus and PC

I've collected some patches from here and there in order to get my Plus and PC running mainline with as many working peripherals as possible. They are stored on GitHub. Stuff included:

Wifi

I found Hans de Goede's patched RTL8189ES and it seems to work for me. It took my a while to get it to compile, the makefile does not match my head...

  1. Assume kernel is in /media/sunxi/linux, rtl8189 in /media/sunxi/rtl8189es
  2. Compile at least the kernel modules (we need Module.symvers), make sure this config is present:
    1. CONFIG_CFG80211
    2. CONFIG_MMC_SUNXI
  3. Fire off the rtl8189 build:
jorik@neon:/media/sunxi/rtl8189es$ make -j5 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -C /media/sunxi/linux/ M=/media/sunxi/rtl8189es CONFIG_RTL8189ES=m modules

Hardware accelerated graphics

I'll try to document my progress on getting "kodi" working with bells and whistles on mainline. If I get there, it will be documented here.

Graphics on H3

This is yet unresolved, as there seems to be no proper way to get graphics with DRM and HDMI working on H3. Some pointers:

Mali on H3

WARNING: this is all quite useless, until:

  1. there is a working DRM/prime display driver for your board
  2. either:
    • someone finds a way to make libGLES working with DRM/prime
    • someone creates a UMP/prime, so allwinner's GLES is going to work with prime

I found it very hard to get Mali to compile for a recent kernel, and I was not very successful in finding documentation on the subject. I did some guesswork, read a lot of source code, and got mali to at least compile for me.

I assume the presence of a kernel source, a cross-compiler (arm-linux-gnueabihf-gcc), etc.

Kernel

First of all, compile a kernel. Make sure the following options are set, these are needed to get TRACEPOINTS, which is needed by ump/mali later on.

CONFIG_PROFILING=y
CONFIG_FTRACE=y
CONFIG_ENABLE_DEFAULT_TRACERS=y

Mali

Then, get, patch and compile mali:

export KDIR=/media/scratch/linux-4.7-rc7/
export CROSS_COMPILE=arm-linux-gnueabihf-
wget -P /tmp http://malideveloper.arm.com/downloads/drivers/DX910/r6p2-01rel0/DX910-SW-99002-r6p2-01rel0.tgz
wget -P /tmp https://gist.githubusercontent.com/jonkerj/15bd5a793c0f157b5d7e43b019efccb4/raw/b6c83bb396d3b4e6463b12f52f51e4181ad029ad/fix-mali-sunxi-4.5.patch
tar zxf /tmp/DX910-SW-99002-r6p2-01rel0.tgz
cd DX910-SW-99002-r6p2-01rel0
patch -p1 < /tmp/fix-mali-sunxi-4.5.patch
cd driver/src/devicedrv/ump
CONFIG=ca8-virtex820-m400-1 BUILD=release make
cd ../mali
USING_DT=1 USING_UMP=1 MALI_SHARED_INTERRUPTS=1 MALI_PLATFORM=arm make

This yields the needed kernel modules