Use Android drivers with libhybris on Cubieboard

This forum is for supported devices using an ARMv7 Allwinner SoC.

Use Android drivers with libhybris on Cubieboard

Postby maribu » Fri Aug 02, 2013 8:10 pm

Hi, there!

Has anyone tried using Android driver under Arch Linux with libhybris right now? I've seen this site http://www.cnx-software.com/2013/04/21/ ... ubieboard/ (make sure to have a look at the amazing video!) and I would like to reproduce this on Arch Linux.

I (guess that I) have successfully compiled android for the Cubieboard following the instructions on the cnx website. I uploaded the resulting /system folder and the headers to save you days of downloading and hours of compiling. (The resulting folder (with output) uses about 32GiB, the source code only used I think about 10GiB.)

I put these three PKGBUILDs together, with which you can successfully compile libhybris. But the tests fail.

Anyone an idea?

Regards,
Maribu

$this->bbcode_second_pass_code('', '
pkgname=android-system-cubieboard
pkgver=4.2
pkgrel=1
pkgdesc="/system folder of the Cubieboard Android image"
arch=('armv7h')
url="cubieboard.org"
license=('custom')
provides=('android-system')
options=('!strip')
source=(system.tar.xz::http://ubuntuone.com/64JdjdWVq9F2E5p6gMQE1J)
md5sums=('0291a0fffc5a2c9365473662f891e05e')

build() {
echo "Using prebuild image."
echo "--> Nothing to build!"
}

package() {
cd "${srcdir}"
cp system "${pkgdir}/" -R
}

# vim:set ts=2 sw=2 et:
')

$this->bbcode_second_pass_code('', '
pkgname=android-headers-cubieboard
pkgver=4.2
pkgrel=1
pkgdesc="Android headers extracted using the tool in libhybris. Android from Cubieboard was used"
arch=('armv7h')
url="cubieboard.org"
license=('custom')
provides=('android-headers')
options=('!strip')
source=(headers.tar.xz::http://ubuntuone.com/6PwRhU0CN1MZFrBUNJFnHL)
md5sums=('9a385e3a173ba19436d8723ec5f38cca')

build() {
echo "Using prebuild headers."
echo "--> Nothing to build!"
}

package() {
cd "${srcdir}"
mkdir -p "${pkgdir}/opt"
cp headers "${pkgdir}/opt/android-headers" -R
}

# vim:set ts=2 sw=2 et:
')

$this->bbcode_second_pass_code('', '
pkgname=libhybris-git
_pkgname=libhybris
pkgver=366.065d49c
pkgrel=1
pkgdesc="Enlightenment window manager (formerly e17) - Development version"
arch=('armv7h')
url="https://github.com/libhybris/libhybris"
license=('Apache')
depends=('android-system')
makedepends=('android-headers')
provides=('libhybris')
conflicts=('libhybris')
source=("libhybris::git+https://github.com/libhybris/libhybris")
md5sums=('SKIP')

pkgver() {
cd "${srcdir}/${_pkgname}"
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
cd "${srcdir}/${_pkgname}/hybris"

./autogen.sh \
--prefix=/opt/hybris \
--with-android-headers=/opt/android-headers
make
}

package() {
cd "${srcdir}/${_pkgname}/hybris"

mkdir -p "${pkgdir}/opt/hybris"

make DESTDIR="${pkgdir}" install
}
')
maribu
 
Posts: 33
Joined: Wed Nov 23, 2011 12:39 pm

Re: Use Android drivers with libhybris on Cubieboard

Postby maribu » Thu Aug 08, 2013 12:01 pm

Yeah!

With the help of the fantastic people on https://github.com/libhybris/libhybris I got it working :-)

These steps are needed to get it working:

    - untar the attached archive and untar the containing *.src.tar.gz files
    - run makepkg for android-headers and android-system packages
    - install both packages
    - run makepkg for libhybris package and install it
    - add yourself to the hybris group (gpasswd -a myusername hybris
    - reboot

After this run "/opt/hybris/bin/test_glesv2" and enjoy :-)

Regards,
maribu
maribu
 
Posts: 33
Joined: Wed Nov 23, 2011 12:39 pm

Re: Use Android drivers with libhybris on Cubieboard

Postby maribu » Fri Aug 09, 2013 1:41 pm

Also got this working: http://www.youtube.com/watch?v=B6xb7QY_ ... e=youtu.be

After I installed these packages from AUR, it worked out of the box:
    - qt5-base-git
    - qt5-xmlpatterns-git
    - qt5-jsbackend-git
    - qt5-declarative-git
    - qt5-wayland-git
    - qt5-graphicaleffects-git

Download Cinematic Experience from http://quitcoding.com/download/Qt5_Cine ... pi_1.0.tgz

Use this command to run it:
$this->bbcode_second_pass_code('', 'LD_LIBRARY_PATH=/opt/hybris/lib QT_QPA_EGLFS_DEPTH=24 qmlscene -platform eglfs Qt5_CinematicExperience.qml')

Regards,
maribu

PS: On http://www.cnx-software.com/2013/04/21/ ... ubieboard/ the say you need to comment out the PathAnimation part of content/Mainview.qml to get it working. This is true for mer, but on Arch Linux it works without commenting it out. You should keep the PathAnimation part, it makes the golden glowing ball moving around ;-)
maribu
 
Posts: 33
Joined: Wed Nov 23, 2011 12:39 pm

Re: Use Android drivers with libhybris on Cubieboard

Postby WarheadsSE » Fri Aug 09, 2013 1:51 pm

Nicely done.We'll have to see about being this into a nice clean stack?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Use Android drivers with libhybris on Cubieboard

Postby maribu » Fri Aug 09, 2013 1:56 pm

$this->bbcode_second_pass_quote('', 'W')e'll have to see about being this into a nice clean stack?


Sorry, I don't understand that. I'm not a native speaker and have sometimes trouble to understand the English language. Could you write it again in other words?
maribu
 
Posts: 33
Joined: Wed Nov 23, 2011 12:39 pm

Re: Use Android drivers with libhybris on Cubieboard

Postby WarheadsSE » Sat Aug 10, 2013 4:25 am

bringing* building* .. farking swype.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Use Android drivers with libhybris on Cubieboard

Postby WebReflection » Fri Aug 23, 2013 5:30 am

so I've done everything excellently explained here and see all the Qt demos ... now, what is this all about?

$this->bbcode_list('1')
  • xorg/X11 seems to be unable to enjoy these libraries power
  • no web browser enable HW acceleration after having these libraries in
  • neither I can play 1080p quality video @ at least 30 fps

  • Am I missing something or am I doing everything wrong?

    Thanks
    WebReflection
     
    Posts: 99
    Joined: Tue Apr 02, 2013 6:49 pm

    Re: Use Android drivers with libhybris on Cubieboard

    Postby maribu » Fri Aug 23, 2013 1:25 pm

    Hi, WebReflection!

    $this->bbcode_second_pass_quote('', 'x')org/X11 seems to be unable to enjoy these libraries power


    This is correct.

    $this->bbcode_second_pass_quote('', 'n')o web browser enable HW acceleration after having these libraries in


    In theory you can use this drivers to get acceleration working with your browser. For example the enlightenment foundation librarys allow rendering on wayland using egl (and shm). You could start with the efl-git package in AUR and modify the ./configure parameters to add egl support. The browser "eve" (package eve-svn in AUR, does currently not compile against the git version of efl) uses the efl toolkit. Sadly I cannot run weston using the drm backend. I guess the Raspberry Pi backend would be a good start to write a "egl"-backend. I've no idea if it is possible to render in egl in wayland when you use the fbdev backend.

    $this->bbcode_second_pass_quote('', 'n')either I can play 1080p quality video @ at least 30 fps


    This is because my version of libhybris does not include CedarX. Have a look here http://linux-sunxi.org/CedarX/libve#Using_libhybris_wrapped_Android_libraries. I think you can reuse my system image. But I'm not 100% sure.

    Regards,
    Maribu
    maribu
     
    Posts: 33
    Joined: Wed Nov 23, 2011 12:39 pm
    Top

    Re: Use Android drivers with libhybris on Cubieboard

    Postby WebReflection » Fri Aug 23, 2013 4:01 pm

    are you saying the missing part in order to have CedarX is just this within the android-system PKGBUILD ?

    $this->bbcode_second_pass_code('', '
    package() {
    cd "${srcdir}"
    cp system "${pkgdir}/" -R
    cd /system/lib
    wget https://github.com/allwinner-dev-team/android_external_cedarx/raw/ef36cd760e9d76a2/CedarAndroidLib/LIB_JB_F23/libcedarv_adapter.so
    wget https://github.com/allwinner-dev-team/android_external_cedarx/raw/ef36cd760e9d76a2/CedarAndroidLib/LIB_JB_F23/libcedarv_base.so
    wget https://github.com/allwinner-dev-team/android_external_cedarx/raw/ef36cd760e9d76a2/CedarAndroidLib/LIB_JB_F23/libcedarxosal.so
    wget https://github.com/allwinner-dev-team/android_external_cedarx/raw/ef36cd760e9d76a2/CedarAndroidLib/LIB_JB_F23/libve.so
    }
    ')

    Thanks thought, I appreciate your hints ... it's just so annoying all I'd like to have is a browser with modern technologies supported. Everything seems to be there but completely disassembled ... have you ever had luck building qt5 from the scratch, forcing Open GL ES2.0 and using both Mali driver and these ? if not ... I'm re-trying again with latest hints :-)

    If yes, please share how the hack you did that, I always get stuck when it comes to QtWebkit part ... !
    WebReflection
     
    Posts: 99
    Joined: Tue Apr 02, 2013 6:49 pm

    Re: Use Android drivers with libhybris on Cubieboard

    Postby WarheadsSE » Fri Aug 23, 2013 5:32 pm

    So you two know, I am following these conversations closely. I look forward to progress you make :D
    Core Developer
    Remember: Arch Linux ARM is entirely community donation supported!
    WarheadsSE
    Developer
     
    Posts: 6807
    Joined: Mon Oct 18, 2010 2:12 pm

    Next

    Return to Allwinner

    Who is online

    Users browsing this forum: Google [Bot] and 2 guests