Gentoo Archives: gentoo-soc

From: Pengcheng Xu <i@××××××××.moe>
To: gentoo-soc@l.g.o
Subject: RE: [gentoo-soc] Weekly Report: Portage Powered Android
Date: Tue, 23 Jun 2020 04:45:23
Message-Id: 01b501d64919$16a1f090$43e5d1b0$@jsteward.moe
In Reply to: [gentoo-soc] Weekly Report: Portage Powered Android by Gunwant Jain
1 Sorry for not getting back for some time; I had some other affairs that kept my hands busy. I have some comments for this week's report.
2
3 > -----Original Message-----
4 > From: Gunwant Jain <therealgunwant@×××××.com>
5 > Sent: Tuesday, June 23, 2020 3:16 AM
6 > To: gentoo-soc@l.g.o
7 > Cc: heroxbd@g.o
8 > Subject: [gentoo-soc] Weekly Report: Portage Powered Android
9 >
10 > Hello Everyone,
11 >
12 > I was supposed to integrate `bootstrap-init` and `sar-preinit` into SharkBait
13 > this week. I couldn't quite do that.
14 > `bootstrap-init` was initially cross-compiled for aarch64 using NDK. So the
15 > first job was to get rid of NDK and use a different "build-system".
16 > I opted for CMake and ported the project to use it [1]. But the binary compiled
17 > by CMake on my phone (arm64 Gentoo), would not boot Android.
18 > The build rules can be inspected on [1].
19
20 Have you figured out _why_ Android is not booting? I can think of a bunch of reasons, such as missing dependencies for a dynamically-linked executable, crashing on execution, etc. Simply saying "would not boot Android" does not convey any information.
21
22 Besides, I don't think you need NDK for something as low-level as an init; you shouldn’t need one as long as the code does not use Android-specific 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.
23
24 >
25 > I believe this is because of the fact that I am not using a Bionic based toolchain.
26 > So, I started working on building such a toolchain mid-week.
27 > And this is where my current task starts coinciding with my next scheduled task
28 > of providing a aarch64-linux-android toolchain where we build Bionic as well.
29 > The crux of this task was already performed by KireinaHoro in his GSoC [2].
30 > Since my next scheduled task is required to be finished for my current task,
31 > I propose to merge `bootstrap-init` along with `sar-preinit` together later
32 > in the SharkBait workflow.
33
34 You may try with bionic toolchain, but just as I said, so long as no Android-specific APIs are involved, libc should not be the problem.
35
36 >
37 > And to cover the installing process for users right now, I will write a blog
38 > and post it on [3] within 24 hours of writing this mail. The blog will provide
39 > a guide on assembling the components required for System-As-Root based Android
40 > devices and installing SharkBaitOS. Keep in mind that this process will indeed
41 > be simplified for the user later.
42 > And I propose to edit SharkBait's official wiki later in my GSoC tenure explaining
43 > the simplified procedure to end-users and porters.
44 >
45 > Thanks,
46 > Gunwant
47 >
48 > [1] https://gitlab.com/WantGuns/bootstrap-init/-/tree/cmake
49 > [2]
50 > https://wiki.gentoo.org/wiki/Android/SharkBait/Building_a_toolchain_for_aa
51 > rch64-linux-android
52 > [3] https://wantguns.gitlab.io/
53
54 Regards,
55 --
56 Pengcheng Xu
57 https://jsteward.moe

Attachments

File name MIME type
openpgp-digital-signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-soc] Weekly Report: Portage Powered Android Gunwant Jain <therealgunwant@×××××.com>