aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar7/patches-4.14/920-ar7part.patch
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-01-05 13:49:38 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-01-08 16:45:08 +0100
commit4bc92c1e7526ee48e04c25ec4b468e7527e18b6e (patch)
tree3359b7456b0a2306e55ed5fb78820d7658916fbc /target/linux/ar7/patches-4.14/920-ar7part.patch
parent2a0e0dec02accb77163d8251e1be4fdaa538d8e9 (diff)
downloadupstream-4bc92c1e7526ee48e04c25ec4b468e7527e18b6e.tar.gz
upstream-4bc92c1e7526ee48e04c25ec4b468e7527e18b6e.tar.bz2
upstream-4bc92c1e7526ee48e04c25ec4b468e7527e18b6e.zip
ar7: remove unmaintained target
This target seems to have been unmaintained for quite a while, and not a single tester for the (now outdated) kernel 4.14 patches has been found. Remove the code and all the packages which are only used by this target. To add this target to OpenWrt again port it to a recent and supported kernel version. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ar7/patches-4.14/920-ar7part.patch')
-rw-r--r--target/linux/ar7/patches-4.14/920-ar7part.patch120
1 files changed, 0 insertions, 120 deletions
diff --git a/target/linux/ar7/patches-4.14/920-ar7part.patch b/target/linux/ar7/patches-4.14/920-ar7part.patch
deleted file mode 100644
index e520af2083..0000000000
--- a/target/linux/ar7/patches-4.14/920-ar7part.patch
+++ /dev/null
@@ -1,120 +0,0 @@
---- a/drivers/mtd/ar7part.c
-+++ b/drivers/mtd/ar7part.c
-@@ -30,11 +30,14 @@
-
- #include <uapi/linux/magic.h>
-
-+#include <asm/mach-ar7/prom.h>
-+
- #define AR7_PARTS 4
- #define ROOT_OFFSET 0xe0000
-
- #define LOADER_MAGIC1 le32_to_cpu(0xfeedfa42)
- #define LOADER_MAGIC2 le32_to_cpu(0xfeed1281)
-+#define LOADER_MAGIC3 le32_to_cpu(0x434d4d4c)
-
- struct ar7_bin_rec {
- unsigned int checksum;
-@@ -42,12 +45,16 @@ struct ar7_bin_rec {
- unsigned int address;
- };
-
-+int create_titan_partitions(struct mtd_info *master,
-+ const struct mtd_partition **pparts,
-+ struct mtd_part_parser_data *data);
-+
- static int create_mtd_partitions(struct mtd_info *master,
- const struct mtd_partition **pparts,
- struct mtd_part_parser_data *data)
- {
- struct ar7_bin_rec header;
-- unsigned int offset;
-+ unsigned int offset, mtd_start, mtd_end;
- size_t len;
- unsigned int pre_size = master->erasesize, post_size = 0;
- unsigned int root_offset = ROOT_OFFSET;
-@@ -55,6 +62,16 @@ static int create_mtd_partitions(struct
- int retries = 10;
- struct mtd_partition *ar7_parts;
-
-+ const char *prom_str = prom_getenv("ProductID");
-+ char mtd_name[] = "mtd1";
-+ if(prom_str &&
-+ (strcmp(prom_str, "CYWL")==0 ||
-+ strcmp(prom_str, "CYWM")==0 ||
-+ strcmp(prom_str, "CYLM")==0 ||
-+ strcmp(prom_str, "CYLL")==0)){
-+ return create_titan_partitions(master, pparts, data);
-+ }
-+
- ar7_parts = kzalloc(sizeof(*ar7_parts) * AR7_PARTS, GFP_KERNEL);
- if (!ar7_parts)
- return -ENOMEM;
-@@ -83,34 +100,39 @@ static int create_mtd_partitions(struct
-
- pre_size = offset;
-
-- if (!ar7_parts[1].offset) {
-- ar7_parts[1].offset = master->size - master->erasesize;
-- post_size = master->erasesize;
-- }
--
- switch (header.checksum) {
-- case LOADER_MAGIC1:
-- while (header.length) {
-- offset += sizeof(header) + header.length;
-- mtd_read(master, offset, sizeof(header), &len,
-- (uint8_t *)&header);
-- }
-- root_offset = offset + sizeof(header) + 4;
-- break;
- case LOADER_MAGIC2:
-+ for (retries = 0; retries <= 9; retries++) {
-+ mtd_name[3] = '0' + retries;
-+ prom_str = prom_getenv(mtd_name);
-+ if (prom_str == NULL)
-+ continue;
-+ sscanf(prom_str, "%i,%i", &mtd_start, &mtd_end);
-+ if (pre_size == (mtd_start & 0x1ffffff)) {
-+ ar7_parts[1].offset = mtd_end &= 0x1ffffff;
-+ ar7_parts[1].size = post_size = master->size - mtd_end;
-+ break;
-+ }
-+ }
-+ case LOADER_MAGIC1:
-+ root_offset = (header.checksum == LOADER_MAGIC1) ? 4 : 0;
- while (header.length) {
- offset += sizeof(header) + header.length;
- mtd_read(master, offset, sizeof(header), &len,
- (uint8_t *)&header);
- }
-- root_offset = offset + sizeof(header) + 4 + 0xff;
-- root_offset &= ~(uint32_t)0xff;
-+ root_offset += offset + sizeof(header);
- break;
- default:
- printk(KERN_WARNING "Unknown magic: %08x\n", header.checksum);
- break;
- }
-
-+ if (!ar7_parts[1].offset) {
-+ post_size = master->erasesize;
-+ ar7_parts[1].offset = master->size - post_size;
-+ }
-+
- mtd_read(master, root_offset, sizeof(header), &len, (u8 *)&header);
- if (header.checksum != SQUASHFS_MAGIC) {
- root_offset += master->erasesize - 1;
---- a/drivers/mtd/titanpart.c
-+++ b/drivers/mtd/titanpart.c
-@@ -148,8 +148,8 @@ static void titan_add_partition(char * e
-
- }
- int create_titan_partitions(struct mtd_info *master,
-- struct mtd_partition **pparts,
-- unsigned long origin)
-+ const struct mtd_partition **pparts,
-+ struct mtd_part_parser_data *data)
- {
- struct nsp_img_hdr_head hdr;
- struct nsp_img_hdr_section_info sect_info;