From patchwork Fri Feb 20 18:46:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fathi Boudra X-Patchwork-Id: 44869 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0678F21561 for ; Fri, 20 Feb 2015 18:47:07 +0000 (UTC) Received: by wesk11 with SMTP id k11sf5168465wes.3 for ; Fri, 20 Feb 2015 10:47:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=Xuss7OO2brNNDJMjKfRArAM/ZeGU6cKD8O4b2mrk+s0=; b=ASNMy7t0n2vTqz4+Amf0DkxV+eTRt4kUdD/5g+MEhOuQHXq2E1SL91+nNUDWxlp1jI Ri06d4KXuFDO6Pw9UavblZaTw55M/IRGX8thqdBG8OUCyUPRmlQ0ioTIDbr1wrVsAPEb hCOX/EVjjOEN1tMjMc/EfC0eSCI1u4tXAFIYDM3Xm8vcWjWmkaGif2uh2PxrlkgUCBxC VLh9+ebgRjTfn9n8YRXBYKF74ptcqMVNtwbdeSanUUjV+yj7SM+uJ6MVjfddfoLx77B0 ukRyPFF8EXOteZRbOYvH9ZGAmcTYsUOLuT26lw11xPKazRjJ9Cl8PMduuPGZ5nR1vDqN ZUzw== X-Gm-Message-State: ALoCoQlfd9IHcH1cQpcucKsVqcPj7a+pcRCS5fpSkyUCVs1D5R5j9/yGTsz4j6m0HOJyRS1AsoDS X-Received: by 10.152.28.137 with SMTP id b9mr1490948lah.8.1424458025937; Fri, 20 Feb 2015 10:47:05 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.40 with SMTP id q8ls322590lag.29.gmail; Fri, 20 Feb 2015 10:47:05 -0800 (PST) X-Received: by 10.112.40.201 with SMTP id z9mr9464791lbk.117.1424458025789; Fri, 20 Feb 2015 10:47:05 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id fg3si20198657lbc.157.2015.02.20.10.47.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Feb 2015 10:47:05 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by labhs14 with SMTP id hs14so7995365lab.1 for ; Fri, 20 Feb 2015 10:47:05 -0800 (PST) X-Received: by 10.152.43.51 with SMTP id t19mr9533449lal.73.1424458025636; Fri, 20 Feb 2015 10:47:05 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp61315lbj; Fri, 20 Feb 2015 10:47:04 -0800 (PST) X-Received: by 10.66.154.162 with SMTP id vp2mr9676423pab.73.1424458023489; Fri, 20 Feb 2015 10:47:03 -0800 (PST) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id pu9si11744643pbb.236.2015.02.20.10.47.02; Fri, 20 Feb 2015 10:47:03 -0800 (PST) Received-SPF: none (google.com: openembedded-core-bounces@lists.openembedded.org does not designate permitted sender hosts) client-ip=140.211.169.62; Received: from mail.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 502777368D; Fri, 20 Feb 2015 18:46:56 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) by mail.openembedded.org (Postfix) with ESMTP id 56DBB73658 for ; Fri, 20 Feb 2015 18:46:50 +0000 (UTC) Received: by lbiz11 with SMTP id z11so8077247lbi.5 for ; Fri, 20 Feb 2015 10:46:50 -0800 (PST) X-Received: by 10.112.142.168 with SMTP id rx8mr9509668lbb.37.1424458010224; Fri, 20 Feb 2015 10:46:50 -0800 (PST) Received: from localhost.localdomain (a91-152-81-141.elisa-laajakaista.fi. [91.152.81.141]) by mx.google.com with ESMTPSA id bj2sm240594lbc.43.2015.02.20.10.46.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Feb 2015 10:46:49 -0800 (PST) From: Fathi Boudra To: openembedded-core@lists.openembedded.org Date: Fri, 20 Feb 2015 20:46:41 +0200 Message-Id: <1424458001-12151-1-git-send-email-fathi.boudra@linaro.org> X-Mailer: git-send-email 2.1.4 Subject: [OE-core] [PATCH] kexec-tools: fix build failure on aarch64_be architecture X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: fathi.boudra@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 * refresh/cleanup the patch to apply cleanly on 2.0.9 * get rid of configure - it's autogenerated * configure.ac: use aarch64* wildcard Signed-off-by: Fathi Boudra --- .../kexec/kexec-tools/kexec-aarch64.patch | 102 ++++++++------------- 1 file changed, 40 insertions(+), 62 deletions(-) diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch index b697a54..92b5631 100644 --- a/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch +++ b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch @@ -15,36 +15,44 @@ Upstream-Status: Pending Signed-off-by: Kai Kang --- -Index: kexec-tools-2.0.4/configure.ac -=================================================================== ---- kexec-tools-2.0.4.orig/configure.ac -+++ kexec-tools-2.0.4/configure.ac -@@ -30,6 +30,9 @@ case $target_cpu in - powerpc64 ) +--- + configure.ac | 3 + kexec/Makefile | 1 + kexec/arch/arm64/Makefile | 13 + + kexec/arch/arm64/crashdump-arm64.c | 305 ++++++++++++++++++++++++++++++++ + kexec/arch/arm64/include/arch/options.h | 26 ++ + kexec/arch/arm64/kexec-arm64.c | 177 ++++++++++++++++++ + kexec/arch/arm64/kexec-arm64.h | 20 ++ + kexec/arch/arm64/kexec-elf-arm64.c | 114 +++++++++++ + kexec/kexec-syscall.h | 9 + kexec/kexec.c | 2 + purgatory/arch/arm64/Makefile | 7 + 11 files changed, 675 insertions(+), 2 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -35,6 +35,9 @@ case $target_cpu in ARCH="ppc64" + SUBARCH="LE" ;; -+ aarch64 ) ++ aarch64* ) + ARCH="arm64" + ;; arm* ) ARCH="arm" ;; -Index: kexec-tools-2.0.4/kexec/Makefile -=================================================================== ---- kexec-tools-2.0.4.orig/kexec/Makefile -+++ kexec-tools-2.0.4/kexec/Makefile -@@ -70,6 +70,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT) +--- a/kexec/Makefile ++++ b/kexec/Makefile +@@ -71,6 +71,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT) include $(srcdir)/kexec/arch/alpha/Makefile include $(srcdir)/kexec/arch/arm/Makefile +include $(srcdir)/kexec/arch/arm64/Makefile include $(srcdir)/kexec/arch/i386/Makefile include $(srcdir)/kexec/arch/ia64/Makefile - include $(srcdir)/kexec/arch/mips/Makefile -Index: kexec-tools-2.0.4/kexec/arch/arm64/Makefile -=================================================================== + include $(srcdir)/kexec/arch/m68k/Makefile --- /dev/null -+++ kexec-tools-2.0.4/kexec/arch/arm64/Makefile ++++ b/kexec/arch/arm64/Makefile @@ -0,0 +1,13 @@ + +arm64_KEXEC_SRCS += \ @@ -59,10 +67,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/Makefile +dist += $(arm64_KEXEC_SRCS) \ + kexec/arch/arm64/Makefile \ + kexec/arch/arm64/kexec-arm64.h -Index: kexec-tools-2.0.4/kexec/arch/arm64/crashdump-arm64.c -=================================================================== --- /dev/null -+++ kexec-tools-2.0.4/kexec/arch/arm64/crashdump-arm64.c ++++ b/kexec/arch/arm64/crashdump-arm64.c @@ -0,0 +1,305 @@ +/* + * This program is free software; you can redistribute it and/or modify @@ -369,10 +375,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/crashdump-arm64.c + +#endif + -Index: kexec-tools-2.0.4/kexec/arch/arm64/include/arch/options.h -=================================================================== --- /dev/null -+++ kexec-tools-2.0.4/kexec/arch/arm64/include/arch/options.h ++++ b/kexec/arch/arm64/include/arch/options.h @@ -0,0 +1,26 @@ +#ifndef KEXEC_ARCH_ARM64_OPTIONS_H +#define KEXEC_ARCH_ARM64_OPTIONS_H @@ -400,10 +404,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/include/arch/options.h +#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR + +#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */ -Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.c -=================================================================== --- /dev/null -+++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.c ++++ b/kexec/arch/arm64/kexec-arm64.c @@ -0,0 +1,177 @@ +/* + * ARM64 kexec support. @@ -582,10 +584,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.c + (void)value; + fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); +} -Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.h -=================================================================== --- /dev/null -+++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.h ++++ b/kexec/arch/arm64/kexec-arm64.h @@ -0,0 +1,20 @@ +/* + * ARM64 kexec support. @@ -608,10 +608,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-arm64.h + +#endif \ No newline at end of file -Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-elf-arm64.c -=================================================================== --- /dev/null -+++ kexec-tools-2.0.4/kexec/arch/arm64/kexec-elf-arm64.c ++++ b/kexec/arch/arm64/kexec-elf-arm64.c @@ -0,0 +1,114 @@ +/* + * ARM64 kexec support. @@ -727,10 +725,8 @@ Index: kexec-tools-2.0.4/kexec/arch/arm64/kexec-elf-arm64.c + fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__); + fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__); +} -Index: kexec-tools-2.0.4/kexec/kexec-syscall.h -=================================================================== ---- kexec-tools-2.0.4.orig/kexec/kexec-syscall.h -+++ kexec-tools-2.0.4/kexec/kexec-syscall.h +--- a/kexec/kexec-syscall.h ++++ b/kexec/kexec-syscall.h @@ -39,8 +39,8 @@ #ifdef __s390__ #define __NR_kexec_load 277 @@ -742,7 +738,7 @@ Index: kexec-tools-2.0.4/kexec/kexec-syscall.h #endif #if defined(__mips__) #define __NR_kexec_load 4311 -@@ -72,6 +72,8 @@ static inline long kexec_load(void *entr +@@ -108,6 +108,8 @@ static inline long kexec_file_load(int k #define KEXEC_ARCH_PPC64 (21 << 16) #define KEXEC_ARCH_IA_64 (50 << 16) #define KEXEC_ARCH_ARM (40 << 16) @@ -751,21 +747,19 @@ Index: kexec-tools-2.0.4/kexec/kexec-syscall.h #define KEXEC_ARCH_S390 (22 << 16) #define KEXEC_ARCH_SH (42 << 16) #define KEXEC_ARCH_MIPS_LE (10 << 16) -@@ -114,5 +116,8 @@ static inline long kexec_load(void *entr - #if defined(__mips__) - #define KEXEC_ARCH_NATIVE KEXEC_ARCH_MIPS +@@ -153,5 +155,8 @@ static inline long kexec_file_load(int k + #ifdef __m68k__ + #define KEXEC_ARCH_NATIVE KEXEC_ARCH_68K #endif +#if defined(__arm64__) +#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64 +#endif #endif /* KEXEC_SYSCALL_H */ -Index: kexec-tools-2.0.4/kexec/kexec.c -=================================================================== ---- kexec-tools-2.0.4.orig/kexec/kexec.c -+++ kexec-tools-2.0.4/kexec/kexec.c -@@ -659,6 +659,8 @@ static int my_load(const char *type, int - info.backup_start = 0; +--- a/kexec/kexec.c ++++ b/kexec/kexec.c +@@ -664,6 +664,8 @@ static int my_load(const char *type, int + memset(&info, 0, sizeof(info)); info.kexec_flags = kexec_flags; + fprintf(stderr, "%s:%d: do\n", __func__, __LINE__); @@ -773,10 +767,8 @@ Index: kexec-tools-2.0.4/kexec/kexec.c result = 0; if (argc - fileind <= 0) { fprintf(stderr, "No kernel specified\n"); -Index: kexec-tools-2.0.4/purgatory/arch/arm64/Makefile -=================================================================== --- /dev/null -+++ kexec-tools-2.0.4/purgatory/arch/arm64/Makefile ++++ b/purgatory/arch/arm64/Makefile @@ -0,0 +1,7 @@ +# +# Purgatory arm64 @@ -785,17 +777,3 @@ Index: kexec-tools-2.0.4/purgatory/arch/arm64/Makefile +arm64_PURGATORY_SRCS = + +dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS) -Index: kexec-tools-2.0.4/configure -=================================================================== ---- kexec-tools-2.0.4.orig/configure -+++ kexec-tools-2.0.4/configure -@@ -2256,6 +2256,9 @@ case $target_cpu in - powerpc64 ) - ARCH="ppc64" - ;; -+ aarch64 ) -+ ARCH="arm64" -+ ;; - arm* ) - ARCH="arm" - ;;