I really want my kindle binaries to run on all the eink kindles. That means sticking with standard interfaces, such as standard linux system calls, /proc files, framebuffer access, and so forth.
And apparently a "minimum common denominator" ARM instruction set too. I feel damned lucky just to have found a toolchain that works on the K1 (especially considering that all the other aboriginal toolchains that SHOULD be K1-compatible have been converted to musl and DO NOT WORK on the K1. Thankfully the armv4l was not yet converted, and is still ucllibc based, and still works on a K1.
The problem is that code statically-compiled with this armv4l toolchain gets "Illegal instruction" errors when run on NEWER kindles (recently tested on a PW3). Same problem going the other direction -- code compiled for newer kindles blows chuncks on the K1. What's up with that?
Must I resort to pure embedded assembly language (no C runtime, no libraries, no "Illegal instructions" because I write each and every instruction myself)? I hope not -- though in reality I REALLY LOVED coding in assembler back when that was the main programming language, before companies started migrating to COBOL (or FORTRAN in some shops). At least on a machine like an IBM 360 with its orthogonal instruction set (all instructions can use all registers). And NO STACKS -- everything was passed (and kept as long as possible) in REGISTERS (in the pre-cache era). Nowadays, cache is much like a very large register set that is automagically managed for you.
And regarding cache, I am fascinated a lot with this particular lecture:
And while I am recommending stuff that fascinates me, this link (once again for the newbies):
http://aggregate.org/MAGIC/
But yeah, what magical incantations must I conjure (or mutter) to build binaries that run on all the eink kindles?