Compiling DD-WRT

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... , 12, 13, 14  Next
Author Message
Wolf Kodi
DD-WRT User


Joined: 13 Jun 2010
Posts: 125

PostPosted: Sun Mar 20, 2016 10:03    Post subject: Reply with quote
NIXKnight wrote:
Using toolchain-mipsel_74kc+dsp2_gcc-5.1.0_musl-1.1.9.

I get an error during make -f Makefile.brcm3x configure.

The configure script for radvd fails with error code 77.

http://pastebin.com/K3UkMXmu <---- configure script output.
http://pastebin.com/ZEuHidGG <---- config.log for radvd.

I am using Debian Jessie. Any pointers would be helpful....

Thanks



Encountered the same issue. The config log file shows that it is asking for missing libraries -lutils and -lnvram. Therefore fix by configuring libutils and nvram first. Run the following:

Code:
   make -f Makefile.brcm3x libutils-configure
   make -f Makefile.brcm3x nvram-configure
   make -f Makefile.brcm3x radvd-clean
   make -f Makefile.brcm3x radvd-configure

_________________


YouTube | Facebook Page
Per-user Live Down/Upload Rate Monitoring [No PC needed!]
Sponsor
houzi008
DD-WRT Novice


Joined: 19 Apr 2016
Posts: 4

PostPosted: Sat May 14, 2016 2:56    Post subject: Reply with quote
tsynik wrote:
When I compile for arm, with Makefile.northstar, there is errors about absent register_check.o in libutils, httpd which caused by:

OBJS += $(TOP)/register/register_check.o

in Makefiles. Do I need to comment CONFIG_SUPERCHANNEL=y in config file? What this option for?

And this on kernel build also:

# Also build kernel
cp /home/dd-wrt/dev/src/linux/universal/linux-3.10/.config_northstar_smp /home/dd-wrt/dev/src/linux/universal/linux-3.10/.config
cp /home/dd-wrt/dev/src/linux/universal/linux-3.10/brcm/arm/wl/clm/src/wlc_clm_data_default.c /home/dd-wrt/dev/src/linux/universal/linux-3.10/brcm/arm/wl/clm/src/wlc_clm_data.c
cp: cannot stat ‘/home/dd-wrt/dev/src/linux/universal/linux-3.10/brcm/arm/wl/clm/src/wlc_clm_data_default.c’: No such file or directory
Makefile.northstar:157: recipe for target 'kernel' failed

and in final depmod.pl phase:

./busybox/examples/depmod.pl -F /home/dd-wrt/dev/src/linux/universal/linux-3.10/System.map -b arm-uclibc/target/lib/modules
Guessed module directory as arm-uclibc/target/lib/modules/3.10.63
unresolved symbol clm_header in file /lib/modules/3.10.63/wl.ko
===
OS: SuSE 13.2
Config used: src/router/configs/northstar/.config_northstar_16m
Toolchain used for compilation: toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi
SVN revision: r25652

===
After fixing all code mistakes in Makefile.northstar, I got dd-wrt firmware images for Netgears. Not sure about proper lzma flags, because it's as always missing in svn, here is original dd-wrt code:

Code:
mkfs.jffs2 --pad --big-endian --squash -e 0x20000 -o arm-uclibc/dd-wrt.jffs2 -d arm-uclibc/target
tools/lzma_4k e /home/dd-wrt/dev/src/linux/universal/linux-3.10/arch/arm/boot/zImage arm-uclibc/vmlinuz.lzma
make: tools/lzma_4k: Command not found
Makefile.northstar:439: recipe for target 'install' failed


first line must be commented (it's not used anyway)
second must be fixed.

I have this options:

Code:
    ../../opt/loader-0.02/lzma e -lc3 -lp2 -pb2 -d25 $(LINUXDIR)/arch/arm/boot/zImage $(ARCH)-uclibc/vmlinuz.lzma

# ### my way ### lzma е -d16 -lc1 -lp2 -pb2 $(LINUXDIR)/arch/arm/boot/zImage $(ARCH)-uclibc/vmlinuz.lzma
# ### netgear mips way ### ./netgear/lzma -e $(LINUXDIR)/arch/arm/boot/zImage $(ARCH)-uclibc/vmlinuz.lzma


I think all can be fine, but dunno which is better Wink


hello!tsynik
I have a similar situation! How do I resolve?

make [1]: *** no rules can create "libutils.so" objective needs "/home/houzi/dd-wrt/dd-wrt/src/router/register/register_check.o". stop.
fseka
DD-WRT User


Joined: 02 Dec 2009
Posts: 75

PostPosted: Thu May 26, 2016 7:20    Post subject: Reply with quote
Hi,

is it possible to have a table with all supported devices and the corresponding toolchain to use?

I've compiled the latest version of pound for my Netgear r7000 and wanted to compile it also for a friend with a different hardware.
But I don't know which toolchain to use Rolling Eyes

Many thanks in advance and kind regards,

fSeka

_________________
E3000 running DD-WRT v24-sp2(Build 14929) mega
Netgear R7000 running DD-WRT v3.0-r27858)
mr.shimpy
DD-WRT User


Joined: 01 Aug 2014
Posts: 70

PostPosted: Sat Jun 04, 2016 7:37    Post subject: dd-wrt has no build system Reply with quote
It would help, if dd-wrt would have a build system, but unfortunately that's not the case.
fseka
DD-WRT User


Joined: 02 Dec 2009
Posts: 75

PostPosted: Mon Jun 06, 2016 12:06    Post subject: Reply with quote
In particular I don't know what to use for the Linksys E3000

Thanks

_________________
E3000 running DD-WRT v24-sp2(Build 14929) mega
Netgear R7000 running DD-WRT v3.0-r27858)
djigarji
DD-WRT Novice


Joined: 04 Jan 2017
Posts: 1

PostPosted: Tue Jan 10, 2017 16:36    Post subject: Reply with quote
I've read through this thread several times and was just wondering if anyone has been able to successfully come up with a build script for arm processors?

