News for hackers. Stuff that matters.
Re:Building GCC as a Cross Compiler for Raspberry Pi by yorwba on Saturday May 12, 2018 @01:00PM (#17054899)
I recently built a cross-compiler for a used Kindle 3 I got from a friend. Its kernel is from 2008, but you can still read books with it just fine. I was thinking about turning it into a mobile terminal I can use in full sunshine (e-ink is rad) and using precompiled hacks from the mobilereads forums, I got ssh on the device pretty quickly.

But as soon as I wanted to compile my own binaries, things weren't so easy anymore. The glibc on there is too ancient for modern cross-compilers (like the one installed by apt). It can't be replaced because the kernel is too ancient for a modern glibc. Replacing the kernel would probably fail due to lack of compatible drivers.

The sources for the original cross-compiler, the kernel and various libraries were actually quite easy to find on Amazon's website, but they were incredibly difficult to build. Because that GCC used some GNU C extensions that changed semantics in modern GCCs, it didn't even compile without patching the source. The build step for glibc involved filtering the assembly produced by the compiler through a sed script, which of course silently failed when the newer compiler produced different output.

All in all, it took me about two weeks of experimentation until I had a working cross-toolchain.

Re:Building GCC as a Cross Compiler for Raspberry Pi by stuaxo on Saturday May 12, 2018 @04:19PM (#17055830)
Did you put this up somewhere ?

There are probably at least a couple of other people who might find it usefl.

Re:Building GCC as a Cross Compiler for Raspberry Pi by alex7o on Saturday May 12, 2018 @02:53PM (#17055438)
I did something similar for kindle 4, and it wasn't that hard, i just had to patch a few of the makefiles and i got gcc, but i was unable to then build that to run on the kindle.
Re:Building GCC as a Cross Compiler for Raspberry Pi by nerdponx on Saturday May 12, 2018 @02:46PM (#17055408)
Wouldn't this madness be solved by documenting the versions of the various required tools?