Documentation EciAdsl / OpenBSD ()

A documentation for installing EciAdsl driver on OpenBSD has been written by Benoit Papillault.
This can be useful for installing driver on other BSD versions.

Documentation EciAdsl / OpenBSD

New comment
6 comments:
Re: Documentation EciAdsl / OpenBSD
Posted by ouatsefie,
Hi
Using this documentation,
i did not succed in installing the driver on NetBSD 1.6.2
I've got the following error
/usr/bin/ld: cannot find -lpthread
while trying to compile the driver

Is there an other thing which i had forget?
Thanks
Re: Documentation EciAdsl / OpenBSD
Posted by FlashCode,
I think pthread library is not installed on your system. Try to install it, then compile again the driver.
Re: Documentation EciAdsl / OpenBSD
Posted by ouatsefie,
Hi

Here are the steps i've followed in trying to install the eci adsl driver on my NetBSD 1.6.2

I/ When installing my OS (NetBSD 1.6.2) i downloaded and installed all the available packages on my computer (don't worry i've got enough space for that :);) ). i've changed the shell to /usr/pkg/bin/bash.

II/ Then i followed all the steps from the documentation .
i/ Every thing went fine before i began compiling the driver .
At that moment i got the bloody error.
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o eci-load1.o eci-load1.c
eci-load1.c: In function `main':
eci-load1.c:415: warning: implicit declaration of function `basename'
eci-load1.c:415: warning: assignment makes pointer from integer without a cast
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o util.o util.c
gcc -lpthread eci-load1.o util.o -L/usr/local/lib -lpusb -o eci-load1
ld: cannot find -lpthread
gmake: *** [eci-load1] Error 1

ii/ Looking for solution, i read BENOIT Papillault advising us to run a gmake clean; rm *.o then run ./configure

Here are the logs i got

bash-2.05b# gmake clean; rm *.o
rm -f eci-load1 eci-load2 pppoeci check-hdlc check-hdlc-bug *.o core
rm: *.o: No such file or directory
bash-2.05b# ./configure
checking for gawk... gawk
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking whether make sets ${MAKE}... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking pusb.h usability... yes
checking pusb.h presence... yes
checking for pusb.h... yes
checking for pusb_endpoint_open in -lpusb... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for gcc option to accept ANSI C... none needed
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for unistd.h... (cached) yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... (cached) yes
checking for working vfork... (cached) yes
checking whether gcc needs -traditional... no
checking for stdlib.h... (cached) yes
checking for working malloc... yes
checking return type of signal handlers... void
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for alarm... yes
checking for gettimeofday... yes
checking for memset... yes
checking for select... yes
checking for socket... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strtol... yes
checking for strtoul... yes
checking for uname... yes
configure: creating ./config.status
config.status: creating Makefile
bash-2.05b# gmake eci-load1 eci-load2 pppoeci
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o eci-load1.o eci-load1.c
eci-load1.c: In function `main':
eci-load1.c:415: warning: implicit declaration of function `basename'
eci-load1.c:415: warning: assignment makes pointer from integer without a cast
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o util.o util.c
gcc -lpthread eci-load1.o util.o -L/usr/local/lib -lpusb -o eci-load1
ld: cannot find -lpthread
gmake: *** [eci-load1] Error 1

iii/ then i edited the Makefile and changed the line 29 from LDLIBS += -L/usr/local/lib -lpusb to
LDLIBS += -L/usr/local/lib -L/usr/pkg/pthreads/lib -lpusb

Then i re-ran the following commands ...

bash-2.05b# gmake clean; rm *.o
rm -f eci-load1 eci-load2 pppoeci check-hdlc check-hdlc-bug *.o core
rm: *.o: No such file or directory