I'm specifically trying to build for the Linksys WRT1900AC v1 router and am having trouble finding a complete or mostly complete script. I know it's been a while since any activity on this thread but I figured I'd give it a shot.

Any help would be appreciated
cb3hn
DD-WRT User


Joined: 10 Aug 2009
Posts: 50

PostPosted: Mon Jan 30, 2017 3:29    Post subject: Reply with quote
Hi,

normally I download finished builds for the Linksys EA6500v1 from the dd-wrt repository. But they are all in mega builds. Is there a way to get in mini builds like before in the older devices?

Or do I have personally to compile?

If yes, need help how to do it. Have only little experience in compiling in Linux.

Will grateful if someone can support it.

Regards...
broly
DD-WRT Novice


Joined: 03 Apr 2010
Posts: 27
Location: edmonton

PostPosted: Wed Mar 22, 2017 2:32    Post subject: Reply with quote
tusc wrote:
Here's my attempt at creating an ARM script based on MastaG's mips version. I spent some time this afternoon on it but it's not complete.

It's erroring during the configure part (make -f Makefile.northstar configure )

Building ddwrt is not as trivial as openwrt (much more elegant build system). That's all I'm going to comment on it unless I want to get flamed.

I'm still trying to figure out which toolchain to use for ARM builds. There are 5 listed in the Toolchains folder:

Code:
toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi
toolchain-arm_cortex-a9+neon_gcc-4.9-linaro_musl-1.1.1_eabi
toolchain-armeb_xscale_gcc-4.8-linaro_musl-1.1.2
toolchain-arm_gcc4.2.3
toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eab


I picked toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi as it's one of the few that does not enable hard fpu support.

What's odd is that the build version on my R7000 is not even listed. The top of dmesg on my router shows a version of Linaro not listed. I'm running Kong's 24345M build:
Linux version 3.10.25 (bluebat@opensuse) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.01 r39555) ) #1081 SMP PREEMPT Fri Jun 13 21:55:53 CEST 2014

I ran arm-linux-gcc -v in each of the toolchain bin folders to match the Linaro version.

The script will run until it hits the configure part as i said earlier. I had to create some sym links in /usr/bin to an older version of gnu tools (aclocal, automake, etc) as the configure script is expecting it (pretty ridiculous). I also had to comment out some apps from the .config file as they would not compile (radvd for example).

I haven't changed the sed commands in the scripts as I'm not sure if they only pertain to the MIPS build. These are the hints given by Kong at the beginning of this thread.

Good luck.

Code:

#!/bin/bash
if [ "$1" = "" ]
then
   echo ""
   echo ""
   echo "Please run the script with the path to your cross-compiler directory"
   echo ""
   echo "eg $0 /opt/toolchain-arm_cortex-a9_gcc-4.9-linaro_musl-1.1.2_eabi""
   echo ""
   exit 0
fi
if [ ! -e $1/bin/arm-openwrt-linux-muslgnueabi-gcc]
then
   echo ""
   echo ""
   echo "$1/bin/arm-openwrt-linux-muslgnueabi-gcc does not exist"
   echo ""
   echo "Please check that you specify the correct path to your cross-compiler!"
   echo ""
   exit 0
fi
if [ ! -e src/router/Makefile.northstar ]
then
   echo ""
   echo "Getting DD-WRT svn..."
   svn co svn://svn.dd-wrt.com/DD-WRT .
   mkdir mroot
else
   echo svn update
fi
export GCCARM="$1/bin"
export PATH=$GCCARM:`pwd`/mroot/bin:$PATH
RDIR="`pwd`"
if [ -e src/router/mipsel-uclibc/dd-wrt.v24-K3_R6300.trx ]
then
   rm -f src/router/mipsel-uclibc/dd-wrt.v24-K3_R6300.trx
