Signed-off-by: Eugene San (eugenesan) <eugene...@gmail.com>
---
 target/linux/orion/config-default                  |   10 +++--
 target/linux/orion/image/generic.mk                |   34 ++++++++++++++++---
 .../patches/102-rd88f5181l-ge_partition_map.patch  |   33 +++++++++++++++++++
 3 files changed, 67 insertions(+), 10 deletions(-)
 create mode 100644 
target/linux/orion/patches/102-rd88f5181l-ge_partition_map.patch

diff --git a/target/linux/orion/config-default 
b/target/linux/orion/config-default
index c78a397..665a2e8 100644
--- a/target/linux/orion/config-default
+++ b/target/linux/orion/config-default
@@ -41,6 +41,7 @@ CONFIG_CPU_TLB_V4WBI=y
 CONFIG_CRYPTO_DEV_MV_CESA=y
 CONFIG_CRYPTO_HW=y
 # CONFIG_DEBUG_USER is not set
+CONFIG_DECOMPRESS_LZMA=y
 CONFIG_DEVPORT=y
 CONFIG_DLCI=m
 CONFIG_DLCI_MAX=8
@@ -137,7 +138,7 @@ CONFIG_MACH_DT2=y
 # CONFIG_MACH_MV2120 is not set
 # CONFIG_MACH_NET2BIG is not set
 # CONFIG_MACH_RD88F5181L_FXO is not set
-# CONFIG_MACH_RD88F5181L_GE is not set
+CONFIG_MACH_RD88F5181L_GE=y
 # CONFIG_MACH_RD88F5182 is not set
 # CONFIG_MACH_RD88F6183AP_GE is not set
 # CONFIG_MACH_TERASTATION_PRO2 is not set
@@ -192,6 +193,7 @@ CONFIG_PLAT_ORION=y
 # CONFIG_R6040 is not set
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_ISL1208=y
+CONFIG_RTC_DRV_DS1307=y
 CONFIG_SATA_PMP=y
 # CONFIG_SCSI_MULTI_LUN is not set
 # CONFIG_SENSORS_PC87360 is not set
@@ -209,10 +211,10 @@ CONFIG_USB_EHCI_HCD=m
 # CONFIG_USB_ISIGHTFW is not set
 # CONFIG_USB_ISP1760_HCD is not set
 # CONFIG_USB_KAWETH is not set
-CONFIG_USB=m
+CONFIG_USB=y
 # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
 # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_HCD is not set
 # CONFIG_USBPCWATCHDOG is not set
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_PRINTER is not set
@@ -229,7 +231,7 @@ CONFIG_USB_OHCI_HCD=m
 # CONFIG_USB_STORAGE_SDDR55 is not set
 # CONFIG_USB_STORAGE_USBAT is not set
 CONFIG_USB_SUPPORT=y
-CONFIG_USB_UHCI_HCD=m
+# CONFIG_USB_UHCI_HCD is not set
 # CONFIG_USB_USBNET is not set
 # CONFIG_USB_VIDEO_CLASS is not set
 # CONFIG_USB_WDM is not set
diff --git a/target/linux/orion/image/generic.mk 
b/target/linux/orion/image/generic.mk
index c3bd601..4a88a3a 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,13 @@ 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
 endef
 
 define Image/Build/Netgear
@@ -40,6 +49,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-rd88f5181l_ge-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 +88,19 @@ define Image/Build/Linksys
 endef
 
 define Image/Build
-$(call Image/Build/$(1),$(1))
-$(call Image/Build/Netgear,$(1),wnr854t,NG_WNR854T,$(1))
- # Leave WRT350Nv2 at last position due to webimage dependency for zip
- # 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/$(1),$(1))
+       $(call Image/Build/Netgear,$(1),wnr854t,NG_WNR854T,$(1))
+       $(call Image/Build/Marvell,$(1),rd88f5181l_ge,RD88F5181L_GE,$(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)
+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/patches/102-rd88f5181l-ge_partition_map.patch 
b/target/linux/orion/patches/102-rd88f5181l-ge_partition_map.patch
new file mode 100644
index 0000000..9ce1d3f
--- /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      2011-01-05 
02:50:19.000000000 +0200
++++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c      2011-03-04 
17:41:20.853100150 +0200
+@@ -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 = {
-- 
1.7.4.1

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to