OpenWrt Forum Archive

Topic: HAME MPR-A1 - Small and cheap router with built-in battery

The content of this topic has been archived between 12 May 2015 and 2 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Squonk--My device arrived (MPR-L8-V8), and I downloaded the patches from your post mentioned above after doing "svn up".  The first two were applied without errors.  There were some errors from the third patch because of changes in the downloaded files.  I tracked them down and got everything patched correctly (I think).

When I did "make menuconfig", after selecting "Target System: (Ralink RT288x/RT3xxx)" and "Subtarget: (RT305x based boards)", there was no "HAME MPR-A1" available under "Target Profile".

I went back and checked each patched file, and they look ok to me. 

What might I have done wrong, or what do I need to do to get the "HAME MPR-A1" option to show up?

There probably has been some changes in the trunk since I did the patches: I created them against revision 34872.

So you may check out this particular revision instead of HEAD, using:

svn co -r 34872 svn://svn.openwrt.org/openwrt/trunk/

... or let me some time to freshen them up!

You may have to remove the "tmp" directory in trunk, then redo a "make menuconfig": I found that there are some dependencies that are not refreshed correctly (as they should) if you patch files related to profiles like we do here...

I deleted the contents of the tmp directory and with "make menuconfig" I got the HAME MPR-A1 option.  It's running now--we'll see how it turns out.

lizby wrote:

I deleted the contents of the tmp directory and with "make menuconfig" I got the HAME MPR-A1 option.  It's running now--we'll see how it turns out.

It doesn't work: problem in the mac80211 package, because of some mods in trunk 10 hours ago!

Serge's RF (second) patch does not apply cleanly any more, it also needs to be modified.

The easiest if you want to test your MPR-L8 board quickly is to go back to revision 34872 until I fix the mess in the patches brought by latest trunk...

swatfa wrote:

Just to update, unfortunatly after talking to the factory the header modifications will not be done. Apparenty the research and development time to remap the new pcb is not possible for the time being for our expected initial order quantity. This would have to be kept for the next potential model or release of the product.

With this in mind is there any possibility that the device can still be used to interact with peripherals without the header? Im not very tech savvy but would it be possible just to use the existing i2c and free gpios to connect to the peripherals perhaps through soldering?  I ask so that i can be sure whether or not i can mention that it is capable of communicating with devices/robotics etc in my marketing campaign or whether its impossible without the header discussed previously.

For now the confirmed upgrades are the 32mb ram and 8mb flash. Perhaps if the device can support larger flash than i will try to upgrade it even further. Will have to check the limitations of the uboot and compatible chips.

Please also make 8MB flash version if possible. Is your goal still to be ready in february? Will you have worldwide availability with free shipping?

Squonk--my compile left to run last night failed as you described.  I'm starting the process with r34872.  Thanks.

lizby wrote:

Squonk--my compile left to run last night failed as you described.  I'm starting the process with r34872.  Thanks.

I will probably have time to work on it this week end: I will update the patches so they run again against latest trunk.

(Last edited by Squonk on 10 Jan 2013, 14:06)

After "svn co -r 34872 svn://svn.openwrt.org/openwrt/trunk/ r34872" I got to pick "HAME MPR-A1" but when I ran "make V=99" I got the error shown below.  I'll wait and try again when the patches are updated.  Thanks for your work.

...

