public inbox for gentoo-soc@lists.gentoo.org
 help / color / mirror / Atom feed
* Fwd: Re: [gentoo-soc] Weekly Report: Portage Powered Android
@ 2020-07-01 15:57 Gunwant Jain
  2020-07-02  0:05 ` Benda Xu
  0 siblings, 1 reply; 6+ messages in thread
From: Gunwant Jain @ 2020-07-01 15:57 UTC (permalink / raw
  To: gentoo-soc


[-- Attachment #1.1: Type: text/plain, Size: 51 bytes --]

Sorry, didn't cc gentoo-soc in the attached reply.

[-- Attachment #1.2: Type: message/rfc822, Size: 2703 bytes --]

[-- Attachment #1.2.1.1: Type: text/plain, Size: 1425 bytes --]

On 20/07/01 03:14PM, Benda Xu wrote:
> > 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].
> 
> Could you please remind me why we need a bootstrap-init?  Can we just
> exec the Android init when the lxc-guest starts?

Yeah sure. Apparently, Android needs to parse its device tree for early
mounting partitions, before exec'ing `init`. Plus even before dealing
with the dt, we need to mount `/system` and switch root to it.
I could create the environment for "using /system as root" w/o the help
of `bootstrap-init` but I couldn't deal with the device tree easily. 

`bootstrap-init` creates the entire environment for android to boot from
scratch and then finally exec's `init`. So I proposed to use it instead
of manually setting up the LXC container for system-as-root devices. 
That way the setup is clean as we only need a /dev directory and a static
`bootstrap-init` binary inside of the LXC rootfs.

Please let me know if this approach is unsatisfactory.

Regards,
Gunwant

[-- Attachment #1.2.1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-02 12:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-01 15:57 Fwd: Re: [gentoo-soc] Weekly Report: Portage Powered Android Gunwant Jain
2020-07-02  0:05 ` Benda Xu
2020-07-02  0:43   ` Gunwant Jain
2020-07-02  7:47     ` Benda Xu
2020-07-02 12:01       ` Gunwant Jain
2020-07-02 12:46         ` Benda Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox