diff options
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ppc44x/Makefile | 8 | ||||
-rw-r--r-- | target/linux/ppc44x/config-default | 40 | ||||
-rw-r--r-- | target/linux/ppc44x/image/Makefile | 6 | ||||
-rw-r--r-- | target/linux/ppc44x/patches/001-taishan_openwrt_flashmap.patch | 38 | ||||
-rw-r--r-- | target/linux/ppc44x/patches/100-taishan_emac.patch | 71 | ||||
-rw-r--r-- | target/linux/ppc44x/patches/110-openwrt_mtd_mapping.patch | 29 | ||||
-rw-r--r-- | target/linux/ppc44x/patches/120-uncompressed_uImage.patch | 17 |
7 files changed, 68 insertions, 141 deletions
diff --git a/target/linux/ppc44x/Makefile b/target/linux/ppc44x/Makefile index ed43ccaec7..9b4342c3d0 100644 --- a/target/linux/ppc44x/Makefile +++ b/target/linux/ppc44x/Makefile @@ -9,13 +9,15 @@ include $(TOPDIR)/rules.mk ARCH:=powerpc BOARD:=ppc44x BOARDNAME:=AMCC Taishan -FEATURES:=jffs2 +FEATURES:=squashfs -LINUX_VERSION:=2.6.23.14 -LINUX_KARCH:=ppc +LINUX_VERSION:=2.6.24 +LINUX_KARCH:=powerpc include $(INCLUDE_DIR)/target.mk +KERNELNAME:="zImage" + define Target/Description Build firmware images for the AMCC Taishan evaluation board endef diff --git a/target/linux/ppc44x/config-default b/target/linux/ppc44x/config-default index 365dc0edf4..1015189c82 100644 --- a/target/linux/ppc44x/config-default +++ b/target/linux/ppc44x/config-default @@ -1,5 +1,4 @@ # CONFIG_40x is not set -CONFIG_440A=y CONFIG_440GX=y CONFIG_44x=y CONFIG_4xx=y @@ -19,12 +18,13 @@ CONFIG_BOOKE=y # CONFIG_BOOKE_WDT is not set CONFIG_BOOT_LOAD=0x01000000 # CONFIG_BT is not set -CONFIG_CMDLINE="console=ttyS1,115200 init=/etc/preinit" +CONFIG_CMDLINE="console=ttyS1,115200 root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd init=/etc/preinit" CONFIG_CMDLINE_BOOL=y CONFIG_CONSISTENT_SIZE=0x00200000 CONFIG_CONSISTENT_START=0xff100000 # CONFIG_CPU_FREQ is not set # CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_DEVICE_TREE="taishan.dts" # CONFIG_E200 is not set # CONFIG_E500 is not set # CONFIG_EBONY is not set @@ -43,22 +43,18 @@ CONFIG_HZ=250 # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_I2C is not set -CONFIG_IBM_EMAC=y -CONFIG_IBM_EMAC4=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_RGMII=y -CONFIG_IBM_EMAC_RXB=128 -CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256 -CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0 -CONFIG_IBM_EMAC_TAH=y -CONFIG_IBM_EMAC_TXB=128 -CONFIG_IBM_EMAC_ZMII=y +CONFIG_IBM_NEW_EMAC=y +CONFIG_IBM_NEW_EMAC_RXB=128 +CONFIG_IBM_NEW_EMAC_TXB=128 +CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32 +CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256 +CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0 +# CONFIG_IBM_NEW_EMAC_DEBUG is not set CONFIG_IBM_OCP=y # CONFIG_IDE is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_ISA_DMA_API=y +# CONFIG_KATMAI is not set CONFIG_KERNEL_START=0xc0000000 CONFIG_LOWMEM_SIZE=0x30000000 # CONFIG_LUAN is not set @@ -106,10 +102,8 @@ CONFIG_MTD_MAP_BANK_WIDTH_4=y CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_PCI is not set # CONFIG_MTD_PHRAM is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 -CONFIG_MTD_PHYSMAP_LEN=0x0 -CONFIG_MTD_PHYSMAP_START=0x8000000 +# CONFIG_MTD_PHYSMAP is not set +CONFIG_MTD_PHYSMAP_OF=y # CONFIG_MTD_PLATRAM is not set # CONFIG_MTD_PMC551 is not set # CONFIG_MTD_RAM is not set @@ -123,6 +117,7 @@ CONFIG_NET_SCH_FIFO=y CONFIG_NOT_COHERENT_CACHE=y # CONFIG_NVRAM is not set # CONFIG_OCOTEA is not set +# CONFIG_PCIEPORTBUS is not set # CONFIG_PCIPCWATCHDOG is not set CONFIG_PCI_DOMAINS=y # CONFIG_PC_KEYBOARD is not set @@ -130,15 +125,21 @@ CONFIG_PHYS_64BIT=y # CONFIG_PNPACPI is not set CONFIG_PPC=y CONFIG_PPC32=y +# CONFIG_PPC64 is not set CONFIG_PPC4xx_DMA=y CONFIG_PPC4xx_EDMA=y +# CONFIG_PPC_8xx is not set +# CONFIG_PPC_85xx is not set CONFIG_PPC_DCR=y CONFIG_PPC_DCR_NATIVE=y CONFIG_PPC_GEN550=y # CONFIG_PPC_I8259 is not set CONFIG_PPC_INDIRECT_PCI=y +# CONFIG_PPC_EARLY_DEBUG is not set CONFIG_PPC_OCP=y +CONFIG_PROC_DEVICETREE=y CONFIG_PTE_64BIT=y +# CONFIG_RAINIER is not set CONFIG_RESOURCES_64BIT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y @@ -148,7 +149,9 @@ CONFIG_SERIAL_8250_EXTENDED=y # CONFIG_SERIAL_8250_MANY_PORTS is not set # CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_OF_PLATFORM=y # CONFIG_SERIAL_TEXT_DEBUG is not set +# CONFIG_SEQUOIA is not set # CONFIG_SOFT_WATCHDOG is not set # CONFIG_SOUND is not set # CONFIG_SPARSEMEM_STATIC is not set @@ -160,6 +163,7 @@ CONFIG_TASK_SIZE=0x80000000 # CONFIG_USER_NS is not set # CONFIG_VIA_RHINE is not set CONFIG_WANT_EARLY_SERIAL=y +# CONFIG_WARP is not set # CONFIG_WINDFARM is not set # CONFIG_XILINX_SYSACE is not set # CONFIG_YUCCA is not set diff --git a/target/linux/ppc44x/image/Makefile b/target/linux/ppc44x/image/Makefile index bd284eb975..5c1d023cb0 100644 --- a/target/linux/ppc44x/image/Makefile +++ b/target/linux/ppc44x/image/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/image.mk JFFS2_BLOCKSIZE=256k define Image/Prepare - cp $(LINUX_DIR)/arch/ppc/boot/images/uImage $(KDIR)/uImage + cp $(LINUX_DIR)/arch/powerpc/boot/cuImage.taishan $(KDIR)/uImage endef define Image/BuildKernel @@ -23,7 +23,7 @@ endef define Image/Build/jffs2-256k ( \ - dd if=$(LINUX_DIR)/arch/ppc/boot/images/uImage bs=4096k conv=sync; \ + dd if=$(KDIR)/uImage bs=2048k conv=sync; \ dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \ ) > $(BIN_DIR)/openwrt-$(BOARD)-jffs2.img endef @@ -31,7 +31,7 @@ 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)/uImage bs=2048k conv=sync; \ dd if=$(KDIR)/root.$(1) bs=256k conv=sync; \ ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img endef diff --git a/target/linux/ppc44x/patches/001-taishan_openwrt_flashmap.patch b/target/linux/ppc44x/patches/001-taishan_openwrt_flashmap.patch new file mode 100644 index 0000000000..931b61a91d --- /dev/null +++ b/target/linux/ppc44x/patches/001-taishan_openwrt_flashmap.patch @@ -0,0 +1,38 @@ +diff -Nur linux-2.6.24/arch/powerpc/boot/dts/taishan.dts linux-2.6.24-owrt/arch/powerpc/boot/dts/taishan.dts +--- linux-2.6.24/arch/powerpc/boot/dts/taishan.dts 2008-01-31 18:55:57.000000000 +0100 ++++ linux-2.6.24-owrt/arch/powerpc/boot/dts/taishan.dts 2008-02-02 23:04:12.000000000 +0100 +@@ -175,6 +175,34 @@ + interrupt-parent = <&UIC1>; + + /* TODO: Add other EBC devices */ ++ nor_flash@0,0 { ++ compatible = "cfi-flash"; ++ bank-width = <4>; ++ device-width = <2>; ++ reg = <0 000000 4000000>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ partition@0 { ++ label = "kernel"; ++ reg = <0 200000>; ++ }; ++ partition@200000 { ++ label = "rootfs"; ++ reg = <200000 3c00000>; ++ }; ++ partition@3e00000 { ++ label = "diagnostics"; ++ reg = <3e00000 140000>; ++ }; ++ partition@3f40000 { ++ label = "env"; ++ reg = <3f40000 80000>; ++ }; ++ partition@3fc0000 { ++ label = "u-boot"; ++ reg = <3fc0000 40000>; ++ }; ++ }; + }; + + diff --git a/target/linux/ppc44x/patches/100-taishan_emac.patch b/target/linux/ppc44x/patches/100-taishan_emac.patch deleted file mode 100644 index fde73b77b6..0000000000 --- a/target/linux/ppc44x/patches/100-taishan_emac.patch +++ /dev/null @@ -1,71 +0,0 @@ -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/ppc44x/patches/110-openwrt_mtd_mapping.patch b/target/linux/ppc44x/patches/110-openwrt_mtd_mapping.patch deleted file mode 100644 index 7d07fa9256..0000000000 --- a/target/linux/ppc44x/patches/110-openwrt_mtd_mapping.patch +++ /dev/null @@ -1,29 +0,0 @@ -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/ppc44x/patches/120-uncompressed_uImage.patch b/target/linux/ppc44x/patches/120-uncompressed_uImage.patch deleted file mode 100644 index b1f2707834..0000000000 --- a/target/linux/ppc44x/patches/120-uncompressed_uImage.patch +++ /dev/null @@ -1,17 +0,0 @@ -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: $@ ' |