fi
if [ ! -e init_done ]
then
   echo ""
   echo "Doing some inittial changes."
   echo "Huge thanks to <Kong>!"
   echo ""
   echo ""
   echo "Compiling some userspace tools..."
   echo ""
   cd opt/tools
   gcc -o trx trx.c
   cd ../..
   cd tools
   rm -f ./strip
   gcc strip.c -o ./strip
   rm -f ./write3
   gcc write3.c -o ./write3
   rm -f ./write4
   gcc write4.c -o ./write4
   rm ./webcomp
   gcc -o webcomp -DUEMF -DWEBS -DLINUX webcomp.c
   cd ..
   cd src/router/tools
   rm -f jsformat
   make jsformat
   cd ..
   echo ""
   echo "Setting up configs and makefiles.."
   rm -f .config
   cp configs/northstar/.config_northstar .config

   sed -i 's/^CONFIG_SPUTNIK_APD=y/#CONFIG_SPUTNIK_APD=y/g' .config
   sed -i 's/^CONFIG_ASTERISK=y/#CONFIG_ASTERISK=y/g' .config
   sed -i 's/^CONFIG_3COM=y/#CONFIG_3COM=y/g' .config
   cd ..
   echo -e "--- linux/universal/linux-3.10/drivers/net/wireless/Kconfig.orig\t2014-10-15 11:48:30.747229726 +0200" > ./kpatch
   echo -e "+++ linux/universal/linux-3.10/drivers/net/wireless/Kconfig\t2014-10-15 11:49:14.994041691 +0200" >> ./kpatch
   echo "@@ -280,15 +280,15 @@" >> ./kpatch
   echo " source \"drivers/net/wireless/ti/Kconfig\"" >> ./kpatch
   echo " source \"drivers/net/wireless/zd1211rw/Kconfig\"" >> ./kpatch
   echo " source \"drivers/net/wireless/mwifiex/Kconfig\"" >> ./kpatch
   echo "-if RALINK_DEVICE" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt3352/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt3352/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "-endif" >> ./kpatch
   echo "-if SOC_MT7620_OPENWRT" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt7620/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt7620/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt5592/Kconfig\"" >> ./kpatch
   echo "-source \"drivers/net/wireless/rt7612/rlt_wifi/Kconfig\"" >> ./kpatch
   echo "-endif" >> ./kpatch
   echo "+#if RALINK_DEVICE" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt3352/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt3352/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "+#endif" >> ./kpatch
   echo "+#if SOC_MT7620_OPENWRT" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt7620/rt2860v2_ap/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt7620/rt2860v2_sta/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt5592/Kconfig\"" >> ./kpatch
   echo "+#source \"drivers/net/wireless/rt7612/rlt_wifi/Kconfig\"" >> ./kpatch
   echo "+#endif" >> ./kpatch
   echo "" >> ./kpatch
   echo " endif # WLAN" >>./kpatch

   patch -p0 < ./kpatch
   rm -f ./kpatch
   cd router
   sed -i 's#cd $(ARCH)-uclibc \&\& ../tools/bufenc/makefw.sh dd-wrt.v24-K3-nandboot#\#cd $(ARCH)-uclibc \&\& ../tools/bufenc/makefw.sh dd-wrt.v24-K3-nandboot#g' Makefile.northstar
   sed -i 's#mv $(TARGETDIR)/usr/lib/services.so $(TARGETDIR)/lib#mv $(TARGETDIR)/usr/lib/services.so $(TARGETDIR)/lib\n\tcp emf_bin/mipsel/igs.ko $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/wl/\n\tcp emf_bin/mipsel/emf.ko $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/wl/#g' Makefile.northstar
   sed -i 's#../../opt/asus/asustrx-rt66u -p RT-AC66U -v 3.0.0.1 -m 32000000 -o $(ARCH)-uclibc/dd-wrt.v24-K3_RT-AC66U.trx $(ARCH)-uclibc/lzma_vmlinuz -a 1024 $(ARCH)-uclibc/rootfs.squashfs#\#../../opt/asus/asustrx-rt66u -p RT-AC66U -v 3.0.0.1 -m 32000000 -o $(ARCH)-uclibc/dd-wrt.v24-K3_RT-AC66U.trx $(ARCH)-uclibc/lzma_vmlinuz -a 1024 $(ARCH)-uclibc/rootfs.squashfs#g' Makefile.northstar
   sed -i 's/include rules\/emf.mk/#include rules\/emf.mk/g' rules/all.mk
   ln -s $1/bin/lzma `pwd`/netgear/
   cd ../..
   touch init_done
   echo ""
   echo "Done"
   echo ""
fi
if hash aclocal-1.14 2>/dev/null
then
   echo ""
else
   echo ""
   echo "Automake 1.14 not found!"
   if [ -e `pwd`/automake-1.14.1/configure ]
   then
      echo ""
      echo "Previous compile somehow failed.."
      echo "Bailing out..."
      echo ""
      exit 0
   fi
   echo ""
   echo "Going to try to compile it :)"
   echo ""
   echo ""
   wget http://ftp.gnu.org/gnu/automake/automake-1.14.1.tar.gz
   tar -zxf automake-1.14.1.tar.gz
   rm -f automake-1.14.1.tar.gz
   cd automake-1.14.1
   ./configure --prefix=$RDIR/mroot
   make
   make install
   cd ../mroot/bin
   rm -f aclocal
   rm -f automake
   cd ../..
fi
echo ""
echo ""
read -p "Press [Enter] key to continue..."
cd src/router
echo ""
cd libutils
echo -n '#define SVN_REVISION "' > revision.h
svnversion -n . >> revision.h
echo '"' >> revision.h
cd ../httpd/visuals
echo -n '#define SVN_REVISION "' > revision.h
svnversion -n . >> revision.h
echo '"' >> revision.h
cd ..
echo -n '#define SVN_REVISION "' > revision.h
svnversion -n . >> revision.h
echo '"' >> revision.h
cd ..


echo "Installing dependencies.."
#make -f Makefile.northstar jansson
make -f Makefile.northstar jansson-configure
make -f Makefile.northstar jansson
make -f Makefile.northstar jansson-install
make -f Makefile.northstar nvram
make -f Makefile.northstar nvram-install
make -f Makefile.northstar utils
make -f Makefile.northstar utils-install
make -f Makefile.northstar zlib-configure
make -f Makefile.northstar minidlna-configure
make -f Makefile.northstar minidlna
make -f Makefile.northstar minidlna-install
make -f Makefile.northstar install_headers
make -f Makefile.northstar iptables
make -f Makefile.northstar libnet
make -f Makefile.northstar libnet-install
make -f Makefile.northstar kernel
make -f Makefile.northstar ncurses-configure


read -p "Press [Enter] key to continue..."
echo "Configuring.."
make -f Makefile.northstar configure
echo "Building.."
make -f Makefile.northstar clean all install
if [ -e mipsel-uclibc/dd-wrt.v24-K3_R6300.trx ]
then
   STAMP="`date +%Y-%m-%d_%H:%M`"
   cp mipsel-uclibc/dd-wrt.v24-K3_R6300.trx ../../image/dd-wrt.v24-K3_AC_"$STAMP"_r"`svnversion -n .`".bin
   echo ""
   echo ""
   echo "Image created: dd-wrt.v24-K3_AC_"$STAMP"_r"`svnversion -n .`".bin"
   echo "Have a look in the \"image\" directory"
else
   echo ""
   echo ""
   echo "Whoops.. something went wrong, please check the output and consult the forums.."
fi
echo ""
echo ""


i want to thank you for this blurb of yours.

people like me would not have had anything to work with on how to get the pipeline working.

a gnueabihf (GLIBC) hardfloat kernel is now possible if broadcom updates their blobs accordingly.

gnu-lib build: http://pastebin.com/wDR0M03Q
boot on an r7000: http://pastebin.com/arNzC82d
UPDATED (march 22 2016) boot w/ improved CPU_IDLE settings: http://pastebin.com/tbNi5zkK

