All Projects → pgaskin → NickelTC

pgaskin / NickelTC

Licence: other
A dockerized, deterministic, automated, fixed, and fully-relocatable build of @NiLuJe's toolchain for Kobo eReaders.

Programming Languages

Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to NickelTC

Polymcu
An open framework for micro-controller software
Stars: ✭ 173 (+810.53%)
Mutual labels:  toolchain, gcc
rebuild
Zero-dependency, reproducible build environments
Stars: ✭ 48 (+152.63%)
Mutual labels:  toolchain, gcc
homebrew-i386-elf-toolchain
Homebrew formulas for buildling a valid GCC toolchain for the i386-elf target.
Stars: ✭ 62 (+226.32%)
Mutual labels:  toolchain, gcc
Raspberry Pi Cross Compilers
Latest GCC Cross Compiler & Native (ARM & ARM64) CI generated precompiled standalone toolchains for all Raspberry Pis. 🍇
Stars: ✭ 261 (+1273.68%)
Mutual labels:  toolchain, gcc
Musl Cross Make
Simple makefile-based build for musl cross compiler
Stars: ✭ 646 (+3300%)
Mutual labels:  toolchain, gcc
ewxb-gcc-cross-compiler-builder
A script for building a full GCC + glibc toolchain from scratch (with Go support via gccgo) in multiple stages.
Stars: ✭ 18 (-5.26%)
Mutual labels:  gcc, cross-compile
bleeding-edge-toolchain
All-in-one script to build bleeding-edge-toolchain for ARM microcontrollers
Stars: ✭ 60 (+215.79%)
Mutual labels:  toolchain, gcc
Xchain
A cross compiler toolchain targeting macOS/iOS/etc.
Stars: ✭ 95 (+400%)
Mutual labels:  toolchain, gcc
xcross
"Zero Setup" cross-compilation for C/C++. Supports numerous architectures, build systems, C standard libraries, vcpkg, and Conan.
Stars: ✭ 29 (+52.63%)
Mutual labels:  toolchain, gcc
mTower
mTower is Trusted Execution Environment specially designed to be used on MicroController Units (MCUs) supporting ARM TrustZone technology (e.g., Cortex-M23/33/35p). mTower operates well under restrictions typical for such environment – small RAM and ROM sizes, relatively low performance, absence of rich OSes providing variety of services availab…
Stars: ✭ 34 (+78.95%)
Mutual labels:  gcc
mima
MIninmal MAchine Assembler and Simulator
Stars: ✭ 19 (+0%)
Mutual labels:  toolchain
Arduino-CMake-Toolchain
CMake toolchain for all Arduino compatible boards
Stars: ✭ 108 (+468.42%)
Mutual labels:  toolchain
libsrcnn
Super-Resolution imaging with Convolutional Neural Network library for G++, Non-OpenCV model.
Stars: ✭ 14 (-26.32%)
Mutual labels:  gcc
arm-none-eabi-gcc-xpack
A binary xPack with the Arm Embedded GCC toolchain
Stars: ✭ 85 (+347.37%)
Mutual labels:  gcc
minilib
A c standard system library with a focus on size, headeronly, "singlefile", intended for static linking. 187 Bytes for "Hello World"(regular elf), compiled with the standard gcc toolchain.
Stars: ✭ 29 (+52.63%)
Mutual labels:  gcc
bl iot sdk
BL602 SDK (Pine64 fork)
Stars: ✭ 115 (+505.26%)
Mutual labels:  toolchain
docker
Docker-related material to setup, configure and develop with micro-ROS hardware.
Stars: ✭ 32 (+68.42%)
Mutual labels:  toolchain
faucon
NVIDIA Falcon Microprocessor Suite
Stars: ✭ 28 (+47.37%)
Mutual labels:  toolchain
Apriori-and-Eclat-Frequent-Itemset-Mining
Implementation of the Apriori and Eclat algorithms, two of the best-known basic algorithms for mining frequent item sets in a set of transactions, implementation in Python.
Stars: ✭ 36 (+89.47%)
Mutual labels:  gcc
c-compiler-security
Security-related flags and options for C compilers
Stars: ✭ 125 (+557.89%)
Mutual labels:  gcc

NickelTC

Build

A dockerized, deterministic, automated, fixed, and fully-relocatable build of @NiLuJe's toolchain for Kobo eReaders.

This succeeds the old docker image docker.io/geek1011/kobo-toolchain built from kobo-plugin-experiments.

