From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7D47B1382C5 for ; Tue, 23 Jun 2020 11:44:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8F4F5E08C0; Tue, 23 Jun 2020 11:44:52 +0000 (UTC) Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 355C8E08C0 for ; Tue, 23 Jun 2020 11:44:52 +0000 (UTC) Received: by mail-pl1-x635.google.com with SMTP id bh7so9004554plb.11 for ; Tue, 23 Jun 2020 04:44:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=IzdsoJMBnWDpofWkkIiIy4U2B8/W76w1mOpAU07QWn4=; b=VCowaJ/SahkJLlG11JhZGdxHZ6TS88FCf2hpctDSXT/UajHsYoE5JEiA5UIVWatlLH KdMcmZEgllucuDKICwM0L7Up5x/Gp/BsEbsYVHL4KQtiqYmUaKrOVcrenFIO7sf4O7sA mjcHgiozEkZ3es2vXpJwI9NDSjIdMyMrgKd8l6Kx/ojwAhP6anVH/XS04xhkEHvYJU8+ bgBb0WFgHh/2WmRJdgB7spsR3KUL6fYxjTiK0dcHL5w5kcyDrzBEd5R5CJSSknSoghLt LYtZtZpo9jFqWln5pKEOloh6QofYKfKswu3KnvMymrIjpLCeJ5VPKtC7zmhaCjnEkUhU cR7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=IzdsoJMBnWDpofWkkIiIy4U2B8/W76w1mOpAU07QWn4=; b=Erd2lFY4Rn5IyKnUQDR1KrRAAXUFO7zbTWvYbxgnap0gZzRzEV0fAQFCLJlnXCEVx6 XDfxT4XywPSWbcmuHcBN32lQ+UQSrmrGVrvUAy/sboKhFIpU2CiFqKCDq1YW2B6eniLu 2qRqVvXBBzxZx0cCbzDuveJ3rdj5mrCB8GbArFmUpeebSEW5TIoAxab22hh5QBzVSp6I sZ3R0gtS9KNm4VJy5VQHukalsI08FaN18BJOKjZsnIC2uVeOwzACcMLOqxPX+3YzF0Oa 58WRU/GxeV2V1yhxasPwj5sWuGw8i8Nvain8l4ZweHKRd/IgAh0a7kS9aKArRwk46pe5 gi6w== X-Gm-Message-State: AOAM533cXSnv82Bxlj8S6NbJ+KKVHh3wQ8QeA8FQHxJ7/MaiYdtVJY8F s2AwwYOQ65KQPZ3QhvLg6aedlYqr X-Google-Smtp-Source: ABdhPJx6d+W+Bc4grDUo9awY0xViMsYV8DG+Rub/zU9/XnmOpmqODTNmvb2nb30eEAUTuoh4b6ejbg== X-Received: by 2002:a17:90a:eac8:: with SMTP id ev8mr22067458pjb.80.1592912690647; Tue, 23 Jun 2020 04:44:50 -0700 (PDT) Received: from localhost ([106.201.0.249]) by smtp.gmail.com with ESMTPSA id q10sm18072549pfk.86.2020.06.23.04.44.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 04:44:49 -0700 (PDT) Date: Tue, 23 Jun 2020 17:14:46 +0530 From: Gunwant Jain To: gentoo-soc@lists.gentoo.org Subject: Re: [gentoo-soc] Weekly Report: Portage Powered Android Message-ID: <20200623114446.pr5nsojvs7irqlgk@tardis.localdomain> References: <20200622191553.2rodmf6heg6my25d@tardis.localdomain> <01b501d64919$16a1f090$43e5d1b0$@jsteward.moe> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-soc@lists.gentoo.org Reply-to: gentoo-soc@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5g4ywzgvwqpvxptl" Content-Disposition: inline In-Reply-To: <01b501d64919$16a1f090$43e5d1b0$@jsteward.moe> X-Archives-Salt: 5d0f82cb-13aa-4c9c-8704-37da219c4f55 X-Archives-Hash: 7bf3ab62a031d81f81f3373bf56e3eec --5g4ywzgvwqpvxptl Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks for your query. On 20/06/23 12:45PM, Pengcheng Xu wrote: > Have you figured out _why_ Android is not booting? I can think of a bunc= h of reasons, such as missing dependencies for a dynamically-linked executa= ble, crashing on execution, etc. Simply saying "would not boot Android" do= es not convey any information. The binary exits after execution in the container. Also, it is a static binary. > Besides, I don't think you need NDK for something as low-level as an init= ; you shouldn=E2=80=99t need one as long as the code does not use Android-s= pecific functions or call into Android service (e.g. vold). You should be = able to get away with something standard, i.e. newlib/musl/glibc. I haven'= t read the source code though, and I might be wrong here; do your survey. I had the same thoughts/arguments regarding using NDK for init. Also as far as I can tell, it does not depend any Android-specific functions either. But even then, using Gentoo's libc does not produce a working binary. Couple of things to keep in mind regarding the NDK setup: - It uses clang instead of gcc - Uses a different sysroot, which is provided/bundled in NDK itself (it is bundled according to the API level). - It uses a different STL (again, bundled with NDK).=20 > You may try with bionic toolchain, but just as I said, so long as no Andr= oid-specific APIs are involved, libc should not be the problem. I would argue the same actually, but using Bionic is the closest we can get to have a NDK like environment without actually using NDK. If required, I could also have this week devoted entirely in rewriting `bootstrap-init`, but this would be counter-productive since the same code-base produces working binaries using a different build-system. I am open to any new advices on this topic. Regards, Gunwant >=20 > Regards, > --=20 > Pengcheng Xu > https://jsteward.moe --5g4ywzgvwqpvxptl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEVcYcuddz0Grkn4q20gpuZPFudnkFAl7x6y0ACgkQ0gpuZPFu dnn1Jwf/SdjCCfO6fWCo/HczlqAL/kYW6+jqelqEKzxjEqW1ciHo+OlxdFA2Ccro Q9A707OXb1RviGLk5UZyKYM/LueBii90ERHqQa/f2w83TFImX1SXdGmqRH9/TLxT W8L/BjTku32JlOK4avDpOLIHOWrrux9s4+aYIFF8IoTuIwjJbKlOuZEfEzglgTOe GNzSpyA4TV/VvfyvuMgxiJvH1AUY2dPAV6HweLSzOQ1wU8axjg3uZRuQUyhQAmNw K3GRBNDn/Ncc0DaU7ZhXVzQnypxfiTrfSOasWwWZqRj/3dWcmMQUhLn59mPtPeKw ZNMwI8LNiJ9zWwRwv2kVZwMEwv3PzQ== =3seS -----END PGP SIGNATURE----- --5g4ywzgvwqpvxptl--