diff --git a/Android.mk b/Android.mk index bc0e3b2..de6ddd6 100644 --- a/Android.mk +++ b/Android.mk @@ -27,12 +27,6 @@ ifndef BOARD_HAS_NO_MISC_PARTITION LOCAL_SRC_FILES += \ firmware.c \ bootloader.c -else - LOCAL_CFLAGS += -DBOARD_HAS_NO_MISC_PARTITION -endif - -ifdef BOARD_RECOVERY_IGNORE_BOOTABLES - LOCAL_CFLAGS += -DBOARD_RECOVERY_IGNORE_BOOTABLES endif ifdef BOARD_HIJACK_RECOVERY_PATH @@ -45,12 +39,12 @@ LOCAL_MODULE := recovery LOCAL_FORCE_STATIC_EXECUTABLE := true -RECOVERY_VERSION := ClockworkMod Recovery v2.5.1.3 +RECOVERY_VERSION := ClockworkMod Recovery v2.5.1.4 LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)" RECOVERY_API_VERSION := 2 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) -BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_SDCARD_DEVICE_PRIMARY BOARD_SDCARD_DEVICE_SECONDARY BOARD_SDEXT_DEVICE BOARD_SDEXT_FILESYSTEM BOARD_DATA_DEVICE BOARD_DATA_FILESYSTEM BOARD_DATADATA_DEVICE BOARD_DATADATA_FILESYSTEM BOARD_CACHE_DEVICE BOARD_CACHE_FILESYSTEM BOARD_SYSTEM_DEVICE BOARD_SYSTEM_FILESYSTEM BOARD_HAS_DATADATA BOARD_DATA_FILESYSTEM_OPTIONS BOARD_DATADATA_FILESYSTEM_OPTIONS BOARD_CACHE_FILESYSTEM_OPTIONS BOARD_SYSTEM_FILESYSTEM_OPTIONS BOARD_HAS_MTD_CACHE BOARD_USES_BMLUTILS BOARD_USES_MMCUTILS BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY +BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_SDCARD_DEVICE_PRIMARY BOARD_SDCARD_DEVICE_SECONDARY BOARD_SDEXT_DEVICE BOARD_SDEXT_FILESYSTEM BOARD_DATA_DEVICE BOARD_DATA_FILESYSTEM BOARD_DATADATA_DEVICE BOARD_DATADATA_FILESYSTEM BOARD_CACHE_DEVICE BOARD_CACHE_FILESYSTEM BOARD_SYSTEM_DEVICE BOARD_SYSTEM_FILESYSTEM BOARD_HAS_DATADATA BOARD_DATA_FILESYSTEM_OPTIONS BOARD_DATADATA_FILESYSTEM_OPTIONS BOARD_CACHE_FILESYSTEM_OPTIONS BOARD_SYSTEM_FILESYSTEM_OPTIONS BOARD_HAS_MTD_CACHE BOARD_USES_BMLUTILS BOARD_USES_MMCUTILS BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_RECOVERY_IGNORE_BOOTABLES BOARD_HAS_NO_MISC_PARTITION $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \ $(if $($(board_define)), \ diff --git a/bmlutils/bmlutils.c b/bmlutils/bmlutils.c index 5709cc5..92bd929 100644 --- a/bmlutils/bmlutils.c +++ b/bmlutils/bmlutils.c @@ -21,9 +21,14 @@ #include extern int __system(const char *command); +#define BML_UNLOCK_ALL 0x8A29 ///< unlock all partition RO -> RW int cmd_bml_restore_raw_partition(const char *partition, const char *filename) { + printf("bml restore\n"); + int fd = open("/dev/block/bml7", O_RDWR | O_LARGEFILE); + return ioctl(fd, BML_UNLOCK_ALL, 0); + char tmp[PATH_MAX]; sprintf("dd if=%s of=/dev/block/bml7 bs=4096", filename); return __system(tmp); diff --git a/minui/graphics.c b/minui/graphics.c index c562053..bf90484 100644 --- a/minui/graphics.c +++ b/minui/graphics.c @@ -90,7 +90,7 @@ static int get_framebuffer(GGLSurface *fb) fb->version = sizeof(*fb); fb->width = vi.xres; fb->height = vi.yres; - fb->stride = vi.xres; + fb->stride = fi.line_length/2; /* stride is the number of pixels until the data of next row, >= xres */; fb->data = bits; fb->format = GGL_PIXEL_FORMAT_RGB_565; @@ -99,8 +99,8 @@ static int get_framebuffer(GGLSurface *fb) fb->version = sizeof(*fb); fb->width = vi.xres; fb->height = vi.yres; - fb->stride = vi.xres; - fb->data = (void*) (((unsigned) bits) + vi.yres * vi.xres * 2); + fb->stride = fi.line_length/2; + fb->data = (void*) (((unsigned) bits) + vi.yres * fi.line_length); fb->format = GGL_PIXEL_FORMAT_RGB_565; return fd;