Features

  • NickelTC-specific
    • Fully relocatable without any additional scripts.
    • Fixed DESTDIR/prefix (NiLuJe needed to include the DESTDIR in the prefix path due to limitations in the build scripts of some dependencies, see pgaskin/kobo-plugin-experiments#2)
    • Docker image (but can still run directly on the host).
    • Fully automated builds without dependencies on NiLuJe's home folder layout.
    • Offline builds (TODO: almost).
    • Versioned dependencies (i.e. you can rebuild old commits) (TODO: almost).
    • Minimal dependencies.
    • Detailed comments.
  • NiLuJe's scripts
    • Output is essentially identical to Kobo's toolchain and sysroot.
    • Includes all kobo-specific patches.
    • Built from scratch.
    • Patches for running ancient build systems on newer distros.

Usage

Prebuilt docker images are available here.

To run it directly from the docker image, you can create a wrapper like:

#!/bin/bash
exec /usr/bin/docker run --volume="$PWD:$PWD" --user="$(id --user):$(id --group)" --workdir="$PWD" --env=HOME --entrypoint="$(basename "${BASH_SOURCE[0]}")" --rm -it ghcr.io/pgaskin/nickeltc:1 "$@"

Then, you can symlink it to:

arm-nickel-linux-gnueabihf-addr2line arm-nickel-linux-gnueabihf-ar arm-nickel-linux-gnueabihf-as arm-nickel-linux-gnueabihf-c++ arm-nickel-linux-gnueabihf-c++filt arm-nickel-linux-gnueabihf-cc arm-nickel-linux-gnueabihf-cpp arm-nickel-linux-gnueabihf-ct-ng.config arm-nickel-linux-gnueabihf-dwp arm-nickel-linux-gnueabihf-elfedit arm-nickel-linux-gnueabihf-g++ arm-nickel-linux-gnueabihf-gcc arm-nickel-linux-gnueabihf-gcc-4.9.4 arm-nickel-linux-gnueabihf-gcc-ar arm-nickel-linux-gnueabihf-gcc-nm arm-nickel-linux-gnueabihf-gcc-ranlib arm-nickel-linux-gnueabihf-gcov arm-nickel-linux-gnueabihf-gprof arm-nickel-linux-gnueabihf-ld arm-nickel-linux-gnueabihf-ld.bfd arm-nickel-linux-gnueabihf-ld.gold arm-nickel-linux-gnueabihf-ldd arm-nickel-linux-gnueabihf-nm arm-nickel-linux-gnueabihf-objcopy arm-nickel-linux-gnueabihf-objdump arm-nickel-linux-gnueabihf-pkg-config arm-nickel-linux-gnueabihf-populate arm-nickel-linux-gnueabihf-ranlib arm-nickel-linux-gnueabihf-readelf arm-nickel-linux-gnueabihf-size arm-nickel-linux-gnueabihf-strings arm-nickel-linux-gnueabihf-strip lconvert lrelease lupdate moc qdbuscpp2xml qdbusxml2cpp qdoc qmake qmlimportscanner qmlmin qt.conf rcc uic

If you don't want to use the docker image, you can extract and use the built toolchain binaries just like any other. The only dependencies are glibc 2.4+, pkg-config (optional), and the standard utilities.

When using this toolchain, you'll probably want to include the following flags as a base if you aren't using qmake:

LDFLAGS = -Wl,-rpath,/usr/local/Kobo -Wl,-rpath,/usr/local/Qt-5.2.1-arm/lib
CFLAGS  = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -mthumb

Building

Simply run docker build . in the root of this repository.

For offline builds, you'll need to mount a volume on /tc/tc-cache for the toolchain deps. You'll also need to mount a volume on TODO for the sysroot ones. The dependencies will be cached when you build the image, and then you'll be able to build it offline.

The build is (mostly) deterministic and the docker build cache can be used unless updating Kobo's forks. TODO: The sysroot build still uses unversioned checkouts of Kobo's Qt forks, so those won't currently get updated, neither are they deterministic.

To extract the built TC from the image to run on a host directly, run docker run --rm <image> tar cvf -C /tc arm-nickel-linux-gnueabihf > tc.tar.

Note that this cross-toolchain has only been tested on x86_64.

Development

To update @NiLuJe's TC scripts, update the revision in update-niluje.sh and run it. You will need to ensure the relocation and DESTDIR/prefixes are up to date.

Versioning

The docker images will be tagged with a version in the form <major>, <major>.<minor>, <major>.<minor>.<commit-sha>.<build-number> and will be released on a rolling basis.

Note that there is not a latest tag, so you must choose a versioned one. In general, you should choose a tag in the form <major>.<minor>, as the <major>.<minor>.<commit-sha>.<build-number> ones may be deleted at any time, and the <major> ones may break your build at some point in the future.

There are also builds of each commit available in the nickeltc-git image, but these should be only used temporarily or for testing. To reference the latest commit on a branch, use the branch name as the tag.

Major versions will be incremented manually when:

  • The path to the toolchain or an important tool changes.
  • A change is made to the toolchain which reduces compatibility with Kobo devices.
  • Qt is updated to a new major version.
  • An important package is removed (see below).
  • The versioning scheme changes in a way where the <major> or the <major>.<minor> tags have different meanings (it will always have a major version, though).
  • There are other large breaking changes.

Minor versions will be incremented manually when:

  • A significant improvement or bugfix applicable to the majority of builds is made to the toolchain.
  • A minor package is removed (see below). If you depend on one of these packages, you should install it explicitly.
  • Major changes are made to the Dockerfile.
  • A dependency's version is updated and requires new downloads.
  • There are enough cumulative small changes.
  • A change is made which may require build script changes.
  • It is necessary for another reason.

The commit sha is an arbitrary number of characters of the current git hash.

The build number is an arbitrary counter which will be increased for newer rebuilds of the commit.

Some debian packages are included in the image on top of the base image with standard utilities:

  • Packages (removal will result in a major version increase): autoconf autoconf-archive automake bash bison build-essential busybox-static bsdutils bzip2 coreutils curl diffutils file findutils flex gawk git gperf grep gzip jq libtool make nano openssh-client perl rsync sed unzip wget xz-utils zip
  • Packages (removal will result in a minor version increase): cmake ninja-build python python3 subversion
  • Packages (may be removed without notice): help2man libdbus-1-dev libicu-dev libncurses-dev libpng-dev pigz python3-distutils python3-pip tclsh texinfo zlib1g-dev
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].