From 1a13de6df9bf998a0b6d9bfa4255cfc711ea8f0f Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Thu, 22 Sep 2016 16:54:29 +1000 Subject: 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 [mpe: Reword first paragraph of change log a little] Signed-off-by: Michael Ellerman --- arch/powerpc/boot/fixup-headers.sed | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arch/powerpc/boot/fixup-headers.sed (limited to 'arch/powerpc/boot/fixup-headers.sed') 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 @@; +s@\"zlib_inflate/\([^\"]*\).*@"\1"@; +s@@@; + +s@__used@@; +s@]*\).*@"\1"@; -- cgit v1.2.3