diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-kernel/kexec | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-kernel/kexec')
3 files changed, 127 insertions, 0 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools.inc b/meta/recipes-kernel/kexec/kexec-tools.inc new file mode 100644 index 0000000000..7e3b7adfc7 --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools.inc | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Kexec fast reboot tools" | ||
2 | DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel" | ||
3 | AUTHOR = "Eric Biederman" | ||
4 | HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/" | ||
5 | SECTION = "kernel/userland" | ||
6 | LICENSE = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \ | ||
8 | file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09" | ||
9 | DEPENDS = "zlib xz" | ||
10 | |||
11 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz" | ||
12 | |||
13 | inherit autotools-brokensep | ||
14 | |||
15 | COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*|mips.*)-(linux|freebsd.*)' | ||
16 | |||
17 | INSANE_SKIP_${PN} = "arch" | ||
18 | |||
19 | do_compile_prepend() { | ||
20 | # Remove the '*.d' file to make sure the recompile is OK | ||
21 | for dep in `find ${B} -type f -name '*.d'`; do | ||
22 | dep_no_d="`echo $dep | sed 's#.d$##'`" | ||
23 | # Remove file.d when there is a file.o | ||
24 | if [ -f "$dep_no_d.o" ]; then | ||
25 | rm -f $dep | ||
26 | fi | ||
27 | done | ||
28 | } | ||
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch b/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch new file mode 100644 index 0000000000..ab1fe96db2 --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | kexec-tools: Refine kdump device_tree sort | ||
2 | |||
3 | The commit b02d735bf was to rearrange the device-tree entries, and | ||
4 | assumed that these entries are sorted in the ascending order. but | ||
5 | acctually when I was validating kexec and kdump, the order of | ||
6 | serial node still is changed. So the patch is to sort these entries | ||
7 | by the directory name in ascending order. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Yang Wei <Wei.Yang@windriver.com> | ||
12 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
13 | --- | ||
14 | kexec/arch/ppc/fs2dt.c | 13 ++++++++++--- | ||
15 | kexec/fs2dt.c | 13 ++++++++++--- | ||
16 | 2 files changed, 20 insertions(+), 6 deletions(-) | ||
17 | |||
18 | diff --git a/kexec/arch/ppc/fs2dt.c b/kexec/arch/ppc/fs2dt.c | ||
19 | index 4121c7d..cc04b04 100644 | ||
20 | --- a/kexec/arch/ppc/fs2dt.c | ||
21 | +++ b/kexec/arch/ppc/fs2dt.c | ||
22 | @@ -296,6 +296,9 @@ static int comparefunc(const void *dentry1, const void *dentry2) | ||
23 | { | ||
24 | char *str1 = (*(struct dirent **)dentry1)->d_name; | ||
25 | char *str2 = (*(struct dirent **)dentry2)->d_name; | ||
26 | + char* ptr1 = strchr(str1, '@'); | ||
27 | + char* ptr2 = strchr(str2, '@'); | ||
28 | + int len1, len2; | ||
29 | |||
30 | /* | ||
31 | * strcmp scans from left to right and fails to idetify for some | ||
32 | @@ -303,9 +306,13 @@ static int comparefunc(const void *dentry1, const void *dentry2) | ||
33 | * Therefore, we get the wrong sorted order like memory@10000000 and | ||
34 | * memory@f000000. | ||
35 | */ | ||
36 | - if (strchr(str1, '@') && strchr(str2, '@') && | ||
37 | - (strlen(str1) > strlen(str2))) | ||
38 | - return 1; | ||
39 | + if (ptr1 && ptr2) { | ||
40 | + len1 = ptr1 - str1; | ||
41 | + len2 = ptr2 - str2; | ||
42 | + if (!strncmp(str1, str2, len1 >len2 ? len1: len2) && | ||
43 | + (strlen(str1) > strlen(str2))) | ||
44 | + return 1; | ||
45 | + } | ||
46 | |||
47 | return strcmp(str1, str2); | ||
48 | } | ||
49 | diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c | ||
50 | index 5e6b98d..1c0345b 100644 | ||
51 | --- a/kexec/fs2dt.c | ||
52 | +++ b/kexec/fs2dt.c | ||
53 | @@ -475,6 +475,9 @@ static int comparefunc(const struct dirent **dentry1, | ||
54 | { | ||
55 | char *str1 = (*(struct dirent **)dentry1)->d_name; | ||
56 | char *str2 = (*(struct dirent **)dentry2)->d_name; | ||
57 | + char* ptr1 = strchr(str1, '@'); | ||
58 | + char* ptr2 = strchr(str2, '@'); | ||
59 | + int len1, len2; | ||
60 | |||
61 | /* | ||
62 | * strcmp scans from left to right and fails to idetify for some | ||
63 | @@ -482,9 +485,13 @@ static int comparefunc(const struct dirent **dentry1, | ||
64 | * Therefore, we get the wrong sorted order like memory@10000000 and | ||
65 | * memory@f000000. | ||
66 | */ | ||
67 | - if (strchr(str1, '@') && strchr(str2, '@') && | ||
68 | - (strlen(str1) > strlen(str2))) | ||
69 | - return 1; | ||
70 | + if (ptr1 && ptr2) { | ||
71 | + len1 = ptr1 - str1; | ||
72 | + len2 = ptr2 - str2; | ||
73 | + if (!strncmp(str1, str2, len1 >len2 ? len1: len2) && | ||
74 | + (strlen(str1) > strlen(str2))) | ||
75 | + return 1; | ||
76 | + } | ||
77 | |||
78 | return strcmp(str1, str2); | ||
79 | } | ||
80 | -- | ||
81 | 1.7.9.5 | ||
82 | |||
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb new file mode 100644 index 0000000000..f0ece0d45b --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | require kexec-tools.inc | ||
2 | export LDFLAGS = "-L${STAGING_LIBDIR}" | ||
3 | EXTRA_OECONF = " --with-zlib=yes" | ||
4 | |||
5 | SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch" | ||
6 | |||
7 | SRC_URI[md5sum] = "2309ba43981cb6d39d07ac3a9aac30ab" | ||
8 | SRC_URI[sha256sum] = "dde5c38be39882c6c91f0129647349c4e1943b077d3020af1970b481ee954eb0" | ||
9 | |||
10 | PACKAGES =+ "kexec kdump vmcore-dmesg" | ||
11 | |||
12 | ALLOW_EMPTY_${PN} = "1" | ||
13 | RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg" | ||
14 | |||
15 | FILES_kexec = "${sbindir}/kexec" | ||
16 | FILES_kdump = "${sbindir}/kdump" | ||
17 | FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg" | ||