diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-07-03 15:24:01 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-07-03 15:24:01 +0000 |
commit | db1a0d339ede0eac49d1f2d2a6574b0fd8f16503 (patch) | |
tree | 16d5eea0ab41f950d0841b1ad51868ef6b72dca6 /target/linux | |
parent | d4f13972f8563c005b18297d4dd9a40ab7e8dc31 (diff) |
ar71xx: remove the built-in MTD map of the ALL0258N
Pass the mtd_layout via the kernel command line instead.
Also increase the kernel partition size to 1024k, so current kernel can fit in.
Signed-off-by: Daniel Golle <dgolle@allnet.de>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32585 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-all0258n.c | 50 | ||||
-rw-r--r-- | target/linux/ar71xx/image/Makefile | 11 |
2 files changed, 7 insertions, 54 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-all0258n.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-all0258n.c index fa3cefb64c..2495bcba79 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-all0258n.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-all0258n.c @@ -8,9 +8,6 @@ * by the Free Software Foundation. */ -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> - #include <asm/mach-ath79/ath79.h> #include "dev-eth.h" @@ -33,51 +30,6 @@ /* showed up in the original firmware's bootlog */ #define ALL0258N_SEC_PHYMASK BIT(3) -/* - * from U-Boot bootargs of original firmware: - * mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),320k(custom),1024k(kernel),4928k(rootfs),1536k(failsafe),64k(ART) - * we use a more OpenWrt-friendly layout now: - * mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),896k(kernel),5376k(rootfs),1536k(failsafe),64k(ART) - */ -static struct mtd_partition all0258n_partitions[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x040000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "u-boot-env", - .offset = 0x040000, - .size = 0x010000, - }, { - .name = "kernel", - .offset = 0x050000, - .size = 0x0E0000, - }, { - .name = "rootfs", - .offset = 0x130000, - .size = 0x540000, - }, { - .name = "failsafe", - .offset = 0x670000, - .size = 0x180000, - }, { - .name = "firmware", - .offset = 0x050000, - .size = 0x620000, - }, { - .name = "art", - .offset = 0x7F0000, - .size = 0x010000, - .mask_flags = MTD_WRITEABLE, - } -}; - -static struct flash_platform_data all0258n_flash_data = { - .parts = all0258n_partitions, - .nr_parts = ARRAY_SIZE(all0258n_partitions), -}; - static struct gpio_led all0258n_leds_gpio[] __initdata = { { .name = "all0258n:green:rssihigh", @@ -110,7 +62,7 @@ static void __init all0258n_setup(void) u8 *mac = (u8 *) KSEG1ADDR(0x1f7f0000); u8 *ee = (u8 *) KSEG1ADDR(0x1f7f1000); - ath79_register_m25p80(&all0258n_flash_data); + ath79_register_m25p80(NULL); ath79_register_leds_gpio(-1, ARRAY_SIZE(all0258n_leds_gpio), all0258n_leds_gpio); diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 06e39561d7..13fb0ae02a 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -655,6 +655,12 @@ define Image/Build/Profile/ALFAAP96 $(call Image/Build/Template/$(fs_128k)/$(1),AthLzma,alfa-ap96,$(alfa_ap96_cmdline),$(alfa_ap96_mtdlayout),2097152,13631488,RKuImage) endef +all0258n_cmdline=board=ALL0258N console=ttyS0,115200 +all0258n_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),1024k(kernel),5248k(rootfs),1536k(failsafe),64k(art),6272k@0x50000(firmware) +define Image/Build/Profile/ALL0258N + $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,all0258n,$(all0258n_cmdline),$(all0258n_mtdlayout),1048576,5373952,KRuImage) +endef + ap113_mtd_layout=64k(u-boot),3008k(rootfs),896k(uImage),64k(NVRAM),64k(ART),3904k@0x10000(firmware) ap113_cmdline=board=AP113 console=ttyS0,115200 define Image/Build/Profile/AP113 @@ -1057,11 +1063,6 @@ define Image/Build/Profile/ZCN1523H516 $(call Image/Build/Template/$(fs_64k)/$(1),Zcomax,zcn-1523h-5-16,$(zcn1523h516_cmdline)) endef -all0258n_cmdline=board=ALL0258N console=ttyS0,115200 -define Image/Build/Profile/ALL0258N - $(call Image/Build/Template/$(fs_64k)/$(1),AthLzma,all0258n,$(all0258n_cmdline),,917504,5505024,KRuImage) -endef - define Image/Build/Profile/Default $(call Image/Build/Profile/ALFAAP96,$(1)) $(call Image/Build/Profile/ALFANX,$(1)) |