From: "Boie, Andrew P" <andrew.p.boie@intel.com>
To: NeilBrown <neilb@suse.de>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"ccross@android.com" <ccross@android.com>,
"arve@android.com" <arve@android.com>,
"rebecca@android.com" <rebecca@android.com>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] bcb: Android bootloader control block driver
Date: Fri, 29 Jun 2012 21:56:36 +0000 [thread overview]
Message-ID: <2E57EB624252DB47AFBC064A9AFBA980077EE18B@ORSMSX105.amr.corp.intel.com> (raw)
In-Reply-To: <20120630072519.71835f43@notabene.brown>
> From: NeilBrown [mailto:neilb@suse.de]
> Sent: Friday, June 29, 2012 2:25 PM
>
> On Fri, 29 Jun 2012 12:36:30 -0700 Andrew Boie <andrew.p.boie@intel.com>
> wrote:
>
> > Android userspace tells the kernel that it wants to boot into recovery
> > or some other non-default OS environment by passing a string argument
> > to reboot(). It is left to the OEM to hook this up to their specific
> > bootloader.
> Maybe I'm missing something obvious, but why does this need to be
> implemented
> in the kernel? Can't some user-space process just write to that partition
> using open/read/seek/write/close before calling 'reboot'.
Thanks for reviewing. The way Android is currently designed, all calls to reboot the system into an alternate target go into android_reboot() in libcutils which then make the reboot() system call with a string argument. How this is actually done on a particular board is not specified in the Android Open Source Project as far as I can see. The particular bootloader is not specified either, many different ones are being used in practice.
Not every architecture is going to be using the Bootloader Control Block to handle these boots into alternate targets. For example, I worked on one Android-based device that didn't have a traditional bootloader at all and the reboot hook in the kernel was radically different. In this case the BCB ended up only being used by the recovery console to stash its command line arguments.
If this were all done in userspace, then I think there would have to be separate code paths in libcutils for different board implementations of this policy. As of right now libcutils doesn't have any hardware-specific stuff in it and the mechanism to effect these policies is left to the kernel, libcutils works everywhere without modification.
Regards,
Andrew
next prev parent reply other threads:[~2012-06-29 21:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 19:36 Andrew Boie
2012-06-29 21:25 ` NeilBrown
2012-06-29 21:56 ` Boie, Andrew P [this message]
2012-06-30 3:08 ` gregkh
2012-06-30 3:23 ` Greg KH
2012-06-30 3:43 ` Colin Cross
2012-06-30 4:19 ` Greg KH
2012-06-30 4:37 ` Colin Cross
2012-07-02 0:10 ` NeilBrown
2012-07-07 22:39 ` Colin Cross
2012-07-07 23:05 ` Greg KH
2012-07-08 0:25 ` Colin Cross
2012-07-08 0:35 ` Boie, Andrew P
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2E57EB624252DB47AFBC064A9AFBA980077EE18B@ORSMSX105.amr.corp.intel.com \
--to=andrew.p.boie@intel.com \
--cc=arve@android.com \
--cc=ccross@android.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=rebecca@android.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®