Applying /home/lb/openwrt/r34872/target/linux/generic/patches-3.6/472-mtd_mp25p80_add_pm25lq032.patch using plaintext:
patching file drivers/mtd/devices/m25p80.c
Hunk #1 FAILED at 698.
1 out of 1 hunk FAILED -- saving rejects to file drivers/mtd/devices/m25p80.c.rej
Patch failed!  Please fix /home/lb/openwrt/r34872/target/linux/generic/patches-3.6/472-mtd_mp25p80_add_pm25lq032.patch!
make[3]: *** [/home/lb/openwrt/r34872/build_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/linux-3.6.11/.prepared] Error 1
make[3]: Leaving directory `/home/lb/openwrt/r34872/toolchain/kernel-headers'
make[2]: *** [toolchain/kernel-headers/prepare] Error 2
make[2]: Leaving directory `/home/lb/openwrt/r34872'
make[1]: *** [/home/lb/openwrt/r34872/staging_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/stamp/.toolchain_install] Error 2
make[1]: Leaving directory `/home/lb/openwrt/r34872'
make: *** [world] Error 2

(Last edited by lizby on 10 Jan 2013, 17:04)

valentt wrote:

Please also make 8MB flash version if possible. Is your goal still to be ready in february? Will you have worldwide availability with free shipping?

The Device will have 8mb flash and 32mb ram. This is confirmed and tested by us successfully.
Worldwide delivery also a Yes.

Free shipping is a complicated one. Due to our business strategy, we might be offering free delivery only to the U.S and maybe even the U.K.

Our timeline still holds true for a February release date. However due to a few setbacks and delays in marketing and press releases it may be end of February instead of the orginal plan for beginning of February.

lizby wrote:

After "svn co -r 34872 svn://svn.openwrt.org/openwrt/trunk/ r34872" I got to pick "HAME MPR-A1" but when I ran "make V=99" I got the error shown below.  I'll wait and try again when the patches are updated.  Thanks for your work.

...

Applying /home/lb/openwrt/r34872/target/linux/generic/patches-3.6/472-mtd_mp25p80_add_pm25lq032.patch using plaintext:
patching file drivers/mtd/devices/m25p80.c
Hunk #1 FAILED at 698.
1 out of 1 hunk FAILED -- saving rejects to file drivers/mtd/devices/m25p80.c.rej
Patch failed!  Please fix /home/lb/openwrt/r34872/target/linux/generic/patches-3.6/472-mtd_mp25p80_add_pm25lq032.patch!
make[3]: *** [/home/lb/openwrt/r34872/build_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/linux-3.6.11/.prepared] Error 1
make[3]: Leaving directory `/home/lb/openwrt/r34872/toolchain/kernel-headers'
make[2]: *** [toolchain/kernel-headers/prepare] Error 2
make[2]: Leaving directory `/home/lb/openwrt/r34872'
make[1]: *** [/home/lb/openwrt/r34872/staging_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/stamp/.toolchain_install] Error 2
make[1]: Leaving directory `/home/lb/openwrt/r34872'
make: *** [world] Error 2

I had to add a missing newline at the end of each file from PasteBin (you can also replace all CRLF by LF, but this is not required), but beside that , I had no problem with revision 38472:

svn co -r 34872 svn://svn.openwrt.org/openwrt/trunk
cd trunk
mkdir patches
cd patches/
wget http://pastebin.com/download.php?i=9SVHfva3 -O openwrt_add_pm26lq032_flash_support.txt
echo "" >> openwrt_add_pm26lq032_flash_support.txt
wget http://pastebin.com/download.php?i=5cerkhUB -O openwrt_add_rt3550_wlan_support.txt
echo "" >> openwrt_add_rt3550_wlan_support.txt
wget http://pastebin.com/download.php?i=jESjc2nH -O openwrt_hame_mpr-a1_patch.txt
echo "" >> openwrt_hame_mpr-a1_patch.txt
cd ..
patch -p0 <patches/openwrt_add_pm26lq032_flash_support.txt 
patch -p0 <patches/openwrt_add_rt3550_wlan_support.txt 
patch -p0 --dry-run <patches/openwrt_hame_mpr-a1_patch.txt 
make menuconfig
make -j 5
cp bin/ramips/openwrt-ramips-rt305x-mpr-a1-squashfs-sysupgrade.bin /tftpboot/

Then:

U-Boot 1.1.7 (Dec 13 2011 - 13:49:42)

Board: Ralink APSoC DRAM:  16 MB
relocate_code Pointer at: 80fb4000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42 
spi device id: ef 40 16 0 0 (40160000)
find flash: W25Q32BV
raspi_read: from:30000 len:1000 
.raspi_read: from:30000 len:1000 
.============================================ 
Ralink UBoot Version: 3.6.0.0
-------------------------------------------- 
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping 
DRAM_TYPE: SDRAM 
DRAM_SIZE: 128 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 16 MBytes
Flash component: SPI Flash
Date:Dec 13 2011  Time:13:49:42
============================================ 
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384 

 ##### The CPU freq = 360 MHZ #### 
 estimate memory size =16 Mbytes
