OUR NETWORK:TiVo Community TechLore Explore3DTV DVRplayground Dijit Community See all... About UsAdvertiseContact Us

 
Learn about scoring Forum's Raw Score: 581048.0
September 15, 2011 06:03 AM

Categories: WNDR3800 Open Platform Router

Rating (0 votes)
  • 1
  • 2
  • 3
  • 4
  • 5
Rate This!

Member Avatar

Tathagata Das

NETGEAR
Joined: 12/24/2007

Hi,
I am trying to port DD-WRT on a AR71XX platform I am unable to run any application.I am getting following error

"FPU emulator disabled, make sure your toolchainwas compiled with software floating point support (soft-float)"

Below is the console log

Starting kernel ...

[ 0.000000] Linux version 2.6.34.9-svn17134 (tatha@localhost.localdomain) (gcc version 4.1.2) #4 Mon Sep 12 13:59:40 IST 2011
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[ 0.000000] booting platform Atheros AR7161 rev 2 (0xaa)
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Zone PFN ranges:
[ 0.000000] Normal 0x00000000 -> 0x00008000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[1] active PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00008000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 rootfstype=squashfs init=/sbin/init
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 126644k/131072k available (2265k kernel code, 4428k reserved, 558k data, 148k init, 0k highmem)
[ 0.000000] NR_IRQS:128
[ 0.000000] irq init done
[ 0.000000] plat_time_init: plat time init done
[ 0.000000] Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
[ 0.250000] Mount-cache hash table entries: 512
[ 0.250000] NET: Registered protocol family 16
[ 3.250000] registering PCI controller with io_map_base unset
[ 3.260000] bio: create slab at 0
[ 3.270000] usbcore: registered new interface driver usbfs
[ 3.270000] usbcore: registered new interface driver hub
[ 3.280000] usbcore: registered new device driver usb
[ 3.340000] no in flash calibration fata found, no fix required
[ 3.400000] no in flash calibration fata found, no fix required
[ 3.410000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff]
[ 3.410000] pci 0000:00:00.0: BAR 0: set to [mem 0x10000000-0x1000ffff] (PCI address [0x10000000-0x1000ffff]
[ 3.420000] pci 0000:00:01.0: BAR 0: assigned [mem 0x10010000-0x1001ffff]
[ 3.420000] pci 0000:00:01.0: BAR 0: set to [mem 0x10010000-0x1001ffff] (PCI address [0x10010000-0x1001ffff]
[ 3.430000] fixup irq: got 48
[ 3.430000] fixup irq: got 49
[ 3.430000] Switching to clocksource MIPS
[ 3.440000] NET: Registered protocol family 2
[ 3.440000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 3.450000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 3.460000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 3.460000] TCP: Hash tables configured (established 4096 bind 4096)
[ 3.470000] TCP reno registered
[ 3.470000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 3.480000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 3.480000] NET: Registered protocol family 1
[ 3.490000] gpio_proc: module loaded and /proc/gpio/ created
[ 3.490000] wl0gpio_proc: module loaded and /proc/wl0gpio/ created
[ 3.500000] AR7100 GPIOC major 0
[ 3.500000] init_vdso successfull
[ 3.510000] squashfs: version 3.0 (2006/03/15) Phillip Lougher
[ 3.510000] msgmni has been set to 247
[ 3.520000] io scheduler noop registered
[ 3.520000] io scheduler deadline registered (default)
[ 3.530000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 3.530000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 19) is a 16550A
[ 3.540000] console [ttyS0] enabled, bootconsole disabled
[ 3.540000] console [ttyS0] enabled, bootconsole disabled
[ 3.550000] guessed flashsize = 16M
[ 3.560000] scanning for root partition
[ 3.560000] bootloader size = 70000
[ 3.570000]
[ 3.570000] found squashfs at 170000
[ 3.580000] Creating 8 MTD partitions on "ar7100-nor0":
[ 3.580000] 0x000000000000-0x000000070000 : "RedBoot"
[ 3.590000] 0x000000070000-0x000001000000 : "linux"
[ 3.590000] 0x000000170000-0x000000430000 : "rootfs"
[ 3.600000] mtd: partition "rootfs" set to be root filesystem
[ 3.610000] 0x000000430000-0x000000fe0000 : "ddwrt"
[ 3.610000] 0x000000fe0000-0x000000ff0000 : "nvram"
[ 3.620000] 0x000000ff0000-0x000001000000 : "FIS directory"
[ 3.620000] 0x000000ff0000-0x000001000000 : "board_config"
[ 3.630000] 0x000000000000-0x000001000000 : "fullflash"
[ 3.640000] PPP generic driver version 2.4.2
[ 3.640000] PPP Deflate Compression module registered
[ 3.650000] PPP BSD Compression module registered
[ 3.650000] PPP MPPE Compression module registered
[ 3.660000] NET: Registered protocol family 24
[ 3.660000] PPPoL2TP kernel driver, V1.0
[ 3.660000] IMQ driver loaded successfully.
[ 3.670000] Hooking IMQ before NAT on PREROUTING.
[ 3.670000] Hooking IMQ after NAT on POSTROUTING.
[ 3.680000] tun: Universal TUN/TAP device driver, 1.6
[ 3.680000] tun: (C) 1999-2004 Max Krasnyansky
[ 3.690000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 5.590000] ar71xx-ehci ar71xx-ehci.0: Atheros AR71xx built-in EHCI controller
[ 5.600000] ar71xx-ehci ar71xx-ehci.0: new USB bus registered, assigned bus number 1
[ 5.640000] ar71xx-ehci ar71xx-ehci.0: irq 3, io mem 0x1b000000
[ 5.660000] ar71xx-ehci ar71xx-ehci.0: USB 2.0 started, EHCI 1.00
[ 5.660000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 5.670000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.680000] usb usb1: Product: Atheros AR71xx built-in EHCI controller
[ 5.680000] usb usb1: Manufacturer: Linux 2.6.34.9-svn17134 ehci_hcd
[ 5.690000] usb usb1: SerialNumber: platform
[ 5.690000] hub 1-0:1.0: USB hub found
[ 5.700000] hub 1-0:1.0: 2 ports detected
[ 5.700000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 5.710000] ar71xx-ohci ar71xx-ohci.0: Atheros AR71xx built-in OHCI controller
[ 5.720000] ar71xx-ohci ar71xx-ohci.0: new USB bus registered, assigned bus number 2
[ 5.720000] ar71xx-ohci ar71xx-ohci.0: irq 22, io mem 0x1c000000
[ 5.790000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.800000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.800000] usb usb2: Product: Atheros AR71xx built-in OHCI controller
[ 5.810000] usb usb2: Manufacturer: Linux 2.6.34.9-svn17134 ohci_hcd
[ 5.820000] usb usb2: SerialNumber: platform
[ 5.820000] hub 2-0:1.0: USB hub found
[ 5.820000] hub 2-0:1.0: 2 ports detected
[ 5.830000] usbcore: registered new interface driver usbserial
[ 5.840000] USB Serial support registered for generic
[ 5.840000] usbcore: registered new interface driver usbserial_generic
[ 5.850000] usbserial: USB Serial Driver core
[ 5.850000] USB Serial support registered for GSM modem (1-port)
[ 5.860000] usbcore: registered new interface driver option
[ 5.860000] option: v0.7.2:USB Driver for GSM modems
[ 5.870000] USB Serial support registered for pl2303
[ 5.870000] usbcore: registered new interface driver pl2303
[ 5.880000] pl2303: Prolific PL2303 USB to serial adaptor driver
[ 5.890000] USB Serial support registered for Sierra USB modem
[ 5.890000] usbcore: registered new interface driver sierra
[ 5.900000] sierra: v.1.7.16:USB Driver for Sierra Wireless USB modems
[ 5.900000] Software Watchdog Timer: 0.07 initialized. soft_noboot=0 soft_margin=60 sec (nowayout= 0)
[ 5.910000] u32 classifier
[ 5.920000] input device check on
[ 5.920000] Actions configured
[ 5.920000] Netfilter messages via NETLINK v0.30.
[ 5.930000] nf_conntrack version 0.5.0 (1978 buckets, 7912 max)
[ 5.930000] CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
[ 5.940000] nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
[ 5.950000] sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
[ 5.960000] nf_conntrack_rtsp v0.6.21 loading
[ 5.960000] nf_nat_rtsp v0.6.21 loading
[ 5.960000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 5.970000] IPP2P v0.8.2 loading
[ 5.970000] TCP bic registered
[ 5.980000] TCP cubic registered
[ 5.980000] TCP westwood registered
[ 5.980000] TCP highspeed registered
[ 5.990000] TCP hybla registered
[ 5.990000] TCP htcp registered
[ 5.990000] TCP vegas registered
[ 6.000000] TCP veno registered
[ 6.000000] TCP scalable registered
[ 6.000000] TCP lp registered
[ 6.010000] TCP yeah registered
[ 6.010000] TCP illinois registered
[ 6.010000] NET: Registered protocol family 17
[ 6.020000] 802.1Q VLAN Support v1.8 Ben Greear
[ 6.020000] All bugs added by David S. Miller
[ 6.060000] Broken NVRAM found, recovering it (Magic FFFFFFFF)
[ 6.070000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[ 6.080000] Freeing unused kernel memory: 148k freed
start service
starting Architecture code for pb42
system: /sbin/startservice devinit

FPU emulator disabled, make sure your toolchainwas compiled with software floating point support (soft-float)"

Discussion:    Add a Comment | Comments 1-22 of 22 | Latest Comment

September 15, 2011 7:37 AM

Did you use dd-wrts current toolchain?

Kernel config says:

CONFIG_MIPS_FPU_EMU is not set

So the toolchain dd-wrt guys use should work, or the toolchain hasn't been updated. If you already created the toolchain for openwrt build you could patch a few headers and then use your own toolchain.

September 15, 2011 8:08 AM

I am using OpenWrt-SDK-atheros-2.6-for-Linux-i686_32.tar.bz2 as toolchain.
This same toolchain I used to compile Tomato distribution.

In kernel configuration CONFIG_MIPS_FPU_EMU is not set and in router Makefile I have given '-msoft-float' in CFLAGS.

September 15, 2011 10:33 AM

That is most likely the problem, your toolchain wasn't compiled with software floating point support, see uclibc config:

#define UCLIBC_HAS_SOFT_FLOAT 1

September 15, 2011 11:56 AM updated: September 15, 2011 11:57 AM

But I used same toolchain in Tomato distribution. How is Tomato running without any issue ? Moreover this is built-in toolchain. I did not compile it, I am using binaries only.
Do you have toolchain of DD-WRT for mips big endian ?

September 15, 2011 2:23 PM

You need to use dd-wrts toolchain:

ftp://ftp.dd-wrt.com/others/sourcecode/toolchains/

or compile your own toolchain, by downloading OpenWRT toolkit and select create toolchain. After that you need to patch a few includes e.g. if.h, since dd-wrt extendeds network interface structures for some special tasks.

So even if you could compile and boot dd-wrt lots of things would be broken and not working.

For mipsel I use my own toolchain since the current linaro toolchain dd-wrt uses has a buggy uclibc.

September 15, 2011 11:36 PM

It may happen that DD-WRT requires some modification in the toolchain.
I will download the toolchain from the link you gave and try to compile my code using that toolchain.

September 19, 2011 1:39 AM

I downloaded the toolchain but unable to run built-in executable because those are 64-bit and my machine is 32-bit.
So I am planning to compile the toolchain for my machine. Is there any guideline to do that ?

September 21, 2011 8:40 PM

I used 64-bit machine but was getting same FPU problem. Then I enabled FPU in kernel configuration, so no more such error. However I am now getting same old problem of permission denied.
The problem is that the permission of the executable are not same in "src/router/mips-uclibc/target" directory in build system (Linux PC) and in board. The permission of the executable are "?-w---x--x" in the board while in target directory in PC the permissions are "-rwxr-xr-x". As a result shell is showing error message "permission denied" whenever I am trying to execute any executable(except built-in commands) in the board (by system() or manually).
Any idea ?

September 22, 2011 2:58 AM

I actually tested yesterday if permissions get changed when creating the firmware.
But it exactly keeps the permissions as they have been set in the target dir.

So it must be a problem at runtime, thus returning incorrect permissions, first guess is that the libs included in the firmware don't match the ones from your toolchain.
To test this modify the makefile and copy the libs from your toolchain to the target dir e.g. :

cp -f <yourtoolchains_lib_dir/ld-uClibc-0.9.31.so $(TARGETDIR)/lib/ld-uClibc.so.0

do this for all libs that are currently in your target dir. Make sure you add the copy commands after the makefile copied it's file to the target dir.

September 22, 2011 5:14 AM

I copied all libraries from my toolchain to target without any success. I have noticed that size of my libraries in the board are totally different that what I have in target directory.
Also size and permission of all libraries in board are same. Permission sets are
?r--r--rwx.

I am doing following steps in order to compile the code.
1. cd dd-wrt/src
2. make clean
3. make

I am using router/Makefile.pb42

September 22, 2011 6:05 AM

Hmm haven't tried it this way. I compile using:

cd ~/DD-WRT/src/router
make -f Makefile.brcm26 clean all install

But I don't think this is the problem, but rather the mksquashfs you use. I just checked the make file for pb.42. By default it uses the mksquashfs from kernel dir, which was compiled on a 64Bit machine, so you need to use a 64Bit machine or compile it yourself.

However, in the pb42 makefile there are also some exceptions, some routers seem to need a different mksquashfs. When you boot openwrt does it also report:

squashfs: version 3.0

September 22, 2011 7:18 AM

What are possible reason for this "permission denied" error ?
I am now using 64-bit machine and mksquashfs-lzma was also compiled for 64bit. I never use only 'mksquashfs' in order to prepare the firmware.

September 22, 2011 7:32 AM

Also I have to remove relink-lib.sh and copy of lib/pics from Makefile as there is no such file in the distribution.

September 22, 2011 7:32 AM updated: September 22, 2011 7:38 AM

The relink script just removes functions from the libs which are not used by any software in the target dir. It does not cause this.

Maybe due to the wrong squashfs on the board the bitmask returned by the fs is interpreted wrong by the function that calculates the permissions.

The makefile has some extra logic and a mksquashfs-lzma for WNDR3700 for example

September 22, 2011 7:43 AM

Can you please show the place where the makefile has some extra logic ?
I am also not able to find out wndr3700 related tool in the source code.

September 22, 2011 8:07 AM

Starting in line 704:

http://svn.dd-wrt.com:8000/browser//src/router/Makefile.pb42

I haven't looked at the netgear src package, maybe they have it from this package.

September 22, 2011 8:26 AM

By the way, did you try the Mod-Firmware Kit and extract the image?
Not sure if that kit works for this image but it would be worth a try and that way you could check what the permissions are after extraction:

http://bitsum.com/firmware_mod_kit.htm

September 22, 2011 9:06 AM

Kong said: Starting in line 704: http://svn.dd-wrt.com:8000/browser//src/router/Makefile.pb42 I haven't looked at the netgear src package, maybe they have it from this package.
Where can I find that package ?

September 22, 2011 10:05 AM

I just got the src packages from:

ftp://downloads.netgear.com/files/GPL/

and included in WNDR3800-V1.0.0.18_gpl_src/include/ there is a image.mk it shows how the image is generated.

September 22, 2011 10:29 AM

Actually I also followed exactly those steps to prepare the firmware. It is working on OpenWRT and Tomato but not in case of DD-WRT. However I guess DD-WRT distribution should contain some tools to compile the code for WNDR3700/v2. But I am being unable to find them.

September 22, 2011 1:57 PM updated: September 22, 2011 2:00 PM

I did not find them either, but it should be fairly easy to use the openwrt make to create them and them make sure, the parameters are the same as under openwrt.

Does the wndr3800 have a serial header with/without pins for a USB TTL adapter, just like the WNR3500L?

If I get my hands on one of these I'd love to create a build for it, 16MB Flash and the 680Mhz are tempting. And te best thing about, OSS drivers in order to completely debug and profile the code.

September 27, 2011 2:15 AM

I solved the problem by compiling the code as root and copy all libraries from toolchain lib.
Now I am trying to run wireless driver (ath9k) and it requires to have compat_firmware_class.ko and compat.ko. But I cannot find them. However they are available in OpenWRT distribution. Do you know how to compile compat-wirless in dd-wrt and where to get that code for DD-WRT ?

Discussion:    Add a Comment | Back to Top | Comments 1-22 of 22 | Latest Comment

Add Your Reply

(will not be displayed)

Email me when comments are added to this thread

 
 

Please log in or register to participate in this community!

Log In

Remember

Not a member? Sign up!

Did you forget your password?

You can also log in using OpenID.

close this window
close this window