kernel: warn users to use the new (dedicated) firmware splitter
authorRafał Miłecki <zajec5@gmail.com>
Sun, 14 Dec 2014 00:35:03 +0000 (00:35 +0000)
committerRafał Miłecki <zajec5@gmail.com>
Sun, 14 Dec 2014 00:35:03 +0000 (00:35 +0000)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 43700

target/linux/generic/patches-3.14/407-mtd-old-firmware-uimage-splitter.patch
target/linux/generic/patches-3.14/408-mtd-old-rootfs-squashfs-splitter.patch
target/linux/generic/patches-3.18/407-mtd-old-firmware-uimage-splitter.patch
target/linux/generic/patches-3.18/408-mtd-old-rootfs-squashfs-splitter.patch

index 9d8d975dde4cf94e6ad516002856ba0104759e94..3f7e910e7279c08071f31d980f6b84697a88f44e 100644 (file)
@@ -14,7 +14,7 @@
  config MTD_SPLIT
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -668,6 +668,32 @@ mtd_pad_erasesize(struct mtd_info *mtd,
+@@ -668,6 +668,37 @@ mtd_pad_erasesize(struct mtd_info *mtd,
        return len;
  }
  
 +      if (len + master->erasesize > part->mtd.size)
 +              return;
 +
++      if (config_enabled(CONFIG_MTD_SPLIT_UIMAGE_FW))
++              pr_err("Dedicated partitioner didn't split firmware partition, please fill a bug report!\n");
++      else
++              pr_warn("Support for built-in firmware splitter will be removed, please use CONFIG_MTD_SPLIT_UIMAGE_FW\n");
++
 +      __mtd_add_partition(master, "rootfs", part->offset + len,
 +                          part->mtd.size - len, false);
 +}
@@ -47,7 +52,7 @@
  #ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #define SPLIT_FIRMWARE_NAME   CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #else
-@@ -676,7 +702,14 @@ mtd_pad_erasesize(struct mtd_info *mtd,
+@@ -676,7 +707,14 @@ mtd_pad_erasesize(struct mtd_info *mtd,
  
  static void split_firmware(struct mtd_info *master, struct mtd_part *part)
  {
index ff2c702a56f2336bcdcf188300191a64a7b1268d..c29b137774e44cc6d3d1f38f01956640c7cd288f 100644 (file)
@@ -62,7 +62,7 @@
  #define UBOOT_MAGIC   0x27051956
  
  static void split_uimage(struct mtd_info *master, struct mtd_part *part)
-@@ -725,7 +766,10 @@ static void mtd_partition_split(struct m
+@@ -730,7 +771,10 @@ static void mtd_partition_split(struct m
                return;
  
        if (!strcmp(part->mtd.name, "rootfs")) {
index b63690a1d4ed166df3b3888a863b9c5717dcbef9..34a4b1aa8cf2ecece0da57f32d7a6bc47207eb0c 100644 (file)
@@ -14,7 +14,7 @@
  config MTD_SPLIT
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -681,6 +681,32 @@ mtd_pad_erasesize(struct mtd_info *mtd,
+@@ -681,6 +681,37 @@ mtd_pad_erasesize(struct mtd_info *mtd,
        return len;
  }
  
 +      if (len + master->erasesize > part->mtd.size)
 +              return;
 +
++      if (config_enabled(CONFIG_MTD_SPLIT_UIMAGE_FW))
++              pr_err("Dedicated partitioner didn't split firmware partition, please fill a bug report!\n");
++      else
++              pr_warn("Support for built-in firmware splitter will be removed, please use CONFIG_MTD_SPLIT_UIMAGE_FW\n");
++
 +      __mtd_add_partition(master, "rootfs", part->offset + len,
 +                          part->mtd.size - len, false);
 +}
@@ -47,7 +52,7 @@
  #ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #define SPLIT_FIRMWARE_NAME   CONFIG_MTD_SPLIT_FIRMWARE_NAME
  #else
-@@ -689,7 +715,14 @@ mtd_pad_erasesize(struct mtd_info *mtd,
+@@ -689,7 +720,14 @@ mtd_pad_erasesize(struct mtd_info *mtd,
  
  static void split_firmware(struct mtd_info *master, struct mtd_part *part)
  {
index 07d4f7d8245b5ecc485ce65e55868fec6c4577c5..ca819584321be55a84afd469f6ef0738db4eb815 100644 (file)
@@ -62,7 +62,7 @@
  #define UBOOT_MAGIC   0x27051956
  
  static void split_uimage(struct mtd_info *master, struct mtd_part *part)
-@@ -738,7 +779,10 @@ static void mtd_partition_split(struct m
+@@ -743,7 +784,10 @@ static void mtd_partition_split(struct m
                return;
  
        if (!strcmp(part->mtd.name, "rootfs")) {