bml_over_mtd: Take care of bad blocks on "boot" partition for Samsung Galaxy S Phones.
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
diff --git a/Android.mk b/Android.mk
index f70cedc..2d7db14 100644
--- a/Android.mk
+++ b/Android.mk
@@ -16,8 +16,8 @@
verifier.c \
encryptedfs_provisioning.c \
mounts.c \
- extendedcommands.c \
- nandroid.c \
+ extendedcommands.c \
+ nandroid.c \
reboot.c \
edifyscripting.c \
setprop.c
@@ -57,7 +57,12 @@
LOCAL_STATIC_LIBRARIES += libminzip libunz libmincrypt
LOCAL_STATIC_LIBRARIES += libedify libbusybox libclearsilverregex libmkyaffs2image libunyaffs liberase_image libdump_image libflash_image
-LOCAL_STATIC_LIBRARIES += libflashutils libmtdutils libmmcutils libbmlutils
+
+LOCAL_STATIC_LIBRARIES += libflashutils libmtdutils libmmcutils libbmlutils
+
+ifeq ($(BOARD_USES_BML_OVER_MTD),true)
+LOCAL_STATIC_LIBRARIES += libbml_over_mtd
+endif
LOCAL_STATIC_LIBRARIES += libminui libpixelflinger_static libpng libcutils
LOCAL_STATIC_LIBRARIES += libstdc++ libc