Update from CM.
diff --git a/Android.mk b/Android.mk
index 1dc34a5..0179dc0 100644
--- a/Android.mk
+++ b/Android.mk
@@ -26,12 +26,12 @@
 
 LOCAL_FORCE_STATIC_EXECUTABLE := true
 
-RECOVERY_VERSION := ClockworkMod Recovery v3.0.0.5
+RECOVERY_VERSION := ClockworkMod Recovery v3.0.0.6
 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_HAS_MTD_CACHE BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_RECOVERY_IGNORE_BOOTABLES
+BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY
 
 $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \
   $(if $($(board_define)), \
diff --git a/common.h b/common.h
index a4acc39..5d24881 100644
--- a/common.h
+++ b/common.h
@@ -112,7 +112,7 @@
     const char* device2;      // alternative device to try if fs_type
                               // == "ext4" or "vfat" and mounting
                               // 'device' fails
-    const char* fallback_fs_type;
+    const char* fs_type2;
 } Volume;
 
 #endif  // RECOVERY_COMMON_H
diff --git a/etc/init.rc b/etc/init.rc
index 611f5b4..c258657 100644
--- a/etc/init.rc
+++ b/etc/init.rc
@@ -9,6 +9,7 @@
 
     symlink /system/etc /etc
 
+    mkdir /boot
     mkdir /sdcard
     mkdir /sd-ext
     mkdir /datadata
diff --git a/extendedcommands.c b/extendedcommands.c
index 95a5f07..1ce3bf1 100644
--- a/extendedcommands.c
+++ b/extendedcommands.c
@@ -974,7 +974,7 @@
 
     fprintf(file, "%s ", device);
     fprintf(file, "%s ", path);
-    fprintf(file, "%s rw\n", vol->fs_type);
+    fprintf(file, "%s rw\n", vol->fs_type2 != NULL ? "auto" : vol->fs_type);
 }
 
 void create_fstab()
@@ -986,6 +986,9 @@
         LOGW("Unable to create /etc/fstab!\n");
         return;
     }
+    Volume *vol = volume_for_path("/boot");
+    if (NULL != vol && strcmp(vol->fs_type, "mtd") != 0 && strcmp(vol->fs_type, "emmc") != 0 && strcmp(vol->fs_type, "bml") != 0)
+         write_fstab_root("/boot", file);
     write_fstab_root("/cache", file);
     write_fstab_root("/data", file);
     if (has_datadata()) {
diff --git a/minui/Android.mk b/minui/Android.mk
index d71cea2..44f9fa1 100644
--- a/minui/Android.mk
+++ b/minui/Android.mk
@@ -15,6 +15,10 @@
     LOCAL_CFLAGS += -DBOARD_HAS_JANKY_BACKBUFFER
 endif
 
+ifeq ($(BOARD_HAS_FLIPPED_SCREEN), true)
+    LOCAL_CFLAGS += -DBOARD_HAS_FLIPPED_SCREEN
+endif
+
 LOCAL_MODULE := libminui
 
 include $(BUILD_STATIC_LIBRARY)
diff --git a/minui/graphics.c b/minui/graphics.c
index 915873b..8192d3f 100644
--- a/minui/graphics.c
+++ b/minui/graphics.c
@@ -144,6 +144,16 @@
     /* swap front and back buffers */
     gr_active_fb = (gr_active_fb + 1) & 1;
 
+#ifdef BOARD_HAS_FLIPPED_SCREEN
+    /* flip buffer 180 degrees for devices with physicaly inverted screens */
+    unsigned int i;
+    for (i = 1; i < (vi.xres * vi.yres); i++) {
+        unsigned short tmp = gr_mem_surface.data[i];
+        gr_mem_surface.data[i] = gr_mem_surface.data[(vi.xres * vi.yres * 2) - i];
+        gr_mem_surface.data[(vi.xres * vi.yres * 2) - i] = tmp;
+    }
+#endif
+
     /* copy data from the in-memory surface to the buffer we're about
      * to make active. */
     memcpy(gr_framebuffer[gr_active_fb].data, gr_mem_surface.data,
diff --git a/roots.c b/roots.c
index d4c0033..4ef5c37 100644
--- a/roots.c
+++ b/roots.c
@@ -62,6 +62,7 @@
         // lines may optionally have a second device, to use if
         // mounting the first one fails.
         char* device2 = strtok(NULL, " \t\n");
+        char* fs_type2 = strtok(NULL, " \t\n");
 
         if (mount_point && fs_type && device) {
             while (num_volumes >= alloc) {
@@ -69,10 +70,11 @@
                 device_volumes = realloc(device_volumes, alloc*sizeof(Volume));
             }
             device_volumes[num_volumes].mount_point = strdup(mount_point);
-            device_volumes[num_volumes].fs_type = strdup(fs_type);
+            device_volumes[num_volumes].fs_type = fs_type2 != NULL ? strdup(fs_type2) : strdup(fs_type);
             device_volumes[num_volumes].device = strdup(device);
             device_volumes[num_volumes].device2 =
-                device2 ? strdup(device2) : NULL;
+                (device2 != NULL && strcmp(device2, "NULL") != 0) ? strdup(device2) : NULL;
+            device_volumes[num_volumes].fs_type2 = fs_type2 != NULL ? strdup(fs_type) : NULL;
             ++num_volumes;
         } else {
             LOGE("skipping malformed recovery.fstab line: %s\n", original);
@@ -105,6 +107,17 @@
     return NULL;
 }
 
+int try_mount(const char* device, const char* mount_point, const char* fs_type) {
+    if (device == NULL || mount_point == NULL || fs_type == NULL)
+        return -1;
+    int ret = mount(device, mount_point, fs_type,
+                       MS_NOATIME | MS_NODEV | MS_NODIRATIME, "");
+    if (ret == 0)
+        return 0;
+    LOGW("failed to mount %s (%s)\n", device, strerror(errno));
+    return ret;
+}
+
 int ensure_path_mounted(const char* path) {
     Volume* v = volume_for_path(path);
     if (v == NULL) {
@@ -144,21 +157,18 @@
         }
         return mtd_mount_partition(partition, v->mount_point, v->fs_type, 0);
     } else if (strcmp(v->fs_type, "ext4") == 0 ||
+               strcmp(v->fs_type, "ext3") == 0 ||
                strcmp(v->fs_type, "vfat") == 0) {
-        result = mount(v->device, v->mount_point, v->fs_type,
-                       MS_NOATIME | MS_NODEV | MS_NODIRATIME, "");
-        if (result == 0) return 0;
-
-        if (v->device2) {
-            LOGW("failed to mount %s (%s); trying %s\n",
-                 v->device, strerror(errno), v->device2);
-            result = mount(v->device2, v->mount_point, v->fs_type,
-                           MS_NOATIME | MS_NODEV | MS_NODIRATIME, "");
-            if (result == 0) return 0;
-        }
-
-        LOGE("failed to mount %s (%s)\n", v->mount_point, strerror(errno));
-        return -1;
+        // try fs type 2 first
+        if ((result = try_mount(v->device, v->mount_point, v->fs_type)) == 0)
+            return 0;
+        if ((result = try_mount(v->device2, v->mount_point, v->fs_type)) == 0)
+            return 0;
+        if ((result = try_mount(v->device, v->mount_point, v->fs_type2)) == 0)
+            return 0;
+        if ((result = try_mount(v->device2, v->mount_point, v->fs_type2)) == 0)
+            return 0;
+        return result;
     } else {
         // let's try mounting with the mount binary and hope for the best.
         char mount_cmd[PATH_MAX];