diff options
Diffstat (limited to 'meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc')
3 files changed, 80 insertions, 1 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 a459d45a2ba..636151bee94 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 $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\ - -Wl,--no-undefined -nostartfiles -nostdlib \ - -nodefaultlibs -e purgatory_start -r \ -+ -Wl,--no-undefined -Wl,-nostartfiles -Wl,-nostdlib \ ++ -Wl,--no-undefined -Wl,-no-pie -Wl,-nostartfiles -Wl,-nostdlib \ + -Wl,-nodefaultlibs -Wl,--entry=purgatory_start -Wl,-r \ -Wl,-Map=$(PURGATORY_MAP) 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 00000000000..c6afdfae718 --- /dev/null +++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch @@ -0,0 +1,44 @@ +From 06b0d43c20f7c6200902d4c6db3d33416877f71c Mon Sep 17 00:00:00 2001 +From: Andrea Adami <andrea.adami@gmail.com> +Date: Sun, 26 Aug 2018 21:40:06 +0200 +Subject: [PATCH 1/1] arm- backport from oe-core + +Signed-off-by: Andrea Adami <andrea.adami@gmail.com> +--- + kexec/arch/arm/crashdump-arm.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c +index 2530b29..af2600d 100644 +--- a/kexec/arch/arm/crashdump-arm.c ++++ b/kexec/arch/arm/crashdump-arm.c +@@ -240,6 +240,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) + void *buf; + int err; + int last_ranges; ++ unsigned short align_bit_shift = 20; + + /* + * First fetch all the memory (RAM) ranges that we are going to pass to +@@ -281,6 +282,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) + + /* for support LPAE enabled kernel*/ + elf_info.class = ELFCLASS64; ++ align_bit_shift = 21; + + err = crash_create_elf64_headers(info, &elf_info, + usablemem_rgns.ranges, +@@ -302,8 +304,9 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) + * 1MB) so that available memory passed in kernel command line will be + * aligned to 1MB. This is because kernel create_mapping() wants memory + * regions to be aligned to SECTION_SIZE. ++ * The SECTION_SIZE of LPAE kernel is '1UL << 21' defined in pgtable-3level.h + */ +- elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20, ++ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << align_bit_shift, + crash_kernel_mem.start, + crash_kernel_mem.end, -1, 0); + +-- +2.7.4 + 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 00000000000..dc97d930e9c --- /dev/null +++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/powerpc_change-the-memory-size-limit.patch @@ -0,0 +1,35 @@ +From b19b68eab567aa534cf8dec79fe18e3dc0e14043 Mon Sep 17 00:00:00 2001 +From: Quanyang Wang <quanyang.wang@windriver.com> +Date: Tue, 16 Jun 2015 12:59:57 +0800 +Subject: [PATCH] powerpc: change the memory size limit + +When run "kexec" in powerpc board, the kexec has a limit that +the kernel text and bss size must be less than 24M. But now +some kernel size exceed the limit. So we need to change the limit, +else will get the error log as below: + +my_load:669: do +Could not find a free area of memory of 0x12400 bytes... +Could not find a free area of memory of 0x13000 bytes... +locate_hole failed + +Upstream-Status: Pending + +Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com> +--- + kexec/arch/ppc/kexec-ppc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: kexec-tools-2.0.10/kexec/arch/ppc/kexec-ppc.h +=================================================================== +--- kexec-tools-2.0.10.orig/kexec/arch/ppc/kexec-ppc.h ++++ kexec-tools-2.0.10/kexec/arch/ppc/kexec-ppc.h +@@ -42,7 +42,7 @@ void dol_ppc_usage(void); + * During inital setup the kernel does not map the whole memory but a part of + * it. On Book-E that is 64MiB, 601 24MiB or 256MiB (if possible). + */ +-#define KERNEL_ACCESS_TOP (24 * 1024 * 1024) ++#define KERNEL_ACCESS_TOP (36 * 1024 * 1024) + + /* boot block version 17 as defined by the linux kernel */ + struct bootblock { |