1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
From b91730ba705d151577974d5fb9f5371a4569b467 Mon Sep 17 00:00:00 2001
From: Adrian Calianu <adrian.calianu@enea.com>
Date: Tue, 6 Jun 2017 15:47:54 +0200
Subject: [PATCH 1/1] printk: add Enea Linux boot start/end messages
Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
---
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 b3c5a5f0..9fdf3c6 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -202,10 +202,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.
@@ -286,7 +286,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)
@@ -360,17 +360,18 @@ 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");
free_mem_ptr = heap; /* 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
@@ -401,11 +402,11 @@ 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 8358cbe..613caa1 100644
--- a/init/main.c
+++ b/init/main.c
@@ -976,8 +976,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/init.txt for guidance.");
--
2.7.4
|