Compiling DD-WRT

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Generic Questions
Goto page Previous  1, 2, 3 ... 16, 17, 18
Author Message
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 7182
Location: Texas, USA

PostPosted: Thu Jun 18, 2020 15:42    Post subject: Reply with quote
Although this thread was initially started when Broadcom was the main focus, I am moving this to "Generic" and making it a sticky.
_________________
Official Forum Rules, Guidelines, and Helpful InformationFirmware FAQInstallation WikiWhere Do I Download Firmware?
DON'T use Chromium-based browsersRTFM/STFW - TL;DR is NOT an excuse. • Why Should I Care What Color the Bikeshed Is?
Please DO NOT PM me with questions; Ask in the forum.

---------------------------------------------------------

Linux User #377467 counter.li.org / linuxcounter.net
Sponsor
tkmds
DD-WRT User


Joined: 04 Sep 2011
Posts: 92
Location: SA

PostPosted: Thu Jun 25, 2020 22:25    Post subject: Reply with quote
Hey All,

@egc, @yoyoma2, @rkboni

Trying to get a few modules compiled ( or downloaded ) to get StrongSwan / IPSec working correctly. Traffic from Azure down to on-prem works fine across private VLAN's. Nothing I did so far helped to get traffic up to Azure VLAN's .

Code:
ah4
ah6
esp4
esp6
xfrm4_tunnel
xfrm6_tunnel
xfrm_user
ip_tunnel
tunnel
tunnel6
xfrm4_mode_tunnel
xfrm6_mode_tunnel


So tried a few things to get everything working, including sourcing precompiled modules from OpenWRT and compiling them on my own. But no luck. Running into


Code:
 root  ~  linux-4.4  svn update
Updating '.':
U    arch/mips/brcm-boards/bcm947xx/gpio.c
U    arch/mips/brcm-boards/bcm947xx/prom.c
Updated to revision 43522.
 root  ~  linux-4.4  

 root  ~  linux-4.4  
 root  ~  linux-4.4  make config
Makefile:534: arch//Makefile: No such file or directory
make: *** No rule to make target `arch//Makefile'.  Stop.
 root  ~  linux-4.4 
 root  ~  linux-4.4  ls -altri /xfs/
total 4
    128 dr-xr-xr-x. 26 root root 4096 Jun 23 23:00 ..
1448898 lrwxrwxrwx.  1 root root   16 Jun 23 23:01 toolchains -> /root/toolchains
1448897 drwxr-xr-x.  2 root root   23 Jun 23 23:01 .
You have new mail in /var/spool/mail/root
 root  ~  linux-4.4  


In the least I need xfrm_user and it's dependencies working correctly.

Before I start taking apart the repo, could you let me know if I'm going down the wrong path above? Perhaps I should be using another svn repo if the one above doesn't work in order to compile and include xfrm4* modules?


----------------------------------------------

----------------------------------------------
Router / Version: Asus RT-AC68U
File/Kernel: 4.4.228 #380 SMP Tue Jun 23 08:47:04 +04 2020 armv7l DD-WRT
Issues/Errors: none
Mode: OSPF Router
Firmware: RT-AC68U: DD-WRT v3.0-r43502 std (06/23/20)
Notables: OSPF - Fully working. ( https://svn.dd-wrt.com/ticket/6937 can be closed then. )


---------------------------

REF: https://wiki.strongswan.org/projects/strongswan/wiki/KernelModules
REF: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=325479&postdays=0&postorder=asc&start=0

_________________
Cheers, TK
------------------------
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 6154
Location: Netherlands

PostPosted: Fri Jun 26, 2020 9:21    Post subject: Reply with quote
Compiling for DDWRT is rather difficult (understatement of the year)
You need the right build system although BS is using Opensuse , Ubuntu 18.06 will also do,

You must cross compile for Arm cortex A9 (in your case as it was for an AC68U?), so you need the right toolchain, the toolchains you can download from the DDWRT website are however out dated, BS is using newer toolchains, you can try with the latest available.

Theoretically you should be able to compile for one package but there are so many unresolved dependencies that that maybe does not work.

I have taken a look and do not know what configration option will compile your modules, maybe IPSEC, SOFTETHER or STRONGSWAN, those are the options I can find.

I am not the greatest cross compiling expert but I will add in strongswan and see what is compiled

_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
OpenVPN Policy Based Routing guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Server setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Wireguard Client setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324624
Wireguard Advanced setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 6154
Location: Netherlands

PostPosted: Fri Jun 26, 2020 12:22    Post subject: Reply with quote
Strongswan does not compile maybe it s left over from Kong things are missing to compile now.

Attached the best I can do from an old Kong build



xfrm.zip
 Description:

Download
 Filename:  xfrm.zip
 Filesize:  57.59 KB
 Downloaded:  50 Time(s)


_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
OpenVPN Policy Based Routing guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Server setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Wireguard Client setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324624
Wireguard Advanced setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
tkmds
DD-WRT User


Joined: 04 Sep 2011
Posts: 92
Location: SA

PostPosted: Fri Jun 26, 2020 12:56    Post subject: Reply with quote
Yep, realizing I'm just treading water here on my CentOS 7, which you've just pointed out as the first wrong thing I'm doing:

Code:
[root@dd-wrt01 router]# make -f Makefile.northstar jansson
libtool: link: arm-linux-uclibc-ar cru .libs/libjansson.a  dump.o error.o hashtable.o hashtable_seed.o load.o memory.o pack_unpack.o strbuffer.o strconv.o utf.o value.o
arm-linux-uclibc-ar: error while loading shared libraries: libfl.so.2: cannot open shared object file: No such file or directory
make[3]: *** [libjansson.la] Error 127
make[3]: Leaving directory `/root/DD-WRT/src/router/jansson/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/DD-WRT/src/router/jansson'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/DD-WRT/src/router/jansson'
make: *** [jansson] Error 2
[root@dd-wrt01 router]#