raspi_read: from:40028 len:6 
.
raspi_read: from:0 len:30004 
....*************Is_update = 0 plat = 1**************

Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 

You choosed 2

 0 
   
2: System Load Linux Kernel then write to Flash via TFTP. 
 Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)
 Please Input new ones /or Ctrl-C to discard
    Input device IP (192.168.1.1) ==:192.168.1.1
    Input server IP (192.168.1.2) ==:192.168.1.2
    Input Linux Kernel filename (openwrt-ramips-rt305x-mpr-a1-squashfs-sysupgrade.bin) ==:openwrt-ramips-rt305x-mpr-a1-squashfs-sysupgrade.bin

 netboot_common, argc= 3 

 NetTxPacket = 0x80FE6AC0 

 KSEG1ADDR(NetTxPacket) = 0xA0FE6AC0 

 NetLoop,call eth_halt ! 

 NetLoop,call eth_init ! 
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done


 Header Payload scatter function is Disable !! 

 ETH_STATE_ACTIVE!! 
Using Eth0 (10/100-M) device
TFTP from server 192.168.1.2; our IP address is 192.168.1.1
Filename 'openwrt-ramips-rt305x-mpr-a1-squashfs-sysupgrade.bin'.

 TIMEOUT_COUNT=10,Load address: 0x80100000
Loading: *Got ARP REPLY, set server/gtwy eth addr (50:46:5d:dc:94:08)
Got it
#################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     ################################
done
Bytes transferred = 2490372 (260004 hex)
NetBootFileXferSize= 00260004
raspi_erase_write: offs:50000, count:260004
raspi_erase: offs:50000 len:260000
......................................
raspi_write: to:50000 len:260000 
......................................
raspi_read: from:50000 len:10000 
.raspi_read: from:60000 len:10000 
.raspi_read: from:70000 len:10000 
.raspi_read: from:80000 len:10000 
.raspi_read: from:90000 len:10000 
.raspi_read: from:a0000 len:10000 
.raspi_read: from:b0000 len:10000 
.raspi_read: from:c0000 len:10000 
.raspi_read: from:d0000 len:10000 
.raspi_read: from:e0000 len:10000 
.raspi_read: from:f0000 len:10000 
.raspi_read: from:100000 len:10000 
.raspi_read: from:110000 len:10000 
.raspi_read: from:120000 len:10000 
.raspi_read: from:130000 len:10000 
.raspi_read: from:140000 len:10000 
.raspi_read: from:150000 len:10000 
.raspi_read: from:160000 len:10000 
.raspi_read: from:170000 len:10000 
.raspi_read: from:180000 len:10000 
.raspi_read: from:190000 len:10000 
.raspi_read: from:1a0000 len:10000 
.raspi_read: from:1b0000 len:10000 
.raspi_read: from:1c0000 len:10000 
.raspi_read: from:1d0000 len:10000 
.raspi_read: from:1e0000 len:10000 
.raspi_read: from:1f0000 len:10000 
.raspi_read: from:200000 len:10000 
.raspi_read: from:210000 len:10000 
.raspi_read: from:220000 len:10000 
.raspi_read: from:230000 len:10000 
.raspi_read: from:240000 len:10000 
.raspi_read: from:250000 len:10000 
.raspi_read: from:260000 len:10000 
.raspi_read: from:270000 len:10000 
.raspi_read: from:280000 len:10000 
.raspi_read: from:290000 len:10000 
.raspi_read: from:2a0000 len:10000 
.raspi_read: from:2b0000 len:10000 
.raspi_erase: offs:2b0000 len:10000
.
raspi_write: to:2b0000 len:10000 
.
raspi_read: from:2b0000 len:10000 
.Done!
## Booting image at bc050000 ...
raspi_read: from:50000 len:40 
.   Image Name:   MIPS OpenWrt Linux-3.6.11
   Created:      2013-01-10  19:48:50 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    838198 Bytes = 818.6 kB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:cca36 
.............   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 16

Starting kernel ...

