GBD Releases and Directions - andy3471/GBD GitHub Wiki

The Good, the Bad and the Ugly

GBD is released under the MIT license, but is only partially open sourced. For the foreseeable future, the GBD server and library will remain as closed-source distributions. On the other hand, the GBD client program is meant to serve as a PCM plugin for audio players or the OS sound system. To facilitate integration with an arbitrary audio player or some other OS (independent) platform, this part of the GBD framework is open-sourced. See section Notes for PCM Plugin Writers.

ABI Compatibility: Raspbian and GBD Releases

The GBD server executable (gbdserver) and GBD DSP library (gbd.so) for the current GBD release have been compiled for the official 32-bit (ARMv7-compatible) Raspbian 9.4 Stretch:

pi@raspberrypi:~ $ lsb_release -a 2>/dev/null
Distributor ID:   Raspbian
Description:      Raspbian GNU/Linux 9.4 (stretch)
Release:          9.4
Codename:         stretch

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.14.34-v7+ #1110 SMP [...] armv7l GNU/Linux

In particular:

  • The GBD server executable has dynamic linking dependencies on libc.so and libdl.so:

    $ readelf -d gbdserver | grep NEEDED
    0x00000001 (NEEDED)                     Shared library: [libdl.so.2]
    0x00000001 (NEEDED)                     Shared library: [libc.so.6]
    
  • The GBD library binary has dynamic linking dependencies on libc.so, librt.so and libm.so:

    $ readelf -d gbd.so | grep NEEDED
     0x00000001 (NEEDED)                     Shared library: [libm.so.6]
     0x00000001 (NEEDED)                     Shared library: [librt.so.1]
     0x00000001 (NEEDED)                     Shared library: [libc.so.6]
    
  • These binaries were compiled with the default Raspbian gcc(1) switches:

    $ gcc -v
    ...
    Target: arm-linux-gnueabihf
    Configured with: [...] 
    --with-pkgversion='Raspbian 6.3.0-18+rpi1+deb9u1'  
    [...]
    --with-arch=armv6 --with-fpu=vfp --with-float=hard 
    [...]
    Thread model: posix
    gcc version 6.3.0 20170516 (Raspbian 6.3.0-18+rpi1+deb9u1) 
    

    In other words:

    -march=armv6  -mfloat-abi=hard  -mfpu=vfp  -mtls-dialect=gnu
    

    and

    $ readelf -A gbd.so | grep Tag_ABI_VFP_args
    Tag_ABI_VFP_args: VFP registers
    

As noted, the build platform was the RPi model 3B. Although the underlying SoC/CPU for the RPi 3 is Cortex-A53 which is ARMv8 64bit, userland for the official Raspbian release is still 32-bit, e.g.:

pi@raspberrypi:~ $ uname -m
armv7l

pi@raspberrypi:~ $ file /lib/arm-linux-gnueabihf/libc-2.24.so
/lib/arm-linux-gnueabihf/libc-2.24.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV) ... 
for GNU/Linux 3.2.0

In theory, these ARMv7-compatible GBD binaries should also execute on RPi 2 running Stretch (not tested). The system specs for the RPi model 3B used were:

  • BCM283x SoC:

    From /proc/cpuinfo:

    model name	: ARMv7 Processor rev 4 (v7l)
    BogoMIPS	: 38.40
    Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
    CPU implementer	: 0x41
    CPU architecture: 7
    
    Hardware	: BCM2835
    Revision	: a22082
    

    NOTE: As documented here:

    As of the 4.9 kernel, all Pis report BCM2835, even those with 
    BCM2836 and BCM2837 processors. You should not use this string to
    detect the processor.
    
  • RPi Board Revision:

    • In brief: 0xa22082 (see /proc/cpuinfo output above) means RPi Model 3B, 1 GB, and Embest (Manufacturer)

    • In detail: 0xa22082 translates to the 101000100010000010000010 binary encoding for the New-style revision codes, i.e. uuuuuuuuFMMMCCCCPPPPTTTTTTTTRRRR where:

      F: 1               (New Style Revision)
      MMM: 010           (1GB)
      CCCC: 0010         (Embest Manufacturer)
      PPPP: 0010         (Processor BCM2837)
      TTTTTTTT: 00001000 (Type 3B)
      RRRR: 0010         (Revision)
      

    See link for more info.