[Skiboot] opal-prd Makefile hacks

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Feb 15 17:54:06 AEDT 2015

Folks !

I've hacked the opal-prd Makefile quite a bit in the "prd" branch. It's
not great, the way it's done it will always rebuild everything, some
Makefile expert welcome...

Basically the issues I had were:

 - Linking to libflash was bad because we would build .o's in the
original directory which conflict with skiboot own .o's (and typically
have the wrong endian etc...). So instead I link individual .c/.h files
into a local directory.

 - The KERNEL_DIR stuff is a trainwreck. Not your fault Jeremy, it's the
kernel headers... you can't put them in the path like that... yet, they
need sanitizing still, such as removing linux/compiler.h dependencies
etc... so when you add them to the path, you end up with the local
kernel headers overriding the distro ones for some stuff and everything
goes pear-shaped. Especially after fixing the location of opal-prd.h to
be in uapi/asm/ ... for now I just symlinked that file over.

The result is those links ans I think that's what causing the "always
rebuild" phenomenon... I'm not sure what's the best solution. For
opal-prd, we can use the "old way" and ship a copy of the file.


More information about the Skiboot mailing list