Gentoo Archives: gentoo-soc

From: Benda Xu <heroxbd@g.o>
To: Gunwant Jain <therealgunwant@×××××.com>
Cc: gentoo-soc@l.g.o
Subject: Re: Fwd: Re: [gentoo-soc] Weekly Report: Portage Powered Android
Date: Thu, 02 Jul 2020 00:05:25
Message-Id: 87tuyq4w94.fsf@robot.e.airelinux.org
In Reply to: Fwd: Re: [gentoo-soc] Weekly Report: Portage Powered Android by Gunwant Jain
1 Hi Gunwant,
2
3 Gunwant Jain <therealgunwant@×××××.com> writes:
4
5 >> Could you please remind me why we need a bootstrap-init? Can we just
6 >> exec the Android init when the lxc-guest starts?
7 >
8 > Yeah sure. Apparently, Android needs to parse its device tree for early
9 > mounting partitions, before exec'ing `init`. Plus even before dealing
10 > with the dt, we need to mount `/system` and switch root to it.
11 > I could create the environment for "using /system as root" w/o the help
12 > of `bootstrap-init` but I couldn't deal with the device tree easily.
13 >
14 > `bootstrap-init` creates the entire environment for android to boot from
15 > scratch and then finally exec's `init`. So I proposed to use it instead
16 > of manually setting up the LXC container for system-as-root devices.
17 > That way the setup is clean as we only need a /dev directory and a static
18 > `bootstrap-init` binary inside of the LXC rootfs.
19
20 In principle you can choose your way of achieving things. But
21 considering you got stuck in making a functional 'bootstrap-init', I
22 have 2 questions.
23
24 1. If you need to prepare a proper environment for Android to boot
25 inside the LXC guest, please check out LXC container hooks in
26 lxc.container.conf(5) manpage. Another init seems an overkill for
27 me.
28
29 2. Why bootstrap-init needs to be written in C++? Would a shell script
30 enough?
31
32 Benda

Attachments

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

Replies

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