The system() call implemented in bionic/libc/unistd/system.c
depends on paths.h which sets _PATH_BSHELL to "/system/bin/sh"
which is incorrect for recovery - recovery cannot
depend on /system being mounted or even sane because /system
could be corrupt when recovery is used.
We need _PATH_BSHELL to be pointing to /sbin/sh - and
therefore bootable/recovery has its own __system() call
implemented in bootable/recovery/libcrecovery that sets
_PATH_BSHELL as well as makes sure environ is used in
the call to execve.
Change-Id: I2e5fd9c259e4fd0a9aad826a297fd3233a50a7c1
For the Power menu,
frameworks/base/core/jni/android_os_Power.cpp#L180
already uses TARGET_RECOVERY_PRE_COMMAND if
TARGET_RECOVERY_PRE_COMMAND is defined in the
BoardConfig.mk for a device to make a system() call before
calling __reboot() for recovery. This commit adds
the same thing to the other places that we know we are
getting into recovery using __reboot().
Change-Id: Ifd0394fed1e87b63d80d95e0e2a049004518e27e
The Samsung Galaxy S bootloader apparently expects the kernel to be flashed to BML-managed flash - bad erase blocks will be mapped from a reservoir area.
CWM however just skips bad blocks, the usual procedure for mtd-accessed flash.
Consequently, the bootloader sees a corrupt zImage, and will usually crash when the kernel initializes.
This of course will only happen when the "boot" partition has bad blocks.
This patch was written by "eifert" and adds a tool called "bml_over_mtd" for flashing boot images which takes care of bad blocks and maps them to a reservoir area, like BML does.
Change-Id: If570717a19b879d47d70d937a0751cd85853eacd
Exable uses in BoardConfig.mk:
BOARD_HAS_SDCARD_INTERNAL := true
BOARD_SDCARD_DEVICE_INTERNAL := /dev/block/mmcblk3p1
Setting BOARD_SDCARD_DEVICE_SECONDARY to the same value as
BOARD_SDCARD_DEVICE_INTERNAL will allow the device to
"fall back" to the internal SD card for other actions.
Change-Id: I2cf8ab4b1d385ac714f5b7416b915d059033d94b
This, for example, is for an LDPI device:
BOARD_RECOVERY_FONT_INCLUDE_HEADER := ../../device/geeksphone/one/font_7x16.h
BOARD_RECOVERY_FONT_WIDTH := 7
BOARD_RECOVERY_FONT_HEIGHT := 16
Change-Id: I71d2f420b9668b5767c9b0b5d90e3e523c56e873
Detect flash type at runtime rather than requiring this to be set in the
device configuration. The detection is based on the existence of /proc/mtd,
/proc/emmc, or /dev/block/bml1.
Change-Id: I464962a567022c5862c249f06d36c2d1cddeacba