Bibliothek für Fritz!Box kompilieren

lord-of-linux

Mitglied
Mitglied seit
3 Dez 2005
Beiträge
568
Punkte für Reaktionen
1
Punkte
0
Hallo,

könnte mir bitte jemand erklären, wie man grundsätzlich eine Bibliothek für die Fritz!Box kompiliert. Ich fände ein ausführlicheres Tutorial super, dass ich ggf. auch nebenher schreiben kann, während ich die ganze Sache durchführe. Also könnt ihr mir gerne kurz erklären, was ich machen muss und ich schreib es dann ausführlicher.

Also hier mal meine erste Frage:
ich habe die Sourcen einer Bibliothek und würde diese gerne übersetzen. Wie muss ich das ganze angehen.

Hier der Link zur Bibliothek: http://www2.sma.de/de/solartechnik/produkte/kommunikation/kommunikationsprodukte-und-software/software/yasdi/uebersicht-yasdi/index.html. Kann ich einfach das Makefile verwenden bzw. wie muss ich es umschreiben, dass ich für die FB kompilen kann?


EDIT: Nach einigem Spielen habe ich es geschaft, die Lib zu übersetzen. Allerdings hakt es bei der Übersetzung eines kleinen Testprogrammes. Folgender Fehler wird angezeigt:
Code:
/home/user/ds-mod/toolchain_ds-0.2.9/toolchain/build/gcc-3.3.2-glibc-2.3.2/mipsel-unknown-linux-gnu/lib/gcc-lib/mipsel-unknown-linux-gnu/3.3.2/../../../../mipsel-unknown-linux-gnu/bin/ld: cannot find -lyasdimaster
collect2: ld returned 1 exit status
make: *** [YasdiShellUI] Fehler 1

Wie kann ich den Fehler beseitigen?
 
Zuletzt bearbeitet:
1. Am Besten schaust du dir im openwrt mal die Makefiles an. Da stehen gut Beispiele wie das Configure aufgerufen wird.
2. Du benutzt den Kernel-Compiler. Für ein Binary solltest du den Target-Compiler benutzen.
3. Wenn du die Lib kompiliert hast, dann musst du sie mit "make DESTDIR="..../ds-0.2.9/toolchain/target" install in die Toolchain installieren.

MfG Oliver
 
OK, das werde ich morgen mal machen.
 
OK, ich versuche gerade doch noch ein paar Sachen. Allerdings kapiere ich nicht so wirklich, wie ich das Makefile ändern muss, damit der Toolchain-Compiler verwendet wird. Könnt ihr mir da bitte helfen.
 
