warriorpaw DD-WRT Novice
Joined: 11 Oct 2014 Posts: 1
|
Posted: Sat Oct 11, 2014 14:29 Post subject: How to build a pppd plugin from source code ? |
|
The "PLUGINS" file form pppd-2.4.5.tar said :
Code: |
Using gcc under Linux, a plugin called `xyz' could be compiled and linked with
the following commands:
gcc -c -O xyz.c
gcc -shared -o xyz.so xyz.o
|
I tried to compile a plugin written by myself, it works on Desktop UBUNTU , Raspberry PI and a route running openwrt.
But I got "Segmentation fault" on dd-wrt.
I tried build it by all of "toolchain-mipsel_*" compiler in
Code: | http://download1.dd-wrt.com/dd-wrtv2/downloads/toolchains/toolchains.tar.xz |
None worked .. all "Segmentation fault"
Even tried to build this "do_nothing" plugin, still "Segmentation fault"
Code: |
#include <stddef.h>
#include "pppd.h"
char pppd_version[] = VERSION;
static int my_new_phase_hook(int p)
{
return 0;
}
void plugin_init(void)
{
info("plugin_init");
new_phase_hook = my_new_phase_hook;
}
|
Can somebody tell me Why ? thanks~~~!!!!
I using this route
http://wiki.openwrt.org/toh/fiboom/hg320
with dd-wrt.v24-19519_NEWD-2_K2.6_mega |
|