of course it panics because atm the wlan & emf blobs, but i will take a working pipeline with this result than a working softfloat+busybox one.

bless you!
thanks again!!

good luck to anyone who makes this undertaking.

may your tuple variation(s) express your ambition(s) Wink

edit: updating pastebin to reflect my experimenting with CPU_IDLE now gets to the "secondary_start_kernel" call, which is further than before but i don't think the CPUs will be marked online until they "hear back" from the wireless radios (wlan/emf.ko, nas.ko is a chore too obv)
farads
DD-WRT Novice


Joined: 12 Dec 2016
Posts: 3

PostPosted: Thu Mar 23, 2017 16:35    Post subject: Reply with quote
Code:
make -C nvram
make[1]: вход в каталог «/home/kubuntu/DevAsusRT-N66U/dd-wrt/src/router/nvram»
ccache mipsel-linux-uclibc-gcc -Os -pipe -mips32r2 -mtune=74kc -mdspr2 -fno-caller-saves  -msoft-float  -mno-branch-likely -fno-plt -I. -I/home/kubuntu/DevAsusRT-N66U/dd-wrt/src/linux/universal/linux-3.10/brcm/mipsel/include -Wall -I. -I/home/kubuntu/DevAsusRT-N66U/dd-wrt/src/router/shared -s -Os -pipe -mips32r2 -mtune=74kc -mdspr2 -fno-caller-saves  -msoft-float  -mno-branch-likely -fno-plt -minterlink-mips16 -mips16 -fPIC -DHAVE_COOVA_CHILLI   -c -o nvram_linux.o nvram_linux.c
In file included from nvram_linux.c:386:0:
nvram_generics.h:167:5: error: conflicting types for 'nvram_nset'
 int nvram_nset(char *value, const char *fmt, ...)
     ^~~~~~~~~~
In file included from nvram_linux.c:28:0:
/home/kubuntu/DevAsusRT-N66U/dd-wrt/src/linux/universal/linux-3.10/brcm/mipsel/include/bcmnvram.h:123:14: note: previous declaration of 'nvram_nset' was here
 extern char *nvram_nset(char *value,const char *fmt,...);
              ^~~~~~~~~~
<встроенное>: ошибка выполнения рецепта для цели «nvram_linux.o»


I'm building under 64-bit Ubuntu 16.04
Anyone knows?
XGhosT192
DD-WRT User


Joined: 15 Jan 2011
Posts: 66

PostPosted: Tue Apr 04, 2017 18:18    Post subject: Reply with quote
good afternoon!

Please, tell me, what toolchain i want to use for build modules for dd-wrt v3 for Broadcom BCM4708 ?

Currently use firmware
Linux DD-WRT 4.4.17 #1265 SMP Mon Aug 15 06:25:47 CEST 2016 armv7l DD-WRT
tathagata
DD-WRT User


Joined: 01 Apr 2008
Posts: 134

PostPosted: Wed Apr 19, 2017 11:27    Post subject: Build error in php7 Reply with quote
I am getting below error message while running the command

make -f Makefile.northstar php7-configure

configure: error: xml2-config not found. Please check your libxml2 installation.

I am getting error in all recent DD-WRT revision e.g. 31815, 31884.
routernet123
DD-WRT Novice


Joined: 04 May 2017
Posts: 2

PostPosted: Thu May 04, 2017 16:50    Post subject: drivers/built-in.o error -- vmlinux target failed Reply with quote
Hi All,

Thanks Kong for the extremely helpful basic tutorial. I was able to follow along for the most part without much trouble!

I am running into errors compiling the kernel portion:
LInux Kernel 3.10, using the toolchain-mipsel_gcc-linaro_uClibc-0.9.32.