So, habe nun einiges rumprobiert, aber ich bin nicht wirklich weitergekommen. Könnte mir vielleicht jemand mal ein bisschen erklären, ob die Warnings wichtig sind und wo die Fehler herkommen können? Danke schonmal. Hier noch der Output des make:
Code:
user@linux:~/sunny-log/yadis-source/projects/linuxlib$ make mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../libs/libyasdi.c -c -o ../../libs/libyasdi.o
In file included from ../../libs/libyasdi.c:19:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../libs/libyasdi.c:23:
../../core/driver_layer.h:70:7: warning: no newline at end of file
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../os/os_linux.c -c -o ../../os/os_linux.o
In file included from ../../os/os_linux.c:19:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
../../os/os_linux.c: In function 'os_thread_MutexDestroy':
../../os/os_linux.c:111: warning: unused parameter 'mutex'
../../os/os_linux.c: In function 'os_Debug':
../../os/os_linux.c:212: warning: pointer targets in passing argument 1 of 'ctime' differ in signedness
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../smalib/getini.c -c -o ../../smalib/getini.o
In file included from ../../smalib/getini.c:46:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
../../smalib/getini.c:1033:76: warning: no newline at end of file
../../smalib/getini.c: In function 'GetPrivateProfileLongHex':
../../smalib/getini.c:641: warning: 'pIniFile' may be used uninitialized in this function
../../smalib/getini.c: In function 'GetPrivateProfileLong':
../../smalib/getini.c:588: warning: 'pIniFile' may be used uninitialized in this function
../../smalib/getini.c: In function 'GetPrivateProfileHex':
../../smalib/getini.c:533: warning: 'pIniFile' may be used uninitialized in this function
../../smalib/getini.c: In function 'GetPrivateProfileInt_':
../../smalib/getini.c:478: warning: 'pIniFile' may be used uninitialized in this function
../../smalib/getini.c: In function 'GetPrivateProfileString_':
../../smalib/getini.c:335: warning: 'pIniFile' may be used uninitialized in this function
../../smalib/getini.c: In function 'GetPrivateProfileCheck':
../../smalib/getini.c:270: warning: 'pIniFile' may be used uninitialized in this function
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/driver_layer.c -c -o ../../core/driver_layer.o
In file included from ../../core/driver_layer.c:26:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../core/driver_layer.c:30:
../../include/device.h:24:7: warning: no newline at end of file
In file included from ../../core/driver_layer.c:32:
../../core/driver_layer.h:70:7: warning: no newline at end of file
../../core/driver_layer.c: In function 'TDriverLayer_UnregisterDevice':
../../core/driver_layer.c:211: warning: unused parameter 'dev'
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/netbuffer.c -c -o ../../core/netbuffer.o
In file included from ../../core/netbuffer.c:21:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/prot_layer.c -c -o ../../core/prot_layer.o
In file included from ../../core/prot_layer.c:25:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../core/prot_layer.c:28:
../../include/device.h:24:7: warning: no newline at end of file
In file included from ../../core/prot_layer.h:21,
                 from ../../core/prot_layer.c:33:
../../include/frame_listener.h:14:7: warning: extra tokens at end of #endif directive
../../include/frame_listener.h:14:8: warning: no newline at end of file
In file included from ../../core/prot_layer.c:34:
../../core/driver_layer.h:70:7: warning: no newline at end of file
../../core/prot_layer.c:78: warning: missing initializer
../../core/prot_layer.c:78: warning: (near initialization for 'ProtocolMap[0].protocol')
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../protocol/sunnynet.c -c -o ../../protocol/sunnynet.o
In file included from ../../protocol/sunnynet.c:19:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../protocol/sunnynet.c:22:
../../include/device.h:24:7: warning: no newline at end of file
In file included from ../../core/prot_layer.h:21,
                 from ../../protocol/sunnynet.c:25:
../../include/frame_listener.h:14:7: warning: extra tokens at end of #endif directive
../../include/frame_listener.h:14:8: warning: no newline at end of file
In file included from ../../core/prot_layer.h:22,
                 from ../../protocol/sunnynet.c:25:
../../include/device.h:24:7: warning: no newline at end of file
In file included from ../../protocol/sunnynet.c:26:
../../core/driver_layer.h:70:7: warning: no newline at end of file
../../protocol/sunnynet.c: In function 'TSunnyNet_Encapsulate':
../../protocol/sunnynet.c:147: warning: unused parameter 'prot'
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/smadata_layer.c -c -o ../../core/smadata_layer.o
In file included from ../../core/smadata_layer.c:19:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../core/smadata_layer.c:23:
../../include/device.h:24:7: warning: no newline at end of file
In file included from ../../core/prot_layer.h:21,
                 from ../../core/smadata_layer.c:26:
