Andrew Boie | 29 Jun 2012 21:36
Picon
Favicon

[PATCH] bcb: Android bootloader control block driver

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.

This driver uses the bootloader control block (BCB) in the 'misc'
partition, which is the AOSP mechanism used to communicate with
the bootloader. Writing 'bootonce-NNN' to the command field
will cause the bootloader to do a oneshot boot into an alternate
boot label NNN if it exists. The device and partition number are
passed in via kernel command line.

It is the bootloader's job to guard against this area being uninitialzed
or containing an invalid boot label, and just boot normally if that
is the case. The bootloader will always populate a magic signature in
the BCB; the driver will refuse to update it if not present.

Signed-off-by: Andrew Boie <andrew.p.boie <at> intel.com>
---
 drivers/staging/android/Kconfig  |   11 ++
 drivers/staging/android/Makefile |    1 +
 drivers/staging/android/bcb.c    |  232 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 244 insertions(+)
 create mode 100644 drivers/staging/android/bcb.c

diff --git a/drivers/staging/android/Kconfig b/drivers/staging/android/Kconfig
index 9a99238..c30fd20 100644
--- a/drivers/staging/android/Kconfig
+++ b/drivers/staging/android/Kconfig
 <at>  <at>  -78,6 +78,17  <at>  <at>  config ANDROID_INTF_ALARM_DEV
(Continue reading)


Gmane