And the original:

Code:
[root@dd-wrt01 linux-4.4]# make modules
Makefile:636: arch//Makefile: No such file or directory
make: *** No rule to make target `arch//Makefile'.  Stop.
[root@dd-wrt01 linux-4.4]#



I've installed StrongSwan from available packages (opkg). Just needed the xfrm4* kernel modules.

_________________
Cheers, TK
------------------------
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 6154
Location: Netherlands

PostPosted: Fri Jun 26, 2020 13:02    Post subject: Reply with quote
Anything useful in the zip file I attached?
_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
OpenVPN Policy Based Routing guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Server setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Wireguard Client setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324624
Wireguard Advanced setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
tkmds
DD-WRT User


Joined: 04 Sep 2011
Posts: 92
Location: SA

PostPosted: Fri Jun 26, 2020 13:08    Post subject: Reply with quote
Hmm, I'm missing something very basic. This is the FW I have:

https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2020/06-23-2020-r43502/asus-rt-ac68u/

But this is what I'm getting from the modules:

Code:
root@DD-WRT:/opt/xfrm4#
root@DD-WRT:/opt/xfrm4#
root@DD-WRT:/opt/xfrm4# insmod *
insmod: cannot insert 'ah4.ko': unknown symbol in module
root@DD-WRT:/opt/xfrm4# insmod xfrm4_tunnel.ko
insmod: cannot insert 'xfrm4_tunnel.ko': unknown symbol in module
root@DD-WRT:/opt/xfrm4# uname -a
Linux DD-WRT 4.4.228 #380 SMP Tue Jun 23 08:47:04 +04 2020 armv7l DD-WRT
root@DD-WRT:/opt/xfrm4# nvram show|grep -Ei 43502
size: 62675 bytes (2861 left)
os_version=43502
root@DD-WRT:/opt/xfrm4#
root@DD-WRT:/opt/xfrm4#
root@DD-WRT:/opt/xfrm4#
root@DD-WRT:/opt/xfrm4# sha1sum xfrm.zip xfrm4_tunnel.ko xfrm_user.ko
b1a9ff612c3bd804a7deaf6acb20f0df30588878  xfrm.zip
043fbe92151df75fdc256cd3618b7e04be6736ae  xfrm4_tunnel.ko
8ef2821b9c46c0e85663a2874d517ff1237d7030  xfrm_user.ko
root@DD-WRT:/opt/xfrm4#

_________________
Cheers, TK
------------------------
tkmds
DD-WRT User


Joined: 04 Sep 2011
Posts: 92
Location: SA

PostPosted: Fri Jun 26, 2020 13:28    Post subject: Reply with quote
Tried all from the zip file. Two did insert:

Code:
root@DD-WRT:/opt/xfrm4# insmod tunnel4.ko
root@DD-WRT:/opt/xfrm4# insmod ip_tunnel.ko
root@DD-WRT:/opt/xfrm4# insmod xfrm_algo.ko


then I was able to insert this guy:

Code:
root@DD-WRT:/opt/xfrm4# insmod xfrm4_tunnel.ko


then

Code:
root@DD-WRT:/opt/xfrm4# insmod xfrm_ipcomp.ko


Trying a few more combinations with the rest of them.

_________________
Cheers, TK
------------------------
tkmds
DD-WRT User


Joined: 04 Sep 2011
Posts: 92
Location: SA

PostPosted: Fri Jun 26, 2020 13:47    Post subject: Reply with quote
So this is what ends up inserted but nothing else:

Code:
root@DD-WRT:/opt/xfrm4# for mods in $(echo tunnel4.ko ip_tunnel.ko xfrm_algo.ko xfrm4_tunnel.ko xfrm_ipcomp.ko esp4.ko ah4.
ko xfrm4_mode_beet.ko xfrm4_mode_beet.ko xfrm4_mode_transport.ko xfrm4_mode_tunnel.ko xfrm_user.ko); do insmod $mods; done
insmod: cannot insert 'tunnel4.ko': File exists
insmod: cannot insert 'ip_tunnel.ko': File exists
insmod: cannot insert 'xfrm_algo.ko': File exists
insmod: cannot insert 'xfrm4_tunnel.ko': File exists
insmod: cannot insert 'xfrm_ipcomp.ko': File exists
insmod: cannot insert 'esp4.ko': File exists
insmod: cannot insert 'ah4.ko': File exists
insmod: cannot insert 'xfrm4_mode_beet.ko': File exists
insmod: cannot insert 'xfrm4_mode_beet.ko': File exists
insmod: cannot insert 'xfrm4_mode_transport.ko': File exists
insmod: cannot insert 'xfrm4_mode_tunnel.ko': File exists
insmod: cannot insert 'xfrm_user.ko': unknown symbol in module
root@DD-WRT:/opt/xfrm4#


Only thing I can surmise is that there's another dependency missing on xfrm_user.ko .

Code:
root@DD-WRT:/opt/xfrm4# strings xfrm_user.ko|grep -Ei depends
depends=xfrm_algo
root@DD-WRT:/opt/xfrm4# insmod xfrm_algo.ko
insmod: cannot insert 'xfrm_algo.ko': File exists
root@DD-WRT:/opt/xfrm4# lsmod|grep xfrm_algo
xfrm_algo               3645  3 ah4,esp4,xfrm_ipcomp
root@DD-WRT:/opt/xfrm4#



Very close to what I need now.

Could you please include these in the zip for dependencies?

root@DD-WRT:/opt/xfrm4# insmod -v xfrm_user.ko; dmesg tail|grep -Ei xfrm
Using xfrm_user.ko
insmod: cannot insert 'xfrm_user.ko': unknown symbol in module
xfrm_user: Unknown symbol security_xfrm_state_delete (err 0)
xfrm_user: Unknown symbol security_xfrm_state_alloc (err 0)
xfrm_user: Unknown symbol security_xfrm_policy_alloc (err 0)
xfrm_user: Unknown symbol security_xfrm_policy_free (err 0)

So just need xfrm_state and xfrm_policy I guess:

[root@dd-wrt01 linux-4.4]# find ./ -iname xfrm*|grep -Ei "state|policy"
./net/ipv4/xfrm4_policy.c
./net/ipv4/xfrm4_state.c

They should be in the same folder as the ones you've zipped up and uploaded.

_________________
Cheers, TK
------------------------
tkmds
DD-WRT User


Joined: 04 Sep 2011
Posts: 92
Location: SA

PostPosted: Sat Jun 27, 2020 0:27    Post subject: Reply with quote
I cheated:


Code:
[root@dd-wrt01 router]# strace -s 256 -f arm-linux-uclibc-ar
execve("/xfs/toolchains/toolchain-arm_cortex-a9_gcc-8.2.0_musl_eabi//bin/arm-linux-uclibc-ar", ["arm-linux-uclibc-ar"], [/* 22 vars */]) = 0
brk(NULL)                               = 0x10f5000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f76272f3000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=33317, ...}) = 0
mmap(NULL, 33317, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f76272ea000
close(3)                                = 0
open("/lib64/tls/x86_64/libfl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7ffd62f96340) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libfl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", {st_mode=S_IFDIR|0555, st_size=6, ...}) = 0
open("/lib64/x86_64/libfl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7ffd62f96340)   = -1 ENOENT (No such file or directory)
open("/lib64/libfl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64", {st_mode=S_IFDIR|0555, st_size=32768, ...}) = 0
open("/usr/lib64/tls/x86_64/libfl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64", 0x7ffd62f96340) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libfl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls", {st_mode=S_IFDIR|0555, st_size=6, ...}) = 0
open("/usr/lib64/x86_64/libfl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/x86_64", 0x7ffd62f96340) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libfl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64", {st_mode=S_IFDIR|0555, st_size=32768, ...}) = 0
writev(2, [{"arm-linux-uclibc-ar", 19}, {": ", 2}, {"error while loading shared libraries", 36}, {": ", 2}, {"libfl.so.2", 10}, {": ", 2}, {"cannot open shared object file", 30}, {": ", 2}, {"No such file or directory", 25}, {"\n", 1}], 10arm-linux-uclibc-ar: error while loading shared libraries: libfl.so.2: cannot open shared object file: No such file or directory
) = 129
exit_group(127)                         = ?
+++ exited with 127 +++
[root@dd-wrt01 router]#



Code:
[root@dd-wrt01 router]#
[root@dd-wrt01 router]#
[root@dd-wrt01 router]# cd /lib64/tls/x86_64/
-bash: cd: /lib64/tls/x86_64/: No such file or directory
[root@dd-wrt01 router]# cd /lib64/tls/
[root@dd-wrt01 tls]# find / -iname libfl.so.2
/opt/slapos/parts/flex/lib/libfl.so.2
[root@dd-wrt01 tls]# ls -altri /opt/slapos/parts/flex/lib/
total 20
280955108 -rwxr-xr-x. 1 root root 5896 Apr 27 17:53 libfl.so.2.0.0
280955111 -rwxr-xr-x. 1 root root 5896 Apr 27 17:53 libfl_pic.so.2.0.0
280955106 lrwxrwxrwx. 1 root root   14 Jun 26 08:34 libfl.so -> libfl.so.2.0.0
175263320 drwxr-xr-x. 4 root root   26 Jun 26 08:34 ..
280955107 lrwxrwxrwx. 1 root root   14 Jun 26 08:34 libfl.so.2 -> libfl.so.2.0.0
280955110 lrwxrwxrwx. 1 root root   18 Jun 26 08:34 libfl_pic.so.2 -> libfl_pic.so.2.0.0
280955109 lrwxrwxrwx. 1 root root   18 Jun 26 08:34 libfl_pic.so -> libfl_pic.so.2.0.0
280955105 drwxr-xr-x. 2 root root 4096 Jun 26 08:34 .
[root@dd-wrt01 tls]# ln -s /opt/slapos/parts/flex/lib/libfl.so.2.0.0 libfl.so.2
[root@dd-wrt01 tls]# ln -s /opt/slapos/parts/flex/lib/libfl_pic.so.2.0.0 libfl_pic.so.2
[root@dd-wrt01 tls]# ln -s /opt/slapos/parts/flex/lib/libfl.so.2.0.0 libfl.so
[root@dd-wrt01 tls]# ln -s /opt/slapos/parts/flex/lib/libfl_pic.so.2.0.0 libfl_pic.so
[root@dd-wrt01 tls]# ls -altri
total 52
201326728 dr-xr-xr-x. 52 root root 32768 Jun 26 08:49 ..
175157790 lrwxrwxrwx.  1 root root    41 Jun 26 20:20 libfl.so.2 -> /opt/slapos/parts/flex/lib/libfl.so.2.0.0
134301613 lrwxrwxrwx.  1 root root    45 Jun 26 20:20 libfl_pic.so.2 -> /opt/slapos/parts/flex/lib/libfl_pic.so.2.0.0
134766022 lrwxrwxrwx.  1 root root    41 Jun 26 20:20 libfl.so -> /opt/slapos/parts/flex/lib/libfl.so.2.0.0
134766023 lrwxrwxrwx.  1 root root    45 Jun 26 20:22 libfl_pic.so -> /opt/slapos/parts/flex/lib/libfl_pic.so.2.0.0
134299903 dr-xr-xr-x.  2 root root    78 Jun 26 20:22 .
[root@dd-wrt01 tls]# pwd
/lib64/tls
[root@dd-wrt01 tls]# cd /root/DD-WRT/src/router/
[root@dd-wrt01 router]#




Code:

[root@dd-wrt01 router]# make -f Makefile.northstar jansson
stat: missing operand
Try 'stat --help' for more information.
cat: /root/DD-WRT/src/linux/universal/linux-4.4/include/config/kernel.release: No such file or directory
rules/lighttpd.mk:26: warning: overriding recipe for target `lighttpd-configure'
rules/lighttpd.mk:26: warning: ignoring old recipe for target `lighttpd-configure'
rules/lighttpd.mk:31: warning: overriding recipe for target `lighttpd'
rules/lighttpd.mk:31: warning: ignoring old recipe for target `lighttpd'
rules/lighttpd.mk:34: warning: overriding recipe for target `lighttpd-clean'
rules/lighttpd.mk:34: warning: ignoring old recipe for target `lighttpd-clean'
rules/lighttpd.mk:37: warning: overriding recipe for target `lighttpd-install'
rules/lighttpd.mk:37: warning: ignoring old recipe for target `lighttpd-install'
make -C jansson
make[1]: Entering directory `/root/DD-WRT/src/router/jansson'
make  all-recursive
make[2]: Entering directory `/root/DD-WRT/src/router/jansson'
Making all in doc
make[3]: Entering directory `/root/DD-WRT/src/router/jansson/doc'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/root/DD-WRT/src/router/jansson/doc'
Making all in src
make[3]: Entering directory `/root/DD-WRT/src/router/jansson/src'
/bin/sh ../libtool  --tag=CC   --mode=link ccache arm-linux-uclibc-gcc -Wall -Wextra -Wdeclaration-after-statement -Os -pipe -mcpu=cortex-a9 -mtune=cortex-a9  -msoft-float -mfloat-abi=soft -fno-caller-saves -fno-plt  -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC -no-undefined -export-symbols-regex '^^dd_json_' -version-info 14:0:10 -lm -o libjansson.la -rpath /usr/lib dump.lo error.lo hashtable.lo hashtable_seed.lo load.lo memory.lo pack_unpack.lo strbuffer.lo strconv.lo utf.lo value.lo
libtool: link: rm -fr  .libs/libjansson.exp .libs/libjansson.so .libs/libjansson.so.4 .libs/libjansson.so.4.10.0 .libs/libjansson.ver
libtool: link: arm-linux-uclibc-nm  .libs/dump.o .libs/error.o .libs/hashtable.o .libs/hashtable_seed.o .libs/load.o .libs/memory.o .libs/pack_unpack.o .libs/strbuffer.o .libs/strconv.o .libs/utf.o .libs/value.o   | sed -n -e 's/^.*[    ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /bin/sed 's/.* //' | sort | uniq > .libs/libjansson.exp
libtool: link: /bin/grep -E -e "^^dd_json_" ".libs/libjansson.exp" > ".libs/libjansson.expT"
libtool: link: mv -f ".libs/libjansson.expT" ".libs/libjansson.exp"
libtool: link: echo "{ global:" > .libs/libjansson.ver
libtool: link:  cat .libs/libjansson.exp | sed -e "s/\(.*\)/\1;/" >> .libs/libjansson.ver
libtool: link:  echo "local: *; };" >> .libs/libjansson.ver
libtool: link:  ccache arm-linux-uclibc-gcc -shared  -fPIC -DPIC  .libs/dump.o .libs/error.o .libs/hashtable.o .libs/hashtable_seed.o .libs/load.o .libs/memory.o .libs/pack_unpack.o .libs/strbuffer.o .libs/strconv.o .libs/utf.o .libs/value.o   -lm  -Os -mcpu=cortex-a9 -mtune=cortex-a9 -msoft-float -mfloat-abi=soft -Wl,--gc-sections   -Wl,-soname -Wl,libjansson.so.4 -Wl,-version-script -Wl,.libs/libjansson.ver -o .libs/libjansson.so.4.10.0
libtool: link: (cd ".libs" && rm -f "libjansson.so.4" && ln -s "libjansson.so.4.10.0" "libjansson.so.4")
libtool: link: (cd ".libs" && rm -f "libjansson.so" && ln -s "libjansson.so.4.10.0" "libjansson.so")
libtool: link: arm-linux-uclibc-ar cru .libs/libjansson.a  dump.o error.o hashtable.o hashtable_seed.o load.o memory.o pack_unpack.o strbuffer.o strconv.o utf.o value.o
arm-linux-uclibc-ar: `u' modifier ignored since `D' is the default (see `U')
libtool: link: arm-linux-uclibc-ranlib .libs/libjansson.a
libtool: link: ( cd ".libs" && rm -f "libjansson.la" && ln -s "../libjansson.la" "libjansson.la" )
make[3]: Leaving directory `/root/DD-WRT/src/router/jansson/src'
Making all in test
make[3]: Entering directory `/root/DD-WRT/src/router/jansson/test'
Making all in bin
make[4]: Entering directory `/root/DD-WRT/src/router/jansson/test/bin'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/root/DD-WRT/src/router/jansson/test/bin'
Making all in suites
make[4]: Entering directory `/root/DD-WRT/src/router/jansson/test/suites'
Making all in api
make[5]: Entering directory `/root/DD-WRT/src/router/jansson/test/suites/api'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/root/DD-WRT/src/router/jansson/test/suites/api'
make[5]: Entering directory `/root/DD-WRT/src/router/jansson/test/suites'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/root/DD-WRT/src/router/jansson/test/suites'
make[4]: Leaving directory `/root/DD-WRT/src/router/jansson/test/suites'
make[4]: Entering directory `/root/DD-WRT/src/router/jansson/test'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/root/DD-WRT/src/router/jansson/test'
make[3]: Leaving directory `/root/DD-WRT/src/router/jansson/test'
make[3]: Entering directory `/root/DD-WRT/src/router/jansson'
make[3]: Leaving directory `/root/DD-WRT/src/router/jansson'
make[2]: Leaving directory `/root/DD-WRT/src/router/jansson'
make[1]: Leaving directory `/root/DD-WRT/src/router/jansson'
[root@dd-wrt01 router]#


Code:

[root@dd-wrt01 router]# rpm -qf /opt/slapos/parts/flex/lib/libfl.so.2
slapos.node-1.0.144-1.2.x86_64
[root@dd-wrt01 router]# cat /etc/*release*
CentOS Linux release 7.4.1708 (Core)
Derived from Red Hat Enterprise Linux 7.4 (Source)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.4.1708 (Core)
CentOS Linux release 7.4.1708 (Core)
cpe:/o:centos:centos:7
[root@dd-wrt01 router]#
[root@dd-wrt01 router]#
[root@dd-wrt01 router]# history|grep slapos
 1118  wget https://download.opensuse.org/repositories/home:/VIFIBnexedi/CentOS_7/home:VIFIBnexedi.repo -O /etc/yum.repos.d/slapos.repo
 1120  yum install slapos.node
 1123  yum install slapos.node
 1124  rpm -ql slapos.node-1.0.144-1.2.x86_64|grep -Ei lib
 1125  rpm -ql slapos.node-1.0.144-1.2.x86_64|grep -Ei libfl
 1254  ls -altri /opt/slapos/parts/flex/lib/
 1267  ls -altri /opt/slapos/parts/flex/lib/
 1268  ln -s /opt/slapos/parts/flex/lib/libfl.so.2.0.0 libfl.so.2
 1269  ln -s /opt/slapos/parts/flex/lib/libfl_pic.so.2.0.0 libfl_pic.so.2
 1270  ln -s /opt/slapos/parts/flex/lib/libfl.so.2.0.0 libfl.so
 1271  ln -s /opt/slapos/parts/flex/lib/libfl_pic.so.2.0.0 libfl_pic.so
 1276  rpm -qf /opt/slapos/parts/flex/lib/libfl.so.2
 1278  history|grep slapos
[root@dd-wrt01 router]#


Last edited by tkmds on Mon Jun 29, 2020 14:31; edited 1 time in total
tkmds
DD-WRT User


Joined: 04 Sep 2011
Posts: 92
Location: SA

PostPosted: Mon Jun 29, 2020 14:20    Post subject: Reply with quote
@egc

If a copy of the xfrm4_policy.ko and xfrm4_state.ko exists in the same path and don't mind including these modules in the zip earlier, that would be great.


I tried to continue with the kernel compilation. It progressed better then I expected but I'm still quite a way off from even trying to compile any modules. Like folks mentioned on this thread, it's definitely a gauntlet of errors trying to compile the kernel, but in some ways it hasn't been too bad. Mostly autotools and .m4 issues.

I'm using a CentOS 7 VM dedicated to the DD-WRT Kernel compilation.

Stuck on this at the moment, from steps posted earlier in this thread, even though ncurses compiled ok:


Code:

[root@dd-wrt01 util-linux]# GCCARM=/root/toolchains/toolchain-arm_cortex-a9_gcc-8.2.0_musl_eabi/bin
[root@dd-wrt01 util-linux]# export PATH=$GCCARM:$PATH



Code:

make -f Makefile.northstar jansson-configure
make -f Makefile.northstar jansson
make -f Makefile.northstar nvram
make -f Makefile.northstar utils
make -f Makefile.northstar install_headers
make -f Makefile.northstar iptables
make -f Makefile.northstar libnet
make -f Makefile.northstar kernel

make -f Makefile.northstar json-c-configure
make -f Makefile.northstar json-c
make -f Makefile.northstar libubox-configure
make -f Makefile.northstar libubox

make -f Makefile.northstar configure  <<<<<<<< I'm at this step.  All others completed ok.
make -f Makefile.northstar clean all


This 'could' mean nccurses didn't really compile ok but if it didn't, why would it pass through:

Code:

[root@dd-wrt01 router]# make -f Makefile.northstar configure


  CC       libfdisk/src/libfdisk_la-gpt.lo
  CCLD     libfdisk.la
arm-linux-uclibc-ar: `u' modifier ignored since `D' is the default (see `U')
  CC       text-utils/more-more.o
