[PATCH] build: Avoid duplicate files in tarball

Mahesh Jagannath Salgaonkar mahesh at linux.vnet.ibm.com
Tue Aug 14 04:27:32 EDT 2012


On 08/02/2012 08:38 AM, Simon Horman wrote:
> Signed-off-by: Simon Horman <horms at verge.net.au>
> ---
>  kexec/Makefile             | 75 +++++++++++++++++++++++++++-------------------
>  kexec/arch/arm/Makefile    |  2 +-
>  kexec/arch/ppc/Makefile    |  3 +-
>  kexec/arch/sh/Makefile     |  3 +-
>  kexec/arch/x86_64/Makefile | 12 +++++---
>  purgatory/Makefile         |  2 --
>  6 files changed, 58 insertions(+), 39 deletions(-)
> 
[...]
> diff --git a/kexec/arch/x86_64/Makefile b/kexec/arch/x86_64/Makefile
> index 916babf..405bdf5 100644
> --- a/kexec/arch/x86_64/Makefile
> +++ b/kexec/arch/x86_64/Makefile
> @@ -9,10 +9,14 @@ x86_64_KEXEC_SRCS += kexec/arch/i386/kexec-nbi.c
>  x86_64_KEXEC_SRCS += kexec/arch/i386/x86-linux-setup.c
>  x86_64_KEXEC_SRCS += kexec/arch/i386/kexec-x86-common.c
>  x86_64_KEXEC_SRCS += kexec/arch/i386/crashdump-x86.c
> -x86_64_KEXEC_SRCS += kexec/arch/x86_64/kexec-x86_64.c
> -x86_64_KEXEC_SRCS += kexec/arch/x86_64/kexec-elf-x86_64.c
> -x86_64_KEXEC_SRCS += kexec/arch/x86_64/kexec-elf-rel-x86_64.c
> 
> -dist += kexec/arch/x86_64/Makefile $(x86_64_KEXEC_SRCS) \
> +x86_64_KEXEC_SRCS_native =  kexec/arch/x86_64/kexec-x86_64.c
> +x86_64_KEXEC_SRCS_native += kexec/arch/x86_64/kexec-elf-x86_64.c
> +x86_64_KEXEC_SRCS_native += kexec/arch/x86_64/kexec-elf-rel-x86_64.c
> +
> +x86_64_KEXEC_SRCS += $(x86_64_KEXEC_SRCS_native)
> +
> +# Don't add sources in i386/ to dist, as i386/Makefile adds them
> +dist += kexec/arch/x86_64/Makefile $(x86_64_KEXEC_SRCS_native) \
>  	kexec/arch/x86_64/kexec-x86_64.h \
>  	kexec/arch/x86_64/include/arch/options.h
> diff --git a/purgatory/Makefile b/purgatory/Makefile
> index ee1679c..711799b 100644
> --- a/purgatory/Makefile
> +++ b/purgatory/Makefile
> @@ -27,8 +27,6 @@ include $(srcdir)/purgatory/arch/s390/Makefile
>  include $(srcdir)/purgatory/arch/sh/Makefile
>  include $(srcdir)/purgatory/arch/x86_64/Makefile
> 
> -PURGATORY_SRCS+=$($(ARCH)_PURGATORY_SRCS)

Any reason why the above line has been removed? With the above line
removed nothing under 'purgatory/arch/*/' directory gets compiled. This
makes loading of panic kernel (kexec -p) to fail. I tested it on ppc64
and it fails. Same issue may also exist on other architecture.

Restored the line and able to load panic kernel successfully.

> -
>  PURGATORY_OBJS = $(call objify, $(PURGATORY_SRCS)) purgatory/sha256.o
>  PURGATORY_DEPS = $(call depify, $(PURGATORY_OBJS))
> 




More information about the kexec mailing list