Sign inSign up

dasunnimantha/webos-sdk

By dasunnimantha

•Updated 7 months ago

Image
0

260

dasunnimantha/webos-sdk repository overview

⁠webOS SDK Build Environment

Pre-configured Docker image for building native C++ applications targeting LG webOS TVs. Based on Ubuntu 22.04 (Jammy) with GCC 11 for ABI compatibility with webOS TV system libraries.

⁠Supported Architectures

PlatformTagUse Case
linux/arm/v7armhfwebOS TVs with 32-bit ARM userspace
linux/arm64aarch64Newer webOS TVs with 64-bit ARM

⁠What's Included

  • Compilers: GCC 11 / G++ 11 (provides GLIBCXX up to 3.4.29, matching webOS TV)
  • Build tools: CMake, Make, pkg-config, patchelf
  • SDL2: SDL2, SDL2_image, SDL2_ttf development libraries
  • Networking: libcurl (OpenSSL backend)
  • Graphics: OpenGL ES 2.0 (libgles2-mesa-dev)
  • Starfish stub: libplayerAPIs.so stub for linking against the Starfish Media Pipeline (real library lives on the TV)

⁠Quick Start

⁠Build for armhf (32-bit ARM TVs)
# Set up QEMU if cross-compiling from x86_64
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

# Build your project
docker run --rm --platform linux/arm/v7 \
  -v "$(pwd):/src" -w /src \
  dasunnimantha/webos-sdk:latest bash -c '
    mkdir -p build && cd build
    cmake .. -DCMAKE_BUILD_TYPE=Release -DWEBOS_BUILD=ON \
      -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
    make -j$(nproc)

    # Patch interpreter for webOS TV
    patchelf --set-interpreter /lib/ld-linux.so.3 your-app
    patchelf --replace-needed ld-linux-armhf.so.3 ld-linux.so.3 your-app || true
  '
⁠Build for aarch64 (64-bit ARM TVs)
docker run --rm --platform linux/arm64 \
  -v "$(pwd):/src" -w /src \
  dasunnimantha/webos-sdk:latest bash -c '
    mkdir -p build && cd build
    cmake .. -DCMAKE_BUILD_TYPE=Release -DWEBOS_BUILD=ON \
      -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
    make -j$(nproc)

    patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 your-app || true
  '

⁠GitHub Actions Example

- name: Set up QEMU
  uses: docker/setup-qemu-action@v3
  with:
    platforms: arm

- name: Build in webOS SDK container
  run: |
    docker run --rm --platform linux/arm/v7 \
      -v "${{ github.workspace }}:/src" -w /src \
      dasunnimantha/webos-sdk:latest bash -c '
        mkdir -p build && cd build
        cmake .. -DCMAKE_BUILD_TYPE=Release -DWEBOS_BUILD=ON \
          -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
        make -j$(nproc)
        patchelf --set-interpreter /lib/ld-linux.so.3 your-app
      '

⁠Why GCC 11 on Ubuntu Jammy?

webOS TVs ship with glibc 2.35 and GLIBCXX up to 3.4.29. Building with newer compilers or distros produces binaries that depend on symbols not available on the TV. Ubuntu 22.04 (Jammy) with GCC 11 matches these constraints exactly.

For extra safety, add -static-libstdc++ -static-libgcc to your linker flags to statically link the C++ runtime, eliminating any dependency on the TV's libstdc++ version.

⁠Starfish Media Pipeline

The image includes a stub libplayerAPIs.so so your code can link against the Starfish Media Pipeline API at compile time. The real shared library is present on the TV at runtime. Include the StarfishMediaAPIs.h header in your project and link with -lplayerAPIs.

⁠Tags

  • latest — most recent build
  • 1.0.0 — initial release

⁠Source

GitHub Repository⁠

Tag summary

Content type

Image

Digest

sha256:9c277c69a…

Size

194.8 MB

Last updated

7 months ago

docker pull dasunnimantha/webos-sdk