# CCR1xxx with containers

**URL:** <https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851>\
**Category:** Containers\
**Created:** [February 21, 2024, 11:46am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851 "2024-02-21T11:46:26Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![kevinds](https://forum.mikrotik.com/letter_avatar/kevinds/32/6_449c533f586939b6e5f246632a46421f.png) [@kevinds](https://forum.mikrotik.com/u/kevinds)\
**Post date:** [February 23, 2024, 2:17am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/21 "2024-02-23T02:17:22Z")

</div>

> [@](#):
>
> Why is MT to blame for not providing the last-0.1% bit when none of the rest exists?

Without it there is no reason to put in the effort. It is a waste of time knowing the end goal simply isn’t possible regardless of the work put in.

But yes, they stopped making the CPUs last year, it is now a dead architecture.

---

<div class="post-metadata">

**Author:** ![tangent](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/tangent/32/55521_2.png) [@tangent](https://forum.mikrotik.com/u/tangent)\
**Post date:** [February 23, 2024, 2:43am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/22 "2024-02-23T02:43:00Z")

</div>

> [@](#):
>
> Without it there is no reason to put in the effort.

The reasons are independent of the existence of a TILE build of container.npk.

I predict that if you take your gadfly routine to the QEMU and Alpine project fora and try to get them to include TILE support, you’ll get zero traction, regardless of whether you promise them a container.npk port if they do their part.

MikroTik could call your bluff _today_, **_right now_** , and it would still get you nowhere.

---

<div class="post-metadata">

**Author:** ![kevinds](https://forum.mikrotik.com/letter_avatar/kevinds/32/6_449c533f586939b6e5f246632a46421f.png) [@kevinds](https://forum.mikrotik.com/u/kevinds)\
**Post date:** [February 23, 2024, 3:56am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/23 "2024-02-23T03:56:37Z")

</div>

> [@](#):
>
> MikroTik could call your bluff _today_, **_right now_** , and it would still get you nowhere.

Maybe.. Being that it would be my end-goal, I wouldn’t start unless I knew it would happen. Because I predict it will never happen, there is no reason to start the project.

As I said in the beginning.. Chicken-Egg…

Do this, this, this, and then this, after all that, _maybe_ Miktotik will provide the package.. I estimate a thousand hours to get started and another 1-2 thousand on bugs, for a maybe, so no, not happening. That is a lot of work when I realistically, no positive outcome.

The sad part is, I suspect Mikrotik has most of the needed work, that they already have the toolchains are are using them to compile their software.

I can list a few of reasons why it would be a futile project, not seeing many good reasons to begin.

---

<div class="post-metadata">

**Author:** ![tangent](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/tangent/32/55521_2.png) [@tangent](https://forum.mikrotik.com/u/tangent)\
**Post date:** [February 23, 2024, 5:04am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/24 "2024-02-23T05:04:15Z")

</div>

> [@](#):
>
> As I said in the beginning.. Chicken-Egg…

I don’t buy that analogy. If that were the case, no one could ever bootstrap a new CPU architecture.

Bootstrapping proceeds in small steps. It’s a lot of work — enough that there have been [entire companies](https://en.wikipedia.org/wiki/Cygnus_Solutions) founded on doing that type of work — but there is never a point where you’re in a true chicken-and-egg situation.

MT could doubtless produce an untested build of container.npk for TILE within an hour of deciding to do so; there is no “egg” prerequisite here. While it is true that without the build toolchain, you wouldn’t know if that package was of any practical use, there’s a reasonable chance that it works without change given that the other platforms are well-tested by this point. If you were to couch your request in terms of an “if it breaks you get to keep both pieces” warranty, for alpha testing only, MT support might well be willing to provide it.

But if they did, what will you have accomplished in winning that gift?

> I suspect Mikrotik has most of the needed work, that they already have the toolchains are are using them to compile their software.

The cross-compilers are a small fraction of the needed work.

First let’s dispense with the possibility that the requisite C cross-compiler toolchains are proprietary builds provided by Tilera or one of its successors, thus unable to be shared. If that’s the case, this project is dead in the water from “go.”

If it is instead possible to use something based on [Clang for Tilera](https://github.com/tilera/llvm) — last changed 11 years ago, you will note! — then any sufficiently competent software developer could build those tools today, right now, without any help from MT’s development or support departments. The how-to is [documented](https://llvm.org/docs/HowToCrossCompileLLVM.html).

The next step is to revive the [dead tilegx target](https://wiki.qemu.org/Documentation/Platforms/TileGX) in QEMU. I have since found out that it was indeed committed, but was [removed in 2021](https://github.com/qemu/qemu/commit/821e7ed167f11f482d2d1a8eaf114a667295a581). Rolling back to [that version’s parent](https://github.com/qemu/qemu/commit/5c6295a45b4fceac913c11abc62488c49c02b9fd) and using the given configure command, I get a bogus error about an unknown target name. Attempting to roll back even further fails due to a dependency on Python 2, which I no longer have here. I could spin up a VM based on an obsolete version of Linux to chase this further, but I can’t be bothered. It’s your itch; you pursue it.

Should you then solve all the tilegx target QEMU build problems and get it working, you’re still not done, because you have reached the point where “most of the needed work” does in fact occur: you must port a sufficiently featureful Linux distribution to this emulated TILE platform, without which you cannot build any OCI images. (Again, no images, no running containers.) I suggested Alpine above, being small and popular for the purpose, but it doesn’t much matter which one you pick because [according to Distrowatch](https://distrowatch.com/search.php), at least, there are **zero** existing Linux distros for the tilegx architecture. Your only choice is which one you want to port from scratch, not which one to reuse as your pre-made base.

That brings us to the binfmt piece, which I believe you can temporarily skip by using [Buildah](https://buildah.io/) instead of BuildKit as it allows you to manually force all commands through your local QEMU tilegx emulator. That lets you run the “native” tilegx builds of Clang under QEMU to build your first tilegx binaries.

It is possible to build **and test** all this without any help from MT on your desktop/laptop computer platform of choice.

And then, running software in hand, you would finally have a defensible reason to expect MT to test your first TILE container against their internal container.npk builds and work out any remaining bugs.

---

<div class="post-metadata">

**Author:** ![kevinds](https://forum.mikrotik.com/letter_avatar/kevinds/32/6_449c533f586939b6e5f246632a46421f.png) [@kevinds](https://forum.mikrotik.com/u/kevinds)\
**Post date:** [February 23, 2024, 6:35am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/25 "2024-02-23T06:35:11Z")

</div>

> [@](#):
>
> It is possible to build **and test** all this without any help from MT on your desktop/laptop computer platform of choice.

I know.. And going back a few years in the Linux kernel, to when the decision was made to remove it, the kernel supported Tile. 3. somthing. It was pulled because nobody answered that they were still using it.. I have no idea if it would be put back in if people actually started to.. I doubt it, but it is possible I suppose..

I looked into this before v7 was released, when containers were ‘still on the table’. Wanted to be ready for when the feature was available.

The only reason I would go down that path again, is to run containers on my CCR1xxx routers.. I don’t care if Company X or Y doesn’t want to include the tools. The only platform I use containers on is RouterOS, trying to run containers on ‘normal’ systems annoys me, a lot.

Help from Mikrotik was never needed, just having the option was.

> [@](#):
>
> And then, running software in hand, you would finally have a defensible reason to expect MT

You were sounding good up until that point.. I expect nothing from MT, I don’t even expect them to fix their bugs because they don’t. It is always a pleasant surprise when they do, but no, I don’t expect it. One would be a fool to.

Half-baked is how I describe RouterOS.. There is a good start to many features, but so many just fall short of actually being done well, you get used to the bugs and just try and work around them. v7 helped a few compared to v6, but it is largely still the same.

Part of the reason I am looking to get off RouterOS.. The price to performance is the best of any router I’ve dealt with, along with updates, but there comes a point when I ask 'why doesn’t this work properly?" and “Why can’t I do this?” (not talking about containers) and I’ve start to look for another vendor..

---

<div class="post-metadata">

**Author:** ![normis](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/normis/32/8_2.png) [@normis](https://forum.mikrotik.com/u/normis)\
**Post date:** [February 23, 2024, 6:59am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/26 "2024-02-23T06:59:57Z")

</div>

What will you run in the containers on the TILE routers? Is there software that would be compatible?

---

<div class="post-metadata">

**Author:** ![tangent](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/tangent/32/55521_2.png) [@tangent](https://forum.mikrotik.com/u/tangent)\
**Post date:** [February 23, 2024, 7:04am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/27 "2024-02-23T07:04:32Z")

</div>

If the tools described above existed, you could cross-compile anything. Your own PiHole example, for starters.

In case anyone is confused on this point, I’m in support of this idea in principle. My primary question is simply, who’s going to do all the work needed to make it happen, given all of what has to be done to support it? Even if we can assume the QEMU, binfmt, and Clang pieces can be ressurrected without a huge amount of effort, I don’t think it’s fair to expect MT development resources to be spent on an Alpine Linux port to TILE, merely to serve as a build base.

---

<div class="post-metadata">

**Author:** ![normis](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/normis/32/8_2.png) [@normis](https://forum.mikrotik.com/u/normis)\
**Post date:** [February 23, 2024, 7:19am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/28 "2024-02-23T07:19:16Z")

</div>

AFAIK such tools does not exist, so there is no need for container on TILE. Even if there would be a container package for TILE, there would not be anything that can run there, or that can make stuff run there.

---

<div class="post-metadata">

**Author:** ![tangent](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/tangent/32/55521_2.png) [@tangent](https://forum.mikrotik.com/u/tangent)\
**Post date:** [February 23, 2024, 7:24am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/29 "2024-02-23T07:24:09Z")

</div>

> [@](#):
>
> AFAIK such tools does not exist

I outlined all the details for this above. The QEMU emulator for tilegx exists, but is bitrotted; it could be resurrected. A port of Clang to tilegx exists and probably works fine as-is, once built. With those two, one could then cross-compile the Linux distro needed to act as a base image. Given that toolchain, you could then rebuild any portable software atop it.

Therefore, here is my challenge to you: if someone pulled all that together and produced an OCI image that ran under QEMU, would you (MikroTik) be willing to provide a build of container.npk to let that same image run on TILE-based routers?

---

<div class="post-metadata">

**Author:** ![normis](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/normis/32/8_2.png) [@normis](https://forum.mikrotik.com/u/normis)\
**Post date:** [February 23, 2024, 7:26am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/30 "2024-02-23T07:26:08Z")

</div>

TILE CPUs are no longer manufactured and kernel support has been discontinued. Is it worth investing time in it now?

---

<div class="post-metadata">

**Author:** ![tangent](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/tangent/32/55521_2.png) [@tangent](https://forum.mikrotik.com/u/tangent)\
**Post date:** [February 23, 2024, 7:41am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/31 "2024-02-23T07:41:11Z")

</div>

> [@](#):
>
> TILE CPUs are no longer manufactured

True, but your customers have bought them, and some number of them still work. I believe the motivation behind this thread is that some subset of these customers want to stretch their useful lifetimes by using them as container runners.

(For what it’s worth, I don’t own any TILE-based MT products. I’m speaking here from experience building containers and other software, not out of any personal need for this feature to exist.)

> kernel support has been discontinued

MikroTik ported the patches necessary forward into RouterOS 7, solving the deployment case.

A TILE-supporting CPU isn’t needed at build or emulation time, because containers use the host OS’s kernel. Syscalls are resolved by call number, not by memory address or anything else CPU-specific. [mkdir(2) is syscall #83](https://unix.stackexchange.com/a/804/138) on every Linux distro regardless of CPU type, for example. This allows in-container calls into the kernel to be mapped to calls into the host’s kernel.

> Is it worth investing time in it now?

My premise is that MT’s slice of the work is merely to produce a build of container.npk, then support it in the way they do all other NPKs. Everything else is left up to the FOSS community. Would you be willing to provide that build and chase bugs?

If not, then kevinds is right, and it doesn’t matter how much work the FOSS community is willing to do to make this a reality.

---

<div class="post-metadata">

**Author:** ![tukan](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/tukan/32/2785_2.png) [@tukan](https://forum.mikrotik.com/u/tukan)\
**Post date:** [February 23, 2024, 1:22pm UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/32 "2024-02-23T13:22:14Z")

</div>

> My premise is that MT’s slice of the work is merely to produce a build of container.npk, then support it in the way they do all other NPKs. Everything else is left up to the FOSS community. Would you be willing to provide that build and chase bugs?
> 
> If not, then kevinds is right, and it doesn’t matter how much work the FOSS community is willing to do to make this a reality.

That is the core of what my first post was about. I did not call the containers “Docker” on purpose. I have done some research before asking the question too. I just wanted to know if MT is willing to publish the _container.npk_, if not then there is no point in trying to do anything as was said in some posts before. Mikrotik has to have the infrastructure done because otherwise they would not be able to create ROS7 for tile.

[Qemu for tilegx](https://android.googlesource.com/platform/external/qemu/+log/emu-master-dev/target/tilegx)  
Tilera [llvm](http://tilera.github.io/llvm/)  
Cross compilers for both [tile (32 bit) tilepro-linux adn tile (64 bit) tilegx-linux](http://mirrors.mit.edu/kernel/tools/crosstool/)

---

<div class="post-metadata">

**Author:** ![tangent](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/tangent/32/55521_2.png) [@tangent](https://forum.mikrotik.com/u/tangent)\
**Post date:** [February 23, 2024, 2:50pm UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/33 "2024-02-23T14:50:11Z")

</div>

> [@](#):
>
> I just wanted to know if MT is willing to publish the _container.npk_, if not then there is no point in trying to do anything as was said in some posts before.

I don’t see a reason to be that black-and-white about it. All we need at this early stage is a pledge from MT that once someone produces a working TILE-based container that runs under emulation, MT will then produce the container.npk package needed to run it natively on the hardware. Having it before we have the toolchain has zero value. It’s only necessary to make the last step, from emulation to native execution.

I do understand the argument that someone wouldn’t want to start work on producing that toolchain without knowing whether MT will ever provide this, but understand my point in return: all we need at this stage is the _pledge_, not the actuality.

That said, compiling container.npk for TILE shouldn’t be more than an hour’s work. The only problem with doing that early is the inverse of the prior problem: without a working container to test whether the built NPK works, MT’s software developers and QA staff can do little more than throw it over the wall and pray. This is why I suggested above that it be provided under a non-warranty; “if it breaks, you get to keep both pieces” kind of thing.

> Mikrotik has to have the infrastructure done because otherwise they would not be able to create ROS7 for tile.

That only helps them build container.npk for TILE. It doesn’t help anyone else build OCI containers that run atop it.

MikroTik don’t need a QEMU TILE emulator at all. Maybe they have it anyway, such as to speed the compile-test-debug cycle time, but it isn’t a hard requirement for them, as it is with OCI container build systems. If they don’t have it ready to hand and freely distributable, someone’s going to have to resurrect it, which in turn is likely to require a contemporaneous (e.g. out of support for the last decade) version of Linux. Good luck finding a balance between that and the need for a version of Linux that will run a modern OCI build system. RHEL 7 still ships with Podman 1.6.4, for instance, whereas the current version is 4.9.3.

Following from that lack of a hard requirement for QEMU, MikroTik’s developers also don’t need TILE binfmt recognition in their development systems’ kernel to pass “foreign” binaries transparently down to QEMU. This is the easiest piece to provide, but it’ll likely require that you run a custom kernel on your build systems.

I have no internal information, but I fully expect that MT’s developers are doing traditional cross-compilation instead, where their C compiler runs natively on x86\_64 but generates TILE instructions. Nowhere is QEMU involved in this. What Docker and Podman do is entirely different: they run a native TILE compiler under QEMU to produce TILE binaries. As far as the build environment knows, there isn’t any cross-compilation or emulation going on at all; code running inside it thinks it’s all running native on TILE.

That in turn means that if MT were to drop their C compilation toolchain for TILE onto a file server in a tarball right this instant, the only use it would have in the project proposed in this thread is to help bootstrap the next step. Eventually that will have to be thrown away because BuildKit and Buildah require a TILE-native C compiler toolchain that produces TILE binaries, not an x86\_64 to TILE cross-compiler.

That next step is a doozy compared to all the rest, a full-time project for months: a Linux distro cross-compiled for TILE, for use as a container base image.

Oh, and by “distro” I don’t mean “RouterOS”. The bare minimum is something like Alpine with enough of the package repo as needed to build the desired containers. Dockerfile RUN commands require a target-native Busybox runtime environment at least, and nearly all will require a package manager of some kind. When that package manager is invoked (e.g. “RUN apk add clang”) you not only need it to deliver up a TILE build of Clang, but also all its dependencies: binutils, musl-dev, etc.

You don’t need to port the entire Alpine package repo, but you do need to port enough of it to support your desired containers.

And then, once you’ve done that, you’ll want to build a second container, and chances are decent it isn’t going to be “FROM alpine…” but “FROM ubuntu…” or something else instead. Now you have a hard choice: either port these other containers from Ubuntu to Alpine, or undertake a repetition of the prior effort, porting Ubuntu to TILE, too.

This is not easy, by any stretch.

---

<div class="post-metadata">

**Author:** ![kevinds](https://forum.mikrotik.com/letter_avatar/kevinds/32/6_449c533f586939b6e5f246632a46421f.png) [@kevinds](https://forum.mikrotik.com/u/kevinds)\
**Post date:** [February 24, 2024, 12:34am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/34 "2024-02-24T00:34:39Z")

</div>

> [@](#):
>
> I don’t buy that analogy. If that were the case, no one could ever bootstrap a new CPU architecture.

> [@tangent](#):
>
> I predict that if you take your gadfly routine to the QEMU and Alpine project fora and try to get them to include TILE support, you’ll get zero traction,

It takes a LONG time for any group to accept/support a CPU. Does Alpine run on Apple’s M1 CPU yet? Or still only with emulation?

Given the incredibly small usage this would have, I too predict zero traction.

> [@](#):
>
> It is possible to build **and test** all this without any help from MT on your desktop/laptop computer platform of choice.
> 
> And then, running software in hand, you would finally have a defensible reason to expect MT to test your first TILE container against their internal container.npk builds and work out any remaining bugs.

Mikrotik won’t provide container.npk because there are no containers that will run on the tile architecture.

Mikrotik, even if the containers did exist, can just say “No we are not going to do/provide that” and the discussion reasonably ends.

I (don’t know about others) won’t put the work into creating a container that will run on the Tile architecture because it won’t run on RouterOS.

---

<div class="post-metadata">

**Author:** ![kevinds](https://forum.mikrotik.com/letter_avatar/kevinds/32/6_449c533f586939b6e5f246632a46421f.png) [@kevinds](https://forum.mikrotik.com/u/kevinds)\
**Post date:** [February 25, 2024, 5:27am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/35 "2024-02-25T05:27:21Z")

</div>

> [@](#):
>
> a TILE CPU cross-compilation toolchain

I have most of what needed to build the toolchain. Most of the big pieces were provided by the company producing the Tile CPUs, as the company has changed hands multiple times though, some pieces went missing so took a bit to track down some of them.

[https://github.com/online-stuff/tilera-toolchain/](https://github.com/online-stuff/tilera-toolchain/)

---

<div class="post-metadata">

**Author:** ![tukan](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/tukan/32/2785_2.png) [@tukan](https://forum.mikrotik.com/u/tukan)\
**Post date:** [February 27, 2024, 8:32am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/36 "2024-02-27T08:32:03Z")

</div>

> All we need at this stage is the pledge, not the actuality.

Yes, we can agree on that. Till now I did not see anything from Mikrotik even the pledge. I tried to search for it but got big nothing.

As for the rest, I have never written that it will be easy peasy, but it is doable.

---

<div class="post-metadata">

**Author:** ![tukan](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/tukan/32/2785_2.png) [@tukan](https://forum.mikrotik.com/u/tukan)\
**Post date:** [September 8, 2024, 6:38am UTC](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851/37 "2024-09-08T06:38:00Z")

</div>

You see, no answer (even “No we are not going to do/provide that”) from Mikrotik. Any work connected to the containers on Tile architecture is pointless.

[Previous page](https://forum.mikrotik.com/t/ccr1xxx-with-containers/173851.md?page=1)
