Ankündigung

Einklappen
Keine Ankündigung bisher.

Zugriff mit NSLU2 + USB + eibd

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    #16
    Ganz großen Dank!!!

    Jetzt mache ich mich an linknx und dann an knxweb oder knx@home...

    Kommentar


      #17
      Habe doch noch etwas vergessen zu beantworten:
      Zitat von EIBman Beitrag anzeigen
      Okay, das hatte ich auch schon gelesen. Habe es nur der Vollständigkeit halber nochmal erwähnt. GIT habe ich auf dem NSLU2 noch nicht am laufen; jedenfalls schaffe ich es nicht, das bcusdk-Repository auszuchecken. Das wird aber an meiner Unkenntnis bzgl. GIT liegen.
      Sourceforge bittet eine Web-basierten GIT Browser. Dort ist neben jeden Commit ein Link zum Download eines Snapshots als Archiv. Von den configure muss man nur noch autoconf/automake aufrufen:
      Code:
      aclocal -I m4
      autoheader
      automake -a --foreign
      autoconf
      Im bcusdk trac wiki sollte das auch stehen.

      Kommentar


        #18
        Das "Dumme" ist nur, dass das aktuelle bcusdk pthsem 2.0.8 benötigt (--> Fehlermeldung von bcusdk-"./configure ...").

        Also habe ich auch ein pthsem-snapshot heruntergeladen und versucht zu kompilieren (mit "make" nach "autoreconf -i" & "./configure --prefix=/opt"):
        Code:
        make  all-recursive
        make[1]: Entering directory `/root/bcusdk'
        Making all in debian
        make[2]: Entering directory `/root/bcusdk/debian'
        make[2]: Nothing to be done for `all'.
        make[2]: Leaving directory `/root/bcusdk/debian'
        make[2]: Entering directory `/root/bcusdk'
        /bin/bash ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.  -I. -I.   -g -O2 -MT pth_mctx.lo -MD -MP -MF .deps/pth_mctx.Tpo -c -o pth_mctx.lo pth_mctx.c
         gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT pth_mctx.lo -MD -MP -MF .deps/pth_mctx.Tpo -c pth_mctx.c  -fPIC -DPIC -o .libs/pth_mctx.o
        pth_mctx.c:480:2: #error "Unsupported Linux (g)libc version and/or platform"
        make[2]: *** [pth_mctx.lo] Error 1
        make[2]: Leaving directory `/root/bcusdk'
        make[1]: *** [all-recursive] Error 1
        make[1]: Leaving directory `/root/bcusdk'
        make: *** [all] Error 2
        Installiert ist "libc6-unslung - 2.2.5-r13".

        Ich denke nicht, dass keine andere verfügbar ist für Unslung.

        Kommentar


          #19
          Zitat von EIBman Beitrag anzeigen
          Das "Dumme" ist nur, dass das aktuelle bcusdk pthsem 2.0.8 benötigt (--> Fehlermeldung von bcusdk-"./configure ...").

          Also habe ich auch ein pthsem-snapshot heruntergeladen und versucht zu kompilieren (mit "make" nach "autoreconf -i" & "./configure --prefix=/opt"):
          Installiert ist "libc6-unslung - 2.2.5-r13".

          Ich denke nicht, dass keine andere verfügbar ist für Unslung.
          Das Problem ist nicht die Umgebung, sondern das die automatische Erkennung damit nicht nicht ganz zurecht kommt.

          Tu bitte beim configure folgenden Parameter noch dazu:
          --with-mctx-dsp=ssjlj

          Kommentar


            #20
            nun kommt:

            Code:
            make  all-recursive
            make[1]: Entering directory `/root/pthsem'
            Making all in debian
            make[2]: Entering directory `/root/pthsem/debian'
            make[2]: Nothing to be done for `all'.
            make[2]: Leaving directory `/root/pthsem/debian'
            make[2]: Entering directory `/root/pthsem'
            /bin/bash ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.  -I. -I.   -g -O2 -MT pth_mctx.lo -MD -MP -MF .deps/pth_mctx.Tpo -c -o pth_mctx.lo pth_mctx.c
             gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT pth_mctx.lo -MD -MP -MF .deps/pth_mctx.Tpo -c pth_mctx.c  -fPIC -DPIC -o .libs/pth_mctx.o
            pth_mctx.c:246:2: #error "unknown mctx stack setup"
            pth_mctx.c:293:2: #error "unknown mctx stack setup"
            make[2]: *** [pth_mctx.lo] Error 1
            make[2]: Leaving directory `/root/pthsem'
            make[1]: *** [all-recursive] Error 1
            make[1]: Leaving directory `/root/pthsem'
            make: *** [all] Error 2
            Ist der gcc-Parameter "-I. -I. -I." nicht etwas merkwürdig?

            Kommentar


              #21
              Zitat von EIBman Beitrag anzeigen
              nun kommt:
              Ist der gcc-Parameter "-I. -I. -I." nicht etwas merkwürdig?
              Nein. Niemand sorgt sich darum, wenn im Include-Pfad etwas mehrfach aufgenommen wird.

              Das Problem ist, das noch eine Option fehlt. Am besten man setzt alle 3:
              --with-mctx-mth=sjlj --with-mctx-dsp=ssjlj --with-mctx-stk=sas

              Die Kombination sollte für alle aktuellen Linux Plattformen funktionieren.

              Für x86 mit glibc geht auch:
              --with-mctx-mth=mcsc --with-mctx-dsp=sc --with-mctx-stk=mc

              Kommentar


                #22
                Danke!

                pthsem-snapshot hat durchcompiliert und ich konnte es installieren, so dass es das ./configure vom bcusdk finden konnte.

                bcusdk-snapshot bricht wie folgt ab:
                Code:
                Making all in usb
                make[3]: Entering directory `/root/bcusdk/eibd/usb'
                g++ -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -fno-rtti -fno-exceptions -MT usb.o -MD -MP -MF .deps/usb.Tpo -c -o usb.o usb.cpp
                mv -f .deps/usb.Tpo .deps/usb.Po
                gcc -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -MT core.o -MD -MP -MF .deps/core.Tpo -c -o core.o core.c
                mv -f .deps/core.Tpo .deps/core.Po
                gcc -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -MT descriptor.o -MD -MP -MF .deps/descriptor.Tpo -c -o descriptor.o descriptor.c
                mv -f .deps/descriptor.Tpo .deps/descriptor.Po
                gcc -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -MT io.o -MD -MP -MF .deps/io.Tpo -c -o io.o io.c
                mv -f .deps/io.Tpo .deps/io.Po
                gcc -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -MT sync.o -MD -MP -MF .deps/sync.Tpo -c -o sync.o sync.c
                mv -f .deps/sync.Tpo .deps/sync.Po
                gcc -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -MT linux_usbfs.o -MD -MP -MF .deps/linux_usbfs.Tpo -c -o linux_usbfs.o linux_usbfs.c
                linux_usbfs.c: In function `find_monotonic_clock':
                linux_usbfs.c:209: error: `CLOCK_MONOTONIC' undeclared (first use in this function)
                linux_usbfs.c:209: error: (Each undeclared identifier is reported only once
                linux_usbfs.c:209: error: for each function it appears in.)
                make[3]: *** [linux_usbfs.o] Error 1
                make[3]: Leaving directory `/root/bcusdk/eibd/usb'
                make[2]: *** [all-recursive] Error 1
                make[2]: Leaving directory `/root/bcusdk/eibd'
                make[1]: *** [all-recursive] Error 1
                make[1]: Leaving directory `/root/bcusdk'
                make: *** [all] Error 2
                Sollte nach einem Google-Versuch in PREFIX/include/bits/time.h definiert sein. Die gibt es aber nicht. Die Unslung-Kompilierumgebung scheint irgendwie zu "stinken". Ich muss wohl noch mal googeln, um herauszubekommen, wie ich alle header-files auf den NSLU2 unter Unslung 6.1-beta bekomme... vielleicht gibt es ja ein entsprechendes libc6-dev - ipkg...

                Danke und Grüße,
                Stefan

                Kommentar


                  #23
                  Zitat von EIBman Beitrag anzeigen
                  Danke!

                  pthsem-snapshot hat durchcompiliert und ich konnte es installieren, so dass es das ./configure vom bcusdk finden konnte.

                  bcusdk-snapshot bricht wie folgt ab:
                  Code:
                  gcc -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -MT linux_usbfs.o -MD -MP -MF .deps/linux_usbfs.Tpo -c -o linux_usbfs.o linux_usbfs.c
                  linux_usbfs.c: In function `find_monotonic_clock':
                  linux_usbfs.c:209: error: `CLOCK_MONOTONIC' undeclared (first use in this function)
                  linux_usbfs.c:209: error: (Each undeclared identifier is reported only once
                  linux_usbfs.c:209: error: for each function it appears in.)
                  make[3]: *** [linux_usbfs.o] Error 1
                  make[3]: Leaving directory `/root/bcusdk/eibd/usb'
                  make[2]: *** [all-recursive] Error 1
                  make[2]: Leaving directory `/root/bcusdk/eibd'
                  make[1]: *** [all-recursive] Error 1
                  make[1]: Leaving directory `/root/bcusdk'
                  make: *** [all] Error 2
                  Sollte nach einem Google-Versuch in PREFIX/include/bits/time.h definiert sein. Die gibt es aber nicht. Die Unslung-Kompilierumgebung scheint irgendwie zu "stinken". Ich muss wohl noch mal googeln, um herauszubekommen, wie ich alle header-files auf den NSLU2 unter Unslung 6.1-beta bekomme... vielleicht gibt es ja ein entsprechendes libc6-dev - ipkg...
                  Workaround: Definier CLOCK_MONOTONIC als irgend eine Zahl.

                  Werde mir noch anschauen, ob ich da etwas den Sourcen machen kann.

                  Update: Fix im GIT master/pu vorhanden

                  Kommentar


                    #24
                    war 3 Tage weg, deshalb erst jetzt.

                    Den neuen Snapshot habe ich heruntergeladen und versucht zu kompilieren:
                    Code:
                    Making all in usb
                    make[3]: Entering directory `/root/bcusdk/eibd/usb'
                    g++ -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -fno-rtti -fno-exceptions -MT usb.o -MD -MP -MF .deps/usb.Tpo -c -o usb.o usb.cpp
                    mv -f .deps/usb.Tpo .deps/usb.Po
                    gcc -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -MT core.o -MD -MP -MF .deps/core.Tpo -c -o core.o core.c
                    mv -f .deps/core.Tpo .deps/core.Po
                    gcc -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -MT descriptor.o -MD -MP -MF .deps/descriptor.Tpo -c -o descriptor.o descriptor.c
                    mv -f .deps/descriptor.Tpo .deps/descriptor.Po
                    gcc -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -MT io.o -MD -MP -MF .deps/io.Tpo -c -o io.o io.c
                    mv -f .deps/io.Tpo .deps/io.Po
                    gcc -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -MT sync.o -MD -MP -MF .deps/sync.Tpo -c -o sync.o sync.c
                    mv -f .deps/sync.Tpo .deps/sync.Po
                    gcc -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -MT linux_usbfs.o -MD -MP -MF .deps/linux_usbfs.Tpo -c -o linux_usbfs.o linux_usbfs.c
                    mv -f .deps/linux_usbfs.Tpo .deps/linux_usbfs.Po
                    g++ -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -fno-rtti -fno-exceptions -MT dummy.o -MD -MP -MF .deps/dummy.Tpo -c -o dummy.o dummy.cpp
                    mv -f .deps/dummy.Tpo .deps/dummy.Po
                    rm -f libusb.a
                    ar cru libusb.a usb.o core.o descriptor.o io.o sync.o linux_usbfs.o dummy.o 
                    ranlib libusb.a
                    g++ -DHAVE_CONFIG_H -I. -I../..  -I../../eibd/libserver -I../../common -I/opt/include   -g -O2 -fno-rtti -fno-exceptions -MT findknxusb.o -MD -MP -MF .deps/findknxusb.Tpo -c -o findknxusb.o findknxusb.cpp
                    mv -f .deps/findknxusb.Tpo .deps/findknxusb.Po
                    g++  -g -O2 -fno-rtti -fno-exceptions   -o findknxusb findknxusb.o libusb.a -lpthsem 
                    /opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/../../../../armv5b-softfloat-linux/bin/ld: cannot find -lpthsem
                    collect2: ld returned 1 exit status
                    make[3]: *** [findknxusb] Error 1
                    make[3]: Leaving directory `/root/bcusdk/eibd/usb'
                    make[2]: *** [all-recursive] Error 1
                    make[2]: Leaving directory `/root/bcusdk/eibd'
                    make[1]: *** [all-recursive] Error 1
                    make[1]: Leaving directory `/root/bcusdk'
                    make: *** [all] Error 2
                    pthsem 2.0.8 wurde beim ./configure aber gefunden (in /opt).

                    Muss für pthsem noch eine Umgebungsvariable gesetzt sein?

                    Kommentar


                      #25
                      Zitat von EIBman Beitrag anzeigen
                      war 3 Tage weg, deshalb erst jetzt.

                      Den neuen Snapshot habe ich heruntergeladen und versucht zu kompilieren:
                      pthsem 2.0.8 wurde beim ./configure aber gefunden (in /opt).

                      Muss für pthsem noch eine Umgebungsvariable gesetzt sein?
                      Wurde der pth-Test abgedreht?
                      Ich würde gerne einmal config.log und config.status sehen, um mir die Einstellungen anzuschauen. Ansich sollte es ohne alle Tricks funktionieren.

                      CrossCompiling ? BCU SDK with eibd zeigt, wie man Suchpfad an configure übergeben kann.

                      Kommentar


                        #26
                        Hallo,

                        so, nach mehr als 1 Jahr bin ich zurück aus der Versenkung und kann Erfolge berichten:

                        1. Gentoo, wegen unkomplizierterer Buildumgebung auf dem NSLU2 installiert (mit "schlankem" Portage) --> wer möchte, dem kann ich gerne ein Image zur Verfügung stellen... hat ewig gedauert und da ich nur an Wochenenden Zeit dazu habe, ...
                        2. pthsem aus dem GIT-master-Branch auf dem NSLU2 kompiliert. Dabei gab es einige Steine aus dem Weg zu räumen:
                        2.a Analog zu dem Fix in pth die Compilerflags auf dem ARM - also {C,CXX,F,FC}FLAGS - um "-U_FORTIFY_SOURCE" erweitert, sonst steigen Programme, die pthsem nutzen, mit "longjmp causes uninitialized stack frame" aus (siehe Bug 350815 – dev-libs/pth with fortify source breaks gnupg (longjmp causes uninitialized stack frame) on arm/sh). Eine weitere Diskussion zu dem Thema bzw. Details gibt es auch unter https://bugs.launchpad.net/ubuntu/+s...g2/+bug/599862.
                        2.b entsprechendes ebuild geschrieben/korrigiert (dev-libs/pthsem-9999.ebuild):
                        Code:
                        EAPI=2
                        
                        inherit autotools git eutils flag-o-matic
                        
                        EGIT_REPO_URI="http://www.auto.tuwien.ac.at/~mkoegler/git/pthsem.git"
                        
                        DESCRIPTION="extended version of GNU pth (user mode multi threading library)"
                        HOMEPAGE="http://www.auto.tuwien.ac.at/~mkoegler/index.php/pth"
                        
                        LICENSE="LGPL"
                        SLOT="0"
                        KEYWORDS=""
                        IUSE=""
                        
                        DEPEND=""
                        RDEPEND=""
                        
                        src_configure() {
                            cd "${S}"
                            ( use arm || use sh ) && append-flags -U_FORTIFY_SOURCE
                            eautoreconf
                            econf || die "econf failed"
                        }
                        
                        src_compile() {
                            cd "${S}"
                            emake || die "make failed"
                        }
                        
                        src_install() {
                            emake DESTDIR="${D}" install || die "install failed"
                            dodoc ANNOUNCE AUTHORS ChangeLog NEWS README THANKS USERS
                        }
                        2.c pthsem installiert/kompiliert mit "emerge pthsem"
                        Anm.: für den NSLU2 muss das USE-Flag "arm" gesetzt sein
                        3. eibd aus dem GIT-bcusdk-master-Branch auf dem NSLU2 kompiliert. Dazu habe ich auch einige Steine aus dem Weg räumen müssen:
                        3.a Der pthsem-Test funktioniert auch auf meinem Gentoo-NSLU2 nicht. Ich verstehe das zwar nicht, aber man kann ihn ruhigen Gewissens abdrehen mit "./configure --without-pth-test ..."
                        3.b entsprechendes ebuild geschrieben/korrigiert (sys-apps/eibd-9999.ebuild):
                        Code:
                        # Copyright 1999-2007 Gentoo Foundation
                        # Distributed under the terms of the GNU General Public License v2
                        # $Header: $
                        
                        inherit eutils autotools git
                        
                        DESCRIPTION="Provides an interface to the EIB / KNX bus (latest git)"
                        HOMEPAGE="http://www.auto.tuwien.ac.at/~mkoegler/index.php/eibd"
                        
                        LICENSE="GPL-2"
                        SLOT="0"
                        KEYWORDS=""
                        IUSE="eibd ft12 pei16 tpuart pei16s tpuarts eibnetip eibnetiptunnel eibnetipserver
                        usb groupcache php python java tools"
                        
                        DEPEND="dev-libs/pthsem"
                        
                        EGIT_REPO_URI="http://www.auto.tuwien.ac.at/~mkoegler/git/bcusdk.git/"
                        EGIT_PROJECT="bcusdk"
                        
                        src_compile() {
                            eautoreconf || die "eautotooling failed"
                        
                            econf \
                                --enable-onlyeibd \
                                --without-pth-test \
                                $(use_enable ft12) \
                                $(use_enable pei16) \
                                $(use_enable tpuart) \
                                $(use_enable pei16s) \
                                $(use_enable tpuarts) \
                                $(use_enable eibnetip) \
                                $(use_enable eibnetiptunnel) \
                                $(use_enable eibnetipserver) \
                                $(use_enable usb) \
                                $(use_enable java) \
                                $(use_enable groupcache) || die "econf failed"
                        }
                        
                        src_install() {
                            emake DESTDIR="${D}" install || die "install bcusdk failed"
                        
                            if use python; then
                                einfo "Installing python module"
                                cd ${D}/contrib/swig
                                emake || die "could not compile python module"
                                emake install
                            fi
                                
                            einfo "Installing init-script and config"
                            cd ${S}/contrib/gentoo/etc/
                            exeinto /etc/init.d/
                            doexe init.d/eibd
                            
                            insinto /etc/conf.d/
                            doins conf.d/eibd
                        
                        }
                        3.c leider reicht mein Verständnis dafür nicht, aber man muss zum installieren noch die "Sandkiste" abstellen, sonst schlägt die Installation fehl...
                        3.d eibd installiert/kompiliert mit "FEATURES="-sandbox" emerge eibd"
                        Anm.: bei mir sind folgende USE-Flags gesetzt: eibd eibnetip eibnetiptunnel eibnetipserver usb groupcache python java tools
                        3.e noch schnell die /etc/conf.d/eibd angepasst: EIBD_OPTS="-d -R -D -S -T -i usb:"
                        3.f eibd gestartet: /etc/init.d/eibd start
                        3.g eibd auch beim nächsten Systemstart starten: rc-update add eibd default
                        4. probiert, ob eibd auch auf den Bus kommt: /usr/bin/groupswrite ip:localhost x/y/z 1, wobei x/y/z die Gruppenadresse einer x-beliebigen Lampe ist
                        5. Andere Programme wie z.B. LinKNX kompiliert/installiert (nicht Thema dieses Threads), ETS3 auf einem anderen PC, der im selben Netzt hängt zum Laufen gebracht, etc. ...

                        Grüße,
                        Stefan

                        Kommentar

                        Lädt...
                        X