From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id rgbxNC6BZGPrIAAAbAwnHQ (envelope-from ) for ; Fri, 04 Nov 2022 04:04:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ULoCNC6BZGONDAAAauVa8A (envelope-from ) for ; Fri, 04 Nov 2022 04:04:14 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2FC16D897 for ; Fri, 4 Nov 2022 04:04:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqmzz-0006MT-Th; Thu, 03 Nov 2022 23:04:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqmzy-00069y-M6 for guix-patches@gnu.org; Thu, 03 Nov 2022 23:04:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqmzy-0001u8-Ct for guix-patches@gnu.org; Thu, 03 Nov 2022 23:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqmzx-00026P-QS for guix-patches@gnu.org; Thu, 03 Nov 2022 23:04:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51737] [PATCH v3 1/8] gnu: Add linux-libre-waydroid. Resent-From: Denis 'GNUtoo' Carikli Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Nov 2022 03:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51737 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Julien Lepiller Cc: Maxime Devos , Ludovic =?UTF-8?Q?Court=C3=A8s?= , "51737@debbugs.gnu.org" <51737@debbugs.gnu.org>, Liliana Marie Prikler , phodina Received: via spool by 51737-submit@debbugs.gnu.org id=B51737.16675310288055 (code B ref 51737); Fri, 04 Nov 2022 03:04:01 +0000 Received: (at 51737) by debbugs.gnu.org; 4 Nov 2022 03:03:48 +0000 Received: from localhost ([127.0.0.1]:51236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqmzc-00025g-AQ for submit@debbugs.gnu.org; Thu, 03 Nov 2022 23:03:48 -0400 Received: from cyberdimension.org ([80.67.179.20]:36576 helo=gnutoo.cyberdimension.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqmzY-00025V-Ez for 51737@debbugs.gnu.org; Thu, 03 Nov 2022 23:03:38 -0400 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id 72422895; Fri, 4 Nov 2022 02:58:45 +0000 (UTC) Received: from primary_laptop (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 999ba362; Fri, 4 Nov 2022 02:58:45 +0000 (UTC) Date: Fri, 4 Nov 2022 04:03:08 +0100 From: Denis 'GNUtoo' Carikli Message-ID: <20221104040308.770e2853@primary_laptop> In-Reply-To: References: <6DHjUMqjMoW-JFxyBmViVrNgl6CjM63WJ5vn4bejvkbXWdkQa_NSI1l2lfluy4q_PMSinz3DdOq5mM5oVsuoHsrDzMKEqjcUTQ_R7NpAYp0=@protonmail.com> <95979f80d53295fa999af83919909ee786fde125.camel@telenet.be> <8fzx37ONySCMqGXHR4oPO5rd9PWHkHEZVvAb7fGF4EY8pcYugP0Sc8WyO2odhu5SJBfPDbnjkOjxga5n91wMcEKWdSOYYlYKX-ITndH2WUM=@protonmail.com> <9768fe9c925723795a7b9c24504cfec57f5bfde4.camel@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.30; i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/vVTG0skGz6Dnh=.+T4OrGfA"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667531054; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=J4JS1eYFQbDzc0w9+uGWn5wO/XdlDLl56hCOVrZuYC4=; b=nclKUbenH48rh2RGfli3KLG2rJv7JLYqvVB1cYZiMoXJmMcgucOAs8rE7wN/99SXO8Vpva o87trUgDXuwn/EEn5VUUscjx7YDsMU6QGlQkTAO6NI7nfSkSh1NZXYfA6FxHW+Wkrw6qbU 1MClvj96U9Ra4I+rW7R/NX+3lgH98i40JZQznieaAugZJ9A/JVHTBkKHvhXzafGGcV0gVq oVYuD6GfHXcpSjh7lsGFb0+EWFdHY/OeHaY2fFEZ1wAbOsb9NTzmCtvUrhJtnPvFg1YNV7 uJFQWFXS/8bbW7GcNSr61u8adUZdQMIzy7BE1C8IwqvgJxRyXrT/DmgduQ/3ww== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667531054; a=rsa-sha256; cv=none; b=qh3SzF6yOzIT+AU9bIJOUj7KZ9tdqIijp/mJ/3tHHFAmT2vaa2ravGnG46wrBuxNgrrzuG CBvC9FcoyU5bpN9iMVXh3wqDrz3jwRz1S2sVy4mKMydmi1Grd39JOHEsx/u88gxRROwyRB 1ovNAZPfwkATOEBaNk/3QNkvWxDi+FvbGDd/FwVSb4DauqUH0jc+wqJQ5Ujpv7zZrDcwGE UEsCzOBqrsW7ILTeLkmVlFEaG8atgG9pcjSrsH57Pt3ZCsW2augGuUbHdrqMewnQEBnv+x MXOwZHlU1Es4EIAiNzMMueZSbiZRpwFSx15tal+K2Fj8jRkiJq4+26cR7DaZCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.10 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2FC16D897 X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: qJLnv3RH1B9M --Sig_/vVTG0skGz6Dnh=.+T4OrGfA Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 01 Nov 2022 08:04:03 +0100 Julien Lepiller 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. >=20 > 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.=20 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/linea= ge-17.1/manifest_scripts/generate-manifest.sh [3]https://raw.githubusercontent.com/waydroid/android_vendor_waydroid/linea= ge-17.1/manifest_scripts/manifests/02-waydroid.xml [4]https://github.com/boringdroid/platform_frameworks_base [5]https://redmine.replicant.us/issues/2290 Denis. --Sig_/vVTG0skGz6Dnh=.+T4OrGfA Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmNkgOwACgkQX138wUF3 4mMj8A//cPIooMHMOR7MsdNBCQbisbScgZrEeDiY1+Wxj7CD6F0Egl0rI1EDej39 FLHQxB0I62naz0TKq+WNVO4+Nkoy23qrTYp3skZPCMTR9Q0xEIPVKuF/FrVLPWgD krFXvZpNW7eim9U1oq33gXuY4CIJoTaQGpLkz15U4fYbVWnW96u7525Dlen7C8vm 3hMBZHExyvb94nDi3MdNAxjcFn2zBHA3N88PjzWIKf9zv/wbUGutBtHGvJi3T8fk tvycjStRgoraNWcvssTRYuSKXiCta1YQiXfdhfabxUWvx0ZT21Mq9jjVjpadGPfO DHbBfMFk4w9FJgvtcYm5XyexLJthGvShGK08yx0iZ3OdVFq3qQZthuKZGvaZiGBt Rg6jeAsPKN3IfdXfN/+4N+fsOTUhRMQRTE8Tylrb1YXHnNtQIBdKNgbvYsNEBywG 4zQUTPPB+4/EhhsaDvTT0mgCPUPHjjBr/UbVswSimTtmebcT2Fe0COZNvokNtRzE /Q7+66evDMAUoEIXTxTVynXI9loJeWRr7EajJgso62xslMaCfcGn6DaTkg2Ie0ZX JenKjIcH6erAUsXmVmrQXG3I14ai3rARSbSIGdnQH27bOJj2LQ6iTk3+P7dN6Tnd qDsZp4K5Ikqa/YIqIY7PTxqcYB+iIbjQMdGug7ZCZCKy5dcbXtM= =F98M -----END PGP SIGNATURE----- --Sig_/vVTG0skGz6Dnh=.+T4OrGfA--