../../include/frame_listener.h:14:7: warning: extra tokens at end of #endif directive
../../include/frame_listener.h:14:8: warning: no newline at end of file
In file included from ../../core/smadata_layer.c:28:
../../core/driver_layer.h:70:7: warning: no newline at end of file
In file included from ../../core/smadata_layer.c:37:
../../core/fractionizer.h:36:7: warning: no newline at end of file
../../core/smadata_layer.c:52: warning: missing initializer
../../core/smadata_layer.c:52: warning: (near initialization for 'RxService.dwLastActivate')
../../core/smadata_layer.c:53: warning: missing initializer
../../core/smadata_layer.c:53: warning: (near initialization for 'TxService.dwLastActivate')
../../core/smadata_layer.c:55: warning: missing initializer
../../core/smadata_layer.c:55: warning: (near initialization for 'SMADataFrameListener.Node.prev')
../../core/smadata_layer.c:55: warning: missing initializer
../../core/smadata_layer.c:55: warning: (near initialization for 'SMADataFrameListener.OnPacketReceived')
../../core/smadata_layer.c: In function 'TSMAData_SendThreadExecute':
../../core/smadata_layer.c:372: warning: dereferencing type-punned pointer will break strict-aliasing rules
../../core/smadata_layer.c:366: warning: unused parameter 'ignore'
../../core/smadata_layer.c: In function 'TSMAData_ReceiverThreadExecute':
../../core/smadata_layer.c:407: warning: unused parameter 'ignore'
../../core/smadata_layer.c: In function 'TSMAData_OnFrameReceived':
../../core/smadata_layer.c:561: warning: dereferencing type-punned pointer will break strict-aliasing rules
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/scheduler.c -c -o ../../core/scheduler.o
In file included from ../../core/scheduler.c:22:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
../../core/scheduler.c: In function 'TSchedule_MainExecute':
../../core/scheduler.c:117: warning: unused parameter 'nix'
../../core/scheduler.c: In function 'TSchedule_RemTask':
../../core/scheduler.c:201: warning: unused parameter 'me'
../../core/scheduler.c: In function 'TTask_SetEntryPoint':
../../core/scheduler.c:388: warning: unused parameter 'ParamVal'
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/defractionizer.c -c -o ../../core/defractionizer.o
In file included from ../../core/defractionizer.c:21:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../core/defractionizer.c:23:
../../include/device.h:24:7: warning: no newline at end of file
../../core/defractionizer.c: In function 'TDeFrag_Defrag':
../../core/defractionizer.c:76: warning: unused parameter 'Flags'
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/router.c -c -o ../../core/router.o
In file included from ../../core/router.c:19:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../core/router.c:21:
../../core/driver_layer.h:70:7: warning: no newline at end of file
In file included from ../../core/router.c:25:
../../include/device.h:24:7: warning: no newline at end of file
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/timer.c -c -o ../../core/timer.o
In file included from ../../core/timer.c:2:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../protocol/smanet.c -c -o ../../protocol/smanet.o
In file included from ../../protocol/smanet.c:2:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../protocol/smanet.c:6:
../../include/device.h:24:7: warning: no newline at end of file
In file included from ../../core/prot_layer.h:21,
                 from ../../protocol/smanet.c:9:
../../include/frame_listener.h:14:7: warning: extra tokens at end of #endif directive
../../include/frame_listener.h:14:8: warning: no newline at end of file
In file included from ../../core/prot_layer.h:22,
                 from ../../protocol/smanet.c:9:
../../include/device.h:24:7: warning: no newline at end of file
In file included from ../../protocol/smanet.c:10:
../../core/driver_layer.h:70:7: warning: no newline at end of file
../../protocol/smanet.c: In function 'TSMANet_encapsulate':
../../protocol/smanet.c:296: warning: unused parameter 'prot'
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/tools.c -c -o ../../core/tools.o
In file included from ../../core/tools.c:1:
../../core/tools.h:6:7: warning: no newline at end of file
In file included from ../../include/debug.h:23,
                 from ../../core/tools.c:2:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/repository.c -c -o ../../core/repository.o
In file included from ../../core/repository.c:27:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
../../core/repository.c: In function 'TRepository_StoreChanList':
../../core/repository.c:277: warning: unused parameter 'me'
../../core/repository.c: In function 'TRepository_LoadChannelList':
../../core/repository.c:353: warning: ordered comparison of pointer with integer zero
../../core/repository.c:333: warning: unused parameter 'me'
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/fractionizer.c -c -o ../../core/fractionizer.o
In file included from ../../core/fractionizer.c:19:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../core/fractionizer.c:22:
../../include/device.h:24:7: warning: no newline at end of file
In file included from ../../core/fractionizer.c:27:
../../core/fractionizer.h:36:7: warning: no newline at end of file
In file included from ../../core/prot_layer.h:21,
                 from ../../core/fractionizer.c:29:
