Thank you for the patches and your effort. Are your new patches in the latest trunk now?
I just compiled a new Firmware for the Marvell Orion Generic Platform (wrt350n v2). I build it with the standard config and failed on creation of the firmware image. Error is that the kernel size is bigger than his space in the filesystem. Should i increase the size for it. How o i set the offset? 1.5M or 2M? Greetings Patrick 2011/8/29 <eugene...@gmail.com>: > From: "Eugene San (eugenesan)" <eugene...@gmail.com> > > > Signed-off-by: Eugene San (eugenesan) <eugene...@gmail.com> > --- > target/linux/orion/README | 30 +++++++++++++++ > target/linux/orion/image/generic.mk | 38 +++++++++++++++++-- > target/linux/orion/image/harddisk.mk | 6 ++- > .../patches/102-rd88f5181l-ge_partition_map.patch | 33 +++++++++++++++++ > .../patches/103-rd88f5181l-fxo_partition_map.patch | 33 +++++++++++++++++ > .../patches/104-rd88f5181l-force_cardbus.patch | 27 ++++++++++++++ > 6 files changed, 161 insertions(+), 6 deletions(-) > create mode 100644 target/linux/orion/README > create mode 100644 > target/linux/orion/patches/102-rd88f5181l-ge_partition_map.patch > create mode 100644 > target/linux/orion/patches/103-rd88f5181l-fxo_partition_map.patch > create mode 100644 > target/linux/orion/patches/104-rd88f5181l-force_cardbus.patch > > diff --git a/target/linux/orion/README b/target/linux/orion/README > new file mode 100644 > index 0000000..7ea1147 > --- /dev/null > +++ b/target/linux/orion/README > @@ -0,0 +1,30 @@ > +This orion target is intended to be used with devices based on Marvell Orion > 5181 ARM-compatible CPU (aka Feroceon). > + > +Among supported devices are: > + * WRT350N v2 > + * WNR854T > + * RD88F5181L_GE > + * RD88F5181L_FXO > + * DT2 > + > +Marvell RD88F5181L Reference Boards currently utilize OpenWRT native > squashfs+jffs2overlay scheme. > +Currently only manual install/upgrade procedure tested. > +To perform manual/initial installation you will need a TFTP server and board > specific image, > +for example: openwrt-rd88f5181l_fxo-squashfs.img. > + > +Follow below steps to install firmware in to device's NOR flash. > +(Remember to use apropriate network parameters) > + > +1. Prepare uBoot environment (In uBoot): > + >>resetenv; reset > + >>setenv ipaddr 192.168.2.200; setenv serverip 192.168.2.100 > + >>setenv loadaddr 0x400000; setenv console 'console=ttyS0,115200 > panic=30' > + >>setenv bootargs; setenv bootargs_root 'root=/dev/mtd1 ro' > + >>setenv image_name openwrt-rd88f5181l_fxo-squashfs.img > + >>setenv update 'tftpboot $(loadaddr) $(image_name); erase 0xFF800000 > 0xFFEFFFFF; cp.b $(loadaddr) 0xFF800000 0x6FFFFF' > + >>setenv bootcmd 'setenv bootargs $(console) $(bootargs_root); bootm > 0xFF800000' > + >>save > + > +2. Update firmare (In uBoot): > + >>run update > + > diff --git a/target/linux/orion/image/generic.mk > b/target/linux/orion/image/generic.mk > index c3bd601..670bed5 100644 > --- a/target/linux/orion/image/generic.mk > +++ b/target/linux/orion/image/generic.mk > @@ -5,6 +5,8 @@ > # See /LICENSE for more information. > # > > +JFFS2_BLOCKSIZE = 128k > + > define Image/Prepare > cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage > endef > @@ -25,6 +27,20 @@ define Image/BuildKernel > -C none -a 0x00008000 -e 0x00008000 -n 'Linux-$(LINUX_VERSION)' \ > -d $(KDIR)/wnr854t-zImage $(KDIR)/wnr854t-uImage > cp $(KDIR)/wnr854t-uImage $(BIN_DIR)/openwrt-wnr854t-uImage > + # RD88F5181L_GE: mach id 1812 (0x714)" > + echo -en "\x07\x1c\xa0\xe3\x14\x10\x81\xe3" > > $(KDIR)/rd88f5181l_ge-zImage > + cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/rd88f5181l_ge-zImage > + $(STAGING_DIR_HOST)/bin/mkimage -A arm -O linux -T kernel \ > + -C none -a 0x00008000 -e 0x00008000 -n 'Linux-$(LINUX_VERSION)' \ > + -d $(KDIR)/rd88f5181l_ge-zImage $(KDIR)/rd88f5181l_ge-uImage > + cp $(KDIR)/rd88f5181l_ge-uImage > $(BIN_DIR)/openwrt-rd88f5181l_ge-uImage > + # RD88F5181L_FXO: mach id 1818 (0x71a)" > + echo -en "\x07\x1c\xa0\xe3\x1a\x10\x81\xe3" > > $(KDIR)/rd88f5181l_fxo-zImage > + cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/rd88f5181l_fxo-zImage > + $(STAGING_DIR_HOST)/bin/mkimage -A arm -O linux -T kernel \ > + -C none -a 0x00008000 -e 0x00008000 -n 'Linux-$(LINUX_VERSION)' \ > + -d $(KDIR)/rd88f5181l_fxo-zImage $(KDIR)/rd88f5181l_fxo-uImage > + cp $(KDIR)/rd88f5181l_fxo-uImage > $(BIN_DIR)/openwrt-rd88f5181l_fxo-uImage > endef > > define Image/Build/Netgear > @@ -40,6 +56,15 @@ define Image/Build/Netgear > $(STAGING_DIR_HOST)/bin/add_header $(3) > $(BIN_DIR)/openwrt-$(2)-$(1).img $(BIN_DIR)/openwrt-$(2)-$(1)-webupgrade.img > endef > > +define Image/Build/Marvell > + # Orion Marvell Images > + ( \ > + dd if=$(BIN_DIR)/openwrt-$(2)-uImage bs=1024k conv=sync; \ > + dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \ > + ) > $(BIN_DIR)/openwrt-$(2)-$(1).img > + $(STAGING_DIR_HOST)/bin/add_header $(3) > $(BIN_DIR)/openwrt-$(2)-$(1).img $(BIN_DIR)/openwrt-$(2)-$(1)-webupgrade.img > +endef > + > define Image/Build/Linksys > # Orion Linksys Images > # sysupgrade image > @@ -70,15 +95,20 @@ define Image/Build/Linksys > endef > > define Image/Build > -$(call Image/Build/$(1),$(1)) > -$(call Image/Build/Netgear,$(1),wnr854t,NG_WNR854T,$(1)) > + $(call Image/Build/$(1),$(1)) > + $(call Image/Build/Netgear,$(1),wnr854t,NG_WNR854T,$(1)) > + $(call Image/Build/Marvell,$(1),rd88f5181l_ge,RD88F5181L_GE,$(1)) > + $(call Image/Build/Marvell,$(1),rd88f5181l_fxo,RD88F5181L_FXO,$(1)) > # Leave WRT350Nv2 at last position due to webimage dependency for zip > + # and too big image without squashfs > +ifeq ($(1),squashfs) > # 5th parameter is kernel mtd size, e.g. 0x00100000 = 1048576 or 0x001A0000 > = 1703936 > -$(call Image/Build/Linksys,$(1),wrt350nv2,WNR350Nv2,$(1),1048576) > + $(call Image/Build/Linksys,$(1),wrt350nv2,WNR350Nv2,$(1),1048576) > +endif > endef > > define Image/Build/squashfs > -$(call prepare_generic_squashfs,$(KDIR)/root.squashfs) > + $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) > ( \ > dd if=$(KDIR)/uImage bs=1024k conv=sync; \ > dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \ > diff --git a/target/linux/orion/image/harddisk.mk > b/target/linux/orion/image/harddisk.mk > index 9f2efad..8b3f0eb 100644 > --- a/target/linux/orion/image/harddisk.mk > +++ b/target/linux/orion/image/harddisk.mk > @@ -5,6 +5,8 @@ > # See /LICENSE for more information. > # > > +JFFS2_BLOCKSIZE = 128k > + > define Image/Prepare > cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage > endef > @@ -42,8 +44,8 @@ define Image/Build/Freecom > endef > > define Image/Build > -$(call Image/Build/$(1),$(1)) > -$(call Image/Build/Freecom,$(1),dt2,DT,$(1)) > + $(call Image/Build/$(1),$(1)) > + $(call Image/Build/Freecom,$(1),dt2,DT,$(1)) > endef > > define Image/Build/squashfs > diff --git a/target/linux/orion/patches/102-rd88f5181l-ge_partition_map.patch > b/target/linux/orion/patches/102-rd88f5181l-ge_partition_map.patch > new file mode 100644 > index 0000000..c0824d4 > --- /dev/null > +++ b/target/linux/orion/patches/102-rd88f5181l-ge_partition_map.patch > @@ -0,0 +1,33 @@ > +--- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c > ++++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c > +@@ -36,12 +36,30 @@ > + #define RD88F5181L_GE_NOR_BOOT_BASE 0xff000000 > + #define RD88F5181L_GE_NOR_BOOT_SIZE SZ_16M > + > ++static struct mtd_partition rd88f5181l_ge_partitions[] = { > ++ { > ++ .name = "kernel", > ++ .offset = 0, > ++ .size = SZ_1M, > ++ }, { > ++ .name = "rootfs", > ++ .offset = SZ_1M, > ++ .size = (SZ_16M - SZ_2M), > ++ }, { > ++ .name = "uboot", > ++ .offset = (SZ_16M - SZ_1M), > ++ .size = SZ_1M, > ++ .mask_flags = MTD_WRITEABLE, > ++ }, > ++}; > + > + > /***************************************************************************** > + * 16M NOR Flash on Device bus Boot chip select > + > ****************************************************************************/ > + static struct physmap_flash_data rd88f5181l_ge_nor_boot_flash_data = { > + .width = 1, > ++ .nr_parts = ARRAY_SIZE(rd88f5181l_ge_partitions), > ++ .parts = rd88f5181l_ge_partitions, > + }; > + > + static struct resource rd88f5181l_ge_nor_boot_flash_resource = { > diff --git > a/target/linux/orion/patches/103-rd88f5181l-fxo_partition_map.patch > b/target/linux/orion/patches/103-rd88f5181l-fxo_partition_map.patch > new file mode 100644 > index 0000000..d6f1351 > --- /dev/null > +++ b/target/linux/orion/patches/103-rd88f5181l-fxo_partition_map.patch > @@ -0,0 +1,33 @@ > +--- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c > ++++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c > +@@ -35,12 +35,30 @@ > + #define RD88F5181L_FXO_NOR_BOOT_BASE 0xff800000 > + #define RD88F5181L_FXO_NOR_BOOT_SIZE SZ_8M > + > ++static struct mtd_partition rd88f5181l_fxo_partitions[] = { > ++ { > ++ .name = "kernel", > ++ .offset = 0, > ++ .size = SZ_1M, > ++ }, { > ++ .name = "rootfs", > ++ .offset = SZ_1M, > ++ .size = (SZ_8M - SZ_2M), > ++ }, { > ++ .name = "uboot", > ++ .offset = (SZ_8M - SZ_1M), > ++ .size = SZ_1M, > ++ .mask_flags = MTD_WRITEABLE, > ++ }, > ++}; > + > + > /***************************************************************************** > + * 8M NOR Flash on Device bus Boot chip select > + > ****************************************************************************/ > + static struct physmap_flash_data rd88f5181l_fxo_nor_boot_flash_data = { > + .width = 1, > ++ .nr_parts = ARRAY_SIZE(rd88f5181l_fxo_partitions), > ++ .parts = rd88f5181l_fxo_partitions, > + }; > + > + static struct resource rd88f5181l_fxo_nor_boot_flash_resource = { > diff --git a/target/linux/orion/patches/104-rd88f5181l-force_cardbus.patch > b/target/linux/orion/patches/104-rd88f5181l-force_cardbus.patch > new file mode 100644 > index 0000000..9167d47 > --- /dev/null > +++ b/target/linux/orion/patches/104-rd88f5181l-force_cardbus.patch > @@ -0,0 +1,27 @@ > +--- linux-2.6.37.6.orig/arch/arm/mach-orion5x/Kconfig > ++++ linux-2.6.37.6/arch/arm/mach-orion5x/Kconfig > +@@ -157,4 +157,12 @@ > + > + endmenu > + > ++config RD88F5181L_FORCE_CB > ++ bool "Enforce Cardbus over miniPCI slot" > ++ depends on MACH_RD88F5181L_GE || MACH_RD88F5181L_FXO > ++ default y > ++ help > ++ Say 'Y' here if you want to use CardBus instead of > ++ MiniPCI slot on Marvell Orion-VoIP GE/FXO (88F5181L) RDs. > ++ > + endif > +--- linux-2.6.37.6.orig/arch/arm/mach-orion5x/pci.c 2011-03-27 > 21:01:41.000000000 +0200 > ++++ linux-2.6.37.6/arch/arm/mach-orion5x/pci.c 2011-06-11 11:12:01.181318413 > +0300 > +@@ -553,7 +553,9 @@ > + > + void __init orion5x_pci_set_cardbus_mode(void) > + { > ++#ifdef CONFIG_RD88F5181L_FORCE_CB > + orion5x_pci_cardbus_mode = 1; > ++#endif > + } > + > + int __init orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys) > -- > 1.7.6 > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel