From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6045 Path: news.gmane.org!not-for-mail From: Wermut Newsgroups: gmane.linux.lib.musl.general Subject: Re: libhybris and musl? Date: Tue, 2 Sep 2014 09:11:33 +0200 Message-ID: References: <25172046.n8KGkBYA4f@krypton> <20140901210823.GF12888@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf3040ed5a59c62c05020fd4de X-Trace: ger.gmane.org 1409641929 26732 80.91.229.3 (2 Sep 2014 07:12:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Sep 2014 07:12:09 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-6052-gllmg-musl=m.gmane.org@lists.openwall.com Tue Sep 02 09:12:04 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XOiFy-0007C8-DB for gllmg-musl@plane.gmane.org; Tue, 02 Sep 2014 09:11:58 +0200 Original-Received: (qmail 3450 invoked by uid 550); 2 Sep 2014 07:11:50 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3416 invoked from network); 2 Sep 2014 07:11:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bortis.ch; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=bxBeXl3qYvupAoTB+aGAQ5VgcJXMvRmnlL93GLvGPIE=; b=T16HO83UQOaRBoNl7cLyYBWVsw3UexZg4xWFTZIa7bfrc7SOug6jAvB4xnWdH76zXV pvYfzNHcYFbrzqBEXrDN5tcqkSdJAKhnOplHSrRcgHEZ1PxKhZCs9pKG1lGGk9Iae8ZL GqdSF5708FG4HtvRUSi/OcsOpZpaobMFWx0iQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=bxBeXl3qYvupAoTB+aGAQ5VgcJXMvRmnlL93GLvGPIE=; b=P8sCwdMCWmaTMu7fhwQnitWyzD5fgvMaTcedt9F8667BV+pkgGdX1XBzu7xG6PyiYx 16okJrJPFafRsrncbt+gC9/thTRi+L053i6sNB+DwCrNs9f8ztYHRU6AJlx+yxKhqXg9 98HOa/CvTaAe5D2XO2PSzuYTciFeP7TyVhMulcLRAjMSJIUVPfT/NxjtbMWZWiVfO3Kv ZK4XVer1EQx1aRfEO4NXaNcoWrqTvE52tc4UhodSDKAwXIeVMCxNz5z8EC08WJDqoqb0 m9F8brXfozlcNT7jALMVJpX76qfqFWb/K/9B12m2tCVYxgXgfm+pX9qzLFWZrQ8tuQIn KICw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=bxBeXl3qYvupAoTB+aGAQ5VgcJXMvRmnlL93GLvGPIE=; b=NZVbw64um3RPJ6WGToX1ctPyyMDNYU3DPWzA8U942O7txPiGxizPIQPVrCYRVJ1LMZ CV5tDr5hFQHqbLxH+8H1TtQ/fy9VMPuzd207U+LMaqB3XnSBUSnX+UjvMfqhcGBlmgY1 6Mvpwcjqa06NHAqizmdYLhGAuIhQhqvWx62edelypYRLhF6tqL+oaSMtENOrEHx7aeNQ 4l2RoPOfuEwGMWYu56mYNzpEe016w8eFexqHc1HM/uCVR9TVivFJ0MDAtRl8yjLhcjNo EXWX0uwnvLs0daAuFdfSdWMs1ThLxXnZIZOiBhz0Dt1f5zvGM6VyIOr8vzYmTUjSTok4 1upQ== X-Gm-Message-State: ALoCoQnTH3mMRZM0ZsyB/hDx09S/TWVSskPpvx9kLE0seHFbxhnTrUNVu1yhVcKqeZy0vLddh5Qy X-Received: by 10.236.152.168 with SMTP id d28mr50442646yhk.54.1409641893962; Tue, 02 Sep 2014 00:11:33 -0700 (PDT) Original-Sender: kevin@bortis.ch In-Reply-To: <20140901210823.GF12888@brightrain.aerifal.cx> X-Google-Sender-Auth: d0btfBV0FEXA8gP02FYCGYZhMmQ Xref: news.gmane.org gmane.linux.lib.musl.general:6045 Archived-At: --20cf3040ed5a59c62c05020fd4de Content-Type: text/plain; charset=UTF-8 We used libhybris for one single thing. Getting Android/bionic linked graphic drivers up and running under embedded glibc linux. Since all the hardware vendors startet to only deliver their drivers in binary form and exclusivly for Android, these is usually the only way to get GPU up and running. libhybris was originally developed for Sailfish OS that is using Android drivers of all kind under a glibc enviroment. The graphic Stack is Android OpenGL driver > libhybris > wayland. Other projects like the Intel/Samsung "mer" project is doing exactly the same. If you are interessted how to install and use it, there is a rudimentary how to: http://www.cnx-software.com/2013/04/21/how-to-use-libhybris-and-android-gpu-libraries-with-mer-linux-on-the-cubieboard/ This thing is a therible hack, but unfortunatly this is often the only way to get things like OpenGL, hw video decoding etc. working on embedded arm linux. There are no signs that companies like Qualcom or ARM themself with their Mali GPU will deliver open source drivers. Linking your own apps to bionic/libhybris makes absolutly no sense. The reason for libhybris is to use bionic binaries (drivers) within glibc based enviroments. On Mon, Sep 1, 2014 at 11:08 PM, Rich Felker wrote: > On Mon, Sep 01, 2014 at 10:55:26AM +0200, Jens Staal wrote: > > Hi > > > > Has anyone tried if libhybris will emulate the bionic libc properly on > top of > > musl libc? Alternatively, are there plans for bionic binary/source > > compatibility in musl like the glibc compatibility (or would this > contribute > > to bloat?). > > > > I was mostly curious to look into the possiblility of building AOSP (or > Mer) > > with musl instead of bionic (or glibc in the case of Mer), but for > Android app > > (those built with NDK) compatibility, one would then need libhybris. > > > > right now just thinking aloud - no real plans at the moment :) > > While I haven't look at the details for how it works, I'm fairly > doubtful that using libhybris would be practical. My guess is that > you'll find it fairly glibc-specific, but perhaps more importantly I'm > not sure what benefit you would get from having apps built against > Bionic using musl. If you have particular aims in mind, let me know, > but my feeling is that it would be a lot more practical to just fix up > the things Bionic is doing that are gratuitously different/broken to > get to a point where programs using Bionic run cleanly side by side > with musl. But if the issue is binary apps using native NDK code with > the Bionic ABI, but where you want the non-native code to run on a > musl-linked Dalvik rather than a Bionic-linked one, and if this all > takes place in the same process context, then maybe something like > libhybris really is needed. > > I'm quite interested in this project as a prototype for how Android > could be moved from Bionic to musl, and (optionally, but I think this > is the right direction) steered back from its gratuitous > incompatibilities in filesystem layout, handling of dns, user/group > lookups, etc. and re-unified with Linux. Please keep us informed if > you make any interesting progress! > > Rich > --20cf3040ed5a59c62c05020fd4de Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
We used libhybris for one single thing. Getting Android/bi= onic linked graphic drivers up and running under embedded glibc linux. Sinc= e all the hardware vendors startet to only deliver their drivers in binary = form and exclusivly for Android, these is usually the only way to get GPU u= p and running.