../../include/frame_listener.h:14:7: warning: extra tokens at end of #endif directive
../../include/frame_listener.h:14:8: warning: no newline at end of file
../../core/fractionizer.c: In function 'TFrag_SendPacketFractionized':
../../core/fractionizer.c:85: warning: unused parameter 'Flags'
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../core/statistic_writer.c -c -o ../../core/statistic_writer.o
In file included from ../../core/statistic_writer.c:21:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
../../core/statistic_writer.c:34: warning: missing initializer
../../core/statistic_writer.c:34: warning: (near initialization for 'OutputTask.dwLastActivate')
../../core/statistic_writer.c: In function 'TStatisticWriter_WriterTask':
../../core/statistic_writer.c:56: warning: unused parameter 'nix'
../../core/statistic_writer.c: In function 'TStatisticWriter_WriteAllStatistics':
../../core/statistic_writer.c:84: warning: format '%d' expects type 'int', but argument 3 has type 'DWORD'
../../core/statistic_writer.c:87: warning: format '%d' expects type 'int', but argument 3 has type 'DWORD'
../../core/statistic_writer.c:90: warning: format '%d' expects type 'int', but argument 3 has type 'DWORD'
mipsel-linux-gcc -g -fPIC -shared -nostartfiles \
                        -Wl,-soname,libyasdi.so.1 \
                        -ldl -lpthread -lc ../../os/os_linux.o ../../smalib/getini.o ../../core/driver_layer.o ../../core/netbuffer.o ../../core/prot_layer.o ../../protocol/sunnynet.o ../../core/smadata_layer.o ../../core/scheduler.o ../../core/defractionizer.o ../../core/router.o ../../core/timer.o ../../protocol/smanet.o ../../core/tools.o ../../core/repository.o ../../core/fractionizer.o ../../core/statistic_writer.o ../../libs/libyasdi.o \
                        -o libyasdi.so
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../libs/libyasdimaster.c -c -o ../../libs/libyasdimaster.o
In file included from ../../libs/libyasdimaster.c:26:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../libs/libyasdimaster.c:34:
../../core/driver_layer.h:70:7: warning: no newline at end of file
In file included from ../../core/prot_layer.h:21,
                 from ../../libs/libyasdimaster.c:35:
../../include/frame_listener.h:14:7: warning: extra tokens at end of #endif directive
../../include/frame_listener.h:14:8: warning: no newline at end of file
In file included from ../../core/prot_layer.h:22,
                 from ../../libs/libyasdimaster.c:35:
