From 63ba5d38377a1b1b7734972602f35b6c36df3f7e Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Sat, 18 May 2013 12:50:22 +0300 Subject: fix flash partiotions Signed-off-by: Roman Yeryomin --- .../9991-drivers-mtd-maps-openwrt.patch | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 target/linux/realtek/patches-2.6.30/9991-drivers-mtd-maps-openwrt.patch (limited to 'target') diff --git a/target/linux/realtek/patches-2.6.30/9991-drivers-mtd-maps-openwrt.patch b/target/linux/realtek/patches-2.6.30/9991-drivers-mtd-maps-openwrt.patch new file mode 100644 index 000000000..fe413d990 --- /dev/null +++ b/target/linux/realtek/patches-2.6.30/9991-drivers-mtd-maps-openwrt.patch @@ -0,0 +1,81 @@ +--- files/drivers/mtd/maps/rtl819x_flash.c 2013-05-10 23:08:00.000000000 +0300 ++++ files.old/drivers/mtd/maps/rtl819x_flash.c 2013-05-10 15:34:50.000000000 +0300 +@@ -164,45 +164,39 @@ + }, + }; + +-#elif defined( CONFIG_ROOTFS_SQUASH ) +-#ifndef CONFIG_RTL_FLASH_DUAL_IMAGE_ENABLE +-static struct mtd_partition rtl8196_parts1[] = { +- { +- name: "boot+cfg+linux", +- size: (CONFIG_RTL_ROOT_IMAGE_OFFSET-0), +- offset: 0x00000000, +- }, +- { +- name: "root fs", +-#ifdef CONFIG_RTL_TWO_SPI_FLASH_ENABLE +-#ifdef CONFIG_MTD_CONCAT +- size: (CONFIG_RTL_SPI_FLASH1_SIZE+CONFIG_RTL_SPI_FLASH2_SIZE-CONFIG_RTL_ROOT_IMAGE_OFFSET), +-#else +- size: (CONFIG_RTL_SPI_FLASH1_SIZE-CONFIG_RTL_ROOT_IMAGE_OFFSET), +-#endif +-#else +-#if !defined(CONFIG_MTD_CHAR) +- size: (CONFIG_RTL_FLASH_SIZE-CONFIG_RTL_ROOT_IMAGE_OFFSET), +-#else +- size: (CONFIG_RTL_FLATFS_IMAGE_OFFSET-CONFIG_RTL_ROOT_IMAGE_OFFSET), +-#endif +-#endif +- offset: (CONFIG_RTL_ROOT_IMAGE_OFFSET), +- } +-#if defined(CONFIG_MTD_CHAR) +- , +- { +- name: "flatfs", +- +- size: (CONFIG_RTL_FLASH_SIZE-CONFIG_RTL_FLATFS_IMAGE_OFFSET), +- offset: (CONFIG_RTL_FLATFS_IMAGE_OFFSET), +- } +-#endif +- +- +- +-}; +- ++#elif defined( CONFIG_ROOTFS_SQUASH ) ++#ifndef CONFIG_RTL_FLASH_DUAL_IMAGE_ENABLE ++static struct mtd_partition rtl8196_parts1[] = { ++ { ++ name: "boot+cfg", ++ size: (CONFIG_RTL_LINUX_IMAGE_OFFSET - 0), ++ offset: 0x00000000, ++ }, ++ { ++ name: "kernel", ++ size: (CONFIG_RTL_ROOT_IMAGE_OFFSET - CONFIG_RTL_LINUX_IMAGE_OFFSET), ++ offset: CONFIG_RTL_LINUX_IMAGE_OFFSET, ++ }, ++ { ++ name: "rootfs", ++#ifdef CONFIG_RTL_TWO_SPI_FLASH_ENABLE ++#ifdef CONFIG_MTD_CONCAT ++ size: (CONFIG_RTL_SPI_FLASH1_SIZE + CONFIG_RTL_SPI_FLASH2_SIZE - CONFIG_RTL_ROOT_IMAGE_OFFSET), ++#else ++ size: (CONFIG_RTL_SPI_FLASH1_SIZE - CONFIG_RTL_ROOT_IMAGE_OFFSET), ++#endif ++#else ++ size: (CONFIG_RTL_FLASH_SIZE - CONFIG_RTL_ROOT_IMAGE_OFFSET), ++#endif ++ offset: CONFIG_RTL_ROOT_IMAGE_OFFSET, ++ }, ++ { ++ name: "firmware", ++ size: (CONFIG_RTL_FLASH_SIZE - CONFIG_RTL_LINUX_IMAGE_OFFSET), ++ offset: CONFIG_RTL_LINUX_IMAGE_OFFSET, ++ }, ++}; ++ + #else //!CONFIG_RTL_FLASH_DUAL_IMAGE_ENABLE + static struct mtd_partition rtl8196_parts1[] = { + { -- cgit v1.2.3