summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Ionescu <gabriel.ionescu@enea.com>2017-06-08 18:13:42 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2017-06-09 12:23:55 +0200
commite07993bedd511575ccb0802cd14690111978b50a (patch)
tree7d7a2af922d679d4d1aff422f97cbc088bbd0314
parent20a2437ae70d46e830f0e343d2d6e4c5315dc2c8 (diff)
downloadenea-kernel-cache-e07993bedd511575ccb0802cd14690111978b50a.tar.gz
Kernel: Optimize boot time and add start/end messages
Signed-off-by: Gabriel Ionescu <gabriel.ionescu@enea.com> Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
-rw-r--r--features/btrfs/btrfs_m.cfg1
-rw-r--r--features/btrfs/btrfs_m.scc5
-rw-r--r--features/bus/pci_cnb20le_n.cfg1
-rw-r--r--features/bus/pci_cnb20le_n.scc5
-rw-r--r--features/debug/debug_kernel_n.cfg1
-rw-r--r--features/debug/debug_kernel_y.cfg1
-rw-r--r--features/input/input_n.cfg3
-rw-r--r--features/input/input_n.scc5
-rw-r--r--features/intel-e1xxxx/e100_m.cfg1
-rw-r--r--features/intel-e1xxxx/e100_m.scc5
-rw-r--r--features/intel-e1xxxx/e1xxxx_m.cfg3
-rw-r--r--features/intel-e1xxxx/e1xxxx_m.scc5
-rw-r--r--features/ixgbe/ixgbe_m.cfg4
-rw-r--r--features/ixgbe/ixgbe_m.scc4
-rw-r--r--features/mdio/mdio_m.cfg1
-rw-r--r--features/mdio/mdio_m.scc5
-rw-r--r--features/mii/mii_m.cfg1
-rw-r--r--features/mii/mii_m.scc5
-rw-r--r--features/overlayfs/overlayfs_m.cfg1
-rw-r--r--features/overlayfs/overlayfs_m.scc5
-rw-r--r--features/printk/printk_n.cfg1
-rw-r--r--features/printk/printk_y.cfg1
-rw-r--r--features/reduced_kernel_footprint/reduced_kernel_footprint.scc13
-rw-r--r--features/xor_blocks/xor_blocks_m.cfg1
-rw-r--r--features/xor_blocks/xor_blocks_m.scc5
-rw-r--r--patches/kernel_startend_msg/0001-printk-add-Enea-Linux-boot-start-end-messages.patch95
-rw-r--r--patches/kernel_startend_msg/kernel_startend_msg.scc4
27 files changed, 178 insertions, 4 deletions
diff --git a/features/btrfs/btrfs_m.cfg b/features/btrfs/btrfs_m.cfg
new file mode 100644
index 0000000..3b4d425
--- /dev/null
+++ b/features/btrfs/btrfs_m.cfg
@@ -0,0 +1 @@
CONFIG_BTRFS_FS=m
diff --git a/features/btrfs/btrfs_m.scc b/features/btrfs/btrfs_m.scc
new file mode 100644
index 0000000..4827556
--- /dev/null
+++ b/features/btrfs/btrfs_m.scc
@@ -0,0 +1,5 @@
1define KFEATURE_DESCRIPTION "Build BTRFS support as a module"
2
3define KFEATURE_COMPATIBILITY all
4
5kconf hardware btrfs_m.cfg
diff --git a/features/bus/pci_cnb20le_n.cfg b/features/bus/pci_cnb20le_n.cfg
new file mode 100644
index 0000000..a75dcef
--- /dev/null
+++ b/features/bus/pci_cnb20le_n.cfg
@@ -0,0 +1 @@
# CONFIG_PCI_CNB20LE_QUIRK is not set
diff --git a/features/bus/pci_cnb20le_n.scc b/features/bus/pci_cnb20le_n.scc
new file mode 100644
index 0000000..c5da613
--- /dev/null
+++ b/features/bus/pci_cnb20le_n.scc
@@ -0,0 +1,5 @@
1define KFEATURE_DESCRIPTION "Disable support for CNB20LE chipset"
2
3define KFEATURE_COMPATIBILITY all
4
5kconf hardware pci_cnb20le_n.cfg
diff --git a/features/debug/debug_kernel_n.cfg b/features/debug/debug_kernel_n.cfg
index cabde95..77f41ef 100644
--- a/features/debug/debug_kernel_n.cfg
+++ b/features/debug/debug_kernel_n.cfg
@@ -5,5 +5,4 @@ CONFIG_PNP_DEBUG_MESSAGES=n
5CONFIG_SCHED_DEBUG=n 5CONFIG_SCHED_DEBUG=n
6CONFIG_DEBUG_PREEMPT=n 6CONFIG_DEBUG_PREEMPT=n
7CONFIG_X86_DEBUG_FPU=n 7CONFIG_X86_DEBUG_FPU=n
8CONFIG_X86_VERBOSE_BOOTUP=n
9CONFIG_EARLY_PRINTK=n 8CONFIG_EARLY_PRINTK=n
diff --git a/features/debug/debug_kernel_y.cfg b/features/debug/debug_kernel_y.cfg
index cb7617d..29399ad 100644
--- a/features/debug/debug_kernel_y.cfg
+++ b/features/debug/debug_kernel_y.cfg
@@ -6,4 +6,3 @@ CONFIG_PNP_DEBUG_MESSAGES=y
6CONFIG_SCHED_DEBUG=y 6CONFIG_SCHED_DEBUG=y
7CONFIG_DEBUG_PREEMPT=y 7CONFIG_DEBUG_PREEMPT=y
8CONFIG_X86_DEBUG_FPU=y 8CONFIG_X86_DEBUG_FPU=y
9CONFIG_X86_VERBOSE_BOOTUP=y
diff --git a/features/input/input_n.cfg b/features/input/input_n.cfg
new file mode 100644
index 0000000..ee422f2
--- /dev/null
+++ b/features/input/input_n.cfg
@@ -0,0 +1,3 @@
1CONFIG_SERIO=n
2CONFIG_INPUT_LEDS=n
3CONFIG_INPUT_EVDEV=n
diff --git a/features/input/input_n.scc b/features/input/input_n.scc
new file mode 100644
index 0000000..16aaa94
--- /dev/null
+++ b/features/input/input_n.scc
@@ -0,0 +1,5 @@
1define KFEATURE_DESCRIPTION "Disable inputs"
2
3define KFEATURE_COMPATIBILITY all
4
5kconf hardware input_n.cfg
diff --git a/features/intel-e1xxxx/e100_m.cfg b/features/intel-e1xxxx/e100_m.cfg
new file mode 100644
index 0000000..676b909
--- /dev/null
+++ b/features/intel-e1xxxx/e100_m.cfg
@@ -0,0 +1 @@
CONFIG_E100=m
diff --git a/features/intel-e1xxxx/e100_m.scc b/features/intel-e1xxxx/e100_m.scc
new file mode 100644
index 0000000..42730b4
--- /dev/null
+++ b/features/intel-e1xxxx/e100_m.scc
@@ -0,0 +1,5 @@
1define KFEATURE_DESCRIPTION "Build E100 support as a module"
2
3define KFEATURE_COMPATIBILITY all
4
5kconf hardware e100_m.cfg
diff --git a/features/intel-e1xxxx/e1xxxx_m.cfg b/features/intel-e1xxxx/e1xxxx_m.cfg
new file mode 100644
index 0000000..c05e8c6
--- /dev/null
+++ b/features/intel-e1xxxx/e1xxxx_m.cfg
@@ -0,0 +1,3 @@
1CONFIG_E1000=m
2CONFIG_E1000E=m
3CONFIG_E1000E_HWTS=m
diff --git a/features/intel-e1xxxx/e1xxxx_m.scc b/features/intel-e1xxxx/e1xxxx_m.scc
new file mode 100644
index 0000000..d8a8f16
--- /dev/null
+++ b/features/intel-e1xxxx/e1xxxx_m.scc
@@ -0,0 +1,5 @@
1define KFEATURE_DESCRIPTION "Build E1xxxx drivers as modules"
2
3define KFEATURE_COMPATIBILITY all
4
5kconf hardware e1xxxx_m.cfg
diff --git a/features/ixgbe/ixgbe_m.cfg b/features/ixgbe/ixgbe_m.cfg
new file mode 100644
index 0000000..88d48ce
--- /dev/null
+++ b/features/ixgbe/ixgbe_m.cfg
@@ -0,0 +1,4 @@
1CONFIG_IXGB=m
2CONFIG_IXGBE=m
3CONFIG_IXGBEVF=m
4CONFIG_DCA=y
diff --git a/features/ixgbe/ixgbe_m.scc b/features/ixgbe/ixgbe_m.scc
new file mode 100644
index 0000000..25cd537
--- /dev/null
+++ b/features/ixgbe/ixgbe_m.scc
@@ -0,0 +1,4 @@
1define KFEATURE_DESCRIPTION "Build IXGB and IXGBE support as a modules"
2define KFEATURE_COMPATIBILITY board
3
4kconf hardware ixgbe_m.cfg
diff --git a/features/mdio/mdio_m.cfg b/features/mdio/mdio_m.cfg
new file mode 100644
index 0000000..c2915e9
--- /dev/null
+++ b/features/mdio/mdio_m.cfg
@@ -0,0 +1 @@
CONFIG_MDIO=m
diff --git a/features/mdio/mdio_m.scc b/features/mdio/mdio_m.scc
new file mode 100644
index 0000000..654555e
--- /dev/null
+++ b/features/mdio/mdio_m.scc
@@ -0,0 +1,5 @@
1define KFEATURE_DESCRIPTION "Build MDIO support as a module"
2
3define KFEATURE_COMPATIBILITY all
4
5kconf hardware mdio_m.cfg
diff --git a/features/mii/mii_m.cfg b/features/mii/mii_m.cfg
new file mode 100644
index 0000000..b7d4f65
--- /dev/null
+++ b/features/mii/mii_m.cfg
@@ -0,0 +1 @@
CONFIG_MII=m
diff --git a/features/mii/mii_m.scc b/features/mii/mii_m.scc
new file mode 100644
index 0000000..4899cc5
--- /dev/null
+++ b/features/mii/mii_m.scc
@@ -0,0 +1,5 @@
1define KFEATURE_DESCRIPTION "Build MII support as a module"
2
3define KFEATURE_COMPATIBILITY all
4
5kconf hardware mii_m.cfg
diff --git a/features/overlayfs/overlayfs_m.cfg b/features/overlayfs/overlayfs_m.cfg
new file mode 100644
index 0000000..b30428d
--- /dev/null
+++ b/features/overlayfs/overlayfs_m.cfg
@@ -0,0 +1 @@
CONFIG_OVERLAY_FS=m
diff --git a/features/overlayfs/overlayfs_m.scc b/features/overlayfs/overlayfs_m.scc
new file mode 100644
index 0000000..7d4491c
--- /dev/null
+++ b/features/overlayfs/overlayfs_m.scc
@@ -0,0 +1,5 @@
1define KFEATURE_DESCRIPTION "Build overlay FS support as a module"
2
3define KFEATURE_COMPATIBILITY all
4
5kconf hardware overlayfs_m.cfg
diff --git a/features/printk/printk_n.cfg b/features/printk/printk_n.cfg
index d4c04cb..7f0df22 100644
--- a/features/printk/printk_n.cfg
+++ b/features/printk/printk_n.cfg
@@ -1,2 +1,3 @@
1CONFIG_PRINTK=n 1CONFIG_PRINTK=n
2CONFIG_PRINTK_NMI=n 2CONFIG_PRINTK_NMI=n
3CONFIG_X86_VERBOSE_BOOTUP=n
diff --git a/features/printk/printk_y.cfg b/features/printk/printk_y.cfg
index 522de7d..0fcc9f0 100644
--- a/features/printk/printk_y.cfg
+++ b/features/printk/printk_y.cfg
@@ -1,3 +1,4 @@
1CONFIG_PRINTK=y 1CONFIG_PRINTK=y
2CONFIG_PRINTK_NMI=y 2CONFIG_PRINTK_NMI=y
3CONFIG_EARLY_PRINTK=y 3CONFIG_EARLY_PRINTK=y
4CONFIG_X86_VERBOSE_BOOTUP=y
diff --git a/features/reduced_kernel_footprint/reduced_kernel_footprint.scc b/features/reduced_kernel_footprint/reduced_kernel_footprint.scc
index fe07e29..87a915f 100644
--- a/features/reduced_kernel_footprint/reduced_kernel_footprint.scc
+++ b/features/reduced_kernel_footprint/reduced_kernel_footprint.scc
@@ -11,10 +11,11 @@ include features/ata/ata_n.scc
11include features/backlight/backlight_n.scc 11include features/backlight/backlight_n.scc
12include features/bug_support/bug_support_n.scc 12include features/bug_support/bug_support_n.scc
13include features/bluetooth/bluetooth_n.scc 13include features/bluetooth/bluetooth_n.scc
14include features/bus/pci_cnb20le_n.scc
14include features/cdrom/cdrom_n.scc 15include features/cdrom/cdrom_n.scc
15include features/cdrom_fs/cdrom_fs_n.scc 16include features/cdrom_fs/cdrom_fs_n.scc
16include features/cgroupdbg/cgroupdbg_n.scc 17include features/cgroupdbg/cgroupdbg_n.scc
17include features/debug/debug_n.scc 18include features/debug/debug_kernel_n.scc
18include features/devcoredump/devcoredump_n.scc 19include features/devcoredump/devcoredump_n.scc
19include features/display/display_n.scc 20include features/display/display_n.scc
20include features/drm/drm_n.scc 21include features/drm/drm_n.scc
@@ -26,6 +27,7 @@ include features/hid/hid_n.scc
26include features/hidsensor/hidsensor_n.scc 27include features/hidsensor/hidsensor_n.scc
27include features/ieee802154/ieee802154_n.scc 28include features/ieee802154/ieee802154_n.scc
28include features/inclinometer/inclinometer_n.scc 29include features/inclinometer/inclinometer_n.scc
30include features/input/input_n.scc
29include features/keyboard/keyboard_n.scc 31include features/keyboard/keyboard_n.scc
30include features/kgdb/kgdb_n.scc 32include features/kgdb/kgdb_n.scc
31include features/kprobes/kprobes_n.scc 33include features/kprobes/kprobes_n.scc
@@ -38,7 +40,6 @@ include features/mousedev/mousedev_n.scc
38include features/netdevices/netdevices_n.scc 40include features/netdevices/netdevices_n.scc
39include features/nfc/nfc_n.scc 41include features/nfc/nfc_n.scc
40include features/powermanagement/powermanagement_n.scc 42include features/powermanagement/powermanagement_n.scc
41include features/printk/printk_n.scc
42include features/pcspkr/pcspkr_n.scc 43include features/pcspkr/pcspkr_n.scc
43include features/rcudbg/rcudbg_n.scc 44include features/rcudbg/rcudbg_n.scc
44include features/rfkill/rfkill_n.scc 45include features/rfkill/rfkill_n.scc
@@ -53,5 +54,13 @@ include features/wireless/wireless_n.scc
53include features/wlan/wlan_n.scc 54include features/wlan/wlan_n.scc
54 55
55# Added as loadable module 56# Added as loadable module
57include features/btrfs/btrfs_m.scc
58include features/intel-e1xxxx/e100_m.scc
59include features/intel-e1xxxx/e1xxxx_m.scc
60include features/ixgbe/ixgbe_m.scc
61include features/mdio/mdio_m.scc
62include features/mii/mii_m.scc
63include features/overlayfs/overlayfs_m.scc
56include features/usbnet/usbnet_m.scc 64include features/usbnet/usbnet_m.scc
57include features/usbsupport/usbsupport_m.scc 65include features/usbsupport/usbsupport_m.scc
66include features/xor_blocks/xor_blocks_m.scc
diff --git a/features/xor_blocks/xor_blocks_m.cfg b/features/xor_blocks/xor_blocks_m.cfg
new file mode 100644
index 0000000..584c49c
--- /dev/null
+++ b/features/xor_blocks/xor_blocks_m.cfg
@@ -0,0 +1 @@
CONFIG_XOR_BLOCKS=m
diff --git a/features/xor_blocks/xor_blocks_m.scc b/features/xor_blocks/xor_blocks_m.scc
new file mode 100644
index 0000000..3ef6b9d
--- /dev/null
+++ b/features/xor_blocks/xor_blocks_m.scc
@@ -0,0 +1,5 @@
1define KFEATURE_DESCRIPTION "Build XOR blocks as a module"
2
3define KFEATURE_COMPATIBILITY all
4
5kconf hardware xor_blocks_m.cfg
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-boot-start-end-messages.patch
new file mode 100644
index 0000000..0fa8756
--- /dev/null
+++ b/patches/kernel_startend_msg/0001-printk-add-Enea-Linux-boot-start-end-messages.patch
@@ -0,0 +1,95 @@
1From b91730ba705d151577974d5fb9f5371a4569b467 Mon Sep 17 00:00:00 2001
2From: Adrian Calianu <adrian.calianu@enea.com>
3Date: Tue, 6 Jun 2017 15:47:54 +0200
4Subject: [PATCH 1/1] printk: add Enea Linux boot start/end messages
5
6Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
7---
8 arch/x86/boot/compressed/misc.c | 23 ++++++++++++-----------
9 init/main.c | 4 +++-
10 2 files changed, 15 insertions(+), 12 deletions(-)
11
12diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
13index b3c5a5f0..9fdf3c6 100644
14--- a/arch/x86/boot/compressed/misc.c
15+++ b/arch/x86/boot/compressed/misc.c
16@@ -202,10 +202,10 @@ static void handle_relocations(void *output, unsigned long output_len,
17 delta = virt_addr - LOAD_PHYSICAL_ADDR;
18
19 if (!delta) {
20- debug_putstr("No relocation needed... ");
21+ /* debug_putstr("No relocation needed... "); */
22 return;
23 }
24- debug_putstr("Performing relocations... ");
25+ /* debug_putstr("Performing relocations... "); */
26
27 /*
28 * Process relocations: 32 bit relocations first then 64 bit after.
29@@ -286,7 +286,7 @@ static void parse_elf(void *output)
30 return;
31 }
32
33- debug_putstr("Parsing ELF... ");
34+ /* debug_putstr("Parsing ELF... ");*/
35
36 phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum);
37 if (!phdrs)
38@@ -360,17 +360,18 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap,
39 cols = boot_params->screen_info.orig_video_cols;
40
41 console_init();
42- debug_putstr("early console in extract_kernel\n");
43+ /* debug_putstr("early console in extract_kernel\n");*/
44+ debug_putstr("\n");debug_putstr("Enea Linux kernel boot start\n");
45
46 free_mem_ptr = heap; /* Heap */
47 free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
48
49 /* Report initial kernel position details. */
50- debug_putaddr(input_data);
51- debug_putaddr(input_len);
52- debug_putaddr(output);
53- debug_putaddr(output_len);
54- debug_putaddr(kernel_total_size);
55+ /*debug_putaddr(input_data); */
56+ /*debug_putaddr(input_len); */
57+ /*debug_putaddr(output); */
58+ /*debug_putaddr(output_len); */
59+ /*debug_putaddr(kernel_total_size);*/
60
61 /*
62 * 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,
64 error("Destination virtual address changed when not relocatable");
65 #endif
66
67- debug_putstr("\nDecompressing Linux... ");
68+ /*debug_putstr("\nDecompressing Linux... ");*/
69 __decompress(input_data, input_len, NULL, NULL, output, output_len,
70 NULL, error);
71 parse_elf(output);
72 handle_relocations(output, output_len, virt_addr);
73- debug_putstr("done.\nBooting the kernel.\n");
74+ /*debug_putstr("done.\nBooting the kernel.\n");*/
75 return output;
76 }
77diff --git a/init/main.c b/init/main.c
78index 8358cbe..613caa1 100644
79--- a/init/main.c
80+++ b/init/main.c
81@@ -976,8 +976,10 @@ static int __ref kernel_init(void *unused)
82 if (!try_to_run_init_process("/sbin/init") ||
83 !try_to_run_init_process("/etc/init") ||
84 !try_to_run_init_process("/bin/init") ||
85- !try_to_run_init_process("/bin/sh"))
86+ !try_to_run_init_process("/bin/sh")) {
87+ printk(KERN_EMERG "Enea Linux kernel boot end\n");
88 return 0;
89+ }
90
91 panic("No working init found. Try passing init= option to kernel. "
92 "See Linux Documentation/init.txt for guidance.");
93--
942.7.4
95
diff --git a/patches/kernel_startend_msg/kernel_startend_msg.scc b/patches/kernel_startend_msg/kernel_startend_msg.scc
new file mode 100644
index 0000000..e6da49c
--- /dev/null
+++ b/patches/kernel_startend_msg/kernel_startend_msg.scc
@@ -0,0 +1,4 @@
1define KFEATURE_DESCRIPTION "Enable the kernel to output messages when it starts and ends booting"
2define KFEATURE_COMPATIBILITY all
3
4patch 0001-printk-add-Enea-Linux-boot-start-end-messages.patch