Hi, I added support for the seagate GoFlex Net/Home to the dockstar target. The kernel will get slightly larger, but I think this is acceptable on this platform, since it has enough resources.
No change of the bootloader is required, but you must set the u-boot environment variables correctly. These mainly are "mainlineLinux" and "arcNumber". "mainlineLinux" mut be set to "yes" for the u-boot to export the "arcNumber" variable to the kernel, and the arcNumber must be set for the kernel to correctly distinguish between a dockstar and a goflex. To flash openwrt to factory default goflex net, the following steps are neccessary: - Attach a serial console to the goflex and at the bootloader prompt enter the following commands: setenv arcNumber 3089 setenv mainlineLinux yes setenv bootcmd nand read 0x6400000 0x100000 0x400000\; bootm 0x6400000\; setenv bootargs console=ttyS0,115200 root=/dev/mtdblock2 rw rootfstype=jffs2 saveenv flash kernel: mw 0x6400000 0xffff 0x400000 tftpboot 0x6400000 openwrt-kirkwood-uImage nand erase 0x100000 0x400000 nand write.e 0x6400000 0x100000 0x400000 flash rootfs: mw 0x6400000 0xffff 0x400000 tftpboot 0x6400000 openwrt-kirkwood-Dockstar-jffs2-128k.img nand erase 0x500000 0xfb00000 nand write.e 0x6400000 0x500000 0x400000 boot That's it. I hope you apply my patch to openwrt. Signed-off-by: Martin Mueller <m...@sig21.net> Index: target/linux/kirkwood/patches/110-goflex.patch =================================================================== --- target/linux/kirkwood/patches/110-goflex.patch (revision 0) +++ target/linux/kirkwood/patches/110-goflex.patch (revision 0) @@ -0,0 +1,151 @@ +--- a/arch/arm/mach-kirkwood/Makefile ++++ b/arch/arm/mach-kirkwood/Makefile +@@ -6,6 +6,7 @@ + obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o + obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o + obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o ++obj-$(CONFIG_MACH_GOFLEX) += goflex-setup.o + obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o + obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o + obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o +--- a/arch/arm/mach-kirkwood/Kconfig ++++ b/arch/arm/mach-kirkwood/Kconfig +@@ -105,6 +105,12 @@ + Say 'Y' here if you want your kernel to support the + Seagate FreeAgent DockStar. + ++config MACH_GOFLEX ++ bool "Seagate GoFlex Net/Home" ++ help ++ Say 'Y' here if you want your kernel to support the ++ Seagate GoFlex Net/Home. ++ + endmenu + + endif +--- /dev/null ++++ b/arch/arm/mach-kirkwood/goflex-setup.c +@@ -0,0 +1,123 @@ ++/* ++ * arch/arm/mach-kirkwood/goflex-setup.c ++ * ++ * Seagate GoFlex Net/Home ++ * ++ * This file is licensed under the terms of the GNU General Public ++ * License version 2. This program is licensed "as is" without any ++ * warranty of any kind, whether express or implied. ++ */ ++ ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <linux/platform_device.h> ++#include <linux/ata_platform.h> ++#include <linux/mtd/partitions.h> ++#include <linux/mv643xx_eth.h> ++#include <linux/gpio.h> ++#include <linux/leds.h> ++#include <asm/mach-types.h> ++#include <asm/mach/arch.h> ++#include <mach/kirkwood.h> ++#include <plat/mvsdio.h> ++#include "common.h" ++#include "mpp.h" ++ ++static struct mtd_partition goflex_nand_parts[] = { ++ { ++ .name = "u-boot", ++ .offset = 0, ++ .size = SZ_1M ++ }, { ++ .name = "uImage", ++ .offset = MTDPART_OFS_NXTBLK, ++ .size = SZ_2M + SZ_2M, ++ }, { ++ .name = "rootfs", ++ .offset = MTDPART_OFS_NXTBLK, ++ .size = SZ_32M, ++ }, { ++ .name = "data", ++ .offset = MTDPART_OFS_NXTBLK, ++ .size = MTDPART_SIZ_FULL ++ }, ++}; ++ ++static struct mv643xx_eth_platform_data goflex_ge00_data = { ++ .phy_addr = MV643XX_ETH_PHY_ADDR(0), ++}; ++ ++static struct gpio_led goflex_led_pins[] = { ++ { ++ .name = "goflex:green:health", ++ .default_trigger = "default-on", ++ .gpio = 46, ++ .active_low = 1, ++ }, ++ { ++ .name = "goflex:orange:misc", ++ .default_trigger = "none", ++ .gpio = 47, ++ .active_low = 1, ++ }, ++}; ++ ++static struct gpio_led_platform_data goflex_led_data = { ++ .leds = goflex_led_pins, ++ .num_leds = ARRAY_SIZE(goflex_led_pins), ++}; ++ ++static struct platform_device goflex_leds = { ++ .name = "leds-gpio", ++ .id = -1, ++ .dev = { ++ .platform_data = &goflex_led_data, ++ } ++}; ++ ++static struct mv_sata_platform_data goflex_esata_sata_data = { ++ .n_ports = 2, ++}; ++ ++static unsigned int goflex_mpp_config[] __initdata = { ++ MPP29_GPIO, /* USB Power Enable */ ++ MPP46_GPIO, /* LED green */ ++ MPP47_GPIO, /* LED orange */ ++ 0 ++}; ++ ++static void __init goflex_init(void) ++{ ++ /* ++ * Basic setup. Needs to be called early. ++ */ ++ kirkwood_init(); ++ ++ /* setup gpio pin select */ ++ kirkwood_mpp_conf(goflex_mpp_config); ++ ++ kirkwood_uart0_init(); ++ ++ if (gpio_request(29, "USB Power Enable") != 0 || ++ gpio_direction_output(29, 1) != 0) ++ printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n"); ++ kirkwood_ehci_init(); ++ ++ kirkwood_nand_init(ARRAY_AND_SIZE(goflex_nand_parts), 25); ++ ++ kirkwood_ge00_init(&goflex_ge00_data); ++ ++ kirkwood_sata_init(&goflex_esata_sata_data); ++ ++ platform_device_register(&goflex_leds); ++} ++ ++MACHINE_START(GOFLEXNET, "Seagate GoFlex Net") ++ .phys_io = KIRKWOOD_REGS_PHYS_BASE, ++ .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc, ++ .boot_params = 0x00000100, ++ .init_machine = goflex_init, ++ .map_io = kirkwood_map_io, ++ .init_irq = kirkwood_init_irq, ++ .timer = &kirkwood_timer, ++MACHINE_END Index: target/linux/kirkwood/config-default =================================================================== --- target/linux/kirkwood/config-default (revision 25666) +++ target/linux/kirkwood/config-default (working copy) @@ -71,7 +71,10 @@ # CONFIG_I2C_MV64XXX is not set CONFIG_INET_LRO=y CONFIG_INITRAMFS_SOURCE="" -# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MROUTE=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_FWMARK=y CONFIG_IP_PIMSM_V1=y CONFIG_IP_PIMSM_V2=y CONFIG_JBD=y @@ -80,6 +83,22 @@ CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_MACH_DB88F6281_BP is not set CONFIG_MACH_DOCKSTAR=y +CONFIG_MACH_GOFLEX=y +CONFIG_ATA=y +CONFIG_ATA_VERBOSE_ERROR=y +CONFIG_SATA_PMP=y +CONFIG_ATA_SFF=y +CONFIG_ATA_BMDMA=y +CONFIG_SATA_MV=y +CONFIG_BLK_DEV_MD=y +CONFIG_MD_AUTODETECT=y +CONFIG_MD_RAID0=y +CONFIG_MD_RAID1=y +CONFIG_MD_LINEAR=y +# CONFIG_MD_RAID10 is not set +# CONFIG_MD_RAID456 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_MD_FAULTY is not set # CONFIG_MACH_ESATA_SHEEVAPLUG is not set # CONFIG_MACH_GURUPLUG is not set CONFIG_MACH_ICONNECT=y bye MM -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel