{"id":17654264,"url":"https://github.com/pgaskin/nickeltc","last_synced_at":"2025-05-07T09:14:03.170Z","repository":{"id":41880121,"uuid":"260784839","full_name":"pgaskin/NickelTC","owner":"pgaskin","description":"A dockerized, deterministic, automated, fixed, and fully-relocatable build of @NiLuJe's toolchain for Kobo eReaders.","archived":false,"fork":false,"pushed_at":"2021-04-01T19:46:21.000Z","size":132,"stargazers_count":48,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T09:13:46.193Z","etag":null,"topics":["cross-compile","cross-toolchain","docker","gcc","qt","toolchain"],"latest_commit_sha":null,"homepage":"https://git.io/nickeltc","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgaskin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-02T22:15:52.000Z","updated_at":"2025-05-02T15:19:32.000Z","dependencies_parsed_at":"2022-08-29T16:30:35.659Z","dependency_job_id":null,"html_url":"https://github.com/pgaskin/NickelTC","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaskin%2FNickelTC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaskin%2FNickelTC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaskin%2FNickelTC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaskin%2FNickelTC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgaskin","download_url":"https://codeload.github.com/pgaskin/NickelTC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252847519,"owners_count":21813458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cross-compile","cross-toolchain","docker","gcc","qt","toolchain"],"created_at":"2024-10-23T12:09:15.770Z","updated_at":"2025-05-07T09:14:03.150Z","avatar_url":"https://github.com/pgaskin.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NickelTC\n\n[![Build](https://github.com/pgaskin/NickelTC/workflows/Build/badge.svg)](https://github.com/pgaskin/NickelTC/actions)\n\nA dockerized, deterministic, automated, fixed, and fully-relocatable build of [@NiLuJe](https://github.com/pgaskin/NiLuJe)'s [toolchain](http://trac.ak-team.com/trac/log/niluje/Configs/trunk/Kindle/Misc) for Kobo eReaders.\n\nThis succeeds the old docker image `docker.io/geek1011/kobo-toolchain` built from [kobo-plugin-experiments](https://github.com/pgaskin/kobo-plugin-experiments).\n\n### Features\n- [NickelTC-specific](./Dockerfile)\n  - Fully relocatable without any additional scripts.\n  - Fixed DESTDIR/prefix (NiLuJe needed to include the DESTDIR in the prefix path\n  due to limitations in the build scripts of some dependencies, see [pgaskin/kobo-plugin-experiments#2](https://github.com/pgaskin/kobo-plugin-experiments/issues/2))\n  - Docker image (but can still run directly on the host).\n  - Fully automated builds without dependencies on NiLuJe's home folder layout.\n  - Offline builds (TODO: almost).\n  - Versioned dependencies (i.e. you can rebuild old commits) (TODO: almost).\n  - Minimal dependencies.\n  - Detailed comments.\n- [NiLuJe's scripts](./niluje)\n  - Output is essentially identical to Kobo's toolchain and sysroot.\n  - Includes all kobo-specific patches.\n  - Built from scratch.\n  - Patches for running ancient build systems on newer distros.\n\n### Usage\nPrebuilt docker images are available [here](https://github.com/pgaskin/NickelTC/packages).\n\nTo run it directly from the docker image, you can create a wrapper like:\n\n```sh\n#!/bin/bash\nexec /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 \"$@\"\n```\n\nThen, you can symlink it to:\n\n```\narm-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\n```\n\nIf you don't want to use the docker image, you can extract and use the built\ntoolchain binaries just like any other. The only dependencies are glibc 2.4+,\npkg-config (optional), and the standard utilities.\n\nWhen using this toolchain, you'll probably want to include the following flags\nas a base if you aren't using qmake:\n\n```\nLDFLAGS = -Wl,-rpath,/usr/local/Kobo -Wl,-rpath,/usr/local/Qt-5.2.1-arm/lib\nCFLAGS  = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -mthumb\n```\n\n### Building\nSimply run `docker build .` in the root of this repository.\n\nFor offline builds, you'll need to mount a volume on `/tc/tc-cache` for the\ntoolchain deps. You'll also need to mount a volume on `TODO` for the sysroot\nones. The dependencies will be cached when you build the image, and then you'll\nbe able to build it offline.\n\nThe build is *(mostly)* deterministic and the docker build cache can be used\n*unless updating Kobo's forks*. **TODO: The sysroot build still uses unversioned\ncheckouts of Kobo's Qt forks, so those won't currently get updated, neither are\nthey deterministic.**\n\nTo extract the built TC from the image to run on a host directly, run\n`docker run --rm \u003cimage\u003e tar cvf -C /tc arm-nickel-linux-gnueabihf \u003e tc.tar`.\n\nNote that this cross-toolchain has only been tested on x86_64.\n\n### Development\nTo update @NiLuJe's TC scripts, update the revision in\n[update-niluje.sh](./update-niluje.sh) and run it. You will need to ensure the\nrelocation and DESTDIR/prefixes are up to date.\n\n### Versioning\nThe docker images will be tagged with a version in the form `\u003cmajor\u003e`,\n`\u003cmajor\u003e.\u003cminor\u003e`, `\u003cmajor\u003e.\u003cminor\u003e.\u003ccommit-sha\u003e.\u003cbuild-number\u003e` and will be\nreleased on a rolling basis.\n\nNote that there is not a `latest` tag, so you must choose a versioned one. In\ngeneral, you should choose a tag in the form `\u003cmajor\u003e.\u003cminor\u003e`, as the\n`\u003cmajor\u003e.\u003cminor\u003e.\u003ccommit-sha\u003e.\u003cbuild-number\u003e` ones may be deleted at any time,\nand the `\u003cmajor\u003e` ones may break your build at some point in the future.\n\nThere are also builds of each commit available in the `nickeltc-git` image, but\nthese should be only used temporarily or for testing. To reference the latest\ncommit on a branch, use the branch name as the tag.\n\nMajor versions will be incremented manually when:\n- The path to the toolchain or an important tool changes.\n- A change is made to the toolchain which reduces compatibility with Kobo devices.\n- Qt is updated to a new major version.\n- An important package is removed (see below).\n- The versioning scheme changes in a way where the `\u003cmajor\u003e` or the\n  `\u003cmajor\u003e.\u003cminor\u003e` tags have different meanings (it will always have a major\n  version, though).\n- There are other large breaking changes.\n\nMinor versions will be incremented manually when:\n- A significant improvement or bugfix applicable to the majority of builds is\n  made to the toolchain.\n- A minor package is removed (see below). If you depend on one of these\n  packages, you should install it explicitly.\n- Major changes are made to the Dockerfile.\n- A dependency's version is updated and requires new downloads.\n- There are enough cumulative small changes.\n- A change is made which may require build script changes.\n- It is necessary for another reason.\n\nThe commit sha is an arbitrary number of characters of the current git hash.\n\nThe build number is an arbitrary counter which will be increased for newer\nrebuilds of the commit.\n\nSome debian packages are included in the image on top of the base image with\nstandard utilities:\n- Packages (removal will result in a major version increase): `autoconf`\n  `autoconf-archive` `automake` `bash` `bison` `build-essential`\n  `busybox-static` `bsdutils` `bzip2` `coreutils` `curl` `diffutils` `file`\n  `findutils` `flex` `gawk` `git` `gperf` `grep` `gzip` `jq` `libtool` `make`\n  `nano` `openssh-client` `perl` `rsync` `sed` `unzip` `wget` `xz-utils` `zip`\n- Packages (removal will result in a minor version increase): `cmake`\n  `ninja-build` `python` `python3` `subversion`\n- Packages (may be removed without notice): `help2man` `libdbus-1-dev`\n  `libicu-dev` `libncurses-dev` `libpng-dev` `pigz` `python3-distutils`\n  `python3-pip` `tclsh` `texinfo` `zlib1g-dev`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgaskin%2Fnickeltc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgaskin%2Fnickeltc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgaskin%2Fnickeltc/lists"}