aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/amcc
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-09-06 16:27:37 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-09-06 16:27:37 +0000
commit56231056ea784f1cec6450f649b1adaed1f56366 (patch)
tree7b130d72d854cde2bcd3af8b11bd0f7be3dbff6a /target/linux/amcc
parente1184aaa1a7a5e5eeef8e072bf0ea98c291be22a (diff)
downloadupstream-56231056ea784f1cec6450f649b1adaed1f56366.tar.gz
upstream-56231056ea784f1cec6450f649b1adaed1f56366.tar.bz2
upstream-56231056ea784f1cec6450f649b1adaed1f56366.zip
strip the kernel version suffix from target directories, except for brcm-2.4 (the -2.4 will be included in the board name here). CONFIG_LINUX_<ver>_<board> becomes CONFIG_TARGET_<board>, same for profiles.
SVN-Revision: 8653
Diffstat (limited to 'target/linux/amcc')
-rw-r--r--target/linux/amcc/Makefile25
-rw-r--r--target/linux/amcc/base-files/default/etc/inittab5
-rw-r--r--target/linux/amcc/config/default172
-rw-r--r--target/linux/amcc/image/Makefile39
-rw-r--r--target/linux/amcc/patches/100-taishan_emac.patch71
-rw-r--r--target/linux/amcc/patches/110-openwrt_mtd_mapping.patch29
-rw-r--r--target/linux/amcc/patches/120-uncompressed_uImage.patch17
7 files changed, 358 insertions, 0 deletions
diff --git a/target/linux/amcc/Makefile b/target/linux/amcc/Makefile
new file mode 100644
index 0000000000..4dd366caa9
--- /dev/null
+++ b/target/linux/amcc/Makefile
@@ -0,0 +1,25 @@
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+ARCH:=powerpc
+BOARD:=amcc
+BOARDNAME:=AMCC Taishan
+FEATURES:=jffs2
+
+LINUX_VERSION:=2.6.21.5
+
+define Target/Description
+ Build firmware images for the AMCC Taishan evaluation board
+endef
+
+include $(INCLUDE_DIR)/kernel-build.mk
+
+# include the profiles
+-include profiles/*.mk
+
+$(eval $(call BuildKernel))
diff --git a/target/linux/amcc/base-files/default/etc/inittab b/target/linux/amcc/base-files/default/etc/inittab
new file mode 100644
index 0000000000..859dc530ce
--- /dev/null
+++ b/target/linux/amcc/base-files/default/etc/inittab
@@ -0,0 +1,5 @@
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K stop
+tts/0::askfirst:/bin/ash --login
+ttyS1::askfirst:/bin/ash --login
+tty1::askfirst:/bin/ash --login
diff --git a/target/linux/amcc/config/default b/target/linux/amcc/config/default
new file mode 100644
index 0000000000..d0fccac52d
--- /dev/null
+++ b/target/linux/amcc/config/default
@@ -0,0 +1,172 @@
+# CONFIG_40x is not set
+CONFIG_44x=y
+CONFIG_4xx=y
+# CONFIG_6xx is not set
+# CONFIG_8139TOO is not set
+# CONFIG_8xx is not set
+# CONFIG_ATM_DRIVERS is not set
+# CONFIG_BAMBOO is not set
+# CONFIG_E200 is not set
+# CONFIG_E500 is not set
+# CONFIG_EBONY is not set
+# CONFIG_LUAN is not set
+# CONFIG_YUCCA is not set
+# CONFIG_OCOTEA is not set
+CONFIG_TAISHAN=y
+CONFIG_440GX=y
+CONFIG_440A=y
+CONFIG_PTE_64BIT=y
+CONFIG_PHYS_64BIT=y
+# CONFIG_ADVANCED_OPTIONS is not set
+# CONFIG_AGP is not set
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+# CONFIG_B44 is not set
+CONFIG_BASE_SMALL=0
+CONFIG_BIOS_FIXUP=y
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BOOKE_WDT is not set
+CONFIG_BOOT_LOAD=0x01000000
+# CONFIG_BT is not set
+# CONFIG_BUBINGA is not set
+CONFIG_CMDLINE="console=ttyS1,115200 init=/etc/preinit"
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CONSISTENT_SIZE=0x00200000
+CONFIG_CONSISTENT_START=0xff100000
+# CONFIG_CPCI405 is not set
+# CONFIG_CPU_FREQ is not set
+# CONFIG_E200 is not set
+# CONFIG_E500 is not set
+# CONFIG_EP405 is not set
+# CONFIG_FIRMWARE_EDID is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_NVRAM=y
+# CONFIG_GEN_RTC is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_HW_RANDOM=y
+CONFIG_HZ=250
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_I2C is not set
+CONFIG_IBM_EMAC=y
+# CONFIG_IBM_EMAC_DEBUG is not set
+CONFIG_IBM_EMAC_PHY_RX_CLK_FIX=y
+CONFIG_IBM_EMAC_POLL_WEIGHT=32
+CONFIG_IBM_EMAC_RXB=128
+CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256
+CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0
+CONFIG_IBM_EMAC_TXB=128
+CONFIG_IBM_OCP=y
+# CONFIG_IDE is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_ISA_DMA_API=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_KERNEL_START=0xc0000000
+# CONFIG_KEXEC is not set
+CONFIG_LOWMEM_SIZE=0x30000000
+# CONFIG_MACINTOSH_DRIVERS is not set
+CONFIG_MATH_EMULATION=y
+CONFIG_MINI_FO=y
+CONFIG_MTD=y
+# CONFIG_MTD_ABSENT is not set
+CONFIG_MTD_BLOCK=y
+# CONFIG_MTD_BLOCK2MTD is not set
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+CONFIG_MTD_CHAR=y
+# CONFIG_MTD_CMDLINE_PARTS is not set
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+# CONFIG_MTD_ONENAND is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_PCI is not set
+# CONFIG_MTD_PHRAM is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_PLATRAM is not set
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+CONFIG_NETDEV_1000=y
+CONFIG_NOT_COHERENT_CACHE=y
+# CONFIG_NVRAM is not set
+# CONFIG_PCIPCWATCHDOG is not set
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCMCIA_ATMEL is not set
+# CONFIG_PC_KEYBOARD is not set
+# CONFIG_PM is not set
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_PPC4xx_DMA=y
+CONFIG_PPC4xx_EDMA=y
+CONFIG_PPC_GEN550=y
+# CONFIG_PPC_I8259 is not set
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_PPC_OCP=y
+# CONFIG_REDWOOD_5 is not set
+# CONFIG_REDWOOD_6 is not set
+CONFIG_RESOURCES_64BIT=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SECCOMP is not set
+# CONFIG_SERIAL_8250_EXTENDED is not set
+CONFIG_SERIAL_8250_EXTENDED=y
+# CONFIG_SERIAL_8250_MANY_PORTS is not set
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+# CONFIG_SERIAL_8250_DETECT_IRQ is not set
+# CONFIG_SERIAL_8250_RSA is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_SOUND is not set
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SYCAMORE is not set
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_UART0_TTYS0=y
+# CONFIG_UART0_TTYS1 is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_USB is not set
+# CONFIG_VIA_RHINE is not set
+CONFIG_WANT_EARLY_SERIAL=y
+# CONFIG_WINDFARM is not set
+# CONFIG_XILINX_ML300 is not set
+# CONFIG_XILINX_ML403 is not set
diff --git a/target/linux/amcc/image/Makefile b/target/linux/amcc/image/Makefile
new file mode 100644
index 0000000000..09ff061dba
--- /dev/null
+++ b/target/linux/amcc/image/Makefile
@@ -0,0 +1,39 @@
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/image.mk
+
+JFFS2_BLOCKSIZE=256k
+
+define Image/Prepare
+ cp $(LINUX_DIR)/arch/ppc/boot/images/uImage $(KDIR)/uImage
+endef
+
+define Image/BuildKernel
+ cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-uImage
+endef
+
+define Image/Build
+ $(call Image/Build/$(1),$(1))
+endef
+
+define Image/Build/jffs2-256k
+ ( \
+ dd if=$(LINUX_DIR)/arch/ppc/boot/images/uImage bs=4096k conv=sync; \
+ dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
+ ) > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-jffs2.img
+endef
+
+define Image/Build/squashfs
+ $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
+ ( \
+ dd if=$(LINUX_DIR)/arch/ppc/boot/images/uImage bs=4096k conv=sync; \
+ dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \
+ ) > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img
+endef
+
+$(eval $(call BuildImage))
diff --git a/target/linux/amcc/patches/100-taishan_emac.patch b/target/linux/amcc/patches/100-taishan_emac.patch
new file mode 100644
index 0000000000..fde73b77b6
--- /dev/null
+++ b/target/linux/amcc/patches/100-taishan_emac.patch
@@ -0,0 +1,71 @@
+diff -Nur linux-2.6.21/drivers/net/ibm_emac/ibm_emac_phy.c linux-2.6.21-owrt/drivers/net/ibm_emac/ibm_emac_phy.c
+--- linux-2.6.21/drivers/net/ibm_emac/ibm_emac_phy.c 2007-04-27 23:49:26.000000000 +0200
++++ linux-2.6.21-owrt/drivers/net/ibm_emac/ibm_emac_phy.c 2007-05-28 16:27:15.000000000 +0200
+@@ -299,11 +299,50 @@
+ .ops = &cis8201_phy_ops
+ };
+
++#if defined(CONFIG_TAISHAN)
++static int et1011c_init(struct mii_phy *phy)
++{
++ u16 reg_short;
++
++ reg_short = (u16)(phy_read(phy,0x16));
++ reg_short &= ~(0x7);
++ reg_short |= 0x6; /* RGMII Trace Delay*/
++ phy_write(phy, 0x16, reg_short);
++
++ reg_short = (u16)(phy_read(phy, 0x17));
++ reg_short &= ~(0x40);
++ phy_write(phy, 0x17, reg_short);
++
++ phy_write(phy,0x1c,0x74f0);
++ return 0;
++}
++
++static struct mii_phy_ops et1011c_phy_ops = {
++ .init = et1011c_init,
++ .setup_aneg = genmii_setup_aneg,
++ .setup_forced = genmii_setup_forced,
++ .poll_link = genmii_poll_link,
++ .read_link = genmii_read_link
++};
++
++static struct mii_phy_def et1011c_phy_def = {
++ .phy_id = 0x0282f000,
++ .phy_id_mask = 0x0fffff00,
++ .name = "ET1011C Gigabit Ethernet",
++ .ops = &et1011c_phy_ops
++};
++
++static struct mii_phy_def *mii_phy_table[] = {
++ &et1011c_phy_def,
++ NULL
++};
++#else
+ static struct mii_phy_def *mii_phy_table[] = {
+ &cis8201_phy_def,
+ &genmii_phy_def,
+ NULL
+ };
++#endif
+
+ int mii_phy_probe(struct mii_phy *phy, int address)
+ {
+diff -Nur linux-2.6.21/drivers/net/ibm_emac/ibm_emac_zmii.c linux-2.6.21-owrt/drivers/net/ibm_emac/ibm_emac_zmii.c
+--- linux-2.6.21/drivers/net/ibm_emac/ibm_emac_zmii.c 2007-04-27 23:49:26.000000000 +0200
++++ linux-2.6.21-owrt/drivers/net/ibm_emac/ibm_emac_zmii.c 2007-05-28 16:26:48.000000000 +0200
+@@ -170,6 +170,13 @@
+ struct ocp_func_emac_data *emacdata = dev->def->additions;
+
+ if (emacdata->zmii_idx >= 0) {
++#if defined(CONFIG_TAISHAN)
++ /* don't attach emac0 and emac1 */
++ if( dev->def->index < 2 )
++ {
++ return -ENODEV;
++ }
++#endif
+ dev->zmii_input = emacdata->zmii_mux;
+ dev->zmii_dev =
+ ocp_find_device(OCP_VENDOR_IBM, OCP_FUNC_ZMII,
diff --git a/target/linux/amcc/patches/110-openwrt_mtd_mapping.patch b/target/linux/amcc/patches/110-openwrt_mtd_mapping.patch
new file mode 100644
index 0000000000..7d07fa9256
--- /dev/null
+++ b/target/linux/amcc/patches/110-openwrt_mtd_mapping.patch
@@ -0,0 +1,29 @@
+diff -Nur linux-2.6.21/arch/ppc/platforms/4xx/taishan.c linux-2.6.21-owrt/arch/ppc/platforms/4xx/taishan.c
+--- linux-2.6.21/arch/ppc/platforms/4xx/taishan.c 2007-04-27 23:49:26.000000000 +0200
++++ linux-2.6.21-owrt/arch/ppc/platforms/4xx/taishan.c 2007-05-28 17:21:46.000000000 +0200
+@@ -60,8 +60,8 @@
+ };
+
+ #define RW_PART0_OF 0
+-#define RW_PART0_SZ 0x180000
+-#define RW_PART1_SZ 0x200000
++#define RW_PART0_SZ 0x400000
++#define RW_PART1_SZ 0x3a00000
+ /* Partition 2 will be autosized dynamically... */
+ #define RW_PART3_SZ 0x80000
+ #define RW_PART4_SZ 0x40000
+@@ -73,12 +73,12 @@
+ .size = RW_PART0_SZ
+ },
+ {
+- .name = "root",
++ .name = "rootfs",
+ .offset = MTDPART_OFS_APPEND,
+ .size = RW_PART1_SZ,
+ },
+ {
+- .name = "user",
++ .name = "diagnostics",
+ .offset = MTDPART_OFS_APPEND,
+ /* .size = RW_PART2_SZ */ /* will be adjusted dynamically */
+ },
diff --git a/target/linux/amcc/patches/120-uncompressed_uImage.patch b/target/linux/amcc/patches/120-uncompressed_uImage.patch
new file mode 100644
index 0000000000..b1f2707834
--- /dev/null
+++ b/target/linux/amcc/patches/120-uncompressed_uImage.patch
@@ -0,0 +1,17 @@
+diff -Nur linux-2.6.21/arch/ppc/boot/images/Makefile linux-2.6.21-owrt/arch/ppc/boot/images/Makefile
+--- linux-2.6.21/arch/ppc/boot/images/Makefile 2007-04-27 23:49:26.000000000 +0200
++++ linux-2.6.21-owrt/arch/ppc/boot/images/Makefile 2007-05-28 17:44:11.000000000 +0200
+@@ -20,11 +20,11 @@
+
+ quiet_cmd_uimage = UIMAGE $@
+ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A ppc -O linux -T kernel \
+- -C gzip -a 00000000 -e 00000000 -n 'Linux-$(KERNELRELEASE)' \
++ -C none -a 00000000 -e 00000000 -n 'Linux-$(KERNELRELEASE)' \
+ -d $< $@
+
+ targets += uImage
+-$(obj)/uImage: $(obj)/vmlinux.gz
++$(obj)/uImage: $(obj)/vmlinux.bin
+ $(Q)rm -f $@
+ $(call cmd,uimage)
+ @echo -n ' Image: $@ '