../../include/device.h:24:7: warning: no newline at end of file
In file included from ../../libs/libyasdimaster.c:39:
../../core/tools.h:6:7: warning: no newline at end of file
../../libs/libyasdimaster.c: In function 'GetDeviceHandles':
../../libs/libyasdimaster.c:55: warning: unused parameter 'iHandleCount'
../../libs/libyasdimaster.c: In function 'yasdiDoMasterCmdEx':
../../libs/libyasdimaster.c:846: warning: unused parameter 'param2'
../../libs/libyasdimaster.c:846: warning: unused parameter 'param3'
../../libs/libyasdimaster.c: In function 'GetChannelValue':
../../libs/libyasdimaster.c:385: warning: 'MasterCmd' may be used uninitialized in this function
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../master/main.c -c -o ../../master/main.o
In file included from ../../master/main.c:28:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../master/main.c:30:
../../master/stateconfig.h:30:7: warning: no newline at end of file
../../master/main.c: In function 'TSMADataMaster_OnTransfer':
../../master/main.c:424: warning: unused parameter 'req'
../../master/main.c: In function 'TSMADataMaster_GetStateText':
../../master/main.c:438: warning: unused parameter 'me'
../../master/main.c: In function 'TSMADataMaster_DoMasterCmds':
../../master/main.c:585: warning: dereferencing type-punned pointer will break strict-aliasing rules
../../master/main.c: In function 'TStateInit_GetStateIndex':
../../master/main.c:696: warning: unused parameter 'master'
../../master/main.c: In function 'TStateInit_OnIOReqPktRcv':
../../master/main.c:718: warning: unused parameter 'instance'
../../master/main.c:719: warning: unused parameter 'req'
../../master/main.c:720: warning: unused parameter 'SourceAddr'
../../master/main.c:721: warning: unused parameter 'Buffer'
../../master/main.c:722: warning: unused parameter 'BufferSize'
../../master/main.c:723: warning: unused parameter 'RxFlags'
../../master/main.c: In function 'TStateInit_OnIOReqEnd':
../../master/main.c:728: warning: unused parameter 'instance'
../../master/main.c:729: warning: unused parameter 'req'
../../master/main.c: In function 'TStateDetect_GetStateIndex':
../../master/main.c:773: warning: unused parameter 'master'
../../master/main.c: In function 'TStateDetect_OnIOReqPktRcv':
../../master/main.c:893: warning: unused parameter 'req'
../../master/main.c:897: warning: unused parameter 'RxFlags'
../../master/main.c: In function 'TStateDetect_OnIOReqEnd':
../../master/main.c:944: warning: unused parameter 'req'
../../master/main.c: In function 'TStateIdent_GetStateIndex':
../../master/main.c:1177: warning: unused parameter 'master'
../../master/main.c: In function 'TStateIdent_OnIOReqEnd':
../../master/main.c:1326: warning: unused parameter 'req'
../../master/main.c: In function 'TStateIdent_OnIOReqPktRcv':
../../master/main.c:1331: warning: unused parameter 'ctx'
../../master/main.c:1333: warning: unused parameter 'SourceAddr'
../../master/main.c:1336: warning: unused parameter 'RxFlags'
../../master/main.c: In function 'TStateController_GetStateIndex':
../../master/main.c:1379: warning: unused parameter 'master'
../../master/main.c: In function 'TStateController_IdleTask':
../../master/main.c:1443: warning: unused parameter 'nix'
../../master/main.c: In function 'TStateController_OnIOReqEnd':
../../master/main.c:1455: warning: unused parameter 'ctx'
../../master/main.c:1456: warning: unused parameter 'req'
../../master/main.c: In function 'TStateController_OnIOReqPktRcv':
../../master/main.c:1461: warning: unused parameter 'ctx'
../../master/main.c:1462: warning: unused parameter 'req'
../../master/main.c:1463: warning: unused parameter 'SourceAddr'
../../master/main.c:1464: warning: unused parameter 'Buffer'
../../master/main.c:1465: warning: unused parameter 'BufferSize'
../../master/main.c:1466: warning: unused parameter 'RxFlags'
../../master/main.c: In function 'TStateChanReader_GetStateIndex':
../../master/main.c:1497: warning: unused parameter 'master'
../../master/main.c: In function 'TStateChanReader_OnIOReqPktRcv':
../../master/main.c:1774: warning: unused parameter 'ctx'
../../master/main.c:1775: warning: unused parameter 'req'
../../master/main.c:1779: warning: unused parameter 'RxFlags'
../../master/main.c: In function 'TStateChanWriter_GetStateIndex':
../../master/main.c:1826: warning: unused parameter 'master'
../../master/main.c: In function 'TStateChanWriter_OnIOReqPktRcv':
../../master/main.c:1934: warning: unused parameter 'ctx'
../../master/main.c:1935: warning: unused parameter 'req'
../../master/main.c:1936: warning: unused parameter 'SourceAddr'
../../master/main.c:1937: warning: unused parameter 'Buffer'
../../master/main.c:1939: warning: unused parameter 'RxFlags'
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../master/objman.c -c -o ../../master/objman.o
In file included from ../../master/objman.c:19:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
../../master/objman.c:278:7: warning: no newline at end of file
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../master/netdevice.c -c -o ../../master/netdevice.o
In file included from ../../master/netdevice.c:20:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
../../master/netdevice.c: In function 'TNetDevice_IsSupportSubDevs':
../../master/netdevice.c:139: warning: unused parameter 'me'
../../master/netdevice.c: In function 'TNetDevice_FindChannelMask':
../../master/netdevice.c:145: warning: unused parameter 'me'
../../master/netdevice.c:145: warning: unused parameter 'Index'
../../master/netdevice.c:145: warning: unused parameter 'cType'
../../master/netdevice.c: In function 'TNetDevice_Save':
../../master/netdevice.c:150: warning: unused parameter 'me'
../../master/netdevice.c: In function 'TNetDevice_AddDev':
../../master/netdevice.c:186: warning: unused parameter 'me'
../../master/netdevice.c:186: warning: unused parameter 'dev'
../../master/netdevice.c: In function 'TNetDevice_RemDev':
../../master/netdevice.c:192: warning: unused parameter 'me'
../../master/netdevice.c:192: warning: unused parameter 'dev'
../../master/netdevice.c: In function 'TNetSBC_IsSupportSubDevs':
../../master/netdevice.c:388: warning: unused parameter 'me'
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../master/plant.c -c -o ../../master/plant.o
In file included from ../../master/plant.c:1:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../master/netchannel.c -c -o ../../master/netchannel.o
In file included from ../../master/netchannel.c:1:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../master/netchannel.c:5:
../../core/tools.h:6:7: warning: no newline at end of file
../../master/netchannel.c: In function 'TChannel_ScanUpdateValue':
../../master/netchannel.c:328: warning: ordered comparison of pointer with integer zero
../../master/netchannel.c: In function 'TChannel_GetValue':
../../master/netchannel.c:476: warning: 'dblValue' may be used uninitialized in this function
../../master/netchannel.c: In function 'TChannel_ScanUpdateValue':
../../master/netchannel.c:208: warning: 'ChanDataSize' may be used uninitialized in this function
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../master/stateconfig.c -c -o ../../master/stateconfig.o
In file included from ../../master/stateconfig.c:19:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../master/stateconfig.c:21:
../../master/stateconfig.h:30:7: warning: no newline at end of file
../../master/stateconfig.c: In function 'TStateConfig_GetStateIndex':
../../master/stateconfig.c:56: warning: unused parameter 'master'
../../master/stateconfig.c: In function 'TStateConfig_OnIOReqPktRcv':
../../master/stateconfig.c:187: warning: unused parameter 'ctx'
../../master/stateconfig.c:188: warning: unused parameter 'req'
../../master/stateconfig.c:192: warning: unused parameter 'RxFlags'
mipsel-linux-gcc -g -fPIC -shared -nostartfiles -L. \
                        -lyasdi ../../master/main.o ../../master/objman.o ../../master/netdevice.o ../../master/plant.o ../../master/netchannel.o ../../master/stateconfig.o ../../libs/libyasdimaster.o \
                        -o libyasdimaster.so
