From 30aff2983e14dc6482dd2cd6c9a3b96db65c689e Mon Sep 17 00:00:00 2001 From: Matei Valeanu Date: Wed, 20 Jun 2018 09:41:46 +0200 Subject: [PATCH] printk: Add Enea Linux host boot start/end messages rebased for 4.14 Upstream-status: Inappropriate [specific measurement] Signed-off-by: Adrian Calianu Signed-off-by: Matei Valeanu --- arch/x86/boot/compressed/misc.c | 23 ++++++++++++----------- init/main.c | 4 +++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 252fee3..ecff964 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c @@ -212,10 +212,10 @@ static void handle_relocations(void *output, unsigned long output_len, delta = virt_addr - LOAD_PHYSICAL_ADDR; if (!delta) { - debug_putstr("No relocation needed... "); + /* debug_putstr("No relocation needed... "); */ return; } - debug_putstr("Performing relocations... "); + /* debug_putstr("Performing relocations... "); */ /* * Process relocations: 32 bit relocations first then 64 bit after. @@ -296,7 +296,7 @@ static void parse_elf(void *output) return; } - debug_putstr("Parsing ELF... "); + /* debug_putstr("Parsing ELF... ");*/ phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); if (!phdrs) @@ -374,7 +374,8 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, cols = boot_params->screen_info.orig_video_cols; console_init(); - debug_putstr("early console in extract_kernel\n"); + /* debug_putstr("early console in extract_kernel\n");*/ + debug_putstr("\n");debug_putstr("Enea Linux kernel boot start\n"); if (IS_ENABLED(CONFIG_X86_5LEVEL) && !l5_supported()) { error("This linux kernel as configured requires 5-level paging\n" @@ -386,11 +387,11 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, free_mem_end_ptr = heap + BOOT_HEAP_SIZE; /* Report initial kernel position details. */ - debug_putaddr(input_data); - debug_putaddr(input_len); - debug_putaddr(output); - debug_putaddr(output_len); - debug_putaddr(kernel_total_size); + /*debug_putaddr(input_data); */ + /*debug_putaddr(input_len); */ + /*debug_putaddr(output); */ + /*debug_putaddr(output_len); */ + /*debug_putaddr(kernel_total_size);*/ /* * The memory hole needed for the kernel is the larger of either @@ -423,12 +424,12 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, error("Destination virtual address changed when not relocatable"); #endif - debug_putstr("\nDecompressing Linux... "); + /*debug_putstr("\nDecompressing Linux... ");*/ __decompress(input_data, input_len, NULL, NULL, output, output_len, NULL, error); parse_elf(output); handle_relocations(output, output_len, virt_addr); - debug_putstr("done.\nBooting the kernel.\n"); + /*debug_putstr("done.\nBooting the kernel.\n");*/ return output; } diff --git a/init/main.c b/init/main.c index 56210eb..9e61f9d 100644 --- a/init/main.c +++ b/init/main.c @@ -1025,8 +1025,10 @@ static int __ref kernel_init(void *unused) if (!try_to_run_init_process("/sbin/init") || !try_to_run_init_process("/etc/init") || !try_to_run_init_process("/bin/init") || - !try_to_run_init_process("/bin/sh")) + !try_to_run_init_process("/bin/sh")) { + printk(KERN_EMERG "Enea Linux kernel boot end\n"); return 0; + } panic("No working init found. Try passing init= option to kernel. " "See Linux Documentation/admin-guide/init.rst for guidance."); -- 2.7.4