Compiling a ReadyNAS kernel...

I’ve struggled a day or so with this, so let me summarize:

  • Infrant loves replacing their kernel every now and then with a different version, without changing the filename.
  • Be sure to not use the RAIDiator 2.0 release. It’s buggy and misses stuff (so much for “GPL compliance”). The 3.0 (md5sum of .tar.bz2: d7da0363a6d4da912907dd03385d6f7a) is ok.
  • You need to use gcc-2.95.3 to compile the kernel. I’ve spent half a day to fix the kernel to compile with a recent gcc-3.x, and the resulting binary didn’t work, and crashed with random memory corruption.
  • To compile gcc-2.95.3 via crosstool, you might need to use an older host GCC. gcc-3.2 for example worked ok, gcc-4.1.2 did not work.
  • You might need to use an older glibc. Glib-2.3.2 requires a newer (cross) gcc, but you don’t need glibc for compiling the kernel. And for userspace, I would insist on using a newer compiler anyway.
  • Use the defconfig from (Infrant’s) arch/sparc/defconfig as a base, it works ok.
  • The resulting kernel is uncrypted, so you need to encrypt it (hwenc) in order to use it. Or use my hack.
Good luck!