mipsel-linux-gcc -fPIC -I../../core -I../../include -I../../smalib -I../../os -I../../protocol -I../../master -I../../libs -Wall -g -Os -W -pipe -march=4kc -Wa,--trap ../../driver/serial_linux.c -c -o ../../driver/serial_linux.o
In file included from ../../driver/serial_linux.c:37:
../../include/os.h:32:7: warning: extra tokens at end of #else directive
In file included from ../../driver/serial_linux.c:41:
../../include/device.h:24:7: warning: no newline at end of file
In file included from ../../driver/serial_linux.c:43:
../../core/driver_layer.h:70:7: warning: no newline at end of file
../../driver/serial_linux.c: In function 'serial_wait_bus_free':
../../driver/serial_linux.c:236: error: label at end of compound statement
../../driver/serial_linux.c: In function 'serial_read':
../../driver/serial_linux.c:391: warning: comparison between signed and unsigned../../driver/serial_linux.c:391: warning: signed and unsigned type in conditional expression
make: *** [../../driver/serial_linux.o] Fehler 1
user@linux:~/sunny-log/yadis-source/projects/linuxlib$
 
Ist der target Compiler ein gcc-4.x? - Wenn ja, dann liegt der
Fehler und eventuell auch die vielen Warnings vielleicht daran,
dass die Compiler von Version zu Version strenger werden.
Code:
serial_linux.c:236: error: label at end of compound statement
Da hilft nur den Code in Zeile 236 zu lesen und zu verstehen; im diesem Fall reicht es vielleicht die Zeile einfach mit // wegzukommentieren; aber dann kommt bestimmt der nächste Fehler. (Ob der Lord einen Diener braucht? Ist nicht bös gemeint)