libhybris was originally developed for Sailfish OS that is u= sing Android drivers of all kind under a glibc enviroment. The graphic Stac= k is Android OpenGL driver > libhybris > wayland. Other projects like= the Intel/Samsung "mer" project is doing exactly the same.

If you are interessted how to install and use it, there= is a rudimentary how to:=C2=A0http://www.cnx-software.com/2013/04/21/how-to-use-libhybris-an= d-android-gpu-libraries-with-mer-linux-on-the-cubieboard/

This thing is a therible hack, but unfortunatly this is= often the only way to get things like OpenGL, hw video decoding etc. worki= ng on embedded arm linux. There are no signs that companies like Qualcom or= ARM themself with their Mali GPU will deliver open source drivers.

Linking your own apps to bionic/libhybris makes absolut= ly no sense. The reason for libhybris is to use bionic binaries (drivers) w= ithin glibc based enviroments.


On Mon, Sep 1, 2014 at 11:08 PM, Rich Felker= <dalias@libc.org> wrote:
On Mon, Sep 01, 2014 at 10:55:26AM = +0200, Jens Staal wrote:
> Hi
>
> Has anyone tried if libhybris will emulate the bionic libc properly on= top of
> musl libc? Alternatively, are there plans for bionic binary/source
> compatibility in musl like the glibc compatibility (or would this cont= ribute
> to bloat?).
>
> I was mostly curious to look into the possiblility of building AOSP (o= r Mer)
> with musl instead of bionic (or glibc in the case of Mer), but for And= roid app
> (those built with NDK) compatibility, one would then need libhybris. >
> right now just thinking aloud - no real plans at the moment :)

While I haven't look at the details for how it works, I'= ;m fairly
doubtful that using libhybris would be practical. My guess is that
you'll find it fairly glibc-specific, but perhaps more importantly I= 9;m
not sure what benefit you would get from having apps built against
Bionic using musl. If you have particular aims in mind, let me know,
but my feeling is that it would be a lot more practical to just fix up
the things Bionic is doing that are gratuitously different/broken to
get to a point where programs using Bionic run cleanly side by side
with musl. But if the issue is binary apps using native NDK code with
the Bionic ABI, but where you want the non-native code to run on a
musl-linked Dalvik rather than a Bionic-linked one, and if this all
takes place in the same process context, then maybe something like
libhybris really is needed.

I'm quite interested in this project as a prototype for how Android
could be moved from Bionic to musl, and (optionally, but I think this
is the right direction) steered back from its gratuitous
incompatibilities in filesystem layout, handling of dns, user/group
lookups, etc. and re-unified with Linux. Please keep us informed if
you make any interesting progress!

Rich

--20cf3040ed5a59c62c05020fd4de--