make -C /home/karthik/dd-wrt/src/linux/universal/linux-3.10 oldconfig
make[1]: Entering directory '/home/karthik/dd-wrt/src/linux/universal/linux-3.10'
scripts/kconfig/conf --oldconfig Kconfig
drivers/usb/phy/Kconfig:4:error: recursive dependency detected!
drivers/usb/phy/Kconfig:4: symbol USB_PHY is selected by RALINK_USBPHY
drivers/usb/phy/Kconfig:199: symbol RALINK_USBPHY depends on USB_PHY
.config:65:warning: unexpected data
.config:66:warning: unexpected data
.config:2078:warning: override: reassigning to symbol NET_ETHERIP
#
# configuration written to .config
#
make[1]: Leaving directory '/home/karthik/dd-wrt/src/linux/universal/linux-3.10'
make -j 4 -C /home/karthik/dd-wrt/src/linux/universal/linux-3.10 vmlinux CROSS_COMPILE="ccache mipsel-linux-uclibc-" KBUILD_MODPOST_WARN=1
make[1]: Entering directory '/home/karthik/dd-wrt/src/linux/universal/linux-3.10'
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/usb/phy/Kconfig:4:error: recursive dependency detected!
drivers/usb/phy/Kconfig:4: symbol USB_PHY is selected by RALINK_USBPHY
drivers/usb/phy/Kconfig:199: symbol RALINK_USBPHY depends on USB_PHY
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
drivers/net/wl/wl_generic.mk:118: warning: overriding recipe for target 'drivers/net/wl/wlconf.h'
drivers/net/wl/wl_generic.mk:118: warning: ignoring old recipe for target 'drivers/net/wl/wlconf.h'
drivers/net/wl/wl_generic.mk:118: warning: overriding recipe for target 'drivers/net/wl/wlconf.h'
drivers/net/wl/wl_generic.mk:118: warning: ignoring old recipe for target 'drivers/net/wl/wlconf.h'
[ ! -f drivers/net/wl/wlconf.h ] || chmod +w drivers/net/wl/wlconf.h
check and update config file
VLIST = APSTA APSTA APSTA
CONFIG_WL_CONF = wlconfig_lx_router_apsta
WLTUNEFILE = wltunable_lx_router.h
cp drivers/net/wl/../../../brcm/mipsel/wl/config/wltunable_lx_router.h wltemp
drivers/net/wl/../../../brcm/mipsel/wl/config/diffupdate.sh wltemp drivers/net/wl/wlconf.h
LINK vmlinux
LD vmlinux.o
MODPOST vmlinux.o
WARNING: modpost: Found 1 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD vmlinux
drivers/built-in.o: In function `wlc_set_phy_chanspec':
wlc.cSad.text+0x17c5a4): undefined reference to `wlc_txbf_impbf_upd'
wlc.cSad.text+0x17c5a4): relocation truncated to fit: R_MIPS_26 against `wlc_txbf_impbf_upd'
drivers/built-in.o: In function `wlc_d11hdrs':
wlc.cSad.text+0x1863e0): undefined reference to `wlc_olpc_eng_tx_cal_pkts'
wlc.cSad.text+0x1863e0): relocation truncated to fit: R_MIPS_26 against `wlc_olpc_eng_tx_cal_pkts'
wlc.cSad.text+0x186890): undefined reference to `wlc_vht_get_scb_flags'
wlc.cSad.text+0x186890): relocation truncated to fit: R_MIPS_26 against `wlc_vht_get_scb_flags'
wlc.cSad.text+0x186900): undefined reference to `wlc_vht_get_scb_flags'
wlc.cSad.text+0x186900): relocation truncated to fit: R_MIPS_26 against `wlc_vht_get_scb_flags'
wlc.cSad.text+0x186ee8): undefined reference to `wlc_txbf_sel'
wlc.cSad.text+0x186ee8): relocation truncated to fit: R_MIPS_26 against `wlc_txbf_sel'
wlc.cSad.text+0x186f68): undefined reference to `wlc_txbf_applied2ovr_upd'
wlc.cSad.text+0x186f68): relocation truncated to fit: R_MIPS_26 against `wlc_txbf_applied2ovr_upd'
wlc.cSad.text+0x1874a0): undefined reference to `wlc_txbf_fix_rspec_plcp'
wlc.cSad.text+0x1874a0): relocation truncated to fit: R_MIPS_26 against `wlc_txbf_fix_rspec_plcp'
drivers/built-in.o: In function `wlc_set_chanspec':
(.text+0x18c604): undefined reference to `wlc_olpc_eng_hdl_chan_update'
drivers/built-in.o: In function `wlc_set_chanspec':
(.text+0x18c604): relocation truncated to fit: R_MIPS_26 against `wlc_olpc_eng_hdl_chan_update'
drivers/built-in.o: In function `wlc_get_current_highest_rate':
(.text+0x18d044): undefined reference to `wlc_vht_get_scb_ratemask'
drivers/built-in.o: In function `wlc_get_current_highest_rate':
(.text+0x18d044): relocation truncated to fit: R_MIPS_26 against `wlc_vht_get_scb_ratemask'
drivers/built-in.o: In function `wlc_get_current_highest_rate':
(.text+0x18d064): undefined reference to `wlc_vht_get_scb_flags'
drivers/built-in.o: In function `wlc_get_current_highest_rate':
(.text+0x18d064): relocation truncated to fit: R_MIPS_26 against `wlc_vht_get_scb_flags'
drivers/built-in.o: In function `wlc_get_rspec_history':
(.text+0x18d3dc): undefined reference to `wlc_txbf_get_applied2ovr'
drivers/built-in.o: In function `wlc_get_rspec_history':
(.text+0x18d3dc): additional relocation overflows omitted from the output
drivers/built-in.o: In function `wlc_ht_update_ldpc':
wlc.cSad.text+0x18f5c8): undefined reference to `wlc_vht_set_ldpc_cap'
wlc.cSad.text+0x18f600): undefined reference to `wlc_vht_set_ldpc_cap'
drivers/built-in.o: In function `wlc_sta_info':
(.text+0x1933b4): undefined reference to `wlc_vht_get_scb_flags'
drivers/built-in.o: In function `wlc_ht_update_scbstate':
(.text+0x193ad8): undefined reference to `wlc_txbf_update_ht_cap'
drivers/built-in.o: In function `wlc_detach':
(.text+0x195bf8): undefined reference to `wlc_wmf_detach'
drivers/built-in.o: In function `wlc_detach':
(.text+0x195da0): undefined reference to `wlc_vht_detach'
drivers/built-in.o: In function `wlc_detach':
(.text+0x195e44): undefined reference to `wlc_olpc_eng_detach'
drivers/built-in.o: In function `wlc_detach':
(.text+0x195ebc): undefined reference to `wlc_txbf_detach'
drivers/built-in.o: In function `wlc_recv_process_beacon':
wlc.cSad.text+0x197c10): undefined reference to `wlc_read_vht_cap_ie'
wlc.cSad.text+0x197c2c): undefined reference to `wlc_read_vht_op_ie'
wlc.cSad.text+0x197d20): undefined reference to `wlc_read_vht_features_ie'
wlc.cSad.text+0x197d3c): undefined reference to `wlc_read_vht_cap_ie'
wlc.cSad.text+0x197d54): undefined reference to `wlc_read_vht_op_ie'
wlc.cSad.text+0x19812c): undefined reference to `wlc_vht_bcn_scb_upd'
wlc.cSad.text+0x198178): undefined reference to `wlc_vht_bcn_scb_upd'
wlc.cSad.text+0x1981ac): undefined reference to `wlc_vht_update_scb_state'
wlc.cSad.text+0x1984f0): undefined reference to `wlc_vht_chanspec'
wlc.cSad.text+0x198768): undefined reference to `wlc_vht_bcn_scb_upd'
wlc.cSad.text+0x19878c): undefined reference to `wlc_vht_bcn_scb_upd'
drivers/built-in.o: In function `wlc_init':
(.text+0x19a298): undefined reference to `wlc_txbf_init_link'
drivers/built-in.o: In function `wlc_attach':
(.text+0x19b868): undefined reference to `wlc_olpc_eng_attach'
drivers/built-in.o: In function `wlc_attach':
(.text+0x19ba34): undefined reference to `wlc_wmf_attach'
drivers/built-in.o: In function `wlc_attach':
(.text+0x19baa0): undefined reference to `wlc_vht_attach'
drivers/built-in.o: In function `wlc_attach':
(.text+0x19bc58): undefined reference to `wlc_txbf_attach'
drivers/built-in.o: In function `wlc_attach':
(.text+0x19c18c): undefined reference to `wlc_vht_init_defaults'
drivers/built-in.o: In function `wlc_attach':
(.text+0x19c224): undefined reference to `wlc_vht_set_rx_stbc_cap'
drivers/built-in.o: In function `wlc_mimops_action_ht_complete':
wlc.cSad.text+0x19cf94): undefined reference to `wlc_vht_update_mcs_cap'
drivers/built-in.o: In function `wlc_doiovar':
(.text+0x1a3560): undefined reference to `wlc_txbf_update_amt_secindxblk'
drivers/built-in.o: In function `wlc_doiovar':
(.text+0x1a47a0): undefined reference to `wlc_vht_get_cap_info'
drivers/built-in.o: In function `wlc_doiovar':
(.text+0x1a483c): undefined reference to `wlc_vht_update_sgi_rx'
drivers/built-in.o: In function `wlc_doiovar':
(.text+0x1a666c): undefined reference to `wlc_vht_get_scb_ratemask'
drivers/built-in.o: In function `wlc_set_addrmatch':
(.text+0x1aaa30): undefined reference to `wlc_txfbf_update_amt_idx'
drivers/built-in.o: In function `wlc_ampdu_init_tid_ini':
wlc_ampdu.cSad.text+0x1ae380): undefined reference to `wlc_vht_get_scb_ampdu_max_exp'
drivers/built-in.o: In function `wlc_ampdu_doiovar':
wlc_ampdu_rx.cSad.text+0x1b3bc0): undefined reference to `wlc_vht_update_ampdu_cap'
drivers/built-in.o: In function `wlc_ampdu_update_rx_factor':
(.text+0x1b3c54): undefined reference to `wlc_vht_update_ampdu_cap'
drivers/built-in.o: In function `wlc_amsdu_scb_vht_agglimit_upd':
(.text+0x1b50d4): undefined reference to `wlc_vht_get_scb_amsdu_mtu_pref'
drivers/built-in.o: In function `wlc_ap_process_assocreq':
(.text+0x1bd498): undefined reference to `wlc_read_vht_cap_ie'
drivers/built-in.o: In function `wlc_ap_process_assocreq':
(.text+0x1bd4cc): undefined reference to `wlc_read_vht_op_ie'
drivers/built-in.o: In function `wlc_ap_process_assocreq':
(.text+0x1bd500): undefined reference to `wlc_vht_update_scb_state'
drivers/built-in.o: In function `wlc_ap_process_assocreq':
(.text+0x1bd85c): undefined reference to `wlc_vht_update_scb_state'
drivers/built-in.o: In function `wlc_ap_process_assocreq':
(.text+0x1bdb78): undefined reference to `wlc_vht_update_scb_state'
drivers/built-in.o: In function `wlc_join_BSS':
(.text+0x1c6024): undefined reference to `wlc_read_vht_features_ie'
drivers/built-in.o: In function `wlc_join_BSS':
(.text+0x1c6040): undefined reference to `wlc_read_vht_cap_ie'
drivers/built-in.o: In function `wlc_join_BSS':
(.text+0x1c6058): undefined reference to `wlc_read_vht_op_ie'
drivers/built-in.o: In function `wlc_join_BSS':
(.text+0x1c6078): undefined reference to `wlc_read_vht_cap_ie'
drivers/built-in.o: In function `wlc_join_BSS':
(.text+0x1c6090): undefined reference to `wlc_read_vht_op_ie'
drivers/built-in.o: In function `wlc_join_BSS':
(.text+0x1c60b8): undefined reference to `wlc_vht_update_scb_state'
drivers/built-in.o: In function `wlc_join_BSS':
(.text+0x1c6108): undefined reference to `wlc_vht_update_scb_state'
drivers/built-in.o: In function `wlc_bmac_attach':
(.text+0x1d7e3c): undefined reference to `wlc_pio_attach'
drivers/built-in.o: In function `wlc_bsscfg_free':
(.text+0x1de264): undefined reference to `wlc_wmf_instance_del'
drivers/built-in.o: In function `wlc_set_countrycode_rev':
(.text+0x1e5824): undefined reference to `wlc_olpc_eng_reset'
drivers/built-in.o: In function `wlc_rm_terminate':
(.text+0x209a30): undefined reference to `wlc_olpc_eng_hdl_chan_update'
drivers/built-in.o: In function `wlc_rm_start':
(.text+0x20a85c): undefined reference to `wlc_olpc_eng_hdl_chan_update'
drivers/built-in.o: In function `wlc_scantimer':
wlc_scan.cSad.text+0x210e6c): undefined reference to `wlc_olpc_eng_hdl_chan_update'
drivers/built-in.o: In function `wlc_scan_terminate':
(.text+0x21139c): undefined reference to `wlc_olpc_eng_hdl_chan_update'
drivers/built-in.o: In function `wlc_scan':
(.text+0x211f68): undefined reference to `wlc_olpc_eng_hdl_chan_update'
drivers/built-in.o: In function `wlc_scb_ratesel_get_primary':
(.text+0x215094): undefined reference to `wlc_vht_get_scb_flags'
drivers/built-in.o: In function `wlc_scb_ratesel_init':
(.text+0x215aa4): undefined reference to `wlc_vht_get_scb_opermode_enab'
drivers/built-in.o: In function `wlc_scb_ratesel_init':
(.text+0x215ab8): undefined reference to `wlc_vht_get_scb_opermode'
drivers/built-in.o: In function `wlc_scb_ratesel_init':
(.text+0x215ad0): undefined reference to `wlc_vht_get_scb_opermode'
drivers/built-in.o: In function `wlc_scb_ratesel_init':
(.text+0x215ae8): undefined reference to `wlc_vht_get_scb_opermode'
drivers/built-in.o: In function `wlc_scb_ratesel_init':
(.text+0x215b6c): undefined reference to `wlc_vht_get_scb_flags'
drivers/built-in.o: In function `wlc_scb_ratesel_init':
(.text+0x215bc8): undefined reference to `wlc_vht_get_scb_flags'
drivers/built-in.o: In function `wlc_scb_ratesel_init':
(.text+0x215c5c): undefined reference to `wlc_vht_get_scb_flags'
drivers/built-in.o: In function `wlc_scb_ratesel_init':
(.text+0x215cac): undefined reference to `wlc_vht_upd_rate_mcsmap'
drivers/built-in.o: In function `wlc_scb_ratesel_init':
(.text+0x215e3c): undefined reference to `wlc_vht_get_scb_ratemask_per_band'
drivers/built-in.o: In function `wlc_stf_stbc_rx_ht_update':
wlc_stf.cSad.text+0x219484): undefined reference to `wlc_vht_set_rx_stbc_cap'
drivers/built-in.o: In function `wlc_stf_stbc_tx_set':
wlc_stf.cSad.text+0x219538): undefined reference to `wlc_vht_set_tx_stbc_cap'
wlc_stf.cSad.text+0x219594): undefined reference to `wlc_vht_set_tx_stbc_cap'
drivers/built-in.o: In function `wlc_stf_rxchain_set':
(.text+0x219af8): undefined reference to `wlc_vht_update_mcs_cap'
drivers/built-in.o: In function `wlc_stf_rxchain_set':
(.text+0x219b10): undefined reference to `wlc_txbf_rxchain_upd'
drivers/built-in.o: In function `wlc_stf_txchain_set_complete':
(.text+0x21b23c): undefined reference to `wlc_vht_update_mcs_cap'
drivers/built-in.o: In function `wlc_stf_txchain_set_complete':
(.text+0x21b288): undefined reference to `wlc_txbf_txchain_upd'
drivers/built-in.o: In function `wlc_stf_txchain_set_complete':
(.text+0x21b2b8): undefined reference to `wlc_olpc_eng_hdl_txchain_update'
drivers/built-in.o: In function `wlc_stf_doiovar':
wlc_stf.cSad.text+0x21bc70): undefined reference to `wlc_send_action_vht_oper_mode'
wlc_stf.cSad.text+0x21be88): undefined reference to `wlc_olpc_eng_has_active_cal'
drivers/built-in.o: In function `wlc_update_txppr_offset':
(.text+0x21db08): undefined reference to `wlc_txbf_txpower_target_max_upd'
drivers/built-in.o: In function `wlc_stf_set_txbf':
(.text+0x21e3f8): undefined reference to `wlc_txbf_upd'
drivers/built-in.o: In function `init_module':
(.init.text+0x57c0): undefined reference to `__this_module'
drivers/built-in.o: In function `init_module':
(.init.text+0x57cc): undefined reference to `__this_module'
drivers/built-in.o: In function `wlc_sendpkt':
(.text.fastpath+0x8984): undefined reference to `wlc_wmf_packets_handle'
drivers/built-in.o: In function `wlc_recvdata_sendup':
(.text.fastpath+0x910c): undefined reference to `wlc_wmf_packets_handle'
drivers/built-in.o: In function `wlc_dotxstatus':
(.text.fastpath+0xa180): undefined reference to `wlc_txbf_imp_txstatus'
drivers/built-in.o: In function `wlc_recv':
(.text.fastpath+0xf1f8): undefined reference to `wlc_frameaction_vht'
drivers/built-in.o: In function `wlc_set_rateset':
wlc.cSad.text.unlikely+0x634): undefined reference to `wlc_vht_update_mcs_cap'
Makefile:816: recipe for target 'vmlinux' failed
make[1]: *** [vmlinux] Error 1
make[1]: Leaving directory '/home/karthik/dd-wrt/src/linux/universal/linux-3.10'
Makefile.brcm3x:130: recipe for target 'kernel' failed
make: *** [kernel] Error 2
cp: cannot stat 'dd-wrt.v24-K26_e2500v3.bin': No such file or directory
Have a look in the "image" directory

