Changeset 29910 for trunk


Ignore:
Timestamp:
2012-01-26T11:44:23+01:00 (4 years ago)
Author:
juhosg
Message:

ramips: add support for Sitecom WL-341v3 and other Sercomm IP1006RRv2 boards

This patch adds support for the Sitecom WL-341 v3 and other Sercomm
IP1006RRv2 based boards for sysupgrade support and for the initial
flash through pushbutton initiated recovery mode with the special
partition table and fixes for the quirks and things required by the
modified bootloader.

There is a known bug, Wi-Fi is not working on my board probably
because of the lack of RAM (the board only has 16MiB ram -- half of
the normal amount for non rebadged versions, but there is an empty
slot for another ram chip,) but I don't know for sure. The driver
loads but hostapd fails to load so I think it's not related to the
specific device except for the lack of RAM.

Moreover, only 7 of the 11 onboard leds are confirmed working, it
seems that one of the others is always on and the remaining ones are
connected to the wireless card leds already recognized by OpenWrt

[juhosg: reordered some parts in order to keep things sorted
alphabetically]

Signed-off-by: Marco Antonio Mauro <marcus90@…>

Location:
trunk/target/linux/ramips
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom

    r29883 r29910  
    6969                ;; 
    7070 
     71        wl341v3) 
     72                rt2x00_eeprom_extract "board-nvram" 64880 272 
     73                ;; 
     74 
    7175        *) 
    7276                rt2x00_eeprom_die "board $board is not supported yet" 
  • trunk/target/linux/ramips/base-files/etc/uci-defaults/network

    r29883 r29910  
    112112                ;; 
    113113 
     114        wl341v3) 
     115                lan_mac=$(ramips_get_mac_binary board-nvram 65440) 
     116                wan_mac=$(/usr/sbin/maccalc add "$lan_mac" 1) 
     117                ;; 
     118 
    114119        wli-tx4-ag300n) 
    115120                lan_mac=$(ramips_get_mac_binary factory 4) 
  • trunk/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac

    r29883 r29910  
    3030                ifconfig eth0 hw ether $mac 2>/dev/null 
    3131                ;; 
     32        wl341v3) 
     33                mac=$(ramips_get_mac_binary board-nvram 65440) 
     34                ifconfig eth0 hw ether $mac 2>/dev/null 
     35                ;; 
    3236        esac 
    3337} 
  • trunk/target/linux/ramips/base-files/lib/ramips.sh

    r29883 r29910  
    114114                name="whr-g300n" 
    115115                ;; 
     116        *"Sitecom WL-341 v3") 
     117                name="wl341v3" 
     118                ;; 
    116119        *"Sitecom WL-351 v1 002") 
    117120                name="wl-351" 
  • trunk/target/linux/ramips/base-files/lib/upgrade/platform.sh

    r29883 r29910  
    3131        w502u |\ 
    3232        v22rw-2x2 | \ 
     33        wl341v3 | \ 
    3334        wli-tx4-ag300n | \ 
    3435        whr-g300n |\ 
  • trunk/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h

    r29882 r29910  
    4343        RAMIPS_MACH_WCR150GN,           /* Sparklan WCR-150GN */ 
    4444        RAMIPS_MACH_WHR_G300N,          /* Buffalo WHR-G300N */ 
     45        RAMIPS_MACH_WL341V3,            /* Sitecom WL-341 v3 */ 
    4546        RAMIPS_MACH_WL351,              /* Sitecom WL-351 v1 002 */ 
    4647        RAMIPS_MACH_WR512_3GN,          /* SH-WR512NU/WS-WR512N1-like 3GN*/ 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig

    r29882 r29910  
    8787        select RALINK_DEV_GPIO_LEDS 
    8888 
     89config RT305X_MACH_WL341V3 
     90        bool "Sitecom WL-341 v3 board support" 
     91        select RALINK_DEV_GPIO_BUTTONS 
     92        select RALINK_DEV_GPIO_LEDS 
     93 
    8994config RT305X_MACH_WL351 
    9095        bool "Sitecom WL-351 support" 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile

    r29882 r29910  
    3131obj-$(CONFIG_RT305X_MACH_WHR_G300N)     += mach-whr-g300n.o 
    3232obj-$(CONFIG_RT305X_MACH_WR512_3GN)     += mach-wr512-3gn.o 
     33obj-$(CONFIG_RT305X_MACH_WL341V3)       += mach-wl341v3.o 
    3334obj-$(CONFIG_RT305X_MACH_WL351)         += mach-wl351.o 
  • trunk/target/linux/ramips/image/Makefile

    r29884 r29910  
    6565                        dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \ 
    6666                ) > $(call imgname,$(1),$(2))-sysupgrade.bin; \ 
     67        fi; fi 
     68endef 
     69 
     70define BuildFirmware/WL341V3 
     71        $(call PatchKernelLzma,$(2),$(3) $($(4))) 
     72        $(call MkImage,lzma,"$(KDIR)/vmlinux-$(2).bin.lzma","$(KDIR)/vmlinux-$(2).uImage") 
     73        if [ `stat -c%s "$(KDIR)/vmlinux-$(2).uImage"` -gt $(5) ]; then \ 
     74                echo "Warning: $(KDIR)/vmlinux-$(2).uImage is too big"; \ 
     75        else if [ `stat -c%s $(KDIR)/root.$(1)` -gt $(6) ]; then \ 
     76                echo "Warning: $(KDIR)/root.$(1) is too big"; \ 
     77        else \ 
     78                ( \ 
     79                        dd if=/dev/zero bs=195936 count=1; \ 
     80                        echo "1.01"; \ 
     81                        dd if=/dev/zero bs=581 count=1; \ 
     82                        echo -n -e "\x73\x45\x72\x43\x6F\x4D\x6D\x00\x01\x00\x00\x59\x4E\x37\x95\x58\x10\x00\x20\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x03\x00\x00\x80\x00\x00\x00\x00\x03\x00\x00\x10\x12\x00\x00\x00\x10\x73\x45\x72\x43\x6F\x4D\x6D"; \ 
     83                        dd if=/dev/zero bs=65552 count=1; \ 
     84                        dd if=$(KDIR)/vmlinux-$(2).uImage bs=$(5) conv=sync; \ 
     85                        dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \ 
     86                        dd if=/dev/zero bs=`expr 4194304 - 262144 - 16 - $(5) - \( \( \( \`stat -c%s $(KDIR)/root.$(1)\` / 65536 \) + 1 \) \* 65536 \)` count=1; \ 
     87                        echo -n -e "\x11\x03\x80\x00\x10\x12\x90\xF7\x65\x52\x63\x4F\x6D\x4D\x00\x00"; \ 
     88                ) > $(call imgname,$(1),$(2))-factory.bin; \ 
    6789        fi; fi 
    6890endef 
     
    150172define Image/Build/Template/OMNIEMB 
    151173        $(call BuildFirmware/Generic,$(1),$(2),board=$(3) console=$(console_OMNIEMB),mtdlayout_OMNIEMB,1048576,7012352) 
     174endef 
     175 
     176mtdlayout_sercomm_4M=mtdparts=physmap-flash.0:128k(u-boot)ro,64k(board-nvram)ro,64k(u-boot-env)ro,832k(kernel),2944k(rootfs),64k(signature-eRcOmM),3776k@0x40000(firmware),4096k@0x0(fullflash) 
     177define Image/Build/Template/WL341V3 
     178        $(call BuildFirmware/Generic,$(1),$(2),board=$(3),mtdlayout_sercomm_4M,851968,3014656) 
     179        $(call BuildFirmware/WL341V3,$(1),$(2),board=$(3),mtdlayout_sercomm_4M,851968,3014656) 
     180endef 
     181 
     182define Image/Build/Profile/WL341V3 
     183        $(call Image/Build/Template/WL341V3,$(1),wl341v3,WL341V3) 
    152184endef 
    153185 
     
    295327        $(call Image/Build/Profile/W502U,$(1)) 
    296328        $(call Image/Build/Profile/WR5123GN,$(1)) 
     329        $(call Image/Build/Profile/WL341V3,$(1)) 
    297330        $(call Image/Build/Profile/WL351,$(1)) 
    298331endef 
  • trunk/target/linux/ramips/rt305x/config-2.6.39

    r29882 r29910  
    110110CONFIG_RT305X_MACH_WCR150GN=y 
    111111CONFIG_RT305X_MACH_WHR_G300N=y 
     112CONFIG_RT305X_MACH_WL341V3=y 
    112113CONFIG_RT305X_MACH_WL351=y 
    113114CONFIG_RT305X_MACH_WR512_3GN=y 
Note: See TracChangeset for help on using the changeset viewer.