Posted: Mon Jun 09, 2014 7:56 Post subject: Compile modules for R7000
Hi there,
I'm in a process of phasing out WNR3500L for a brand new R7000 running kong arm K30 build.
Everything goes smoothly thanks to the hard work he put in including optware support. (aside from a slight git issue)
however, I need to use vlan 100 on my network and the current robo-switch code only has 16 vlans.
With WNR3500L I was able to recompile and upped to 160 vlans since the chip supports it with minimal code change.
However I can't seem to find the correct toolchain to recompile :
toolchain-arm_v6k_gcc-linaro_uClibc-0.9.32_eabi does compile and I was able to load some modules without issue, but not switch-robo and unloading my simple test module caused a kernel panic.
any help zeroing on the right toolchain or help compiling it much appreciated.
Posted: Mon Jun 09, 2014 8:54 Post subject: Re: Compile modules for R7000
gbordier wrote:
Hi there,
I'm in a process of phasing out WNR3500L for a brand new R7000 running kong arm K30 build.
Everything goes smoothly thanks to the hard work he put in including optware support. (aside from a slight git issue)
however, I need to use vlan 100 on my network and the current robo-switch code only has 16 vlans.
With WNR3500L I was able to recompile and upped to 160 vlans since the chip supports it with minimal code change.
However I can't seem to find the correct toolchain to recompile :
toolchain-arm_v6k_gcc-linaro_uClibc-0.9.32_eabi does compile and I was able to load some modules without issue, but not switch-robo and unloading my simple test module caused a kernel panic.
any help zeroing on the right toolchain or help compiling it much appreciated.
If you manage to get it working you can give a patch and we can integrate it.[/quote]
Hi Kong,
thanks for the reply,
The tarball does not seem to contain an arm v7.1 toolchain that I can (know how to) use.
I'm using .config.northstar_smp as my base config file and since R7000 seems to have a northstar baseboard
with a Cortex A9 dual-core processor.
Here is what I'm doing:
as a test I have just added a printk command to cdrom.c
PATH=/dd-wrt/ddwrt/toolchains/toolchain-arm_v7-a_gcc-4.7-linaro_uClibc-0.9.33.2_eabi/bin:$PATH
make modules CROSS_COMPILE=arm-openwrt-linux- ARCH=arm SUBDIRS=drivers/net/cdrom
compiles ok, but loading the uploaded module reboots
If I use:
PATH=/dd-wrt/ddwrt/toolchains/toolchain-arm_v6k_gcc-linaro_uClibc-0.9.32_eabi:$PATH
make modules CROSS_COMPILE=arm-openwrt-linux- ARCH=arm SUBDIRS=drivers/net/cdrom
it compiles ok, loads ok (I get my witness message in dmesg) but attempting to unload the driver reboots
a recompiled switch-core.ko also loads, but switch-robo.ko reboots as well (I suppose kernel panic)
I though I read somewhere that kernel modules needed to be compiled with gcc 4.5.3, but I can't find a toolchain for arm v7 with gcc 4.5.3
If you would be so kind as to share your .config file and the toolchain you use to compile kernel modules that would be great.
Alternatively if you can't / don't want to, I would settle for a version of switch-robo.ko that has
switch_driver driver = {
.name = DRIVER_NAME,
.version = DRIVER_VERSION,
.interface = device,
.cpuport = 5,
.ports = 6,
.vlans = 160,
.driver_handlers = cfg,
.port_handlers = port,
.vlan_handlers = vlan,
};
I know it is enough for my need.
Although if I could compile it myself, I'd like to add the possiblity of having vlan number <> vlan ID, most of the switches have this possibility and that would be much more elegant than having 100 kernel structures just to reach vlan ID 100.
That would also help with older routers (like WRT54G) that really have only 16 vlans possible, I've done a working POC for that on K24 a few years ago.
I've looked at the specs last year and I think I know where to write the VLANID in the switches registers.
Sorry I just looked again you need the gcc4.8, you are already using the correct config, but you need to use toolchain-arm_cortex-a9_gcc-4.8-linaro_uClibc-0.9.33.2_eabi _________________ KONG PB's: http://www.desipro.de/ddwrt/
KONG Info: http://tips.desipro.de/
since it is not part of the tarball on dd-wrt site.
in the end I did use the .config_northstar_mp and everyting went fine.
My guess is my previous attempt to this were failed because I did not do a make distclean between each try.
So thank you again Kong for bearing with me, I'll be working on putting together a patch to tag the VLAN ID without increasing the number of VLANs , I've seen several people that did this for different versions.
maybe eventually we can make insert this into the VLAN config page.
This is awesome news!
I just entered the world of dd-wrt and I've not yet been able to catch up on how everything works.
I hope this gets implemented and released soon. _________________ Netgear R7000
since it is not part of the tarball on dd-wrt site.
in the end I did use the .config_northstar_mp and everyting went fine.
My guess is my previous attempt to this were failed because I did not do a make distclean between each try.
So thank you again Kong for bearing with me, I'll be working on putting together a patch to tag the VLAN ID without increasing the number of VLANs , I've seen several people that did this for different versions.
maybe eventually we can make insert this into the VLAN config page.
since it is not part of the tarball on dd-wrt site.
in the end I did use the .config_northstar_mp and everyting went fine.
My guess is my previous attempt to this were failed because I did not do a make distclean between each try.
So thank you again Kong for bearing with me, I'll be working on putting together a patch to tag the VLAN ID without increasing the number of VLANs , I've seen several people that did this for different versions.
maybe eventually we can make insert this into the VLAN config page.
Guillaume
Hi Guillaume,
I guess you recompiled switch_robo.ko kernel module for R7000 on kernel 4.4. Could you please share the compiled module ? I am looking for the same.My ppoe internet connection need vlan-id 20
I had to remove the WL and DHD module options (and edit a KConfig) to get it to compile.
I changed the vlans from 16 to 64 (Bell Aliant uses 35 which is what I needed). I'm using mine on my Linksys EA6400. Since I found and used this post to help me compile it I thought I would post it here.