I am not sure of how to tackle this error, could anyone please guide me in the right direction? I am trying to compile for LInksys E2500V3.

Thanks for taking the time to help!
jiquera
DD-WRT Novice


Joined: 13 Jan 2013
Posts: 40

PostPosted: Wed May 10, 2017 11:58    Post subject: Reply with quote
fseka wrote:
Hi,

is it possible to have a table with all supported devices and the corresponding toolchain to use?

I've compiled the latest version of pound for my Netgear r7000 and wanted to compile it also for a friend with a different hardware.
But I don't know which toolchain to use Rolling Eyes

Many thanks in advance and kind regards,

fSeka


I would like that too... but it should be exist already right? @Kong and BS: you have a script that compiles for all models... would like sharing which toolchain you use for which target?
hanskloss
DD-WRT User


Joined: 30 May 2010
Posts: 98

PostPosted: Thu Sep 07, 2017 19:43    Post subject: Reply with quote
From Kong's Tips page:

Quote:
*Note: The default package url that is included in my build points to the openwrt repository. Since these packages have been compiled with the openwrt sdk not all packages will work under dd-wrt. This comes from the fact, that dd-wrt uses a modified ethernet structure header and packages that were not compiled with the dd-wrt sdk cannot query all ethernet infos and will fail to get details about the existing interfaces e.g. ushare is affected by this.


