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. > -----Original Message----- > From: Gunwant Jain > Sent: Tuesday, June 23, 2020 3:16 AM > To: gentoo-soc@lists.gentoo.org > Cc: heroxbd@gentoo.org > Subject: [gentoo-soc] Weekly Report: Portage Powered Android > > Hello Everyone, > > I was supposed to integrate `bootstrap-init` and `sar-preinit` into SharkBait > this week. I couldn't quite do that. > `bootstrap-init` was initially cross-compiled for aarch64 using NDK. So the > first job was to get rid of NDK and use a different "build-system". > I opted for CMake and ported the project to use it [1]. But the binary compiled > by CMake on my phone (arm64 Gentoo), would not boot Android. > The build rules can be inspected on [1]. 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. 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. > > I believe this is because of the fact that I am not using a Bionic based toolchain. > So, I started working on building such a toolchain mid-week. > And this is where my current task starts coinciding with my next scheduled task > of providing a aarch64-linux-android toolchain where we build Bionic as well. > The crux of this task was already performed by KireinaHoro in his GSoC [2]. > Since my next scheduled task is required to be finished for my current task, > I propose to merge `bootstrap-init` along with `sar-preinit` together later > in the SharkBait workflow. 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. > > And to cover the installing process for users right now, I will write a blog > and post it on [3] within 24 hours of writing this mail. The blog will provide > a guide on assembling the components required for System-As-Root based Android > devices and installing SharkBaitOS. Keep in mind that this process will indeed > be simplified for the user later. > And I propose to edit SharkBait's official wiki later in my GSoC tenure explaining > the simplified procedure to end-users and porters. > > Thanks, > Gunwant > > [1] https://gitlab.com/WantGuns/bootstrap-init/-/tree/cmake > [2] > https://wiki.gentoo.org/wiki/Android/SharkBait/Building_a_toolchain_for_aa > rch64-linux-android > [3] https://wantguns.gitlab.io/ Regards, -- Pengcheng Xu https://jsteward.moe