diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2016-09-22 09:54:29 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-09-28 07:20:44 +0300 |
commit | 1a13de6df9bf998a0b6d9bfa4255cfc711ea8f0f (patch) | |
tree | 4c90cba3d521a7d764868ff6fe58b273fe15b76d /arch/powerpc/boot/fixup-headers.sed | |
parent | 96c447077c2f66ed4117fd832a84c40265dbd9f2 (diff) | |
download | linux-1a13de6df9bf998a0b6d9bfa4255cfc711ea8f0f.tar.xz |
powerpc/boot: Add sed script
The powerpc boot wrapper is potentially compiled with a separate
toolchain and/or toolchain flags than the rest of the kernel. The usual
case is a 64-bit big endian kernel builds a 32-bit big endian wrapper.
The main problem with this is that the wrapper does not have access to
the kernel headers (without a lot of gross hacks). To get around this
the required headers are copied into the build directory via several sed
scripts which rewrite problematic includes. This patch moves these
fixups out of the makefile into a separate .sed script file to clean up
makefile slightly.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
[mpe: Reword first paragraph of change log a little]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/boot/fixup-headers.sed')
-rw-r--r-- | arch/powerpc/boot/fixup-headers.sed | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/boot/fixup-headers.sed b/arch/powerpc/boot/fixup-headers.sed new file mode 100644 index 000000000000..96362428eb37 --- /dev/null +++ b/arch/powerpc/boot/fixup-headers.sed @@ -0,0 +1,12 @@ +# Copyright 2016 IBM Corporation. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 or later as +# published by the Free Software Foundation. + +s@#include <linux/decompress/mm\.h>@@; +s@\"zlib_inflate/\([^\"]*\).*@"\1"@; +s@<linux/kernel.h>@<stddef.h>@; + +s@__used@@; +s@<linux/\([^>]*\).*@"\1"@; |