Does anyone still have the patch? I remember seeing on the github(entware?) 3-4 years ago but cannot locate it anymore.

_________________
Asus RT-AC66R Target:brcm47xx SubTarget:mips74k Packages:mipsel_74kc
Netgear R7000 Target:bcm53xx Packages:arm_cortex-a9
quarkysg
DD-WRT User


Joined: 03 May 2015
Posts: 250

PostPosted: Sat Oct 07, 2017 1:54    Post subject: Reply with quote
I'm sharing what I've learnt from trying to build a working firmware for the DIR-868L and DIR-880L router, which is essentially based on the Broadcom Northstar Prototype architecture.

It is not easy (well, as least for me Razz) with tons of Internet searches. This thread helped, but there're lots of build issues that's not discussed anywhere in the forum thread. The most problematic is with the Broadcom closed source drivers for the wireless and ethernet interfaces.

From what I can gather, the Makefiles committed into the SVN repo expect all source codes to available, including the source codes for the Broadcom drivers. But what was committed into the SVN repo are compiled binaries. So it will be impossible to build a working binary image from the SVN repo without any changes.

Fortunately, the dev team committed the compiled binaries for the relevant drivers, so we can still build a working image for our own use.

So this is what I did to get a working copy for the DIR-868L and DIR-880L:


