No description
elf
Find a file
Kirill Zhumarin 90a894d038
Some checks failed
CI / deploy (push) Failing after 16m48s
Experimental SG patterns
2026-11-25 18:05:31 +03:00
.github/workflows Create release.yml 2026-10-23 02:57:44 +03:00
cmake Fix elf linking 2026-11-24 22:18:58 +03:00
dietlibc Test elfstore files 2026-09-28 04:21:19 +03:00
docs Test elfstore files 2026-09-28 04:21:19 +03:00
include Refactor swi macroses 2026-09-16 01:58:13 +03:00
lib Migrate build system to cmake 2026-09-17 15:48:54 +03:00
libc++ Test elfstore files 2026-09-28 04:21:19 +03:00
libc++abi Migrate build system to cmake 2026-09-17 15:48:54 +03:00
libcrt Migrate build system to cmake 2026-09-17 15:48:54 +03:00
libcrt-static Migrate build system to cmake 2026-09-17 15:48:54 +03:00
libcrt_helper Test elfstore files 2026-09-28 04:21:19 +03:00
libft Test elfstore files 2026-09-28 04:21:19 +03:00
libft_server Test elfstore files 2026-09-28 04:21:19 +03:00
libgcc Migrate build system to cmake 2026-09-17 15:48:54 +03:00
libjpeg Test elfstore files 2026-09-28 04:21:19 +03:00
libm Test elfstore files 2026-09-28 04:21:19 +03:00
libpng Test elfstore files 2026-09-28 04:21:19 +03:00
libsigc++ Test elfstore files 2026-09-28 04:21:19 +03:00
libsupc++ Migrate build system to cmake 2026-09-17 15:48:54 +03:00
libuc++ Test elfstore files 2026-09-28 04:21:19 +03:00
libz Test elfstore files 2026-09-28 04:21:19 +03:00
swilib Experimental SG patterns 2026-11-25 18:05:31 +03:00
tests Migrate build system to cmake 2026-09-17 15:48:54 +03:00
tools some updates 2023-10-28 01:29:36 +03:00
.clangd mark @builtin 2024-06-08 12:26:38 +03:00
.editorconfig Build .epk for all libs 2026-09-19 20:26:26 +03:00
.gitignore Update .gitignore 2026-11-24 22:19:28 +03:00
.gitmodules move tests 2023-10-30 16:41:14 +02:00
CMakeLists.txt Migrate build system to cmake 2026-09-17 15:48:54 +03:00
config.cmake Build .epk for all libs 2026-09-19 20:26:26 +03:00
libs.md some updates 2023-10-28 01:29:36 +03:00
README.md Build .epk for all libs 2026-09-19 20:26:26 +03:00

Siemens ELF's SDK

This SDK is an attempt to unify tools and the environment for creating ELF's for Siemens mobile phones.

SDK mainly focused on ELFLoader 3.0+, shared libs and ARM GCC as the compiler.

Main features:

  • We use modern and open-source tools for building.
  • A lot of shared libs are available by default.
  • CMake-based build system.
  • Easy to use.
  • Compiler-neutral swilib. You can still use some parts of this SDK with IAR (coming soon).

Docs

SDK structure

sdk/
├── lib/         <-- compilled shared libs
│   ├── legacy/      <-- dir with legacy libs for some old ELF's
│   ├── ELKA/        <-- dir with libs for NewSGOLD phones: E71, EL71
│   ├── NSG/         <-- dir with libs for NewSGOLD phones: C81, S75, SL75, S68
│   ├── X75/         <-- dir with platform overrides for SGOLD X75 phones
│   ├── SG/          <-- dir with libs for SGOLD phones
│   ├── libXXX.so    <-- Platform-neutral libs for any phone
│   ├── libYYY.so
│   └── ...
├── swilib/      <-- functions library for IAR and GCC
│   ├── include/     <-- swilib headers
│   └── patterns/    <-- swilib patterns
├── include/     <-- common headers
├── libXXX/      <-- static or shared library
│   ├── src/         <-- library source
│   └── include/     <-- library headers
└── tools/       <-- tools and utils for the maintenance

Available shared libs

C core libs

Name Required Description
-lcrt Yes C runtime. This lib is required for all executables (.elf).
-lcrt_helper Yes Helper for C runtime. This lib required for both .elf and .so
-lgcc Yes GCC helper library which is required for any code compiled by GCC.
-lc No Lightweight libc (dietlibc) ported for Siemens.
-lm No Lightweight libm (openlibm). Required when you use <math.h> functions.

C++11 core libs

Name Required Description
-lc++ Yes LLVM libcxxx library for C++11 support.
-lsupc++ Yes C++ ABI for gcc.

C++98 core libs (legacy)

Name Required Description
-luc++ Yes uClibc++ library for C++98 support.
-lsupc++ Yes ABI for gcc.

Data processing libs

Name Required Description
-ljpeg No Library for encoding and decoding JPEG.
-lpng No Library for encoding and decoding PNG.
-lz No Library for gzip/inflate/deflate compression (zlib).

Advanced options for CMake

Properties:

Option Description Default
TOOLCHAIN GNU Arm Embedded toolchain prefix. arm-none-eabi
SOURCE_ENCODING Source encoding. Use native to disable conversion. utf-8
OUTPUT_ENCODING Target string literal encoding. cp1251
CXX_TYPE C++ library: libcxx, uclibc++, or none. libcxx

Important: set these properties before config.cmake inclusion.

Set them on the CMake command line when configuring the project:

cmake -B build -DCXX_TYPE=uclibc++ -DSOURCE_ENCODING=native

Functions:

Function Description
target_sdk_setup(target, platform) Configure a target for Siemens ELF. Supported platforms: ELKA, NSG, X75, and SG.
target_sdk_set_lib_name(target, name [version [symlink_name]]) Set the output name and SONAME of a shared library. With a version, also create an unversioned or explicitly named symlink.
add_executable(example main.c)
target_sdk_setup(example NSG)

add_library(example_lib SHARED lib.c)
target_sdk_setup(example_lib NSG)
target_sdk_set_lib_name(example_lib example 1.0)

See Building EPK packages for package metadata, payload, version, and platform handling.

AI-assisted contributions

We are not against AI. We are against vibe coding, AI slop, and attempts to offload engineering work to a model. This project prioritizes quality, not development speed or results at any cost.

  1. Do not use AI-generated text in human-to-human communication.

    Write comments, discussions, PR descriptions, and responses to reviewers yourself.

  2. Do not let AI submit PRs or commits.

    The author must always be a human who has personally reviewed the changes and takes responsibility for them.

  3. Do not submit code primarily designed or written by AI.

    Architecture, algorithms, code organization, and the final implementation must be decided by a human. AI may only be used as an auxiliary tool.

  4. You must understand all the code you submit.

    You must be able to explain every change, justify your decisions, and fix any problems yourself. If you do not understand the code, open a feature request instead of a PR.

  5. Code must be simple, clear, and tested.

    Follow KISS, the project's coding style, and its existing architecture. Do not introduce unnecessary abstractions, dependencies, or untested changes.

AI slop PRs will be closed without review.