diff options
| -rw-r--r-- | patches/kernel_startend_msg/0001-printk-Add-Enea-Linux-guest-boot-start-end-messages.patch | 103 | ||||
| -rw-r--r-- | patches/kernel_startend_msg/0001-printk-Add-Enea-Linux-host-boot-start-end-messages.patch (renamed from patches/kernel_startend_msg/0001-printk-add-Enea-Linux-boot-start-end-messages.patch) | 56 | ||||
| -rw-r--r-- | patches/kernel_startend_msg/kernel_guest_startend_msg.scc | 4 | ||||
| -rw-r--r-- | patches/kernel_startend_msg/kernel_host_startend_msg.scc (renamed from patches/kernel_startend_msg/kernel_startend_msg.scc) | 2 |
4 files changed, 140 insertions, 25 deletions
diff --git a/patches/kernel_startend_msg/0001-printk-Add-Enea-Linux-guest-boot-start-end-messages.patch b/patches/kernel_startend_msg/0001-printk-Add-Enea-Linux-guest-boot-start-end-messages.patch new file mode 100644 index 0000000..e5c613c --- /dev/null +++ b/patches/kernel_startend_msg/0001-printk-Add-Enea-Linux-guest-boot-start-end-messages.patch | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | From 30aff2983e14dc6482dd2cd6c9a3b96db65c689e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Matei Valeanu <Matei.Valeanu@enea.com> | ||
| 3 | Date: Wed, 20 Jun 2018 09:41:46 +0200 | ||
| 4 | Subject: [PATCH] printk: Add Enea Linux guest boot start/end messages | ||
| 5 | |||
| 6 | rebased for 4.14 | ||
| 7 | |||
| 8 | Upstream-status: Inappropriate [specific measurement] | ||
| 9 | |||
| 10 | Signed-off-by: Adrian Calianu <adrian.calianu@enea.com> | ||
| 11 | Signed-off-by: Matei Valeanu <Matei.Valeanu@enea.com> | ||
| 12 | --- | ||
| 13 | arch/x86/boot/compressed/misc.c | 23 ++++++++++++----------- | ||
| 14 | init/main.c | 4 +++- | ||
| 15 | 2 files changed, 15 insertions(+), 12 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c | ||
| 18 | index 252fee3..ecff964 100644 | ||
| 19 | --- a/arch/x86/boot/compressed/misc.c | ||
| 20 | +++ b/arch/x86/boot/compressed/misc.c | ||
| 21 | @@ -212,10 +212,10 @@ static void handle_relocations(void *output, unsigned long output_len, | ||
| 22 | delta = virt_addr - LOAD_PHYSICAL_ADDR; | ||
| 23 | |||
| 24 | if (!delta) { | ||
| 25 | - debug_putstr("No relocation needed... "); | ||
| 26 | + /* debug_putstr("No relocation needed... "); */ | ||
| 27 | return; | ||
| 28 | } | ||
| 29 | - debug_putstr("Performing relocations... "); | ||
| 30 | + /* debug_putstr("Performing relocations... "); */ | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Process relocations: 32 bit relocations first then 64 bit after. | ||
| 34 | @@ -296,7 +296,7 @@ static void parse_elf(void *output) | ||
| 35 | return; | ||
| 36 | } | ||
| 37 | |||
| 38 | - debug_putstr("Parsing ELF... "); | ||
| 39 | + /* debug_putstr("Parsing ELF... ");*/ | ||
| 40 | |||
| 41 | phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); | ||
| 42 | if (!phdrs) | ||
| 43 | @@ -374,7 +374,8 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, | ||
| 44 | cols = boot_params->screen_info.orig_video_cols; | ||
| 45 | |||
| 46 | console_init(); | ||
| 47 | - debug_putstr("early console in extract_kernel\n"); | ||
| 48 | + /* debug_putstr("early console in extract_kernel\n");*/ | ||
| 49 | + debug_putstr("\n");debug_putstr("Enea Linux guest kernel boot start\n"); | ||
| 50 | |||
| 51 | if (IS_ENABLED(CONFIG_X86_5LEVEL) && !l5_supported()) { | ||
| 52 | error("This linux kernel as configured requires 5-level paging\n" | ||
| 53 | @@ -386,11 +387,11 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, | ||
| 54 | free_mem_end_ptr = heap + BOOT_HEAP_SIZE; | ||
| 55 | |||
| 56 | /* Report initial kernel position details. */ | ||
| 57 | - debug_putaddr(input_data); | ||
| 58 | - debug_putaddr(input_len); | ||
| 59 | - debug_putaddr(output); | ||
| 60 | - debug_putaddr(output_len); | ||
| 61 | - debug_putaddr(kernel_total_size); | ||
| 62 | + /*debug_putaddr(input_data); */ | ||
| 63 | + /*debug_putaddr(input_len); */ | ||
| 64 | + /*debug_putaddr(output); */ | ||
| 65 | + /*debug_putaddr(output_len); */ | ||
| 66 | + /*debug_putaddr(kernel_total_size);*/ | ||
| 67 | |||
| 68 | /* | ||
| 69 | * The memory hole needed for the kernel is the larger of either | ||
| 70 | @@ -423,12 +424,12 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, | ||
| 71 | error("Destination virtual address changed when not relocatable"); | ||
| 72 | #endif | ||
| 73 | |||
| 74 | - debug_putstr("\nDecompressing Linux... "); | ||
| 75 | + /*debug_putstr("\nDecompressing Linux... ");*/ | ||
| 76 | __decompress(input_data, input_len, NULL, NULL, output, output_len, | ||
| 77 | NULL, error); | ||
| 78 | parse_elf(output); | ||
| 79 | handle_relocations(output, output_len, virt_addr); | ||
| 80 | - debug_putstr("done.\nBooting the kernel.\n"); | ||
| 81 | + /*debug_putstr("done.\nBooting the kernel.\n");*/ | ||
| 82 | return output; | ||
| 83 | } | ||
| 84 | |||
| 85 | diff --git a/init/main.c b/init/main.c | ||
| 86 | index 56210eb..9e61f9d 100644 | ||
| 87 | --- a/init/main.c | ||
| 88 | +++ b/init/main.c | ||
| 89 | @@ -1025,8 +1025,10 @@ static int __ref kernel_init(void *unused) | ||
| 90 | if (!try_to_run_init_process("/sbin/init") || | ||
| 91 | !try_to_run_init_process("/etc/init") || | ||
| 92 | !try_to_run_init_process("/bin/init") || | ||
| 93 | - !try_to_run_init_process("/bin/sh")) | ||
| 94 | + !try_to_run_init_process("/bin/sh")) { | ||
| 95 | + printk(KERN_EMERG "Enea Linux guest kernel boot end\n"); | ||
| 96 | return 0; | ||
| 97 | + } | ||
| 98 | |||
| 99 | panic("No working init found. Try passing init= option to kernel. " | ||
| 100 | "See Linux Documentation/admin-guide/init.rst for guidance."); | ||
| 101 | -- | ||
| 102 | 2.7.4 | ||
| 103 | |||
diff --git a/patches/kernel_startend_msg/0001-printk-add-Enea-Linux-boot-start-end-messages.patch b/patches/kernel_startend_msg/0001-printk-Add-Enea-Linux-host-boot-start-end-messages.patch index 0fa8756..565e689 100644 --- a/patches/kernel_startend_msg/0001-printk-add-Enea-Linux-boot-start-end-messages.patch +++ b/patches/kernel_startend_msg/0001-printk-Add-Enea-Linux-host-boot-start-end-messages.patch | |||
| @@ -1,21 +1,26 @@ | |||
| 1 | From b91730ba705d151577974d5fb9f5371a4569b467 Mon Sep 17 00:00:00 2001 | 1 | From 30aff2983e14dc6482dd2cd6c9a3b96db65c689e Mon Sep 17 00:00:00 2001 |
| 2 | From: Adrian Calianu <adrian.calianu@enea.com> | 2 | From: Matei Valeanu <Matei.Valeanu@enea.com> |
| 3 | Date: Tue, 6 Jun 2017 15:47:54 +0200 | 3 | Date: Wed, 20 Jun 2018 09:41:46 +0200 |
| 4 | Subject: [PATCH 1/1] printk: add Enea Linux boot start/end messages | 4 | Subject: [PATCH] printk: Add Enea Linux host boot start/end messages |
| 5 | |||
| 6 | rebased for 4.14 | ||
| 7 | |||
| 8 | Upstream-status: Inappropriate [specific measurement] | ||
| 5 | 9 | ||
| 6 | Signed-off-by: Adrian Calianu <adrian.calianu@enea.com> | 10 | Signed-off-by: Adrian Calianu <adrian.calianu@enea.com> |
| 11 | Signed-off-by: Matei Valeanu <Matei.Valeanu@enea.com> | ||
| 7 | --- | 12 | --- |
| 8 | arch/x86/boot/compressed/misc.c | 23 ++++++++++++----------- | 13 | arch/x86/boot/compressed/misc.c | 23 ++++++++++++----------- |
| 9 | init/main.c | 4 +++- | 14 | init/main.c | 4 +++- |
| 10 | 2 files changed, 15 insertions(+), 12 deletions(-) | 15 | 2 files changed, 15 insertions(+), 12 deletions(-) |
| 11 | 16 | ||
| 12 | diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c | 17 | diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c |
| 13 | index b3c5a5f0..9fdf3c6 100644 | 18 | index 252fee3..ecff964 100644 |
| 14 | --- a/arch/x86/boot/compressed/misc.c | 19 | --- a/arch/x86/boot/compressed/misc.c |
| 15 | +++ b/arch/x86/boot/compressed/misc.c | 20 | +++ b/arch/x86/boot/compressed/misc.c |
| 16 | @@ -202,10 +202,10 @@ static void handle_relocations(void *output, unsigned long output_len, | 21 | @@ -212,10 +212,10 @@ static void handle_relocations(void *output, unsigned long output_len, |
| 17 | delta = virt_addr - LOAD_PHYSICAL_ADDR; | 22 | delta = virt_addr - LOAD_PHYSICAL_ADDR; |
| 18 | 23 | ||
| 19 | if (!delta) { | 24 | if (!delta) { |
| 20 | - debug_putstr("No relocation needed... "); | 25 | - debug_putstr("No relocation needed... "); |
| 21 | + /* debug_putstr("No relocation needed... "); */ | 26 | + /* debug_putstr("No relocation needed... "); */ |
| @@ -23,29 +28,31 @@ index b3c5a5f0..9fdf3c6 100644 | |||
| 23 | } | 28 | } |
| 24 | - debug_putstr("Performing relocations... "); | 29 | - debug_putstr("Performing relocations... "); |
| 25 | + /* debug_putstr("Performing relocations... "); */ | 30 | + /* debug_putstr("Performing relocations... "); */ |
| 26 | 31 | ||
| 27 | /* | 32 | /* |
| 28 | * Process relocations: 32 bit relocations first then 64 bit after. | 33 | * Process relocations: 32 bit relocations first then 64 bit after. |
| 29 | @@ -286,7 +286,7 @@ static void parse_elf(void *output) | 34 | @@ -296,7 +296,7 @@ static void parse_elf(void *output) |
| 30 | return; | 35 | return; |
| 31 | } | 36 | } |
| 32 | 37 | ||
| 33 | - debug_putstr("Parsing ELF... "); | 38 | - debug_putstr("Parsing ELF... "); |
| 34 | + /* debug_putstr("Parsing ELF... ");*/ | 39 | + /* debug_putstr("Parsing ELF... ");*/ |
| 35 | 40 | ||
| 36 | phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); | 41 | phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); |
| 37 | if (!phdrs) | 42 | if (!phdrs) |
| 38 | @@ -360,17 +360,18 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, | 43 | @@ -374,7 +374,8 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, |
| 39 | cols = boot_params->screen_info.orig_video_cols; | 44 | cols = boot_params->screen_info.orig_video_cols; |
| 40 | 45 | ||
| 41 | console_init(); | 46 | console_init(); |
| 42 | - debug_putstr("early console in extract_kernel\n"); | 47 | - debug_putstr("early console in extract_kernel\n"); |
| 43 | + /* debug_putstr("early console in extract_kernel\n");*/ | 48 | + /* debug_putstr("early console in extract_kernel\n");*/ |
| 44 | + debug_putstr("\n");debug_putstr("Enea Linux kernel boot start\n"); | 49 | + debug_putstr("\n");debug_putstr("Enea Linux kernel boot start\n"); |
| 45 | 50 | ||
| 46 | free_mem_ptr = heap; /* Heap */ | 51 | if (IS_ENABLED(CONFIG_X86_5LEVEL) && !l5_supported()) { |
| 52 | error("This linux kernel as configured requires 5-level paging\n" | ||
| 53 | @@ -386,11 +387,11 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, | ||
| 47 | free_mem_end_ptr = heap + BOOT_HEAP_SIZE; | 54 | free_mem_end_ptr = heap + BOOT_HEAP_SIZE; |
| 48 | 55 | ||
| 49 | /* Report initial kernel position details. */ | 56 | /* Report initial kernel position details. */ |
| 50 | - debug_putaddr(input_data); | 57 | - debug_putaddr(input_data); |
| 51 | - debug_putaddr(input_len); | 58 | - debug_putaddr(input_len); |
| @@ -57,13 +64,13 @@ index b3c5a5f0..9fdf3c6 100644 | |||
| 57 | + /*debug_putaddr(output); */ | 64 | + /*debug_putaddr(output); */ |
| 58 | + /*debug_putaddr(output_len); */ | 65 | + /*debug_putaddr(output_len); */ |
| 59 | + /*debug_putaddr(kernel_total_size);*/ | 66 | + /*debug_putaddr(kernel_total_size);*/ |
| 60 | 67 | ||
| 61 | /* | 68 | /* |
| 62 | * The memory hole needed for the kernel is the larger of either | 69 | * The memory hole needed for the kernel is the larger of either |
| 63 | @@ -401,11 +402,11 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, | 70 | @@ -423,12 +424,12 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, |
| 64 | error("Destination virtual address changed when not relocatable"); | 71 | error("Destination virtual address changed when not relocatable"); |
| 65 | #endif | 72 | #endif |
| 66 | 73 | ||
| 67 | - debug_putstr("\nDecompressing Linux... "); | 74 | - debug_putstr("\nDecompressing Linux... "); |
| 68 | + /*debug_putstr("\nDecompressing Linux... ");*/ | 75 | + /*debug_putstr("\nDecompressing Linux... ");*/ |
| 69 | __decompress(input_data, input_len, NULL, NULL, output, output_len, | 76 | __decompress(input_data, input_len, NULL, NULL, output, output_len, |
| @@ -74,11 +81,12 @@ index b3c5a5f0..9fdf3c6 100644 | |||
| 74 | + /*debug_putstr("done.\nBooting the kernel.\n");*/ | 81 | + /*debug_putstr("done.\nBooting the kernel.\n");*/ |
| 75 | return output; | 82 | return output; |
| 76 | } | 83 | } |
| 84 | |||
| 77 | diff --git a/init/main.c b/init/main.c | 85 | diff --git a/init/main.c b/init/main.c |
| 78 | index 8358cbe..613caa1 100644 | 86 | index 56210eb..9e61f9d 100644 |
| 79 | --- a/init/main.c | 87 | --- a/init/main.c |
| 80 | +++ b/init/main.c | 88 | +++ b/init/main.c |
| 81 | @@ -976,8 +976,10 @@ static int __ref kernel_init(void *unused) | 89 | @@ -1025,8 +1025,10 @@ static int __ref kernel_init(void *unused) |
| 82 | if (!try_to_run_init_process("/sbin/init") || | 90 | if (!try_to_run_init_process("/sbin/init") || |
| 83 | !try_to_run_init_process("/etc/init") || | 91 | !try_to_run_init_process("/etc/init") || |
| 84 | !try_to_run_init_process("/bin/init") || | 92 | !try_to_run_init_process("/bin/init") || |
| @@ -87,9 +95,9 @@ index 8358cbe..613caa1 100644 | |||
| 87 | + printk(KERN_EMERG "Enea Linux kernel boot end\n"); | 95 | + printk(KERN_EMERG "Enea Linux kernel boot end\n"); |
| 88 | return 0; | 96 | return 0; |
| 89 | + } | 97 | + } |
| 90 | 98 | ||
| 91 | panic("No working init found. Try passing init= option to kernel. " | 99 | panic("No working init found. Try passing init= option to kernel. " |
| 92 | "See Linux Documentation/init.txt for guidance."); | 100 | "See Linux Documentation/admin-guide/init.rst for guidance."); |
| 93 | -- | 101 | -- |
| 94 | 2.7.4 | 102 | 2.7.4 |
| 95 | 103 | ||
diff --git a/patches/kernel_startend_msg/kernel_guest_startend_msg.scc b/patches/kernel_startend_msg/kernel_guest_startend_msg.scc new file mode 100644 index 0000000..e7a1bec --- /dev/null +++ b/patches/kernel_startend_msg/kernel_guest_startend_msg.scc | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | define KFEATURE_DESCRIPTION "Enable the kernel to output messages when it starts and ends booting" | ||
| 2 | define KFEATURE_COMPATIBILITY all | ||
| 3 | |||
| 4 | patch 0001-printk-Add-Enea-Linux-guest-boot-start-end-messages.patch | ||
diff --git a/patches/kernel_startend_msg/kernel_startend_msg.scc b/patches/kernel_startend_msg/kernel_host_startend_msg.scc index e6da49c..861a936 100644 --- a/patches/kernel_startend_msg/kernel_startend_msg.scc +++ b/patches/kernel_startend_msg/kernel_host_startend_msg.scc | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | define KFEATURE_DESCRIPTION "Enable the kernel to output messages when it starts and ends booting" | 1 | define KFEATURE_DESCRIPTION "Enable the kernel to output messages when it starts and ends booting" |
| 2 | define KFEATURE_COMPATIBILITY all | 2 | define KFEATURE_COMPATIBILITY all |
| 3 | 3 | ||
| 4 | patch 0001-printk-add-Enea-Linux-boot-start-end-messages.patch | 4 | patch 0001-printk-Add-Enea-Linux-host-boot-start-end-messages.patch |