[    0.000000] Linux version 3.6.11 (mstempin@Mikeul) (gcc version 4.6.4 20121106 (prerelease) (Linaro GCC 4.6-2012.11) ) #1 Thu Jan 10 20:48:47 CET 2013
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT5350 id:1 rev:3 running at 360.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 01000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x00ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x00ffffff]
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
[    0.000000] Kernel command line:  board=MPR-A1 console=ttyS1,57600 mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware) rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 64 (order: -4, 256 bytes)
[    0.000000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] Writing ErrCtl register=000056c0
[    0.000000] Readback ErrCtl register=000056c0
[    0.000000] Memory: 13576k/16384k available (1931k kernel code, 2808k reserved, 312k data, 176k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is HAME MPR-A1
[    0.130000] bio: create slab <bio-0> at 0
[    0.140000] Switching to clocksource MIPS
[    0.150000] NET: Registered protocol family 2
[    0.160000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.180000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.190000] TCP: Hash tables configured (established 512 bind 512)
[    0.200000] TCP: reno registered
[    0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.230000] NET: Registered protocol family 1
[    0.280000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.290000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.320000] msgmni has been set to 26
[    0.320000] io scheduler noop registered
[    0.330000] io scheduler deadline registered (default)
[    0.340000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.360000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.370000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.390000] ramips-spi ramips-spi.0: master is unqueued, this is deprecated
[    0.410000] m25p80 spi0.0: found w25q32, expected pm25lq032
[    0.420000] m25p80 spi0.0: w25q32 (4096 Kbytes)
[    0.430000] 6 cmdlinepart partitions found on MTD device spi0.0
[    0.440000] Creating 6 MTD partitions on "spi0.0":
[    0.450000] 0x000000000000-0x000000030000 : "u-boot"
[    0.460000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.480000] 0x000000040000-0x000000050000 : "factory"
[    0.490000] 0x000000050000-0x000000130000 : "kernel"
[    0.500000] 0x000000130000-0x000000400000 : "rootfs"
[    0.520000] mtd: partition "rootfs" set to be root filesystem
[    0.530000] mtd: partition "rootfs_data" created automatically, ofs=2A0000, len=160000 
[    0.540000] 0x0000002a0000-0x000000400000 : "rootfs_data"
[    0.560000] 0x000000050000-0x000000400000 : "firmware"
[    0.580000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 35, using 35
[    0.600000] TCP: cubic registered
[    0.610000] NET: Registered protocol family 17
[    0.620000] 8021q: 802.1Q VLAN Support v1.8
[    0.650000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.660000] Freeing unused kernel memory: 176k freed
[    4.870000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[    5.090000] Button Hotplug driver version 0.4.1
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
jffs2 not ready yet; using ramdisk
- init -

Please press Enter to activate this console. [   10.320000] Compat-drivers backport release: compat-drivers-2012-12-04
[   10.330000] Backport based on wireless-testing.git master-2012-12-06
[   10.350000] compat.git: wireless-testing.git
[   10.390000] cfg80211: Calling CRDA to update world regulatory domain
[   10.410000] cfg80211: World regulatory domain updated:
[   10.420000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   10.430000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.450000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.460000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.480000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.500000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.040000] usbcore: registered new interface driver usbfs
[   11.050000] usbcore: registered new interface driver hub
[   11.070000] usbcore: registered new device driver usb
[   12.120000] PPP generic driver version 2.4.2
[   12.320000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.580000] NET: Registered protocol family 24
[   12.610000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   13.620000] ehci-platform ehci-platform: Generic Platform EHCI Controller
[   13.630000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[   13.680000] ehci-platform ehci-platform: irq 26, io mem 0x101c0000
[   13.710000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[   13.720000] hub 1-0:1.0: USB hub found
[   13.730000] hub 1-0:1.0: 1 port detected
[   13.760000] nf_conntrack version 0.5.0 (214 buckets, 856 max)
[   20.380000] device eth0.1 entered promiscuous mode
[   20.390000] device eth0 entered promiscuous mode
[   20.410000] br-lan: port 1(eth0.1) entered forwarding state
[   20.420000] br-lan: port 1(eth0.1) entered forwarding state
[   21.230000] ramips-wdt: timeout value 60 must be 0 < timeout <= 35, using 35
[   22.420000] br-lan: port 1(eth0.1) entered forwarding state
[   36.450000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   36.470000] jffs2_build_filesystem(): unlocking the mtd device... done.
[   36.480000] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[   44.150000] jffs2: notice: (1013) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.



BusyBox v1.19.4 (2013-01-10 20:47:10 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r34872)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/# uname -a
Linux OpenWrt 3.6.11 #1 Thu Jan 10 20:48:47 CET 2013 mips GNU/Linux
root@OpenWrt:/# cd /etc/config/
root@OpenWrt:/etc/config# sed -i '/disabled/d' wireless
root@OpenWrt:/etc/config# wifi up
Configuration file: /var/run/hostapd-phy0.conf
[  221.060000] device wlan0 entered promiscuous mode
Using interface wlan0 with hwaddr 00:20:0c:06:35:a0 and ssid "OpenWrt"
[  221.260000] br-lan: port 2(wlan0) entered forwarding state
[  221.270000] br-lan: port 2(wlan0) entered forwarding state
[  223.270000] br-lan: port 2(wlan0) entered forwarding state
root@OpenWrt:/etc/config# ifconfig
br-lan    Link encap:Ethernet  HWaddr 00:20:0C:06:35:A0  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:250 errors:0 dropped:0 overruns:0 frame:0
          TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:13207 (12.8 KiB)  TX bytes:12937 (12.6 KiB)

eth0      Link encap:Ethernet  HWaddr 02:20:0C:06:35:A0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:250 errors:0 dropped:0 overruns:0 frame:0
          TX packets:216 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17707 (17.2 KiB)  TX bytes:41377 (40.4 KiB)
          Interrupt:5 

eth0.1    Link encap:Ethernet  HWaddr 02:20:0C:06:35:A0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:250 errors:0 dropped:0 overruns:0 frame:0
          TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:13207 (12.8 KiB)  TX bytes:12937 (12.6 KiB)

eth0.2    Link encap:Ethernet  HWaddr 00:20:0C:06:35:A1  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:27510 (26.8 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1584 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1584 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:107712 (105.1 KiB)  TX bytes:107712 (105.1 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:20:0C:06:35:A0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@OpenWrt:/etc/config# 

Hi can you share .config file for this router?
Thanks a lot.

Squonk wrote:

There probably has been some changes in the trunk since I did the patches: I created them against revision 34872.

So you may check out this particular revision instead of HEAD, using:

svn co -r 34872 svn://svn.openwrt.org/openwrt/trunk/

... or let me some time to freshen them up!

You may have to remove the "tmp" directory in trunk, then redo a "make menuconfig": I found that there are some dependencies that are not refreshed correctly (as they should) if you patch files related to profiles like we do here...

Can someone send compiled firmware image? Because I tried 10 times without a succesfull build. Maybe my system is debian ,and dependencies are broken

Squonk--with your code suggested in post 160, I successfully compiled the firmware.  I loaded it with tftp on the device without errors, but when I boot, it terminates with this:

[    4.390000] Out of memory: Kill process 205 (hotplug2) score 0 or sacrifice child
[    4.410000] Killed process 278 (hotplug2) total-vm:844kB, anon-rss:104kB, file-rss:0kB

Here is the whole boot log

U-Boot 1.1.7 (Dec 13 2011 - 13:49:42)

Board: Ralink APSoC DRAM:   8 MB
relocate_code Pointer at: 807b4000
spi_wait_nsec: 42
spi device id: 7f 9d 46 7f 9d (9d467f9d)
Warning: un-recognized chip ID, please update bootloader!
raspi_read: from:30000 len:1000
.raspi_read: from:30000 len:1000
.============================================
Ralink UBoot Version: 3.6.0.0
--------------------------------------------
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: SDRAM
DRAM_SIZE: 64 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 8 MBytes
Flash component: SPI Flash
Date:Dec 13 2011  Time:13:49:42
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

 ##### The CPU freq = 360 MHZ ####
 estimate memory size =8 Mbytes
raspi_read: from:40028 len:6
.
raspi_read: from:0 len:30004
....*************Is_update = 0 plat = 1**************

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.                     0

3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
.   Image Name:   MIPS OpenWrt Linux-3.6.11
   Created:      2013-01-10  23:47:09 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    838146 Bytes = 818.5 kB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:cca02
.............   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 8

Starting kernel ...

[    0.000000] Linux version 3.6.11 (lb@lb-atom1) (gcc version 4.6.4 20121106 (prerelease) (Linaro GCC 4.6-2012.11) ) #1 Thu Jan 10 19:46:50 AST 2013
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT5350 id:1 rev:3 running at 360.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 00800000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x007fffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x007fffff]
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 2032
[    0.000000] Kernel command line:  board=MPR-A1 console=ttyS1,57600 mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware) rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 32 (order: -5, 128 bytes)
[    0.000000] Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] Writing ErrCtl register=000492a0
[    0.000000] Readback ErrCtl register=000492a0
[    0.000000] Memory: 5452k/8192k available (1931k kernel code, 2740k reserved, 312k data, 176k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is HAME MPR-A1
[    0.130000] bio: create slab <bio-0> at 0
[    0.140000] Switching to clocksource MIPS
[    0.150000] NET: Registered protocol family 2
[    0.160000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.180000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.190000] TCP: Hash tables configured (established 512 bind 512)
[    0.200000] TCP: reno registered
[    0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.230000] NET: Registered protocol family 1
[    0.280000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.290000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.320000] msgmni has been set to 16
[    0.320000] io scheduler noop registered
[    0.330000] io scheduler deadline registered (default)
[    0.340000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.360000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.370000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.390000] ramips-spi ramips-spi.0: master is unqueued, this is deprecated
[    0.410000] m25p80 spi0.0: pm25lq032 (4096 Kbytes)
[    0.420000] 6 cmdlinepart partitions found on MTD device spi0.0
[    0.430000] Creating 6 MTD partitions on "spi0.0":
[    0.440000] 0x000000000000-0x000000030000 : "u-boot"
[    0.450000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.460000] 0x000000040000-0x000000050000 : "factory"
[    0.480000] 0x000000050000-0x000000130000 : "kernel"
[    0.490000] 0x000000130000-0x000000400000 : "rootfs"
[    0.510000] mtd: partition "rootfs" set to be root filesystem
[    0.520000] mtd: partition "rootfs_data" created automatically, ofs=340000, len=C0000
[    0.530000] 0x000000340000-0x000000400000 : "rootfs_data"
[    0.550000] 0x000000050000-0x000000400000 : "firmware"
[    0.570000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 35, using 35
[    0.590000] TCP: cubic registered
[    0.600000] NET: Registered protocol family 17
[    0.610000] 8021q: 802.1Q VLAN Support v1.8
[    0.640000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.660000] Freeing unused kernel memory: 176k freed
[    3.730000] hotplug2 invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0, oom_score_adj=0
[    3.740000] Call Trace:[<801de3a8>] 0x801de3a8
[    3.750000] [<801de3a8>] 0x801de3a8
[    3.760000] [<801decbc>] 0x801decbc
[    3.770000] [<8004df94>] 0x8004df94
[    3.770000] [<80059f58>] 0x80059f58
[    3.780000] [<8004e684>] 0x8004e684
[    3.790000] [<800515ac>] 0x800515ac
[    3.790000] [<8006398c>] 0x8006398c
[    3.800000] [<800628e4>] 0x800628e4
[    3.810000] [<8000a624>] 0x8000a624
[    3.810000] [<80065688>] 0x80065688
[    3.820000] [<800657f4>] 0x800657f4
[    3.830000] [<8000a590>] 0x8000a590
[    3.840000] [<80035e3c>] 0x80035e3c
[    3.840000] [<80001a08>] 0x80001a08
[    3.850000] [<800019c0>] 0x800019c0
[    3.860000]
[    3.860000] Mem-Info:
[    3.860000] Normal per-cpu:
[    3.870000] CPU    0: hi:    0, btch:   1 usd:   0
[    3.880000] active_anon:200 inactive_anon:0 isolated_anon:0
[    3.880000]  active_file:8 inactive_file:17 isolated_file:0
[    3.880000]  unevictable:0 dirty:0 writeback:0 unstable:0
[    3.880000]  free:90 slab_reclaimable:60 slab_unreclaimable:521
[    3.880000]  mapped:0 shmem:0 pagetables:51 bounce:0
[    3.930000] Normal free:360kB min:360kB low:448kB high:540kB active_anon:800kB inactive_anon:0kB active_file:32kB inactive_file:68kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:8128kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:240kB slab_unreclaimable:2084kB kernel_stack:320kB pagetables:204kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:4412 all_unreclaimable? yes
[    4.010000] lowmem_reserve[]: 0 0
[    4.010000] Normal: 0*4kB 1*8kB 0*16kB 1*32kB 1*64kB 0*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 360kB
[    4.040000] 25 total pagecache pages
[    4.040000] 0 pages in swap cache
[    4.050000] Swap cache stats: add 0, delete 0, find 0/0
[    4.060000] Free swap  = 0kB
[    4.070000] Total swap = 0kB
[    4.070000] 2048 pages RAM
[    4.080000] 641 pages reserved
[    4.080000] 458 pages shared
[    4.090000] 1080 pages non-shared
[    4.100000] [ pid ]   uid  tgid total_vm      rss nr_ptes swapents oom_score_adj name
[    4.110000] [  205]     0   205      211       26       3        0             0 hotplug2
[    4.130000] [  278]     0   278      211       26       3        0             0 hotplug2
[    4.140000] [  279]     0   279      143        1       2        0             0 hotplug-call
[    4.160000] [  280]     0   280      211       26       3        0             0 hotplug2
[    4.180000] [  281]     0   281      211       26       3        0             0 hotplug2
[    4.190000] [  282]     0   282      211       26       3        0             0 hotplug2
[    4.210000] [  283]     0   283      143        1       2        0             0 hotplug-call
[    4.230000] [  284]     0   284      143        1       2        0             0 hotplug-call
[    4.240000] [  285]     0   285      143        1       2        0             0 hotplug-call
[    4.260000] [  286]     0   286      211       26       3        0             0 hotplug2
[    4.280000] [  287]     0   287      211       26       3        0             0 hotplug2
[    4.290000] [  288]     0   288      211       26       3        0             0 hotplug2
[    4.310000] [  289]     0   289      211       26       3        0             0 hotplug2
[    4.330000] [  290]     0   290      211       26       3        0             0 hotplug2
[    4.340000] [  291]     0   291      211       26       3        0             0 hotplug2
[    4.360000] [  292]     0   292      211       26       3        0             0 hotplug2
[    4.380000] [  293]     0   293      211       26       3        0             0 hotplug2
[    4.390000] Out of memory: Kill process 205 (hotplug2) score 0 or sacrifice child
[    4.410000] Killed process 278 (hotplug2) total-vm:844kB, anon-rss:104kB, file-rss:0kB

This is similar to your post 87 boot log up to here

[    0.650000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.660000] Freeing unused kernel memory: 176k freed

After this it goes off, with hotplug2 apparently detecting an error.

Any ideas about what may have gone wrong?  (I'm awaiting my 8mb flash modules, so no great loss if this is a bust--it was experimental).

(Last edited by lizby on 11 Jan 2013, 21:11)

lizby wrote:

Squonk--with your code suggested in post 160, I successfully compiled the firmware.  I loaded it with tftp on the device without errors, but when I boot, it terminates with this:

[    4.390000] Out of memory: Kill process 205 (hotplug2) score 0 or sacrifice child
[    4.410000] Killed process 278 (hotplug2) total-vm:844kB, anon-rss:104kB, file-rss:0kB

Here is the whole boot log

U-Boot 1.1.7 (Dec 13 2011 - 13:49:42)

Board: Ralink APSoC DRAM:   8 MB
relocate_code Pointer at: 807b4000
spi_wait_nsec: 42
spi device id: 7f 9d 46 7f 9d (9d467f9d)
Warning: un-recognized chip ID, please update bootloader!
raspi_read: from:30000 len:1000
.raspi_read: from:30000 len:1000
.============================================
Ralink UBoot Version: 3.6.0.0
--------------------------------------------
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: SDRAM
DRAM_SIZE: 64 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 8 MBytes
Flash component: SPI Flash
Date:Dec 13 2011  Time:13:49:42

Ouch, only 8MB SDRAM hmm

I guess this is the main reason for the crash sad

My MPR-L8 is 16 MB, and I find it small already... I thought it was the smallest possible capacity available for these routers...

Can you tell me exactly what is written onto the SDRAM chip? Maybe the bootloader is guessing wrong?

SDRAM marking: Etrontech EM639165TS-6G N49AG05AGB749.13ZQ

According to the datasheet, this is "8M x 16 bit Synchronous DRAM (SDRAM)", so should be 16MB. 

Datasheet: http://www.qinuo.com.cn/Attaches/Produc … 848109.pdf

So I wonder why only 8MBytes is detected?

This seems to be an old bootloader: it doesn't even detect correctly the Flash chip used...

You can try to edit the kernel command line in uboot using printenv and setenv, and add a "mem=16M" option to it.

Squonk--thanks for the suggestion.  I wasn't sure where to put the "mem=16M" option.  I first added it freestanding, and it had no effect.  Then I added it to the "addmisc" variable.  That also had no effect.  Here is my printenv

bootcmd=tftp
bootdelay=2
baudrate=57600
ethaddr="00:AA:BB:CC:DD:10"
ramargs=setenv bootargs root=/dev/ram rw
addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off
flash_self=run ramargs addip addmisc;bootm $(kernel_addr) $(ramdisk_addr)
kernel_addr=BFC40000
u-boot=u-boot.bin
load=tftp 8A100000 $(u-boot)
u_b=protect off 1:0-1;era 1:0-1;cp.b 8A100000 BC400000 $(filesize)
loadfs=tftp 8A100000 root.cramfs
u_fs=era bc540000 bc83ffff;cp.b 8A100000 BC540000 $(filesize)
test_tftp=tftp 8A100000 root.cramfs;run test_tftp
ethact=Eth0 (10/100-M)
ipaddr=192.168.1.100
serverip=192.168.1.122
stdin=serial
stdout=serial
stderr=serial
addmisc=setenv bootargs console=ttyS0,57600 ethaddr="00:AA:BB:CC:DD:10" panic=1

How should I add the mem variable?

Type:
setenv ram 16M

no equal sign.

Finally I've build succesfully. With default settings works very good but when add luci interface it can't operate.

If you only have 16 MB of RAM, then this is not enough to run LuCI.

Yes I have 16 mb memory, I'll try extroot and swap options. I think it will be possible.

Yes, it may be a viable option!

Or if you have a hot air station and a 256 or 512 Mbit SDRAM chip available, just replace it...

I updated the patches required to build OpenWrt on the HAME MPR-A1 and other Ralink RT5350-based routers to work with the latest trunk revision (revision 35145).

This has been made necessary, as major changes took place recently in the trunk:

  • switch from Linux kernel 3.6.11 to 3.7.2

  • switch from package mac80211 2012-12-06  to 2013-01-07

This caused major disruptions in the previous patches proper applications.

This is now fixed, and I took the opportunity to add the JEDEC definitions for GigaDevices GD25Q32 and GD25Q64 chips.

As PasteBin is no longer appropriate to keep track of revisions, I switch to a GitHub repository:
https://github.com/Squonk42/OpenWrt-RT5350

A brief introduction, build instructions and patch contents are provided there.

Enjoy big_smile

(Last edited by Squonk on 13 Jan 2013, 23:52)

Squonk wrote:

I updated the patches required to build OpenWrt on the HAME MPR-A1 and other Ralink RT5350-based routers to work with the latest trunk revision (revision 35145).

This has been made necessary, as major changes took place recently in the trunk:

  • switch from Linux kernel 3.6.11 to 3.7.2

  • switch from package mac80211 2012-12-06  to 2013-01-07

This caused major disruptions in the previous patches proper applications.

This is now fixed, and I took the opportunity to add the JEDEC definitions for GigaDevices GD25Q32 and GD25Q64 chips.

As PasteBin is no longer appropriate to keep track of revisions, I switch to a GitHub repository:
https://github.com/Squonk42/OpenWrt-RT5350

A brief introduction, build instructions and patch contents are provided there.

Enjoy big_smile

Thank you @Squonk. I'm going to make a build for my Poray M3 with the new patches and report what happen.

(Last edited by miguxbe on 14 Jan 2013, 00:00)

Not good in features Linux.
My HAME MPR-A1 works fine Yota LTE LU150.
My MPR-L8 is not working Yota LTE LU150.
Two questions:
1. You can flash the MPR-L8 => HAME MPR-A1 A1_2.3.105.214_20120821024324.bin ?
2. Support Yota LTE LU150 MPR-L8 OpenWTR ?

Thank you.

Sorry, posts 176 to 175 are missing from our archive.