spblinux
 
Stimmt. Sowas hab ich schonmal gesehen.
Es reicht dann, wenn man ein "return;" hinter das Label schreibt.

MfG Oliver
 
OK, dass kann ich mal probieren. Vielleicht brauch ich ja wirklich ein bisschen Hilfe. Welche Version der Target-Compiler hat, weis ich nicht. Muss mal an meiner Maschine mit Toolchain schauen, die ist leider gerade aus. Ich habe dort den gerade aktuellen ds-mod (normal kein Labor).
 
So, nun habe ich die Biliothek erfolgreich kompilert. Danke nochmal an alle.
@olistudent: das mit dem Return hat geholfen.


So, nun versuch ich aber das compilen eines kleinen Programmes, das diese libs nutzt. Bekomme aber trotz dem make install in target-Verzeichnis den folgenden Fehler:
Code:
ds-mod/toolchain_ds-0.2.9/toolchain/build/gcc-4.1.0-uClibc-0.9.26/mipsel-linux-uclibc/bin-ccache/../lib/gcc/mipsel-linux-uclibc/4.1.0/../../../../mipsel-linux-uclibc/bin/ld: cannot find -lyasdimaster
collect2: ld returned 1 exit status

Muss ich noch eine Variable setzen, damit der an der richtigen Stelle nach den Libs sucht?
 
lord-of-linux schrieb:
Code:
cannot find -lyasdimaster
Muss ich noch eine Variable setzen, damit der an der richtigen Stelle nach den Libs sucht?
genau; zum Beispiel dort, wo -lyasdimaster im Makefile steht ergänzen
Code:
-lyasdimaster -L/pfad_zu_ordner_mit_libyasdimaster
der Pfad darf auch mit ./relativer_pfad geschrieben sein (oft hat es dafür die Variable LDFLAGS = -l... im Makefile).

Oder die libyadismaster*.so und/oder *.a Dateien in das Verzeichnis kopieren, in dem die uClibc ist; in deinem Fall wohl
Code:
ds-mod/toolchain_ds-0.2.9/toolchain/build/gcc-4.1.0-uClibc-0.9.26/mipsel-linux-uclibc/lib

Gruss, spblinux
 
OK, konnte es compilen und es läuft schon fast. Allerdings bekomme ich noch den Folgenden Fehler, der das nutzen natürlich unmöglich macht:
Code:
Repository: Main Program Path = '.'
Repository: Using configuration file './yasdi.ini'
TDriverLayer::Constructor(): Modul 'libyasdi_drv_serial.so' seems not to be a Yasdi Driver!
TSchedule::DoScheduling...
WARNING: No Yasdi-Drivers loadled!
TStateInit::OnEnter

Vielleicht kann sich das ja mal jemand anschauen und sieht den Fehler? Da das Compilen ohne Probleme lief, hab ich keine Ahnung, woran es liegen könnte.
 
/dev/ttyS0 durch /dev/tts/0 ersetzen in yasdi.ini :) (devfs statt statischer devices)

den seriellen Anschluss auf der Platine der box hast nach aussen geführt?

spblinux
 