bash-2.05b# gmake eci-load1 eci-load2 pppoeci
gcc -ansi -pedantic -Wall -W -I/usr/local/include -MM check-hdlc-bug.c eci-eeprom.c eci-load2.c pppoeci.c util.c check-hdlc.c eci-load1.c gs7070.c semaphore.c > Makefile.dep
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o eci-load1.o eci-load1.c
eci-load1.c: In function `main':
eci-load1.c:415: warning: implicit declaration of function `basename'
eci-load1.c:415: warning: assignment makes pointer from integer without a cast
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o util.o util.c
gcc -lpthread eci-load1.o util.o -L/usr/local/lib -L/usr/pkg/pthreads/lib -lpusb -o eci-load1
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o eci-load2.o eci-load2.c
eci-load2.c: In function `sigtimeout':
eci-load2.c:503: warning: implicit declaration of function `kill'
eci-load2.c: In function `main':
eci-load2.c:518: warning: implicit declaration of function `basename'
eci-load2.c:518: warning: assignment makes pointer from integer without a cast
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o semaphore.o semaphore.c
semaphore.c: In function `semaphore_done':
semaphore.c:79: storage size of `un' isn't known
semaphore.c:79: warning: unused variable `un'
gmake: *** [semaphore.o] Error 1

iv / At this step i tried to change the line 28 of the Makefile (CFLAGS += -I/usr/local/include) but i did not succeed in compiling.
Then i edited semaphore.c file and commented the lines 24 and 32 so that the union semun can be declared.

then i re-ran
gmake clean; rm *.o
gmake eci-load1 eci-load2 pppoeci

then i succeeded in compiling the driver. See the logs

bash-2.05b# gmake clean; rm *.o
gcc -ansi -pedantic -Wall -W -I/usr/local/include -MM check-hdlc-bug.c eci-eeprom.c eci-load2.c pppoeci.c util.c check-hdlc.c eci-load1.c gs7070.c semaphore.c > Makefile.dep
rm -f eci-load1 eci-load2 pppoeci check-hdlc check-hdlc-bug *.o core
rm: *.o: No such file or directory
bash-2.05b# gmake eci-load1 eci-load2 pppoeci
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o eci-load1.o eci-load1.c
eci-load1.c: In function `main':
eci-load1.c:415: warning: implicit declaration of function `basename'
eci-load1.c:415: warning: assignment makes pointer from integer without a cast
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o util.o util.c
gcc -lpthread eci-load1.o util.o -L/usr/local/lib -L/usr/pkg/pthreads/lib -lpusb -o eci-load1
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o eci-load2.o eci-load2.c
eci-load2.c: In function `sigtimeout':
eci-load2.c:503: warning: implicit declaration of function `kill'
eci-load2.c: In function `main':
eci-load2.c:518: warning: implicit declaration of function `basename'
eci-load2.c:518: warning: assignment makes pointer from integer without a cast
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o semaphore.o semaphore.c
gcc -lpthread eci-load2.o util.o semaphore.o -L/usr/local/lib -L/usr/pkg/pthreads/lib -lpusb -o eci-load2
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o pppoeci.o pppoeci.c
pppoeci.c: In function `main':
pppoeci.c:1440: warning: implicit declaration of function `basename'
pppoeci.c:1440: warning: assignment makes pointer from integer without a cast
pppoeci.c:1719: warning: pointer targets in passing arg 5 of `getsockopt' differ in signedness
pppoeci.c:1741: warning: pointer targets in passing arg 5 of `getsockopt' differ in signedness
gcc -ansi -pedantic -Wall -W -I/usr/local/include -c -o gs7070.o gs7070.c
gcc -lpthread pppoeci.o gs7070.o util.o -L/usr/local/lib -L/usr/pkg/pthreads/lib -lpusb -o pppoeci

At this moment, i was happy thinking every would be fine .
Then i configured my ppp.conf and placed it in /etc/ppp

This command is running fine
./eci-load1 0x0547 0x2131 0x0915 0x8000 firmware00.bin

The second one did not finish its execution so i couldn't run the last one
./eci-load2 0x0915 0x8000 synch01.bin

I don't know what happened
The only thing i noticed it's that the green ligth of my modem stopped flashing but i didn't got the message saying eci-load2
successefuly
Re: Documentation EciAdsl / OpenBSD
Posted by ouatsefie,
Hi All
Did someone succed in running the driver on NetBSD 1.6.2 ?

After hard insvetigations i succed in compiling it and and running the two following commands correctly

./eci-load1 0x0547 0x2131 0x0915 0x8000 firmware00.bin

./eci-load2 0x0915 0x8000 synch01.bin

But the last one

ppp -background adsl did not succed
and i've in my /var/log/messages

the bloody messages

ppp[309]: tun0: Phase: Unknown protocol 0x0063
Child failed (errdead)


Can someone help me please ?


Re: Documentation EciAdsl / OpenBSD
Posted by ouatsefie,
I've succed the installation and run it on OpenBSD 3.5
But i need recompile my kernel before it works.
I was oblige to remove the DIAGNOSTIC option
in the file /sys/conf/GENERIC

I'm planning to find exactly whats wrong with NetBSD 1.6.2

So see you soon

Thanks FlashCode and his friends.
Re: Documentation EciAdsl / OpenBSD
Posted by alison,
any progress with installing on netbsd yet?
Back to news