text-utils/more.c: In function 'expand':
text-utils/more.c:2093:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if (*inpstr == '%' || *inpstr == '!') {
       ^
text-utils/more.c:2097:3: note: here
   default:
   ^~~~~~~
  CCLD     more
/root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
make[3]: *** [more] Error 1
make[3]: Leaving directory `/root/DD-WRT/src/router/util-linux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/DD-WRT/src/router/util-linux'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/DD-WRT/src/router/util-linux'
make: *** [util-linux-configure] Error 2
[root@dd-wrt01 router]# ls -altri /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so
134427856 lrwxrwxrwx. 1 root root 19 Jun 28 23:32 /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so -> libncurses.so.6.1.0
[root@dd-wrt01 router]# view /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so
[root@dd-wrt01 router]# type /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so
/root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so is /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so
[root@dd-wrt01 router]# type /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so
/root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so is /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so
[root@dd-wrt01 router]# type /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses
libncurses.a           libncurses++.la        libncurses.so          libncurses++.so.6
libncurses++.a         libncurses.lai         libncurses++.so        libncurses.so.6.1.0
libncurses.la          libncurses++.lai       libncurses.so.6        libncurses++.so.6.1.0
[root@dd-wrt01 router]# type /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so.6
libncurses.so.6      libncurses.so.6.1.0
[root@dd-wrt01 router]# type /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so.6.1.0
/root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so.6.1.0 is /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so.6.1.0
[root@dd-wrt01 router]#
[root@dd-wrt01 router]#
[root@dd-wrt01 router]# ls -altri /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so.6.1.0
134427854 -rwxr-xr-x. 1 root root 433080 Jun 28 23:32 /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so.6.1.0
[root@dd-wrt01 router]# file /root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so.6.1.0
/root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so.6.1.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=a987c4cd79d37ee38545b091b6e84493e33bbeeb, not stripped
[root@dd-wrt01 router]#




An strace reveals:


Code:

[pid 26129] open("/root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so", O_RDONLY) = 9
[pid 26129] lstat("/root", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 26129] lstat("/root/DD-WRT", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 26129] lstat("/root/DD-WRT/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 26129] lstat("/root/DD-WRT/src/router", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
[pid 26129] lstat("/root/DD-WRT/src/router/ncurses", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 26129] lstat("/root/DD-WRT/src/router/ncurses/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 26129] lstat("/root/DD-WRT/src/router/ncurses/lib/.libs", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 26129] lstat("/root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so", {st_mode=S_IFLNK|0777, st_size=19, ...}) = 0
[pid 26129] readlink("/root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so", "libncurses.so.6.1.0", 4095) = 19
[pid 26129] lstat("/root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so.6.1.0", {st_mode=S_IFREG|0755, st_size=433080, ...}) = 0
[pid 26129] ioctl(9, TCGETS, 0x7fff67519180) = -1 ENOTTY (Inappropriate ioctl for device)
[pid 26129] fstat(9, {st_mode=S_IFREG|0755, st_size=433080, ...}) = 0
[pid 26129] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fae2e7ab000
[pid 26129] read(9, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320R\1\0\0\0\0\0@\0\0\0\0\0\0\0x\224\6\0\0\0
\0\0\0\0\0\0@\0008\0\7\0@\0\35\0\34\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0D\237\5\0\0\0\0\0D\237\5\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\310\254\5\0\0\0\0\0\310\254%\0\0\0\0\0\310\254%\0\0\0\0\0\224D\0\0\0
\0\0\0\20L\0\0\0\0\0\0\0\0 \0\0\0\0\0\2\0\0\0\6\0\0\0p\334\5\0\0\0\0\0p\334%\0\0\0\0\0p\334%\0\0\0\0\0\320\1\0\0\0\0\0\0\320
\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\310\1\0\0\0\0\0\0\310\1\0\0\0\0\0\0"..., 8192) = 8192
[pid 26129] write(2, "/root/DD-WRT/src/router/ncurses/lib/.libs/libncurses.so", 55) = 55
[pid 26129] write(2, ": file not recognized: ", 23) = 23
[pid 26129] write(2, "file format not recognized", 26) = 26
[pid 26129] write(2, "\n", 1)           = 1
[pid 26129] close(8)
dominic0315
DD-WRT Novice


Joined: 21 Apr 2020
Posts: 10

PostPosted: Thu Jul 23, 2020 23:26    Post subject: Reply with quote
egc wrote:
This is just to say thank you to all those who participated.

With the help of the pointers from this thread we were able to compile, build and run builds for Broadcom Northstar routers.

Thanks again Smile


Hello egc, Do you mind writing a walkthrough for a successful build and share to the wider community?
Goto page Previous  1, 2, 3 ... 16, 17, 18 Display posts from previous:    Page 18 of 18
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Generic Questions 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