all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
To: Julien Lepiller <julien@lepiller.eu>
Cc: "Maxime Devos" <maximedevos@telenet.be>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"51737@debbugs.gnu.org" <51737@debbugs.gnu.org>,
	"Liliana Marie Prikler" <liliana.prikler@gmail.com>,
	phodina <phodina@protonmail.com>
Subject: [bug#51737] [PATCH v3 1/8] gnu: Add linux-libre-waydroid.
Date: Fri, 4 Nov 2022 04:03:08 +0100	[thread overview]
Message-ID: <20221104040308.770e2853@primary_laptop> (raw)
In-Reply-To: <A63322B3-B4F2-487E-A581-3DE48C09C715@lepiller.eu>

[-- Attachment #1: Type: text/plain, Size: 6495 bytes --]

On Tue, 01 Nov 2022 08:04:03 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> That sounds good to me. We could have a default, though we must at
> least make sure we don't advertise for a non-free image.
> 
> Concerning my own work, I'm currently trying to build some base
> system libraries. I managed to get a working cross-compiler for
> x86_64-linux-android, and I managed to cross-build a couple
> libraries. I'm hopeful I'll be able to build bionic (android's libc)
> by the end of the week, then a complete cross toolchain that will
> help build the rest of the system.

Sorry for catching up late, I was really busy before.

Note that I'm not familiar with Waydroid. Reviewing the Android part
and the overall architecture it was on my TODO list[5] but I've not yet
got the time to do that[1].

I'm also not a Guix maintainer and I don't know if the project already
took decisions or not with what I'm about to discuss.

What I wonder is that if Waydroid gets added as-is, it might be useful
to at least be able to test its functionalities with some FSDG
compliant image.

For instance if users report that audio is broken, it would probably be
a good idea to be able to run test ourselves. And if there is a bug in
binder, we could also do security testing ourselves for instance.

If I compare with another similar Guix functionality: we can
produce software for Microsoft Windows with "guix build -t
x86_64-w64-mingw32 hello" but we at least have Wine for testing.

As I see it, there might be several approaches to solve this testing
issue.

(1) Use GNU/Linux and Guix to make that FSDG compliant image. 

   For instance we could have:
   +-----------------------------------------------+
   | Guix host                                     |
   |                                               |
   | Waydroid (the host/container tools)           |
   |   ^                                           |
   |   |                                           |
   |   v                                           |
   | The communication protocols (like Pulseaudio) |
   |   ^                                           |
   |   |                                           |
   +---+-------------------------------------------+
       |
   +---+------------------------------------------------------+
   |   |  Guix guest                                          |
   |   v                                                      |
   | Android HAL like hardware/waydroid/audio                 |
   |   ^                                                      |
   |   |                                                      |
   |   v                                                      |
   | Libhybris or compatibility software that can run Android |
   | libraries on GNU/Linux.                                  |
   |   ^                                                      |
   |   |                                                      |
   |   v                                                      |
   | GNU/Linux audio stack or software that can use the       |
   | Android audio API somehow.                               |
   +----------------------------------------------------------+

   I'm unsure how much work that would be, and I've also not looked if
   some GNU/Linux distributions are already using libhybris with Android
   10 HAL. I'm also unsure if we need to use glibc or bionic (guix can
   build Android components with glibc and libhybris probably expects
   bionic).

   The advantage of this approach that it might be possible to do
   automatic testing within Guix as Guix would be used everywhere.

(2) Another approach would be to look more closely at lineage-17.1 and
    make a stripped down version that is hopefuly FSDG compliant. It
    should normally build fine on top of Trisquel.

    In Replicant we moved to AOSP for our work on Android 11, so we
    didn't do extensive research on what needs to be removed in
    LineageOS 17.1.

    However there is at least low hanging fruits that could be removed
    easily like:
    - The Linux kernel
    - The unused hardware support code, like vendor specific libraries
      in hardware/ or device repositories in device/.

    The waydroid additions probably need to be reviewed too.

    The downside here is probably maintenance: users need a way to
    report FSDG compliance issue, and there needs to be a way to fix
    that.

(3) Porting the Waydroid modifications[2][3] on top of Replicant 11 (and
    reviewing these modifications too).

    While Replicant 11 is not really usable yet on real devices yet
    (telephony support for the GT-I9300 (Galaxy SIII) isn't complete for
    instance, sound support is very basic, etc), Replicant 11 status
    shouldn't affect the ability to add Waydroid support.

    The advantage of Replicant here is that there is already a community
    and infrastructure and Replicant is already listed in the FSDG
    compliant distributions.

    An issue with Replicant would probably be with boringdroid[4]:
    It ships a binary apk (though it's released under the Apache 2.0).
    Building it from source within the Replicant source code would fix
    that, and the boringdroid seems to be doing something like that
    already. However we also need to deactivate it for real devices, so
    that seems to require more code integration work as boringdroid
    seems to patch core android components like
    platform/frameworks/base[4].

By the way, does someone knows where to find information about the
architecture of Waydroid. For instance is there some document that
explains how it works (like that it uses a HAL that use alsa that
then somehow talks to the host pulseaudio?, what modifications it did
for graphics, etc).

References:
-----------
[1]In Replicant 11, we now use a kernel based on upstream Linux (more
   precisely a Debian kernel with our patches on top). So we need to
   understand which projects we can share (maintenance) work with.
[2]https://raw.githubusercontent.com/waydroid/android_vendor_waydroid/lineage-17.1/manifest_scripts/generate-manifest.sh
[3]https://raw.githubusercontent.com/waydroid/android_vendor_waydroid/lineage-17.1/manifest_scripts/manifests/02-waydroid.xml
[4]https://github.com/boringdroid/platform_frameworks_base
[5]https://redmine.replicant.us/issues/2290

Denis.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-11-04  3:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10  1:33 [bug#51737] Add Waydroid phodina via Guix-patches via
2021-11-10  1:37 ` [bug#51737] [PATCH 1/4] gnu: Add libglibutil phodina via Guix-patches via
2021-11-10  1:38 ` [bug#51737] [PATCH 2/4] gnu: Add libgbinder phodina via Guix-patches via
2021-11-10  1:38 ` [bug#51737] [PATCH 3/4] gnu: Add python-gbinder phodina via Guix-patches via
2021-11-10  1:39 ` [bug#51737] [PATCH 4/4] gnu: Add waydroid phodina via Guix-patches via
2021-11-15 20:03   ` Liliana Marie Prikler
2021-11-15 22:30     ` phodina via Guix-patches via
2021-12-03 15:00     ` phodina via Guix-patches via
2022-06-25 13:08 ` [bug#51737] [PATCH v2 1/7] gnu: Add linux-libre-waydroid phodina via Guix-patches via
2022-06-25 16:46   ` Maxime Devos
2022-06-27  7:07     ` phodina via Guix-patches via
2022-07-19 14:56       ` Maxime Devos
2022-07-19 14:57       ` Maxime Devos
2022-10-29 19:28         ` [bug#51737] [PATCH v3 1/8] " phodina via Guix-patches via
2022-10-31 19:30           ` phodina via Guix-patches via
2022-11-01  6:51             ` Liliana Marie Prikler
2022-11-01  7:04               ` Julien Lepiller
2022-11-04  3:03                 ` Denis 'GNUtoo' Carikli [this message]
2022-11-04 11:38                   ` Denis 'GNUtoo' Carikli
2022-11-04 11:51                   ` Denis 'GNUtoo' Carikli
2022-11-04 12:26                   ` Denis 'GNUtoo' Carikli
2022-11-12 15:54                   ` Denis 'GNUtoo' Carikli
2022-12-13 17:48                   ` phodina via Guix-patches via
2022-12-15 17:02                     ` Denis 'GNUtoo' Carikli
2022-12-13 17:10                 ` phodina via Guix-patches via
2022-12-13 18:23                   ` Julien Lepiller
2022-12-15 16:38                     ` Denis 'GNUtoo' Carikli
2022-12-13 16:49               ` phodina via Guix-patches via
2022-12-15 16:44                 ` Denis 'GNUtoo' Carikli
2022-10-18  9:32 ` [bug#51737] Add Waydroid dan
2024-03-20 13:56 ` outlook user

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221104040308.770e2853@primary_laptop \
    --to=gnutoo@cyberdimension.org \
    --cc=51737@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    --cc=liliana.prikler@gmail.com \
    --cc=ludo@gnu.org \
    --cc=maximedevos@telenet.be \
    --cc=phodina@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.