summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2008-11-17 17:42:35 +0000
committerGabor Juhos <juhosg@openwrt.org>2008-11-17 17:42:35 +0000
commit22a7b1b3d384203a6100b7773f3565d3139a7b69 (patch)
treefcd0d3ef4eee05cf4db5f18457913fbe2d77a22b /target
parent722c78cd1e5df62e39b0db62166c6ed089dc7145 (diff)
downloadmtk-20170518-22a7b1b3d384203a6100b7773f3565d3139a7b69.zip
mtk-20170518-22a7b1b3d384203a6100b7773f3565d3139a7b69.tar.gz
mtk-20170518-22a7b1b3d384203a6100b7773f3565d3139a7b69.tar.bz2
use MyLoader partition parser on the WP543 board
SVN-Revision: 13265
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c27
-rw-r--r--target/linux/ar71xx/image/Makefile6
-rw-r--r--target/linux/ar71xx/patches-2.6.26/102-mtd_m25p80_add_myloader_parser.patch22
3 files changed, 24 insertions, 31 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
index ef2ef05..c1fe33e 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
@@ -31,39 +31,12 @@
#define WP543_BUTTONS_POLL_INTERVAL 20
-#ifdef CONFIG_MTD_PARTITIONS
-static struct mtd_partition wp543_partitions[] = {
- {
- .name = "myloader",
- .offset = 0,
- .size = 0x20000,
- .mask_flags = MTD_WRITEABLE,
- } , {
- .name = "kernel",
- .offset = 0x30000,
- .size = 0xd0000,
- } , {
- .name = "rootfs",
- .offset = 0x100000,
- .size = 0x100000,
- }
-};
-#endif /* CONFIG_MTD_PARTITIONS */
-
-static struct flash_platform_data wp543_flash_data = {
-#ifdef CONFIG_MTD_PARTITIONS
- .parts = wp543_partitions,
- .nr_parts = ARRAY_SIZE(wp543_partitions),
-#endif
-};
-
static struct spi_board_info wp543_spi_info[] = {
{
.bus_num = 0,
.chip_select = 0,
.max_speed_hz = 25000000,
.modalias = "m25p80",
- .platform_data = &wp543_flash_data,
}
};
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index c37dc67..4baa789 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -35,10 +35,8 @@ endef
define Image/Build/MyLoader
-$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) \
- -p0x30000:0xd0000:ahl:0x80060000 \
- -p0x100000:0 \
- -b0x30000:0xd0000:h:$(KDIR)/vmlinux.lzma \
- -b0x100000:0::$(KDIR)/root.$(1) \
+ -p0x30000:0xc0000:ahl:0x80060000:kernel:$(KDIR)/vmlinux.lzma \
+ -p0xf0000:0:::rootfs:$(KDIR)/root.$(1) \
$(call imgname,$(1),$(2)).img
endef
diff --git a/target/linux/ar71xx/patches-2.6.26/102-mtd_m25p80_add_myloader_parser.patch b/target/linux/ar71xx/patches-2.6.26/102-mtd_m25p80_add_myloader_parser.patch
new file mode 100644
index 0000000..4485d08
--- /dev/null
+++ b/target/linux/ar71xx/patches-2.6.26/102-mtd_m25p80_add_myloader_parser.patch
@@ -0,0 +1,22 @@
+--- a/drivers/mtd/devices/m25p80.c
++++ b/drivers/mtd/devices/m25p80.c
+@@ -645,12 +645,17 @@ static int __devinit m25p_probe(struct s
+ struct mtd_partition *parts = NULL;
+ int nr_parts = 0;
+
++ static const char *part_probes[] = {
+ #ifdef CONFIG_MTD_CMDLINE_PARTS
+- static const char *part_probes[] = { "cmdlinepart", NULL, };
++ "cmdlinepart",
++#endif
++#ifdef CONFIG_MTD_MYLOADER_PARTS
++ "MyLoader",
++#endif
++ NULL, };
+
+ nr_parts = parse_mtd_partitions(&flash->mtd,
+ part_probes, &parts, 0);
+-#endif
+
+ if (nr_parts <= 0 && data && data->parts) {
+ parts = data->parts;