Achso, liegt es daran. Ne, hab ich nicht gemacht und will ich auch nicht. Will einen USB-Seriell-Adapter nutzen. Hardware-Modifikation mag ich eigentlich nicht.

Dachte halt, das kann ich zum testen auch ohne seriellem Anschluß starten. Hab ich mit der Win lib auch ohne angeschloßenem Gerät gemacht, allerdings hat mein Win ja auch ne Serielle Schnittstelle installiert. Tja, dann muss ich mir morgen mal nen Adapter holen.
 
wäre auch kritisch geworden, weil die box auf dem Anschluss Systemmeldungen ausgibt, die man dann ausstellen müsste.

Gruss, spblinux
 
So, danke nochmal für eure bisherige Hilfe.

Ich habe heute den USB-Adapter erstanden und habe versucht nun das Programm mal zu starten. Dies hat auch funktioniert, allerdings bekomme ich den Fehler:
Code:
TDriverLayer::Constructor(): Modul 'libyasdi_drv_serial.so' seems not to be a Yasdi Driver!
TSchedule::DoScheduling...
ServiceThread starts....
WARNING: No Yasdi-Drivers loadled!
TStateInit::OnEnter
Kann jemand etwas aus diesem Fehler erkennen und mir vielleicht einen Tipp geben, wie ich dieses File FritzBox kompatibel compilen kann? Wäre echt eine große Hilfe.

PS: Ich lerne zur Zeit C und will mich wenn ich C einigermaßen verstehe, auch nochmal in das Cross-Compilen einlesen. Dann wird mir das ganze hoffentlich klarer.
 
Zuerst würde ich auf dem PC unter Linux mit
Code:
file libyasdi_drv_serial.so
prüfen, ob die library wirklich als mipsel binary kompiliert ist.

Dann würde ich auf der box mit ldd prüfen, ob 'libyasdi_drv_serial.so' noch von anderen Bibliotheken abhängt:
ldd (und libgcc_s.so) kann man sich mit wget http://spblinux.de/fbox/ldd (bzw. libgcc_s.so) holen (chmod +x ldd) und
Code:
cd /var
LD_LIBRARY_PATH=. ldd libyasdi_drv_serial.so
wenn alle Dateien in /var liegen.

Danach könnte man auf der box mit strace programmname nachschauen, wobei das Programm abbricht (ebenfalls unter spblinux.de/fbox zu finden).

spblinux
 
Hi,

habe die Sache mal ausprobiert. Hier mal die Ausgabe von file:
Code:
libyasdi_drv_serial.so: ELF 32-bit LSB shared object, MIPS, version 1 (SYSV), not stripped
Scheint doch soweit in Ordnung zu sein.


Und die Ausgabe von ldd sieht so aus:
Code:
./ldd libyasdi_drv_serial.so
        libgcc_s.so.1 => libgcc_s.so.1 (0x00000000)
        libc.so.0 => /lib/libc.so.0 (0x00000000)
        /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)
Sieht doch so auch OK aus.


Mit strace komme ich noch nicht klar. Vielleicht könntest du es ja kurz beschreiben. Ich habe es mit ./strace YasdiShellUI versucht, doch dies stürtzt ja nicht ab, sondern warnt nur, dass etwas nicht funktioniert hat. Und wenn ich wie oben beschriebe mit strace starte, dann bekomme ich nur noch die Konsolenangabe ausgeworfen.


EDIT:
Scheint doch zu funktionieren. War wohl die ini mit den Einstellungen fehlerhaft.
 
Zuletzt bearbeitet:
lord-of-linux schrieb:
file:
Code:
libyasdi_drv_serial.so: ELF 32-bit LSB shared object, MIPS, version 1 (SYSV), not stripped
Scheint doch soweit in Ordnung zu sein.
sieht schon gut aus, aber wenn du die lib noch strippst, dann wird sie kleiner *tipp*
 

Neueste Beiträge

Statistik des Forums

Themen
244,695
Beiträge
2,216,690
Mitglieder
371,314
Neuestes Mitglied
Gjorstn
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.