Build environment

- Virtual guest running on Oracle VirtualBox 5.1 running on macOS Sierra.
- Virtual guest is Debian 8 (64bit)
- Cross compile toolchain used is 'toolchain-arm_cortex-a9_gcc-6.1.0_musl-1.1.15_eabi', downloaded from the dd-wrt website.
- Ensure your build environment can also run 32bit executables, as the build process will execute 32bit executables to prepare the final binary image.
- Other than exporting the toolchain's 'bin' directory into your PATH environment variable, you will also need to export the TOOLCHAIN environment variable with the home directory of your toolchain of choice. This is required as the makefiles uses this variables for the build process.

From what I understand of the entire process, the environment is not really important, as long as the build dependencies (read this thread from the start) are satisfied.


Compiling the Broadcom drivers

The Broadcom closed source drivers are located in the Linux kernel source directory. In my case I'm using the linux-4.4 kernel (/src/linux/universal/linux-4.4/). I did the following to compile a working (so far) driver for the wireless chipset of my router:

- Edit 'linux-4.4/brcm/$(ARCH)/wl/config/wl.mk' (in my case, '$(ARCH)' will be 'arm') to comment out this line 'WLFILES_SRC_HI += src/wl/clm/src/wlc_clm_data.c' to prevent compilation as we don't have source code for this.
- Edit 'linux-4.4/drivers/net/wl/wl_generic.mk' to append ' $(SRCBASE_OFFSET)/wl/clm/src/wlc_clm_data.o' to the line $(TARGET)-objs := '$(WLCONF_O) $(WL_OBJS)'.
- Comment the line in the Makefile you're using (in /src/router/) where it copies 'wlm_clm_data.c', as this file does not exists in the repository.


Boardroom driver kernel modules and utilities

Apparently there're two kernel modules and utilities that the SVN Makefiles will try to compile, which source codes are not available as well. They are supposedly in the /src/router/emf directory, and the rules to build them are in /src/router/rules/emf.mk. Fortunately the binaries are provided in the SVN report but they are in /src/router/emf_bin/.

For for the build to succeed, I had to edit the /src/router/rules/emf.mk file as follows (entire file listed):

emf:
# $(MAKE) -C emf/emfconf CROSS=$(CROSS_COMPILE)
# $(MAKE) -C emf/igsconf CROSS=$(CROSS_COMPILE)
# $(MAKE) -C emf/emf
# $(MAKE) -C emf/igs

emf-clean:
# $(MAKE) -C emf/emfconf clean
# $(MAKE) -C emf/igsconf clean
# $(MAKE) -C emf/emf clean
# $(MAKE) -C emf/igs clean

emf-install:
# $(MAKE) -C emf/igsconf CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR)/emf install
# $(MAKE) -C emf/emfconf CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR)/emf install
# $(MAKE) -C emf/igs CROSS=$(CROSS_COMPILE) INSTALL_MOD_PATH=$(INSTALLDIR)/emf install
# $(MAKE) -C emf/emf CROSS=$(CROSS_COMPILE) INSTALL_MOD_PATH=$(INSTALLDIR)/emf install
install -D emf_bin/$(ARCH)/emf.ko $(INSTALLDIR)/emf/lib/modules/$(KERNELRELEASE)/emf.ko
install -D emf_bin/$(ARCH)/igs.ko $(INSTALLDIR)/emf/lib/modules/$(KERNELRELEASE)/igs.ko
install -D emf_bin/$(ARCH)/emf $(INSTALLDIR)/emf/usr/sbin/emf
install -D emf_bin/$(ARCH)/igs $(INSTALLDIR)/emf/usr/sbin/igs


Components without source codes

There are also user land components that are also closed sourced. I had to comment out the following in the .config file (be sure to copy the correct version for your router) before my build succeeded:

- CONFIG_SUPERCHANNEL
- CONFIG_SPUTNIK_APD


Makefiles for user land components

Lots of configuration and linking errors. I had to amend each of the .mk, Makefile or the configure.ac files to fix the configuration or linking issues. You have to familiarise yourself with automake and Makefile. I struggled for a while with this.


Firmware GUI issues

The source from the SVN repo apparently could not be used to successfully build a working GUI for the firmware image. The Javascript optimisation part always messes it up, resulting in corrupted Javascripts being generated and built into the firmware. Instead of troubleshooting, I took the shortcut of extracting the Javascript files in the released binary (downloaded from the dd-wrt website) and including them in my build. I replaced the Javascripts I extracted from the working binary located in this location: /src/router/kromo/.


I probably may have missed out other important details, but that's what I can get from my notes and from what I can remember Razz

Hope the above will be able to help others willing to try building their own firmware images.
Goto page Previous  1, 2, 3 ... , 12, 13, 14  Next Display posts from previous:    Page 13 of 14
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum