[OpenWrt-Devel] [PATCH 5/5] [orion] add rd88f5181l-ge and rd88f5181l-fxo devices

2011-09-19 Thread Patrick Florek
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 000..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 0x40; 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 0xFF80 
 0xFFEF; cp.b $(loadaddr) 0xFF80 0x6F'
 +       setenv bootcmd 'setenv bootargs $(console) $(bootargs_root); bootm 
 0xFF80'
 +       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 0x8000 -e 0x8000 -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 0x8000 -e 0x8000 -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 0x8000 -e 0x8000 -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; \
 +       )  

[OpenWrt-Devel] [PATCH 5/5] [orion] add rd88f5181l-ge and rd88f5181l-fxo devices

2011-08-29 Thread eugenesan
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 000..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 0x40; 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 0xFF80 
0xFFEF; cp.b $(loadaddr) 0xFF80 0x6F'
+   setenv bootcmd 'setenv bootargs $(console) $(bootargs_root); bootm 
0xFF80'
+   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 0x8000 -e 0x8000 -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 0x8000 -e 0x8000 -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 0x8000 -e 0x8000 -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