<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:宋体;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-CN" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi Ross<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp; Well</span>,<span lang="EN-US">through my test</span>,<span lang="EN-US">this patch works well on poky-lsb without compile error.</span><span lang="EN-US" style="font-size:10.5pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">--------------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Zheng Ruoqin<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">ADDR.: No.6 Wenzhu Road, Software Avenue,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Nanjing, 210012, China<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">MAIL : zhengrq.fnst@cn.fujistu.com<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> Burton, Ross [mailto:ross.burton@intel.com]
<br>
<b>Sent:</b> Wednesday, November 08, 2017 5:15 PM<br>
<b>To:</b> Zheng, Ruoqin/</span><span style="font-size:11.0pt">郑</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">
</span><span style="font-size:11.0pt">若钦</span><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> &lt;zhengrq.fnst@cn.fujitsu.com&gt;<br>
<b>Cc:</b> OE-core &lt;openembedded-core@lists.openembedded.org&gt;<br>
<b>Subject:</b> Re: [OE-core] [PATCH] kexec-tools: 2.0.14 -&gt; 2.0.15<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">Does this work on poky-lsb?&nbsp; Previous upgrades were failing with that due to the security flags being enabled.<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Ross<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">On 8 November 2017 at 09:56, zhengrq &lt;<a href="mailto:zhengrq.fnst@cn.fujitsu.com" target="_blank">zhengrq.fnst@cn.fujitsu.com</a>&gt; wrote:<o:p></o:p></span></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal"><span lang="EN-US">1) Upgrade kexec-tools from 2.0.14 to 2.0.15.<br>
2) Remove patches that are included in 2.0.15.<br>
&nbsp; &nbsp;kexec-tools/0001-arm64-Disable-PIC.patch<br>
&nbsp; &nbsp;kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch<br>
&nbsp; &nbsp;kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch<br>
&nbsp; &nbsp;kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch<br>
&nbsp; &nbsp;kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch<br>
&nbsp; &nbsp;kexec-tools/0002-ppc-Fix-format-warning-with-die.patch<br>
&nbsp; &nbsp;kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch<br>
&nbsp; &nbsp;kexec-tools/0004-arm64-kdump-identify-memory-regions.patch<br>
&nbsp; &nbsp;kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch<br>
&nbsp; &nbsp;kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch<br>
&nbsp; &nbsp;kexec-tools/0007-arm64-kdump-set-up-other-segments.patch<br>
&nbsp; &nbsp;kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch<br>
&nbsp; &nbsp;kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch<br>
<br>
Signed-off-by: Zheng Ruoqin &lt;<a href="mailto:zhengrq.fnst@cn.fujitsu.com">zhengrq.fnst@cn.fujitsu.com</a>&gt;<br>
---<br>
&nbsp;.../kexec/kexec-tools/0001-arm64-Disable-PIC.patch |&nbsp; 31 ----<br>
&nbsp;...nd-the-semantics-of-kexec_iomem_for_each_.patch |&nbsp; 78 --------<br>
&nbsp;.../0001-vmcore-dmesg-Define-_GNU_SOURCE.patch&nbsp; &nbsp; &nbsp;|&nbsp; 31 ----<br>
&nbsp;...01-x86-x86_64-Fix-format-warning-with-die.patch |&nbsp; 78 --------<br>
&nbsp;...eneralize-and-rename-get_kernel_stext_sym.patch | 194 --------------------<br>
&nbsp;.../0002-ppc-Fix-format-warning-with-die.patch&nbsp; &nbsp; &nbsp;|&nbsp; 43 -----<br>
&nbsp;...0003-arm64-identify-PHYS_OFFSET-correctly.patch |&nbsp; 76 --------<br>
&nbsp;.../0004-arm64-kdump-identify-memory-regions.patch | 202 ---------------------<br>
&nbsp;...5-arm64-kdump-add-elf-core-header-segment.patch | 191 -------------------<br>
&nbsp;...6-arm64-kdump-set-up-kernel-image-segment.patch | 137 --------------<br>
&nbsp;.../0007-arm64-kdump-set-up-other-segments.patch&nbsp; &nbsp;|&nbsp; 35 ----<br>
&nbsp;...-add-DT-properties-to-crash-dump-kernel-s.patch | 150 ---------------<br>
&nbsp;...-kdump-Add-support-for-binary-image-files.patch |&nbsp; 52 ------<br>
&nbsp;...<a href="http://kexec-tools_2.0.14.bb" target="_blank">kexec-tools_2.0.14.bb</a> =&gt;
<a href="http://kexec-tools_2.0.15.bb" target="_blank">kexec-tools_2.0.15.bb</a>} |&nbsp; 17 &#43;-<br>
&nbsp;14 files changed, 2 insertions(&#43;), 1313 deletions(-)<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch<br>
&nbsp;delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch<br>
&nbsp;rename meta/recipes-kernel/kexec/{<a href="http://kexec-tools_2.0.14.bb" target="_blank">kexec-tools_2.0.14.bb</a> =&gt;
<a href="http://kexec-tools_2.0.15.bb" target="_blank">kexec-tools_2.0.15.bb</a>} (63%)<br>
<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch<br>
deleted file mode 100644<br>
index 84e94d7..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,31 &#43;0,0 @@<br>
-From 3bb73e5e5649b455e15d5ca3a7ad1a90c4960972 Mon Sep 17 00:00:00 2001<br>
-From: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt;<br>
-Date: Sat, 10 Jun 2017 11:54:36 -0700<br>
-Subject: [PATCH] arm64: Disable PIC<br>
-<br>
-Fix<br>
-| cc1: sorry, unimplemented: code model 'large' with -fPIC<br>
-| make: *** [Makefile:118: purgatory/arch/arm64/entry.o] Error 1<br>
-<br>
-Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt;<br>
----<br>
-Upstream-Status: Pending<br>
-<br>
- purgatory/arch/arm64/Makefile | 1 &#43;<br>
- 1 file changed, 1 insertion(&#43;)<br>
-<br>
-diff --git a/purgatory/arch/arm64/Makefile b/purgatory/arch/arm64/Makefile<br>
-index 636abea..80068ca 100644<br>
---- a/purgatory/arch/arm64/Makefile<br>
-&#43;&#43;&#43; b/purgatory/arch/arm64/Makefile<br>
-@@ -1,6 &#43;1,7 @@<br>
-<br>
- arm64_PURGATORY_EXTRA_CFLAGS = \<br>
-&nbsp; &nbsp; &nbsp; &nbsp;-mcmodel=large \<br>
-&#43;&nbsp; &nbsp; &nbsp; -fno-PIC \<br>
-&nbsp; &nbsp; &nbsp; &nbsp;-fno-stack-protector \<br>
-&nbsp; &nbsp; &nbsp; &nbsp;-fno-asynchronous-unwind-tables \<br>
-&nbsp; &nbsp; &nbsp; &nbsp;-Wundef \<br>
---<br>
-2.13.1<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch<br>
deleted file mode 100644<br>
index 822f28c..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,78 &#43;0,0 @@<br>
-From 02eed0f8f2748fd7579f69e5373445b52b2b8754 Mon Sep 17 00:00:00 2001<br>
-From: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Date: Mon, 17 Oct 2016 13:56:58 &#43;0900<br>
-Subject: [PATCH 1/9] kexec: exntend the semantics of kexec_iomem_for_each_line<br>
-<br>
-The current kexec_iomem_for_each_line() counts up all the lines for which<br>
-a callback function returns zero(0) or positive, and otherwise it stops<br>
-further scanning.<br>
-This behavior is incovenient in some cases. For instance, on arm64, we want<br>
-to count up &quot;System RAM&quot; entries, but need to skip &quot;reserved&quot; entries.<br>
-<br>
-So this patch extends the semantics so that we will continue to scan<br>
-succeeding entries but not count lines for which a callback function<br>
-returns positive.<br>
-<br>
-The current users of kexec_iomem_for_each_line(), arm, sh and x86, will not<br>
-be affected by this change because<br>
-* arm<br>
-&nbsp; The callback function only returns -1 or 0, and the return value of<br>
-&nbsp; kexec_iomem_for_each_line() will never be used.<br>
-* sh, x86<br>
-&nbsp; The callback function may return (-1 for sh,) 0 or 1, but always returns<br>
-&nbsp; 1 once we have reached the maximum number of entries allowed.<br>
-&nbsp; Even so the current kexec_iomem_for_each_line() counts them up.<br>
-&nbsp; This change actually fixes this bug.<br>
-<br>
-Upstream-Status: Backport [<a href="https://git.linaro.org/people/takahiro.akashi/kexec-tools.git" target="_blank">https://git.linaro.org/people/takahiro.akashi/kexec-tools.git</a>]<br>
-<br>
-Signed-off-by: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Signed-off-by: He Zhe &lt;<a href="mailto:zhe.he@windriver.com">zhe.he@windriver.com</a>&gt;<br>
----<br>
- kexec/kexec-iomem.c | 15 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;-----<br>
- 1 file changed, 10 insertions(&#43;), 5 deletions(-)<br>
-<br>
-diff --git a/kexec/kexec-iomem.c b/kexec/kexec-iomem.c<br>
-index 485a2e8..0a0277a 100644<br>
---- a/kexec/kexec-iomem.c<br>
-&#43;&#43;&#43; b/kexec/kexec-iomem.c<br>
-@@ -18,6 &#43;18,9 @@<br>
-&nbsp; * Iterate over each line in the file returned by proc_iomem(). If match is<br>
-&nbsp; * NULL or if the line matches with our match-pattern then call the<br>
-&nbsp; * callback if non-NULL.<br>
-&#43; * If match is NULL, callback should return a negative if error.<br>
-&#43; * Otherwise the interation goes on, incrementing nr but only if callback<br>
-&#43; * returns 0 (matched).<br>
-&nbsp; *<br>
-&nbsp; * Return the number of lines matched.<br>
-&nbsp; */<br>
-@@ -37,7 &#43;40,7 @@ int kexec_iomem_for_each_line(char *match,<br>
-&nbsp; &nbsp; &nbsp; &nbsp;char *str;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;int consumed;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;int count;<br>
--&nbsp; &nbsp; &nbsp; int nr = 0;<br>
-&#43;&nbsp; &nbsp; &nbsp; int nr = 0, ret;<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;fp = fopen(iomem, &quot;r&quot;);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (!fp)<br>
-@@ -50,11 &#43;53,13 @@ int kexec_iomem_for_each_line(char *match,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;str = line &#43; consumed;<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;size = end - start &#43; 1;<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (!match || memcmp(str, match, strlen(match)) == 0) {<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (callback<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;&amp; callback(data, nr, str, start, size) &lt; 0) {<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (callback) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ret = callback(data, nr, str, start, size);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (ret &lt; 0)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (ret == 0)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nr&#43;&#43;;<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nr&#43;&#43;;<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
-&nbsp; &nbsp; &nbsp; &nbsp;}<br>
-<br>
---<br>
-1.9.1<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch<br>
deleted file mode 100644<br>
index 90c2f6e..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,31 &#43;0,0 @@<br>
-From d811875a41b4628040abaada3da29b7b9592e757 Mon Sep 17 00:00:00 2001<br>
-From: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt;<br>
-Date: Sat, 9 Jan 2016 17:16:16 -0800<br>
-Subject: [PATCH] vmcore-dmesg: Define _GNU_SOURCE<br>
-<br>
-loff_t is guarded with _GNU_SOURCE on some C library implementations<br>
-e.g. musl since this type is not defined by POSIX. Define _GNU_SOURCE to<br>
-include this define, it should help compiling on musl while nothing<br>
-changes for glibc based systems since there _GNU_SOURCE is already<br>
-defined<br>
-<br>
-Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt;<br>
----<br>
-Upstream-Status: Submitted<br>
-<br>
- vmcore-dmesg/vmcore-dmesg.c | 1 &#43;<br>
- 1 file changed, 1 insertion(&#43;)<br>
-<br>
-diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c<br>
-index 0364636..a8f56df 100644<br>
---- a/vmcore-dmesg/vmcore-dmesg.c<br>
-&#43;&#43;&#43; b/vmcore-dmesg/vmcore-dmesg.c<br>
-@@ -1,4 &#43;1,5 @@<br>
- #define _XOPEN_SOURCE 600<br>
-&#43;#define _GNU_SOURCE<br>
- #define _LARGEFILE_SOURCE 1<br>
- #define _FILE_OFFSET_BITS 64<br>
- #include &lt;endian.h&gt;<br>
---<br>
-2.7.0<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch<br>
deleted file mode 100644<br>
index e601f52..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-x86-x86_64-Fix-format-warning-with-die.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,78 &#43;0,0 @@<br>
-Upstream-Status: Backport<br>
-Signed-off-by: Jussi Kukkonen &lt;<a href="mailto:jussi.kukkonen@intel.com">jussi.kukkonen@intel.com</a>&gt;<br>
-<br>
-<br>
-From 1550f81bf1886aa0520da0b6181cd61c1a75d4ad Mon Sep 17 00:00:00 2001<br>
-From: Pratyush Anand &lt;<a href="mailto:panand@redhat.com">panand@redhat.com</a>&gt;<br>
-Date: Tue, 14 Mar 2017 17:59:22 &#43;0530<br>
-Subject: [PATCH 1/2] x86/x86_64: Fix format warning with die()<br>
-<br>
-Fedora koji uses gcc version 7.0.1-0.12.fc27, and it generates a build<br>
-warning<br>
-<br>
-&nbsp; &nbsp;kexec/arch/i386/kexec-elf-x86.c:299:3: error: format not a string<br>
-&nbsp; &nbsp;literal and no format arguments [-Werror=format-security]<br>
-&nbsp; &nbsp; &nbsp; &nbsp;die(error_msg);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;^~~<br>
-&nbsp; &nbsp; cc1: some warnings being treated as errors<br>
-<br>
-error_msg can have a format specifier as well in string. In such cases,<br>
-if there is no other arguments for the format variable then code will<br>
-try to access a non existing argument. Therefore, use 1st argument as<br>
-format specifier for string print and pass error_msg as the string to be<br>
-printed.<br>
-<br>
-While doing that,also use const qualifier before &quot;char *error_msg&quot;.<br>
-<br>
-Signed-off-by: Pratyush Anand &lt;<a href="mailto:panand@redhat.com">panand@redhat.com</a>&gt;<br>
-Signed-off-by: Simon Horman &lt;<a href="mailto:horms@verge.net.au">horms@verge.net.au</a>&gt;<br>
----<br>
- kexec/arch/i386/kexec-elf-x86.c&nbsp; &nbsp; &nbsp; | 4 &#43;&#43;--<br>
- kexec/arch/x86_64/kexec-elf-x86_64.c | 4 &#43;&#43;--<br>
- 2 files changed, 4 insertions(&#43;), 4 deletions(-)<br>
-<br>
-diff --git a/kexec/arch/i386/kexec-elf-x86.c b/kexec/arch/i386/kexec-elf-x86.c<br>
-index de00dcb..fedf031 100644<br>
---- a/kexec/arch/i386/kexec-elf-x86.c<br>
-&#43;&#43;&#43; b/kexec/arch/i386/kexec-elf-x86.c<br>
-@@ -91,7 &#43;91,7 @@ int elf_x86_load(int argc, char **argv, const char *buf, off_t len,<br>
-&nbsp; &nbsp; &nbsp; &nbsp;char *command_line = NULL, *modified_cmdline = NULL;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;const char *append = NULL;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;char *tmp_cmdline = NULL;<br>
--&nbsp; &nbsp; &nbsp; char *error_msg = NULL;<br>
-&#43;&nbsp; &nbsp; &nbsp; const char *error_msg = NULL;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;int result;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;int command_line_len;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;const char *ramdisk;<br>
-@@ -296,6 &#43;296,6 @@ out:<br>
-&nbsp; &nbsp; &nbsp; &nbsp;free(command_line);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;free(modified_cmdline);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (error_msg)<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(error_msg);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(&quot;%s&quot;, error_msg);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;return result;<br>
- }<br>
-diff --git a/kexec/arch/x86_64/kexec-elf-x86_64.c b/kexec/arch/x86_64/kexec-elf-x86_64.c<br>
-index ae65692..ad22311 100644<br>
---- a/kexec/arch/x86_64/kexec-elf-x86_64.c<br>
-&#43;&#43;&#43; b/kexec/arch/x86_64/kexec-elf-x86_64.c<br>
-@@ -99,7 &#43;99,7 @@ int elf_x86_64_load(int argc, char **argv, const char *buf, off_t len,<br>
- #define ARG_STYLE_NONE&nbsp; 2<br>
-&nbsp; &nbsp; &nbsp; &nbsp;int opt;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;int result = 0;<br>
--&nbsp; &nbsp; &nbsp; char *error_msg = NULL;<br>
-&#43;&nbsp; &nbsp; &nbsp; const char *error_msg = NULL;<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;/* See options.h and add any new options there too! */<br>
-&nbsp; &nbsp; &nbsp; &nbsp;static const struct option options[] = {<br>
-@@ -276,6 &#43;276,6 @@ out:<br>
-&nbsp; &nbsp; &nbsp; &nbsp;free(command_line);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;free(modified_cmdline);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (error_msg)<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(error_msg);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(&quot;%s&quot;, error_msg);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;return result;<br>
- }<br>
---<br>
-2.11.0<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch b/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch<br>
deleted file mode 100644<br>
index 953f13b..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,194 &#43;0,0 @@<br>
-From d29f37bb6e9114aba96c606103b110f511bee9a1 Mon Sep 17 00:00:00 2001<br>
-From: Pratyush Anand &lt;<a href="mailto:panand@redhat.com">panand@redhat.com</a>&gt;<br>
-Date: Wed, 2 Nov 2016 15:05:25 &#43;0530<br>
-Subject: [PATCH 2/9] kexec: generalize and rename get_kernel_stext_sym()<br>
-<br>
-get_kernel_stext_sym() has been defined for both arm and i386. Other<br>
-architecture might need some other kernel symbol address. Therefore rewrite<br>
-this function as generic function to get any kernel symbol address.<br>
-<br>
-More over, kallsyms is not arch specific representation, therefore have<br>
-common function for all arches.<br>
-<br>
-Upstream-Status: Backport [<a href="https://git.linaro.org/people/takahiro.akashi/kexec-tools.git" target="_blank">https://git.linaro.org/people/takahiro.akashi/kexec-tools.git</a>]<br>
-<br>
-Signed-off-by: Pratyush Anand &lt;<a href="mailto:panand@redhat.com">panand@redhat.com</a>&gt;<br>
-[created symbols.c]<br>
-Signed-off-by: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Signed-off-by: He Zhe &lt;<a href="mailto:zhe.he@windriver.com">zhe.he@windriver.com</a>&gt;<br>
----<br>
- kexec/Makefile&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; 1 &#43;<br>
- kexec/arch/arm/crashdump-arm.c&nbsp; | 40 &#43;---------------------------------------<br>
- kexec/arch/i386/crashdump-x86.c | 29 -----------------------------<br>
- kexec/kexec.h&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; 2 &#43;&#43;<br>
- kexec/symbols.c&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| 41 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
- 5 files changed, 45 insertions(&#43;), 68 deletions(-)<br>
- create mode 100644 kexec/symbols.c<br>
-<br>
-diff --git a/kexec/Makefile b/kexec/Makefile<br>
-index 39f365f..2b4fb3d 100644<br>
---- a/kexec/Makefile<br>
-&#43;&#43;&#43; b/kexec/Makefile<br>
-@@ -26,6 &#43;26,7 @@ KEXEC_SRCS_base &#43;= kexec/kernel_version.c<br>
- KEXEC_SRCS_base &#43;= kexec/lzma.c<br>
- KEXEC_SRCS_base &#43;= kexec/zlib.c<br>
- KEXEC_SRCS_base &#43;= kexec/kexec-xen.c<br>
-&#43;KEXEC_SRCS_base &#43;= kexec/symbols.c<br>
-<br>
- KEXEC_GENERATED_SRCS &#43;= $(PURGATORY_HEX_C)<br>
-<br>
-diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c<br>
-index 4a89b5e..245c21a 100644<br>
---- a/kexec/arch/arm/crashdump-arm.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm/crashdump-arm.c<br>
-@@ -73,48 &#43;73,10 @@ static struct crash_elf_info elf_info = {<br>
-<br>
- extern unsigned long long user_page_offset;<br>
-<br>
--/* Retrieve kernel _stext symbol virtual address from /proc/kallsyms */<br>
--static unsigned long long get_kernel_stext_sym(void)<br>
--{<br>
--&nbsp; &nbsp; &nbsp; const char *kallsyms = &quot;/proc/kallsyms&quot;;<br>
--&nbsp; &nbsp; &nbsp; const char *stext = &quot;_stext&quot;;<br>
--&nbsp; &nbsp; &nbsp; char sym[128];<br>
--&nbsp; &nbsp; &nbsp; char line[128];<br>
--&nbsp; &nbsp; &nbsp; FILE *fp;<br>
--&nbsp; &nbsp; &nbsp; unsigned long long vaddr = 0;<br>
--&nbsp; &nbsp; &nbsp; char type;<br>
--<br>
--&nbsp; &nbsp; &nbsp; fp = fopen(kallsyms, &quot;r&quot;);<br>
--&nbsp; &nbsp; &nbsp; if (!fp) {<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf(stderr, &quot;Cannot open %s\n&quot;, kallsyms);<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 0;<br>
--&nbsp; &nbsp; &nbsp; }<br>
--<br>
--&nbsp; &nbsp; &nbsp; while(fgets(line, sizeof(line), fp) != NULL) {<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unsigned long long addr;<br>
--<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (sscanf(line, &quot;%Lx %c %s&quot;, &amp;addr, &amp;type, sym) != 3)<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br>
--<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (strcmp(sym, stext) == 0) {<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgprintf(&quot;kernel symbol %s vaddr = %#llx\n&quot;, stext, addr);<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vaddr = addr;<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
--&nbsp; &nbsp; &nbsp; }<br>
--<br>
--&nbsp; &nbsp; &nbsp; fclose(fp);<br>
--<br>
--&nbsp; &nbsp; &nbsp; if (vaddr == 0)<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf(stderr, &quot;Cannot get kernel %s symbol address\n&quot;, stext);<br>
--<br>
--&nbsp; &nbsp; &nbsp; return vaddr;<br>
--}<br>
--<br>
- static int get_kernel_page_offset(struct kexec_info *info,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;struct crash_elf_info *elf_info)<br>
- {<br>
--&nbsp; &nbsp; &nbsp; unsigned long long stext_sym_addr = get_kernel_stext_sym();<br>
-&#43;&nbsp; &nbsp; &nbsp; unsigned long long stext_sym_addr = get_kernel_sym(&quot;_stext&quot;);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (stext_sym_addr == 0) {<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (user_page_offset != (-1ULL)) {<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elf_info-&gt;page_offset = user_page_offset;<br>
-diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c<br>
-index ab833d4..abf82a5 100644<br>
---- a/kexec/arch/i386/crashdump-x86.c<br>
-&#43;&#43;&#43; b/kexec/arch/i386/crashdump-x86.c<br>
-@@ -102,35 &#43;102,6 @@ static int get_kernel_paddr(struct kexec_info *UNUSED(info),<br>
-&nbsp; &nbsp; &nbsp; &nbsp;return -1;<br>
- }<br>
-<br>
--/* Retrieve kernel symbol virtual address from /proc/kallsyms */<br>
--static unsigned long long get_kernel_sym(const char *symbol)<br>
--{<br>
--&nbsp; &nbsp; &nbsp; const char *kallsyms = &quot;/proc/kallsyms&quot;;<br>
--&nbsp; &nbsp; &nbsp; char sym[128];<br>
--&nbsp; &nbsp; &nbsp; char line[128];<br>
--&nbsp; &nbsp; &nbsp; FILE *fp;<br>
--&nbsp; &nbsp; &nbsp; unsigned long long vaddr;<br>
--&nbsp; &nbsp; &nbsp; char type;<br>
--<br>
--&nbsp; &nbsp; &nbsp; fp = fopen(kallsyms, &quot;r&quot;);<br>
--&nbsp; &nbsp; &nbsp; if (!fp) {<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf(stderr, &quot;Cannot open %s\n&quot;, kallsyms);<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 0;<br>
--&nbsp; &nbsp; &nbsp; }<br>
--<br>
--&nbsp; &nbsp; &nbsp; while(fgets(line, sizeof(line), fp) != NULL) {<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (sscanf(line, &quot;%Lx %c %s&quot;, &amp;vaddr, &amp;type, sym) != 3)<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (strcmp(sym, symbol) == 0) {<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgprintf(&quot;kernel symbol %s vaddr = %16llx\n&quot;, symbol, vaddr);<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return vaddr;<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
--&nbsp; &nbsp; &nbsp; }<br>
--<br>
--&nbsp; &nbsp; &nbsp; fprintf(stderr, &quot;Cannot get kernel %s symbol address\n&quot;, symbol);<br>
--&nbsp; &nbsp; &nbsp; return 0;<br>
--}<br>
--<br>
- /* Retrieve info regarding virtual address kernel has been compiled for and<br>
-&nbsp; * size of the kernel from /proc/kcore. Current /proc/kcore parsing from<br>
-&nbsp; * from kexec-tools fails because of malformed elf notes. A kernel patch has<br>
-diff --git a/kexec/kexec.h b/kexec/kexec.h<br>
-index 9194f1c..b4fafad 100644<br>
---- a/kexec/kexec.h<br>
-&#43;&#43;&#43; b/kexec/kexec.h<br>
-@@ -312,4 &#43;312,6 @@ int xen_kexec_load(struct kexec_info *info);<br>
- int xen_kexec_unload(uint64_t kexec_flags);<br>
- void xen_kexec_exec(void);<br>
-<br>
-&#43;extern unsigned long long get_kernel_sym(const char *text);<br>
-&#43;<br>
- #endif /* KEXEC_H */<br>
-diff --git a/kexec/symbols.c b/kexec/symbols.c<br>
-new file mode 100644<br>
-index 0000000..ea6e327<br>
---- /dev/null<br>
-&#43;&#43;&#43; b/kexec/symbols.c<br>
-@@ -0,0 &#43;1,41 @@<br>
-&#43;#include &lt;stdio.h&gt;<br>
-&#43;#include &lt;string.h&gt;<br>
-&#43;#include &quot;kexec.h&quot;<br>
-&#43;<br>
-&#43;/* Retrieve kernel symbol virtual address from /proc/kallsyms */<br>
-&#43;unsigned long long get_kernel_sym(const char *text)<br>
-&#43;{<br>
-&#43;&nbsp; &nbsp; &nbsp; const char *kallsyms = &quot;/proc/kallsyms&quot;;<br>
-&#43;&nbsp; &nbsp; &nbsp; char sym[128];<br>
-&#43;&nbsp; &nbsp; &nbsp; char line[128];<br>
-&#43;&nbsp; &nbsp; &nbsp; FILE *fp;<br>
-&#43;&nbsp; &nbsp; &nbsp; unsigned long long vaddr = 0;<br>
-&#43;&nbsp; &nbsp; &nbsp; char type;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; fp = fopen(kallsyms, &quot;r&quot;);<br>
-&#43;&nbsp; &nbsp; &nbsp; if (!fp) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf(stderr, &quot;Cannot open %s\n&quot;, kallsyms);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 0;<br>
-&#43;&nbsp; &nbsp; &nbsp; }<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; while (fgets(line, sizeof(line), fp) != NULL) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unsigned long long addr;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (sscanf(line, &quot;%Lx %c %s&quot;, &amp;addr, &amp;type, sym) != 3)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (strcmp(sym, text) == 0) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgprintf(&quot;kernel symbol %s vaddr = %#llx\n&quot;,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text, addr);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vaddr = addr;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
-&#43;&nbsp; &nbsp; &nbsp; }<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; fclose(fp);<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; if (vaddr == 0)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf(stderr, &quot;Cannot get kernel %s symbol address\n&quot;, text);<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; return vaddr;<br>
-&#43;}<br>
---<br>
-1.9.1<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch b/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch<br>
deleted file mode 100644<br>
index 6a1c06d..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,43 &#43;0,0 @@<br>
-From 1c956fc8c6b6324d8d38bba5f9e60a018051c6f5 Mon Sep 17 00:00:00 2001<br>
-From: Jussi Kukkonen &lt;<a href="mailto:jussi.kukkonen@intel.com">jussi.kukkonen@intel.com</a>&gt;<br>
-Date: Thu, 16 Mar 2017 15:39:06 &#43;0200<br>
-Subject: [PATCH 2/2] ppc: Fix format warning with die()<br>
-<br>
-Enable compiling kexec-tools for ppc with -Werror=format-security.<br>
-<br>
-Signed-off-by: Jussi Kukkonen &lt;<a href="mailto:jussi.kukkonen@intel.com">jussi.kukkonen@intel.com</a>&gt;<br>
-Upstream-Status: Submitted [Mailing list]<br>
----<br>
- kexec/arch/ppc/kexec-elf-ppc.c&nbsp; &nbsp; | 2 &#43;-<br>
- kexec/arch/ppc/kexec-uImage-ppc.c | 2 &#43;-<br>
- 2 files changed, 2 insertions(&#43;), 2 deletions(-)<br>
-<br>
-diff --git a/kexec/arch/ppc/kexec-elf-ppc.c b/kexec/arch/ppc/kexec-elf-ppc.c<br>
-index 291f06d..ad43ad1 100644<br>
---- a/kexec/arch/ppc/kexec-elf-ppc.c<br>
-&#43;&#43;&#43; b/kexec/arch/ppc/kexec-elf-ppc.c<br>
-@@ -453,7 &#43;453,7 @@ out:<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (!tmp_cmdline)<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;free(command_line);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (error_msg)<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(error_msg);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(&quot;%s&quot;, error_msg);<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;return result;<br>
- }<br>
-diff --git a/kexec/arch/ppc/kexec-uImage-ppc.c b/kexec/arch/ppc/kexec-uImage-ppc.c<br>
-index 5eec6e4..e8f7adc 100644<br>
---- a/kexec/arch/ppc/kexec-uImage-ppc.c<br>
-&#43;&#43;&#43; b/kexec/arch/ppc/kexec-uImage-ppc.c<br>
-@@ -306,7 &#43;306,7 @@ out:<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (!tmp_cmdline)<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;free(command_line);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (error_msg)<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(error_msg);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(&quot;%s&quot;, error_msg);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;return ret;<br>
- }<br>
-<br>
---<br>
-2.11.0<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch b/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch<br>
deleted file mode 100644<br>
index 1a1c317..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,76 &#43;0,0 @@<br>
-From 16df170ad4808d12acd5e919ac4f6e7f33a247b3 Mon Sep 17 00:00:00 2001<br>
-From: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Date: Thu, 1 Sep 2016 10:57:42 &#43;0900<br>
-Subject: [PATCH 3/9] arm64: identify PHYS_OFFSET correctly<br>
-<br>
-Due to the kernel patch, commit e7cd190385d1 (&quot;arm64: mark reserved<br>
-memblock regions explicitly in iomem&quot;), the current code will not be able<br>
-to identify the correct value of PHYS_OFFSET if some &quot;reserved&quot; memory<br>
-region, which is likely to be UEFI runtime services code/data, exists at<br>
-an address below the first &quot;System RAM&quot; regions.<br>
-<br>
-This patch fixes this issue.<br>
-<br>
-Upstream-Status: Backport [<a href="https://git.linaro.org/people/takahiro.akashi/kexec-tools.git" target="_blank">https://git.linaro.org/people/takahiro.akashi/kexec-tools.git</a>]<br>
-<br>
-Signed-off-by: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Signed-off-by: He Zhe &lt;<a href="mailto:zhe.he@windriver.com">zhe.he@windriver.com</a>&gt;<br>
----<br>
- kexec/arch/arm64/iomem.h&nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; 7 &#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
- kexec/arch/arm64/kexec-arm64.c | 12 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;--<br>
- 2 files changed, 17 insertions(&#43;), 2 deletions(-)<br>
- create mode 100644 kexec/arch/arm64/iomem.h<br>
-<br>
-diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h<br>
-new file mode 100644<br>
-index 0000000..7fd66eb<br>
---- /dev/null<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/iomem.h<br>
-@@ -0,0 &#43;1,7 @@<br>
-&#43;#ifndef IOMEM_H<br>
-&#43;#define IOMEM_H<br>
-&#43;<br>
-&#43;#define SYSTEM_RAM&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;System RAM\n&quot;<br>
-&#43;#define IOMEM_RESERVED&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;reserved\n&quot;<br>
-&#43;<br>
-&#43;#endif<br>
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c<br>
-index 2e8839a..8ac811d 100644<br>
---- a/kexec/arch/arm64/kexec-arm64.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/kexec-arm64.c<br>
-@@ -21,6 &#43;21,7 @@<br>
- #include &quot;crashdump-arm64.h&quot;<br>
- #include &quot;dt-ops.h&quot;<br>
- #include &quot;fs2dt.h&quot;<br>
-&#43;#include &quot;iomem.h&quot;<br>
- #include &quot;kexec-syscall.h&quot;<br>
- #include &quot;arch/options.h&quot;<br>
-<br>
-@@ -475,7 &#43;476,14 @@ static int get_memory_ranges_iomem_cb(void *data, int nr, char *str,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return -1;<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;r = (struct memory_range *)data &#43; nr;<br>
--&nbsp; &nbsp; &nbsp; r-&gt;type = RANGE_RAM;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; if (!strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)))<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r-&gt;type = RANGE_RAM;<br>
-&#43;&nbsp; &nbsp; &nbsp; else if (!strncmp(str, IOMEM_RESERVED, strlen(IOMEM_RESERVED)))<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r-&gt;type = RANGE_RESERVED;<br>
-&#43;&nbsp; &nbsp; &nbsp; else<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 1;<br>
-&#43;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;r-&gt;start = base;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;r-&gt;end = base &#43; length - 1;<br>
-<br>
-@@ -494,7 &#43;502,7 @@ static int get_memory_ranges_iomem_cb(void *data, int nr, char *str,<br>
- static int get_memory_ranges_iomem(struct memory_range *array,<br>
-&nbsp; &nbsp; &nbsp; &nbsp;unsigned int *count)<br>
- {<br>
--&nbsp; &nbsp; &nbsp; *count = kexec_iomem_for_each_line(&quot;System RAM\n&quot;,<br>
-&#43;&nbsp; &nbsp; &nbsp; *count = kexec_iomem_for_each_line(NULL,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;get_memory_ranges_iomem_cb, array);<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (!*count) {<br>
---<br>
-1.9.1<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch b/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch<br>
deleted file mode 100644<br>
index 66600f3..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0004-arm64-kdump-identify-memory-regions.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,202 &#43;0,0 @@<br>
-From 48a4c7874d8264ddbfaec2e9858d7866a2d2eb60 Mon Sep 17 00:00:00 2001<br>
-From: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Date: Wed, 5 Aug 2015 13:16:30 &#43;0900<br>
-Subject: [PATCH 4/9] arm64: kdump: identify memory regions<br>
-<br>
-The following regions need to be identified for later use:<br>
- a) memory regions which belong to the 1st kernel<br>
- b) usable memory reserved for crash dump kernel<br>
-<br>
-We go through /proc/iomem to find out a) and b) which are marked<br>
-as &quot;System RAM&quot; and &quot;Crash kernel&quot;, respectively.<br>
-<br>
-Upstream-Status: Backport [<a href="https://git.linaro.org/people/takahiro.akashi/kexec-tools.git" target="_blank">https://git.linaro.org/people/takahiro.akashi/kexec-tools.git</a>]<br>
-<br>
-Signed-off-by: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Signed-off-by: He Zhe &lt;<a href="mailto:zhe.he@windriver.com">zhe.he@windriver.com</a>&gt;<br>
----<br>
- kexec/arch/arm64/Makefile&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp;2 &#43;<br>
- kexec/arch/arm64/crashdump-arm64.c | 100 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;-<br>
- kexec/arch/arm64/crashdump-arm64.h |&nbsp; 14 &#43;&#43;&#43;&#43;&#43;-<br>
- kexec/arch/arm64/iomem.h&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp;1 &#43;<br>
- 4 files changed, 114 insertions(&#43;), 3 deletions(-)<br>
-<br>
-diff --git a/kexec/arch/arm64/Makefile b/kexec/arch/arm64/Makefile<br>
-index 74b677f..2d4ae0e 100644<br>
---- a/kexec/arch/arm64/Makefile<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/Makefile<br>
-@@ -6,6 &#43;6,8 @@ arm64_FS2DT_INCLUDE &#43;= \<br>
-<br>
- arm64_DT_OPS &#43;= kexec/dt-ops.c<br>
-<br>
-&#43;arm64_MEM_REGIONS = kexec/mem_regions.c<br>
-&#43;<br>
- arm64_CPPFLAGS &#43;= -I $(srcdir)/kexec/<br>
-<br>
- arm64_KEXEC_SRCS &#43;= \<br>
-diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c<br>
-index d2272c8..dcaca43 100644<br>
---- a/kexec/arch/arm64/crashdump-arm64.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/crashdump-arm64.c<br>
-@@ -1,5 &#43;1,13 @@<br>
- /*<br>
-&nbsp; * ARM64 crashdump.<br>
-&#43; *&nbsp; &nbsp; &nbsp;partly derived from arm implementation<br>
-&#43; *<br>
-&#43; * Copyright (c) 2014-2016 Linaro Limited<br>
-&#43; * Author: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-&#43; *<br>
-&#43; * This program is free software; you can redistribute it and/or modify<br>
-&#43; * it under the terms of the GNU General Public License version 2 as<br>
-&#43; * published by the Free Software Foundation.<br>
-&nbsp; */<br>
-<br>
- #define _GNU_SOURCE<br>
-@@ -10,12 &#43;18,102 @@<br>
- #include &quot;kexec.h&quot;<br>
- #include &quot;crashdump.h&quot;<br>
- #include &quot;crashdump-arm64.h&quot;<br>
-&#43;#include &quot;iomem.h&quot;<br>
- #include &quot;kexec-arm64.h&quot;<br>
- #include &quot;kexec-elf.h&quot;<br>
-&#43;#include &quot;mem_regions.h&quot;<br>
-<br>
--struct memory_ranges usablemem_rgns = {};<br>
-&#43;/* memory ranges on crashed kernel */<br>
-&#43;static struct memory_range crash_memory_ranges[CRASH_MAX_MEMORY_RANGES];<br>
-&#43;static struct memory_ranges crash_memory_rgns = {<br>
-&#43;&nbsp; &nbsp; &nbsp; .size = 0,<br>
-&#43;&nbsp; &nbsp; &nbsp; .max_size = CRASH_MAX_MEMORY_RANGES,<br>
-&#43;&nbsp; &nbsp; &nbsp; .ranges = crash_memory_ranges,<br>
-&#43;};<br>
-&#43;<br>
-&#43;/* memory range reserved for crashkernel */<br>
-&#43;struct memory_range crash_reserved_mem;<br>
-&#43;struct memory_ranges usablemem_rgns = {<br>
-&#43;&nbsp; &nbsp; &nbsp; .size = 0,<br>
-&#43;&nbsp; &nbsp; &nbsp; .max_size = 1,<br>
-&#43;&nbsp; &nbsp; &nbsp; .ranges = &amp;crash_reserved_mem,<br>
-&#43;};<br>
-&#43;<br>
-&#43;/*<br>
-&#43; * iomem_range_callback() - callback called for each iomem region<br>
-&#43; * @data: not used<br>
-&#43; * @nr: not used<br>
-&#43; * @str: name of the memory region<br>
-&#43; * @base: start address of the memory region<br>
-&#43; * @length: size of the memory region<br>
-&#43; *<br>
-&#43; * This function is called once for each memory region found in /proc/iomem.<br>
-&#43; * It locates system RAM and crashkernel reserved memory and places these to<br>
-&#43; * variables, respectively, crash_memory_ranges and crash_reserved_mem.<br>
-&#43; */<br>
-&#43;<br>
-&#43;static int iomem_range_callback(void *UNUSED(data), int UNUSED(nr),<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char *str, unsigned long long base,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unsigned long long length)<br>
-&#43;{<br>
-&#43;&nbsp; &nbsp; &nbsp; if (strncmp(str, CRASH_KERNEL, strlen(CRASH_KERNEL)) == 0)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return mem_regions_add(&amp;usablemem_rgns,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;base, length, RANGE_RAM);<br>
-&#43;&nbsp; &nbsp; &nbsp; else if (strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return mem_regions_add(&amp;crash_memory_rgns,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;base, length, RANGE_RAM);<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; return 0;<br>
-&#43;}<br>
-<br>
- int is_crashkernel_mem_reserved(void)<br>
- {<br>
-&#43;&nbsp; &nbsp; &nbsp; if (!crash_reserved_mem.end)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kexec_iomem_for_each_line(NULL, iomem_range_callback, NULL);<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; return crash_reserved_mem.start != crash_reserved_mem.end;<br>
-&#43;}<br>
-&#43;<br>
-&#43;/*<br>
-&#43; * crash_get_memory_ranges() - read system physical memory<br>
-&#43; *<br>
-&#43; * Function reads through system physical memory and stores found memory<br>
-&#43; * regions in crash_memory_ranges.<br>
-&#43; * Regions are sorted in ascending order.<br>
-&#43; *<br>
-&#43; * Returns 0 in case of success and -1 otherwise (errno is set).<br>
-&#43; */<br>
-&#43;static int crash_get_memory_ranges(void)<br>
-&#43;{<br>
-&#43;&nbsp; &nbsp; &nbsp; /*<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp;* First read all memory regions that can be considered as<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp;* system memory including the crash area.<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp;*/<br>
-&#43;&nbsp; &nbsp; &nbsp; if (!usablemem_rgns.size)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kexec_iomem_for_each_line(NULL, iomem_range_callback, NULL);<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; /* allow only a single region for crash dump kernel */<br>
-&#43;&nbsp; &nbsp; &nbsp; if (usablemem_rgns.size != 1) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; errno = EINVAL;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return -1;<br>
-&#43;&nbsp; &nbsp; &nbsp; }<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; dbgprint_mem_range(&quot;Reserved memory range&quot;, &amp;crash_reserved_mem, 1);<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; if (mem_regions_exclude(&amp;crash_memory_rgns, &amp;crash_reserved_mem)) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf(stderr,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Error: Number of crash memory ranges excedeed the max limit\n&quot;);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; errno = ENOMEM;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return -1;<br>
-&#43;&nbsp; &nbsp; &nbsp; }<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; /*<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp;* Make sure that the memory regions are sorted.<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp;*/<br>
-&#43;&nbsp; &nbsp; &nbsp; mem_regions_sort(&amp;crash_memory_rgns);<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; dbgprint_mem_range(&quot;Coredump memory ranges&quot;,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;crash_memory_rgns.ranges, crash_memory_rgns.size);<br>
-&#43;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;return 0;<br>
- }<br>
-diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h<br>
-index f33c7a2..07a0ed0 100644<br>
---- a/kexec/arch/arm64/crashdump-arm64.h<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/crashdump-arm64.h<br>
-@@ -1,12 &#43;1,22 @@<br>
- /*<br>
-&nbsp; * ARM64 crashdump.<br>
-&#43; *<br>
-&#43; * Copyright (c) 2014-2016 Linaro Limited<br>
-&#43; * Author: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-&#43; *<br>
-&#43; * This program is free software; you can redistribute it and/or modify<br>
-&#43; * it under the terms of the GNU General Public License version 2 as<br>
-&#43; * published by the Free Software Foundation.<br>
-&nbsp; */<br>
-<br>
--#if !defined(CRASHDUMP_ARM64_H)<br>
-&#43;#ifndef CRASHDUMP_ARM64_H<br>
- #define CRASHDUMP_ARM64_H<br>
-<br>
- #include &quot;kexec.h&quot;<br>
-<br>
-&#43;#define CRASH_MAX_MEMORY_RANGES&nbsp; &nbsp; &nbsp; &nbsp;32<br>
-&#43;<br>
- extern struct memory_ranges usablemem_rgns;<br>
-&#43;extern struct memory_range crash_reserved_mem;<br>
-<br>
--#endif<br>
-&#43;#endif /* CRASHDUMP_ARM64_H */<br>
-diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h<br>
-index 7fd66eb..20cda87 100644<br>
---- a/kexec/arch/arm64/iomem.h<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/iomem.h<br>
-@@ -2,6 &#43;2,7 @@<br>
- #define IOMEM_H<br>
-<br>
- #define SYSTEM_RAM&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;System RAM\n&quot;<br>
-&#43;#define CRASH_KERNEL&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Crash kernel\n&quot;<br>
- #define IOMEM_RESERVED&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;reserved\n&quot;<br>
-<br>
- #endif<br>
---<br>
-1.9.1<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch b/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch<br>
deleted file mode 100644<br>
index fe535b6..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0005-arm64-kdump-add-elf-core-header-segment.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,191 &#43;0,0 @@<br>
-From 769da25627cebb2a53caee5d5be78a32d376adc1 Mon Sep 17 00:00:00 2001<br>
-From: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Date: Wed, 5 Aug 2015 13:45:15 &#43;0900<br>
-Subject: [PATCH 5/9] arm64: kdump: add elf core header segment<br>
-<br>
-Elf core header contains the information necessary for the coredump of<br>
-the 1st kernel, including its physcal memory layout as well as cpu register<br>
-states at the panic.<br>
-The segment is allocated inside the reserved memory of crash dump kernel.<br>
-<br>
-Upstream-Status: Backport [<a href="https://git.linaro.org/people/takahiro.akashi/kexec-tools.git" target="_blank">https://git.linaro.org/people/takahiro.akashi/kexec-tools.git</a>]<br>
-<br>
-Signed-off-by: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Signed-off-by: He Zhe &lt;<a href="mailto:zhe.he@windriver.com">zhe.he@windriver.com</a>&gt;<br>
----<br>
- kexec/arch/arm64/crashdump-arm64.c | 96 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
- kexec/arch/arm64/crashdump-arm64.h |&nbsp; 3 &#43;&#43;<br>
- kexec/arch/arm64/iomem.h&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; 2 &#43;<br>
- kexec/arch/arm64/kexec-elf-arm64.c | 10 &#43;&#43;&#43;&#43;<br>
- 4 files changed, 111 insertions(&#43;)<br>
-<br>
-diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c<br>
-index dcaca43..8346131 100644<br>
---- a/kexec/arch/arm64/crashdump-arm64.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/crashdump-arm64.c<br>
-@@ -39,6 &#43;39,39 @@ struct memory_ranges usablemem_rgns = {<br>
-&nbsp; &nbsp; &nbsp; &nbsp;.ranges = &amp;crash_reserved_mem,<br>
- };<br>
-<br>
-&#43;struct memory_range elfcorehdr_mem;<br>
-&#43;<br>
-&#43;static struct crash_elf_info elf_info = {<br>
-&#43;&nbsp; &nbsp; &nbsp; .class&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = ELFCLASS64,<br>
-&#43;#if (__BYTE_ORDER == __LITTLE_ENDIAN)<br>
-&#43;&nbsp; &nbsp; &nbsp; .data&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= ELFDATA2LSB,<br>
-&#43;#else<br>
-&#43;&nbsp; &nbsp; &nbsp; .data&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= ELFDATA2MSB,<br>
-&#43;#endif<br>
-&#43;&nbsp; &nbsp; &nbsp; .machine&nbsp; &nbsp; &nbsp; &nbsp; = EM_AARCH64,<br>
-&#43;};<br>
-&#43;<br>
-&#43;/*<br>
-&#43; * Note: The returned value is correct only if !CONFIG_RANDOMIZE_BASE.<br>
-&#43; */<br>
-&#43;static uint64_t get_kernel_page_offset(void)<br>
-&#43;{<br>
-&#43;&nbsp; &nbsp; &nbsp; int i;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; if (elf_info.kern_vaddr_start == UINT64_MAX)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return UINT64_MAX;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; /* Current max virtual memory range is 48-bits. */<br>
-&#43;&nbsp; &nbsp; &nbsp; for (i = 48; i &gt; 0; i--)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!(elf_info.kern_vaddr_start &amp; (1UL &lt;&lt; i)))<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; if (i &lt;= 0)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return UINT64_MAX;<br>
-&#43;&nbsp; &nbsp; &nbsp; else<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return UINT64_MAX &lt;&lt; i;<br>
-&#43;}<br>
-&#43;<br>
- /*<br>
-&nbsp; * iomem_range_callback() - callback called for each iomem region<br>
-&nbsp; * @data: not used<br>
-@@ -62,6 &#43;95,10 @@ static int iomem_range_callback(void *UNUSED(data), int UNUSED(nr),<br>
-&nbsp; &nbsp; &nbsp; &nbsp;else if (strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0)<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return mem_regions_add(&amp;crash_memory_rgns,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; base, length, RANGE_RAM);<br>
-&#43;&nbsp; &nbsp; &nbsp; else if (strncmp(str, KERNEL_CODE, strlen(KERNEL_CODE)) == 0)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elf_info.kern_paddr_start = base;<br>
-&#43;&nbsp; &nbsp; &nbsp; else if (strncmp(str, KERNEL_DATA, strlen(KERNEL_DATA)) == 0)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elf_info.kern_size = base &#43; length - elf_info.kern_paddr_start;<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;return 0;<br>
- }<br>
-@@ -115,5 &#43;152,64 @@ static int crash_get_memory_ranges(void)<br>
-&nbsp; &nbsp; &nbsp; &nbsp;dbgprint_mem_range(&quot;Coredump memory ranges&quot;,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; crash_memory_rgns.ranges, crash_memory_rgns.size);<br>
-<br>
-&#43;&nbsp; &nbsp; &nbsp; /*<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp;* For additional kernel code/data segment.<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp;* kern_paddr_start/kern_size are determined in iomem_range_callback<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp;*/<br>
-&#43;&nbsp; &nbsp; &nbsp; elf_info.kern_vaddr_start = get_kernel_sym(&quot;_text&quot;);<br>
-&#43;&nbsp; &nbsp; &nbsp; if (!elf_info.kern_vaddr_start)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elf_info.kern_vaddr_start = UINT64_MAX;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; return 0;<br>
-&#43;}<br>
-&#43;<br>
-&#43;/*<br>
-&#43; * load_crashdump_segments() - load the elf core header<br>
-&#43; * @info: kexec info structure<br>
-&#43; *<br>
-&#43; * This function creates and loads an additional segment of elf core header<br>
-&#43; : which is used to construct /proc/vmcore on crash dump kernel.<br>
-&#43; *<br>
-&#43; * Return 0 in case of success and -1 in case of error.<br>
-&#43; */<br>
-&#43;<br>
-&#43;int load_crashdump_segments(struct kexec_info *info)<br>
-&#43;{<br>
-&#43;&nbsp; &nbsp; &nbsp; unsigned long elfcorehdr;<br>
-&#43;&nbsp; &nbsp; &nbsp; unsigned long bufsz;<br>
-&#43;&nbsp; &nbsp; &nbsp; void *buf;<br>
-&#43;&nbsp; &nbsp; &nbsp; int err;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; /*<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp;* First fetch all the memory (RAM) ranges that we are going to<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp;* pass to the crash dump kernel during panic.<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp;*/<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; err = crash_get_memory_ranges();<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; if (err)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return err;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; elf_info.page_offset = get_kernel_page_offset();<br>
-&#43;&nbsp; &nbsp; &nbsp; dbgprintf(&quot;%s: page_offset:&nbsp; &nbsp;%016llx\n&quot;, __func__,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elf_info.page_offset);<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; err = crash_create_elf64_headers(info, &amp;elf_info,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; crash_memory_rgns.ranges, crash_memory_rgns.size,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;buf, &amp;bufsz, ELF_CORE_HEADER_ALIGN);<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; if (err)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return err;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 0,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; crash_reserved_mem.start, crash_reserved_mem.end,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -1, 0);<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; elfcorehdr_mem.start = elfcorehdr;<br>
-&#43;&nbsp; &nbsp; &nbsp; elfcorehdr_mem.end = elfcorehdr &#43; bufsz - 1;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; dbgprintf(&quot;%s: elfcorehdr 0x%llx-0x%llx\n&quot;, __func__,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elfcorehdr_mem.start, elfcorehdr_mem.end);<br>
-&#43;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;return 0;<br>
- }<br>
-diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h<br>
-index 07a0ed0..da75a2d 100644<br>
---- a/kexec/arch/arm64/crashdump-arm64.h<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/crashdump-arm64.h<br>
-@@ -18,5 &#43;18,8 @@<br>
-<br>
- extern struct memory_ranges usablemem_rgns;<br>
- extern struct memory_range crash_reserved_mem;<br>
-&#43;extern struct memory_range elfcorehdr_mem;<br>
-&#43;<br>
-&#43;extern int load_crashdump_segments(struct kexec_info *info);<br>
-<br>
- #endif /* CRASHDUMP_ARM64_H */<br>
-diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h<br>
-index 20cda87..d4864bb 100644<br>
---- a/kexec/arch/arm64/iomem.h<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/iomem.h<br>
-@@ -2,6 &#43;2,8 @@<br>
- #define IOMEM_H<br>
-<br>
- #define SYSTEM_RAM&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;System RAM\n&quot;<br>
-&#43;#define KERNEL_CODE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;Kernel code\n&quot;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-&#43;#define KERNEL_DATA&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;Kernel data\n&quot;<br>
- #define CRASH_KERNEL&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Crash kernel\n&quot;<br>
- #define IOMEM_RESERVED&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;reserved\n&quot;<br>
-<br>
-diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c<br>
-index daf8bf0..c70a37a 100644<br>
---- a/kexec/arch/arm64/kexec-elf-arm64.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/kexec-elf-arm64.c<br>
-@@ -119,6 &#43;119,16 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,<br>
-&nbsp; &nbsp; &nbsp; &nbsp;dbgprintf(&quot;%s: PE format:&nbsp; &nbsp; &nbsp; %s\n&quot;, __func__,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(arm64_header_check_pe_sig(header) ? &quot;yes&quot; : &quot;no&quot;));<br>
-<br>
-&#43;&nbsp; &nbsp; &nbsp; if (info-&gt;kexec_flags &amp; KEXEC_ON_CRASH) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* create and initialize elf core header segment */<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = load_crashdump_segments(info);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (result) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgprintf(&quot;%s: Creating eflcorehdr failed.\n&quot;,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; __func__);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; goto exit;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
-&#43;&nbsp; &nbsp; &nbsp; }<br>
-&#43;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;/* load the kernel */<br>
-&nbsp; &nbsp; &nbsp; &nbsp;result = elf_exec_load(&amp;ehdr, info);<br>
-<br>
---<br>
-1.9.1<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch b/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch<br>
deleted file mode 100644<br>
index 4149551..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0006-arm64-kdump-set-up-kernel-image-segment.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,137 &#43;0,0 @@<br>
-From 4079c93ac5453ef5f7889ab64920c1e9427690ef Mon Sep 17 00:00:00 2001<br>
-From: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Date: Tue, 17 Feb 2015 16:06:55 &#43;0900<br>
-Subject: [PATCH 6/9] arm64: kdump: set up kernel image segment<br>
-<br>
-On arm64, we can use the same kernel image as 1st kernel, but<br>
-we have to modify the entry point as well as segments' addresses<br>
-in the kernel's elf header in order to load them into correct places.<br>
-<br>
-Upstream-Status: Backport [<a href="https://git.linaro.org/people/takahiro.akashi/kexec-tools.git" target="_blank">https://git.linaro.org/people/takahiro.akashi/kexec-tools.git</a>]<br>
-<br>
-Signed-off-by: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Signed-off-by: He Zhe &lt;<a href="mailto:zhe.he@windriver.com">zhe.he@windriver.com</a>&gt;<br>
----<br>
- kexec/arch/arm64/crashdump-arm64.c | 23 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
- kexec/arch/arm64/crashdump-arm64.h |&nbsp; 1 &#43;<br>
- kexec/arch/arm64/kexec-arm64.c&nbsp; &nbsp; &nbsp;| 25 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;-----<br>
- kexec/arch/arm64/kexec-elf-arm64.c | 10 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;-<br>
- 4 files changed, 53 insertions(&#43;), 6 deletions(-)<br>
-<br>
-diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c<br>
-index 8346131..9517329 100644<br>
---- a/kexec/arch/arm64/crashdump-arm64.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/crashdump-arm64.c<br>
-@@ -213,3 &#43;213,26 @@ int load_crashdump_segments(struct kexec_info *info)<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;return 0;<br>
- }<br>
-&#43;<br>
-&#43;/*<br>
-&#43; * e_entry and p_paddr are actually in virtual address space.<br>
-&#43; * Those values will be translated to physcal addresses by<br>
-&#43; * using virt_to_phys().<br>
-&#43; * So let's get ready for later use so the memory base (phys_offset)<br>
-&#43; * will be correctly replaced with crash_reserved_mem.start.<br>
-&#43; */<br>
-&#43;void modify_ehdr_for_crashdump(struct mem_ehdr *ehdr)<br>
-&#43;{<br>
-&#43;&nbsp; &nbsp; &nbsp; struct mem_phdr *phdr;<br>
-&#43;&nbsp; &nbsp; &nbsp; int i;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; ehdr-&gt;e_entry &#43;= - arm64_mem.phys_offset &#43; crash_reserved_mem.start;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; for (i = 0; i &lt; ehdr-&gt;e_phnum; i&#43;&#43;) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; phdr = &amp;ehdr-&gt;e_phdr[i];<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (phdr-&gt;p_type != PT_LOAD)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; phdr-&gt;p_paddr &#43;=<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (-arm64_mem.phys_offset &#43; crash_reserved_mem.start);<br>
-&#43;&nbsp; &nbsp; &nbsp; }<br>
-&#43;}<br>
-diff --git a/kexec/arch/arm64/crashdump-arm64.h b/kexec/arch/arm64/crashdump-arm64.h<br>
-index da75a2d..382f571 100644<br>
---- a/kexec/arch/arm64/crashdump-arm64.h<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/crashdump-arm64.h<br>
-@@ -21,5 &#43;21,6 @@ extern struct memory_range crash_reserved_mem;<br>
- extern struct memory_range elfcorehdr_mem;<br>
-<br>
- extern int load_crashdump_segments(struct kexec_info *info);<br>
-&#43;extern void modify_ehdr_for_crashdump(struct mem_ehdr *ehdr);<br>
-<br>
- #endif /* CRASHDUMP_ARM64_H */<br>
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c<br>
-index 8ac811d..cec4e41 100644<br>
---- a/kexec/arch/arm64/kexec-arm64.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/kexec-arm64.c<br>
-@@ -307,12 &#43;307,27 @@ unsigned long arm64_locate_kernel_segment(struct kexec_info *info)<br>
- {<br>
-&nbsp; &nbsp; &nbsp; &nbsp;unsigned long hole;<br>
-<br>
--&nbsp; &nbsp; &nbsp; hole = locate_hole(info,<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arm64_mem.text_offset &#43; arm64_mem.image_size,<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MiB(2), 0, ULONG_MAX, 1);<br>
-&#43;&nbsp; &nbsp; &nbsp; if (info-&gt;kexec_flags &amp; KEXEC_ON_CRASH) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unsigned long hole_end;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hole = (crash_reserved_mem.start &lt; mem_min ?<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mem_min : crash_reserved_mem.start);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hole = _ALIGN_UP(hole, MiB(2));<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hole_end = hole &#43; arm64_mem.text_offset &#43; arm64_mem.image_size;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ((hole_end &gt; mem_max) ||<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (hole_end &gt; crash_reserved_mem.end)) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgprintf(&quot;%s: Crash kernel out of range\n&quot;, __func__);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hole = ULONG_MAX;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
-&#43;&nbsp; &nbsp; &nbsp; } else {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hole = locate_hole(info,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arm64_mem.text_offset &#43; arm64_mem.image_size,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MiB(2), 0, ULONG_MAX, 1);<br>
-<br>
--&nbsp; &nbsp; &nbsp; if (hole == ULONG_MAX)<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgprintf(&quot;%s: locate_hole failed\n&quot;, __func__);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (hole == ULONG_MAX)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgprintf(&quot;%s: locate_hole failed\n&quot;, __func__);<br>
-&#43;&nbsp; &nbsp; &nbsp; }<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;return hole;<br>
- }<br>
-diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c<br>
-index c70a37a..842ce21 100644<br>
---- a/kexec/arch/arm64/kexec-elf-arm64.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/kexec-elf-arm64.c<br>
-@@ -9,6 &#43;9,7 @@<br>
- #include &lt;stdlib.h&gt;<br>
- #include &lt;linux/elf.h&gt;<br>
-<br>
-&#43;#include &quot;crashdump-arm64.h&quot;<br>
- #include &quot;kexec-arm64.h&quot;<br>
- #include &quot;kexec-elf.h&quot;<br>
- #include &quot;kexec-syscall.h&quot;<br>
-@@ -105,7 &#43;106,8 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,<br>
-&nbsp; &nbsp; &nbsp; &nbsp;}<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;arm64_mem.vp_offset = _ALIGN_DOWN(ehdr.e_entry, MiB(2));<br>
--&nbsp; &nbsp; &nbsp; arm64_mem.vp_offset -= kernel_segment - get_phys_offset();<br>
-&#43;&nbsp; &nbsp; &nbsp; if (!(info-&gt;kexec_flags &amp; KEXEC_ON_CRASH))<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arm64_mem.vp_offset -= kernel_segment - get_phys_offset();<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;dbgprintf(&quot;%s: kernel_segment: %016lx\n&quot;, __func__, kernel_segment);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;dbgprintf(&quot;%s: text_offset:&nbsp; &nbsp; %016lx\n&quot;, __func__,<br>
-@@ -127,6 &#43;129,12 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;__func__);<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;goto exit;<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /*<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* offset addresses in order to fit vmlinux<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* (elf_exec) into crash kernel's memory<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; modify_ehdr_for_crashdump(&amp;ehdr);<br>
-&nbsp; &nbsp; &nbsp; &nbsp;}<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;/* load the kernel */<br>
---<br>
-1.9.1<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch b/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch<br>
deleted file mode 100644<br>
index 2745466..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0007-arm64-kdump-set-up-other-segments.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,35 &#43;0,0 @@<br>
-From 07ad14e12665221d754fde8e47c32ac18c24586a Mon Sep 17 00:00:00 2001<br>
-From: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Date: Fri, 31 Jul 2015 20:01:39 &#43;0900<br>
-Subject: [PATCH 7/9] arm64: kdump: set up other segments<br>
-<br>
-We make sure that all the other segments, initrd and device-tree blob,<br>
-also be loaded into the reserved memory of crash dump kernel.<br>
-<br>
-Upstream-Status: Backport [<a href="https://git.linaro.org/people/takahiro.akashi/kexec-tools.git" target="_blank">https://git.linaro.org/people/takahiro.akashi/kexec-tools.git</a>]<br>
-<br>
-Signed-off-by: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Signed-off-by: He Zhe &lt;<a href="mailto:zhe.he@windriver.com">zhe.he@windriver.com</a>&gt;<br>
----<br>
- kexec/arch/arm64/kexec-arm64.c | 5 &#43;&#43;&#43;&#43;-<br>
- 1 file changed, 4 insertions(&#43;), 1 deletion(-)<br>
-<br>
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c<br>
-index cec4e41..78a0035 100644<br>
---- a/kexec/arch/arm64/kexec-arm64.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/kexec-arm64.c<br>
-@@ -374,7 &#43;374,10 @@ int arm64_load_other_segments(struct kexec_info *info,<br>
-&nbsp; &nbsp; &nbsp; &nbsp;/* Put the other segments after the image. */<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;hole_min = image_base &#43; arm64_mem.image_size;<br>
--&nbsp; &nbsp; &nbsp; hole_max = ULONG_MAX;<br>
-&#43;&nbsp; &nbsp; &nbsp; if (info-&gt;kexec_flags &amp; KEXEC_ON_CRASH)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hole_max = crash_reserved_mem.end;<br>
-&#43;&nbsp; &nbsp; &nbsp; else<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hole_max = ULONG_MAX;<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (arm64_opts.initrd) {<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;initrd_buf = slurp_file(arm64_opts.initrd, &amp;initrd_size);<br>
---<br>
-1.9.1<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch b/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch<br>
deleted file mode 100644<br>
index 31c3d85..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,150 &#43;0,0 @@<br>
-From 23bf7ac189cc3b87ceb9d1d3b69b5c4815354add Mon Sep 17 00:00:00 2001<br>
-From: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Date: Wed, 27 Jan 2016 13:38:39 &#43;0900<br>
-Subject: [PATCH 8/9] arm64: kdump: add DT properties to crash dump kernel's<br>
- dtb<br>
-<br>
-We pass the following properties to crash dump kernel:<br>
-linux,elfcorehdr: elf core header segment,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;same as &quot;elfcorehdr=&quot; kernel parameter on other archs<br>
-linux,usable-memory-range: usable memory reserved for crash dump kernel<br>
-<br>
-Upstream-Status: Backport [<a href="https://git.linaro.org/people/takahiro.akashi/kexec-tools.git" target="_blank">https://git.linaro.org/people/takahiro.akashi/kexec-tools.git</a>]<br>
-<br>
-Signed-off-by: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Signed-off-by: He Zhe &lt;<a href="mailto:zhe.he@windriver.com">zhe.he@windriver.com</a>&gt;<br>
----<br>
- kexec/arch/arm64/kexec-arm64.c&nbsp; &nbsp; &nbsp;| 76 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;---<br>
- kexec/arch/arm64/kexec-elf-arm64.c |&nbsp; 5 ---<br>
- 2 files changed, 71 insertions(&#43;), 10 deletions(-)<br>
-<br>
-diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c<br>
-index 78a0035..a8fb64f 100644<br>
---- a/kexec/arch/arm64/kexec-arm64.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/kexec-arm64.c<br>
-@@ -128,9 &#43;128,6 @@ int arch_process_options(int argc, char **argv)<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case OPT_INITRD:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;arm64_opts.initrd = optarg;<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case OPT_PANIC:<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(&quot;load-panic (-p) not supported&quot;);<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default:<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break; /* Ignore core and unknown options. */<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
-@@ -285,8 &#43;282,12 @@ on_success:<br>
-&nbsp; * setup_2nd_dtb - Setup the 2nd stage kernel's dtb.<br>
-&nbsp; */<br>
-<br>
--static int setup_2nd_dtb(struct dtb *dtb, char *command_line)<br>
-&#43;static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash)<br>
- {<br>
-&#43;&nbsp; &nbsp; &nbsp; char *new_buf;<br>
-&#43;&nbsp; &nbsp; &nbsp; int new_size;<br>
-&#43;&nbsp; &nbsp; &nbsp; int nodeoffset;<br>
-&#43;&nbsp; &nbsp; &nbsp; uint64_t range[2];<br>
-&nbsp; &nbsp; &nbsp; &nbsp;int result;<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;result = fdt_check_header(dtb-&gt;buf);<br>
-@@ -298,8 &#43;299,72 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line)<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;result = set_bootargs(dtb, command_line);<br>
-<br>
-&#43;&nbsp; &nbsp; &nbsp; /* remove those anyway */<br>
-&#43;&nbsp; &nbsp; &nbsp; nodeoffset = fdt_path_offset(dtb-&gt;buf, &quot;/chosen&quot;);<br>
-&#43;&nbsp; &nbsp; &nbsp; fdt_delprop(dtb-&gt;buf, nodeoffset, &quot;linux,crashkernel-base&quot;);<br>
-&#43;&nbsp; &nbsp; &nbsp; fdt_delprop(dtb-&gt;buf, nodeoffset, &quot;linux,crashkernel-size&quot;);<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; if (on_crash) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nodeoffset = fdt_path_offset(dtb-&gt;buf, &quot;/chosen&quot;);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fdt_delprop(dtb-&gt;buf, nodeoffset, &quot;linux,elfcorehdr&quot;);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fdt_delprop(dtb-&gt;buf, nodeoffset, &quot;linux,usable-memory-range&quot;);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new_size = fdt_totalsize(dtb-&gt;buf)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#43; 2 * (sizeof(struct fdt_property)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#43; FDT_TAGALIGN(sizeof(range)))<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#43; strlen(&quot;linux,elfcorehdr&quot;) &#43; 1<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#43; strlen(&quot;linux,usable-memory-range&quot;) &#43; 1;<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new_buf = xmalloc(new_size);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = fdt_open_into(dtb-&gt;buf, new_buf, new_size);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (result) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgprintf(&quot;%s: fdt_open_into failed: %s\n&quot;, __func__,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fdt_strerror(result));<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = -ENOSPC;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; goto on_error;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; range[0] = cpu_to_be64(elfcorehdr_mem.start);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; range[1] = cpu_to_be64(elfcorehdr_mem.end<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - elfcorehdr_mem.start &#43; 1);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nodeoffset = fdt_path_offset(new_buf, &quot;/chosen&quot;);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = fdt_setprop(new_buf, nodeoffset, &quot;linux,elfcorehdr&quot;,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (void *)range, sizeof(range));<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (result) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgprintf(&quot;%s: fdt_setprop failed: %s\n&quot;, __func__,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fdt_strerror(result));<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = -EINVAL;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; goto on_error;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; range[0] = cpu_to_be64(crash_reserved_mem.start);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; range[1] = cpu_to_be64(crash_reserved_mem.end<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - crash_reserved_mem.start &#43; 1);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nodeoffset = fdt_path_offset(new_buf, &quot;/chosen&quot;);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = fdt_setprop(new_buf, nodeoffset,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;linux,usable-memory-range&quot;,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (void *)range, sizeof(range));<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (result) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgprintf(&quot;%s: fdt_setprop failed: %s\n&quot;, __func__,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fdt_strerror(result));<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = -EINVAL;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; goto on_error;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fdt_pack(new_buf);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dtb-&gt;buf = new_buf;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dtb-&gt;size = fdt_totalsize(new_buf);<br>
-&#43;&nbsp; &nbsp; &nbsp; }<br>
-&#43;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;dump_reservemap(dtb);<br>
-<br>
-&#43;<br>
-&#43;&nbsp; &nbsp; &nbsp; return result;<br>
-&#43;<br>
-&#43;on_error:<br>
-&#43;&nbsp; &nbsp; &nbsp; fprintf(stderr, &quot;kexec: %s failed.\n&quot;, __func__);<br>
-&#43;&nbsp; &nbsp; &nbsp; if (new_buf)<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; free(new_buf);<br>
-&#43;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;return result;<br>
- }<br>
-<br>
-@@ -366,7 &#43;431,8 @@ int arm64_load_other_segments(struct kexec_info *info,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
-&nbsp; &nbsp; &nbsp; &nbsp;}<br>
-<br>
--&nbsp; &nbsp; &nbsp; result = setup_2nd_dtb(&amp;dtb, command_line);<br>
-&#43;&nbsp; &nbsp; &nbsp; result = setup_2nd_dtb(&amp;dtb, command_line,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; info-&gt;kexec_flags &amp; KEXEC_ON_CRASH);<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (result)<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return -EFAILED;<br>
-diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c<br>
-index 842ce21..b17a31a 100644<br>
---- a/kexec/arch/arm64/kexec-elf-arm64.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/kexec-elf-arm64.c<br>
-@@ -47,11 &#43;47,6 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf,<br>
-&nbsp; &nbsp; &nbsp; &nbsp;int result;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;int i;<br>
-<br>
--&nbsp; &nbsp; &nbsp; if (info-&gt;kexec_flags &amp; KEXEC_ON_CRASH) {<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf(stderr, &quot;kexec: kdump not yet supported on arm64\n&quot;);<br>
--&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return -EFAILED;<br>
--&nbsp; &nbsp; &nbsp; }<br>
--<br>
-&nbsp; &nbsp; &nbsp; &nbsp;result = build_elf_exec_info(kernel_buf, kernel_size, &amp;ehdr, 0);<br>
-<br>
-&nbsp; &nbsp; &nbsp; &nbsp;if (result &lt; 0) {<br>
---<br>
-1.9.1<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch b/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch<br>
deleted file mode 100644<br>
index 8b1c018..0000000<br>
--- a/meta/recipes-kernel/kexec/kexec-tools/0009-arm64-kdump-Add-support-for-binary-image-files.patch<br>
&#43;&#43;&#43; /dev/null<br>
@@ -1,52 &#43;0,0 @@<br>
-From 5a4958f01a793c3e7f440f5bae75666a4349cc50 Mon Sep 17 00:00:00 2001<br>
-From: Pratyush Anand &lt;<a href="mailto:panand@redhat.com">panand@redhat.com</a>&gt;<br>
-Date: Thu, 14 May 2015 11:25:37 &#43;0530<br>
-Subject: [PATCH 9/9] arm64: kdump: Add support for binary image files<br>
-<br>
-This patch adds support to use binary image ie arch/arm64/boot/Image with<br>
-kdump.<br>
-<br>
-Upstream-Status: Backport [<a href="https://git.linaro.org/people/takahiro.akashi/kexec-tools.git" target="_blank">https://git.linaro.org/people/takahiro.akashi/kexec-tools.git</a>]<br>
-<br>
-Signed-off-by: Pratyush Anand &lt;<a href="mailto:panand@redhat.com">panand@redhat.com</a>&gt;<br>
-[<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>: a bit reworked]<br>
-Signed-off-by: AKASHI Takahiro &lt;<a href="mailto:takahiro.akashi@linaro.org">takahiro.akashi@linaro.org</a>&gt;<br>
-Signed-off-by: He Zhe &lt;<a href="mailto:zhe.he@windriver.com">zhe.he@windriver.com</a>&gt;<br>
----<br>
- kexec/arch/arm64/kexec-image-arm64.c | 12 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
- 1 file changed, 12 insertions(&#43;)<br>
-<br>
-diff --git a/kexec/arch/arm64/kexec-image-arm64.c b/kexec/arch/arm64/kexec-image-arm64.c<br>
-index 960ed96..982e431 100644<br>
---- a/kexec/arch/arm64/kexec-image-arm64.c<br>
-&#43;&#43;&#43; b/kexec/arch/arm64/kexec-image-arm64.c<br>
-@@ -4,7 &#43;4,9 @@<br>
-<br>
- #define _GNU_SOURCE<br>
-<br>
-&#43;#include &quot;crashdump-arm64.h&quot;<br>
- #include &quot;kexec-arm64.h&quot;<br>
-&#43;#include &quot;kexec-syscall.h&quot;<br>
- #include &lt;limits.h&gt;<br>
-<br>
- int image_arm64_probe(const char *kernel_buf, off_t kernel_size)<br>
-@@ -58,6 &#43;60,16 @@ int image_arm64_load(int argc, char **argv, const char *kernel_buf,<br>
-&nbsp; &nbsp; &nbsp; &nbsp;dbgprintf(&quot;%s: PE format:&nbsp; &nbsp; &nbsp; %s\n&quot;, __func__,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(arm64_header_check_pe_sig(header) ? &quot;yes&quot; : &quot;no&quot;));<br>
-<br>
-&#43;&nbsp; &nbsp; &nbsp; if (info-&gt;kexec_flags &amp; KEXEC_ON_CRASH) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* create and initialize elf core header segment */<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = load_crashdump_segments(info);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (result) {<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgprintf(&quot;%s: Creating eflcorehdr failed.\n&quot;,<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; __func__);<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; goto exit;<br>
-&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
-&#43;&nbsp; &nbsp; &nbsp; }<br>
-&#43;<br>
-&nbsp; &nbsp; &nbsp; &nbsp;/* load the kernel */<br>
-&nbsp; &nbsp; &nbsp; &nbsp;add_segment_phys_virt(info, kernel_buf, kernel_size,<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;kernel_segment &#43; arm64_mem.text_offset,<br>
---<br>
-1.9.1<br>
-<br>
diff --git a/meta/recipes-kernel/kexec/<a href="http://kexec-tools_2.0.14.bb" target="_blank">kexec-tools_2.0.14.bb</a> b/meta/recipes-kernel/kexec/<a href="http://kexec-tools_2.0.15.bb" target="_blank">kexec-tools_2.0.15.bb</a><br>
similarity index 63%<br>
rename from meta/recipes-kernel/kexec/<a href="http://kexec-tools_2.0.14.bb" target="_blank">kexec-tools_2.0.14.bb</a><br>
rename to meta/recipes-kernel/kexec/<a href="http://kexec-tools_2.0.15.bb" target="_blank">kexec-tools_2.0.15.bb</a><br>
index 0f6398f1..6bd9025 100644<br>
--- a/meta/recipes-kernel/kexec/<a href="http://kexec-tools_2.0.14.bb" target="_blank">kexec-tools_2.0.14.bb</a><br>
&#43;&#43;&#43; b/meta/recipes-kernel/kexec/<a href="http://kexec-tools_2.0.15.bb" target="_blank">kexec-tools_2.0.15.bb</a><br>
@@ -5,26 &#43;5,13 @@ EXTRA_OECONF = &quot; --with-zlib=yes&quot;<br>
&nbsp;SRC_URI &#43;= &quot;${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="file:///\\0002-powerpc-change-the-memory-size-limit.patch">file://0002-powerpc-change-the-memory-size-limit.patch</a> \<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="file:///\\0001-purgatory-Pass-r-directly-to-linker.patch">file://0001-purgatory-Pass-r-directly-to-linker.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0001-vmcore-dmesg-Define-_GNU_SOURCE.patch">file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch">
file://0001-kexec-exntend-the-semantics-of-kexec_iomem_for_each_.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch">
file://0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0003-arm64-identify-PHYS_OFFSET-correctly.patch">
file://0003-arm64-identify-PHYS_OFFSET-correctly.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0004-arm64-kdump-identify-memory-regions.patch">file://0004-arm64-kdump-identify-memory-regions.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0005-arm64-kdump-add-elf-core-header-segment.patch">
file://0005-arm64-kdump-add-elf-core-header-segment.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0006-arm64-kdump-set-up-kernel-image-segment.patch">
file://0006-arm64-kdump-set-up-kernel-image-segment.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0007-arm64-kdump-set-up-other-segments.patch">file://0007-arm64-kdump-set-up-other-segments.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch">
file://0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0009-arm64-kdump-Add-support-for-binary-image-files.patch">
file://0009-arm64-kdump-Add-support-for-binary-image-files.patch</a> \<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="file:///\\0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch">file://0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0001-x86-x86_64-Fix-format-warning-with-die.patch">
file://0001-x86-x86_64-Fix-format-warning-with-die.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0002-ppc-Fix-format-warning-with-die.patch">file://0002-ppc-Fix-format-warning-with-die.patch</a> \<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="file:///\\kexec-x32.patch">file://kexec-x32.patch</a> \<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="file:///\\0001-Disable-PIE-during-link.patch">file://0001-Disable-PIE-during-link.patch</a> \<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="file:///\\0001-arm64-Disable-PIC.patch">file://0001-arm64-Disable-PIC.patch</a> \<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<br>
<br>
-SRC_URI[md5sum] = &quot;b2b2c5e6b29d467d6e99d587fb6b7cf5&quot;<br>
-SRC_URI[sha256sum] = &quot;b3e69519d2acced256843b1e8f1ecfa00d9b54fa07449ed78f05b9193f239370&quot;<br>
&#43;SRC_URI[md5sum] = &quot;78906fdc255656fa2b9996c8acb3ef62&quot;<br>
&#43;SRC_URI[sha256sum] = &quot;42dbd0dab9964cd1ed89fa4571c8d13191eb7132b361ade5ac44517c91ecb97e&quot;<br>
<br>
&nbsp;SECURITY_PIE_CFLAGS_remove = &quot;-fPIE -pie&quot;<br>
<span style="color:#888888"><br>
<span class="hoenzb">--</span><br>
<span class="hoenzb">2.7.4</span><br>
<br>
<br>
<br>
<span class="hoenzb">--</span><br>
<span class="hoenzb">_______________________________________________</span><br>
<span class="hoenzb">Openembedded-core mailing list</span><br>
<span class="hoenzb"><a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a></span><br>
<span class="hoenzb"><a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a></span></span><o:p></o:p></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
</div>
</div>
</body>
</html>