diff options
| author | Andrea Adami <andrea.adami@gmail.com> | 2018-08-31 17:10:50 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2018-08-31 09:41:29 -0700 |
| commit | d128fcea07f3453433327ac0129ecf207f179e08 (patch) | |
| tree | e8092bea33021a41190cfeb96d524812ad6eda13 | |
| parent | 4abf0f4d6ff9c1455d338075d578dcc683124b0a (diff) | |
| download | meta-openembedded-d128fcea07f3453433327ac0129ecf207f179e08.tar.gz | |
kexec-tools-klibc: sync patches with oe-core
Following patches have been imported:
0001-Disable-PIE-during-link.patch
0001-purgatory-Pass-r-directly-to-linker.patch
The two above are in the now modified
0011-purgatory-Makefile-adapt-to-klcc.patch
These two have been imported and renamed:
0002-powerpc-change-the-memory-size-limit.patch
0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
4 files changed, 83 insertions, 2 deletions
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0011-purgatory-Makefile-adapt-to-klcc.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0011-purgatory-Makefile-adapt-to-klcc.patch index a459d45a2b..636151bee9 100644 --- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0011-purgatory-Makefile-adapt-to-klcc.patch +++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0011-purgatory-Makefile-adapt-to-klcc.patch | |||
| @@ -28,7 +28,7 @@ index 49ce80a..72eefaa 100644 | |||
| 28 | $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\ | 28 | $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\ |
| 29 | - -Wl,--no-undefined -nostartfiles -nostdlib \ | 29 | - -Wl,--no-undefined -nostartfiles -nostdlib \ |
| 30 | - -nodefaultlibs -e purgatory_start -r \ | 30 | - -nodefaultlibs -e purgatory_start -r \ |
| 31 | + -Wl,--no-undefined -Wl,-nostartfiles -Wl,-nostdlib \ | 31 | + -Wl,--no-undefined -Wl,-no-pie -Wl,-nostartfiles -Wl,-nostdlib \ |
| 32 | + -Wl,-nodefaultlibs -Wl,--entry=purgatory_start -Wl,-r \ | 32 | + -Wl,-nodefaultlibs -Wl,--entry=purgatory_start -Wl,-r \ |
| 33 | -Wl,-Map=$(PURGATORY_MAP) | 33 | -Wl,-Map=$(PURGATORY_MAP) |
| 34 | 34 | ||
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch new file mode 100644 index 0000000000..c6afdfae71 --- /dev/null +++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From 06b0d43c20f7c6200902d4c6db3d33416877f71c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrea Adami <andrea.adami@gmail.com> | ||
| 3 | Date: Sun, 26 Aug 2018 21:40:06 +0200 | ||
| 4 | Subject: [PATCH 1/1] arm- backport from oe-core | ||
| 5 | |||
| 6 | Signed-off-by: Andrea Adami <andrea.adami@gmail.com> | ||
| 7 | --- | ||
| 8 | kexec/arch/arm/crashdump-arm.c | 5 ++++- | ||
| 9 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c | ||
| 12 | index 2530b29..af2600d 100644 | ||
| 13 | --- a/kexec/arch/arm/crashdump-arm.c | ||
| 14 | +++ b/kexec/arch/arm/crashdump-arm.c | ||
| 15 | @@ -240,6 +240,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) | ||
| 16 | void *buf; | ||
| 17 | int err; | ||
| 18 | int last_ranges; | ||
| 19 | + unsigned short align_bit_shift = 20; | ||
| 20 | |||
| 21 | /* | ||
| 22 | * First fetch all the memory (RAM) ranges that we are going to pass to | ||
| 23 | @@ -281,6 +282,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) | ||
| 24 | |||
| 25 | /* for support LPAE enabled kernel*/ | ||
| 26 | elf_info.class = ELFCLASS64; | ||
| 27 | + align_bit_shift = 21; | ||
| 28 | |||
| 29 | err = crash_create_elf64_headers(info, &elf_info, | ||
| 30 | usablemem_rgns.ranges, | ||
| 31 | @@ -302,8 +304,9 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) | ||
| 32 | * 1MB) so that available memory passed in kernel command line will be | ||
| 33 | * aligned to 1MB. This is because kernel create_mapping() wants memory | ||
| 34 | * regions to be aligned to SECTION_SIZE. | ||
| 35 | + * The SECTION_SIZE of LPAE kernel is '1UL << 21' defined in pgtable-3level.h | ||
| 36 | */ | ||
| 37 | - elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20, | ||
| 38 | + elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << align_bit_shift, | ||
| 39 | crash_kernel_mem.start, | ||
| 40 | crash_kernel_mem.end, -1, 0); | ||
| 41 | |||
| 42 | -- | ||
| 43 | 2.7.4 | ||
| 44 | |||
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc_change-the-memory-size-limit.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc_change-the-memory-size-limit.patch new file mode 100644 index 0000000000..dc97d930e9 --- /dev/null +++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc_change-the-memory-size-limit.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From b19b68eab567aa534cf8dec79fe18e3dc0e14043 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Quanyang Wang <quanyang.wang@windriver.com> | ||
| 3 | Date: Tue, 16 Jun 2015 12:59:57 +0800 | ||
| 4 | Subject: [PATCH] powerpc: change the memory size limit | ||
| 5 | |||
| 6 | When run "kexec" in powerpc board, the kexec has a limit that | ||
| 7 | the kernel text and bss size must be less than 24M. But now | ||
| 8 | some kernel size exceed the limit. So we need to change the limit, | ||
| 9 | else will get the error log as below: | ||
| 10 | |||
| 11 | my_load:669: do | ||
| 12 | Could not find a free area of memory of 0x12400 bytes... | ||
| 13 | Could not find a free area of memory of 0x13000 bytes... | ||
| 14 | locate_hole failed | ||
| 15 | |||
| 16 | Upstream-Status: Pending | ||
| 17 | |||
| 18 | Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com> | ||
| 19 | --- | ||
| 20 | kexec/arch/ppc/kexec-ppc.h | 2 +- | ||
| 21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 22 | |||
| 23 | Index: kexec-tools-2.0.10/kexec/arch/ppc/kexec-ppc.h | ||
| 24 | =================================================================== | ||
| 25 | --- kexec-tools-2.0.10.orig/kexec/arch/ppc/kexec-ppc.h | ||
| 26 | +++ kexec-tools-2.0.10/kexec/arch/ppc/kexec-ppc.h | ||
| 27 | @@ -42,7 +42,7 @@ void dol_ppc_usage(void); | ||
| 28 | * During inital setup the kernel does not map the whole memory but a part of | ||
| 29 | * it. On Book-E that is 64MiB, 601 24MiB or 256MiB (if possible). | ||
| 30 | */ | ||
| 31 | -#define KERNEL_ACCESS_TOP (24 * 1024 * 1024) | ||
| 32 | +#define KERNEL_ACCESS_TOP (36 * 1024 * 1024) | ||
| 33 | |||
| 34 | /* boot block version 17 as defined by the linux kernel */ | ||
| 35 | struct bootblock { | ||
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb index 4518e707cd..d5f6738d7f 100644 --- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb +++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb | |||
| @@ -34,8 +34,10 @@ KLIBC_PATCHES += " \ | |||
| 34 | file://0015-vmcore-dmesg-fix-warning.patch" | 34 | file://0015-vmcore-dmesg-fix-warning.patch" |
| 35 | 35 | ||
| 36 | WARNING_FIXES = "" | 36 | WARNING_FIXES = "" |
| 37 | FROM_OE_CORE = "file://arm_crashdump-fix-buffer-align.patch \ | ||
| 38 | file://powerpc_change-the-memory-size-limit.patch" | ||
| 37 | 39 | ||
| 38 | SRC_URI += "${BUILD_PATCHES} ${KLIBC_PATCHES} ${WARNING_FIXES}" | 40 | SRC_URI += "${BUILD_PATCHES} ${KLIBC_PATCHES} ${WARNING_FIXES} ${FROM_OE_CORE}" |
| 39 | 41 | ||
| 40 | SRC_URI_append_arm = " file://arm_crashdump.patch" | 42 | SRC_URI_append_arm = " file://arm_crashdump.patch" |
| 41 | 43 | ||
