diff options
author | Gabriel Ionescu <gabriel.ionescu@enea.com> | 2017-06-08 18:13:42 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2017-06-09 12:23:55 +0200 |
commit | e07993bedd511575ccb0802cd14690111978b50a (patch) | |
tree | 7d7a2af922d679d4d1aff422f97cbc088bbd0314 | |
parent | 20a2437ae70d46e830f0e343d2d6e4c5315dc2c8 (diff) | |
download | enea-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>
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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Build BTRFS support as a module" | ||
2 | |||
3 | define KFEATURE_COMPATIBILITY all | ||
4 | |||
5 | kconf 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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Disable support for CNB20LE chipset" | ||
2 | |||
3 | define KFEATURE_COMPATIBILITY all | ||
4 | |||
5 | kconf 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 | |||
5 | CONFIG_SCHED_DEBUG=n | 5 | CONFIG_SCHED_DEBUG=n |
6 | CONFIG_DEBUG_PREEMPT=n | 6 | CONFIG_DEBUG_PREEMPT=n |
7 | CONFIG_X86_DEBUG_FPU=n | 7 | CONFIG_X86_DEBUG_FPU=n |
8 | CONFIG_X86_VERBOSE_BOOTUP=n | ||
9 | CONFIG_EARLY_PRINTK=n | 8 | CONFIG_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 | |||
6 | CONFIG_SCHED_DEBUG=y | 6 | CONFIG_SCHED_DEBUG=y |
7 | CONFIG_DEBUG_PREEMPT=y | 7 | CONFIG_DEBUG_PREEMPT=y |
8 | CONFIG_X86_DEBUG_FPU=y | 8 | CONFIG_X86_DEBUG_FPU=y |
9 | CONFIG_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 @@ | |||
1 | CONFIG_SERIO=n | ||
2 | CONFIG_INPUT_LEDS=n | ||
3 | CONFIG_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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Disable inputs" | ||
2 | |||
3 | define KFEATURE_COMPATIBILITY all | ||
4 | |||
5 | kconf 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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Build E100 support as a module" | ||
2 | |||
3 | define KFEATURE_COMPATIBILITY all | ||
4 | |||
5 | kconf 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 @@ | |||
1 | CONFIG_E1000=m | ||
2 | CONFIG_E1000E=m | ||
3 | CONFIG_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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Build E1xxxx drivers as modules" | ||
2 | |||
3 | define KFEATURE_COMPATIBILITY all | ||
4 | |||
5 | kconf 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 @@ | |||
1 | CONFIG_IXGB=m | ||
2 | CONFIG_IXGBE=m | ||
3 | CONFIG_IXGBEVF=m | ||
4 | CONFIG_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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Build IXGB and IXGBE support as a modules" | ||
2 | define KFEATURE_COMPATIBILITY board | ||
3 | |||
4 | kconf 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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Build MDIO support as a module" | ||
2 | |||
3 | define KFEATURE_COMPATIBILITY all | ||
4 | |||
5 | kconf 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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Build MII support as a module" | ||
2 | |||
3 | define KFEATURE_COMPATIBILITY all | ||
4 | |||
5 | kconf 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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Build overlay FS support as a module" | ||
2 | |||
3 | define KFEATURE_COMPATIBILITY all | ||
4 | |||
5 | kconf 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 @@ | |||
1 | CONFIG_PRINTK=n | 1 | CONFIG_PRINTK=n |
2 | CONFIG_PRINTK_NMI=n | 2 | CONFIG_PRINTK_NMI=n |
3 | CONFIG_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 @@ | |||
1 | CONFIG_PRINTK=y | 1 | CONFIG_PRINTK=y |
2 | CONFIG_PRINTK_NMI=y | 2 | CONFIG_PRINTK_NMI=y |
3 | CONFIG_EARLY_PRINTK=y | 3 | CONFIG_EARLY_PRINTK=y |
4 | CONFIG_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 | |||
11 | include features/backlight/backlight_n.scc | 11 | include features/backlight/backlight_n.scc |
12 | include features/bug_support/bug_support_n.scc | 12 | include features/bug_support/bug_support_n.scc |
13 | include features/bluetooth/bluetooth_n.scc | 13 | include features/bluetooth/bluetooth_n.scc |
14 | include features/bus/pci_cnb20le_n.scc | ||
14 | include features/cdrom/cdrom_n.scc | 15 | include features/cdrom/cdrom_n.scc |
15 | include features/cdrom_fs/cdrom_fs_n.scc | 16 | include features/cdrom_fs/cdrom_fs_n.scc |
16 | include features/cgroupdbg/cgroupdbg_n.scc | 17 | include features/cgroupdbg/cgroupdbg_n.scc |
17 | include features/debug/debug_n.scc | 18 | include features/debug/debug_kernel_n.scc |
18 | include features/devcoredump/devcoredump_n.scc | 19 | include features/devcoredump/devcoredump_n.scc |
19 | include features/display/display_n.scc | 20 | include features/display/display_n.scc |
20 | include features/drm/drm_n.scc | 21 | include features/drm/drm_n.scc |
@@ -26,6 +27,7 @@ include features/hid/hid_n.scc | |||
26 | include features/hidsensor/hidsensor_n.scc | 27 | include features/hidsensor/hidsensor_n.scc |
27 | include features/ieee802154/ieee802154_n.scc | 28 | include features/ieee802154/ieee802154_n.scc |
28 | include features/inclinometer/inclinometer_n.scc | 29 | include features/inclinometer/inclinometer_n.scc |
30 | include features/input/input_n.scc | ||
29 | include features/keyboard/keyboard_n.scc | 31 | include features/keyboard/keyboard_n.scc |
30 | include features/kgdb/kgdb_n.scc | 32 | include features/kgdb/kgdb_n.scc |
31 | include features/kprobes/kprobes_n.scc | 33 | include features/kprobes/kprobes_n.scc |
@@ -38,7 +40,6 @@ include features/mousedev/mousedev_n.scc | |||
38 | include features/netdevices/netdevices_n.scc | 40 | include features/netdevices/netdevices_n.scc |
39 | include features/nfc/nfc_n.scc | 41 | include features/nfc/nfc_n.scc |
40 | include features/powermanagement/powermanagement_n.scc | 42 | include features/powermanagement/powermanagement_n.scc |
41 | include features/printk/printk_n.scc | ||
42 | include features/pcspkr/pcspkr_n.scc | 43 | include features/pcspkr/pcspkr_n.scc |
43 | include features/rcudbg/rcudbg_n.scc | 44 | include features/rcudbg/rcudbg_n.scc |
44 | include features/rfkill/rfkill_n.scc | 45 | include features/rfkill/rfkill_n.scc |
@@ -53,5 +54,13 @@ include features/wireless/wireless_n.scc | |||
53 | include features/wlan/wlan_n.scc | 54 | include features/wlan/wlan_n.scc |
54 | 55 | ||
55 | # Added as loadable module | 56 | # Added as loadable module |
57 | include features/btrfs/btrfs_m.scc | ||
58 | include features/intel-e1xxxx/e100_m.scc | ||
59 | include features/intel-e1xxxx/e1xxxx_m.scc | ||
60 | include features/ixgbe/ixgbe_m.scc | ||
61 | include features/mdio/mdio_m.scc | ||
62 | include features/mii/mii_m.scc | ||
63 | include features/overlayfs/overlayfs_m.scc | ||
56 | include features/usbnet/usbnet_m.scc | 64 | include features/usbnet/usbnet_m.scc |
57 | include features/usbsupport/usbsupport_m.scc | 65 | include features/usbsupport/usbsupport_m.scc |
66 | include 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 @@ | |||
1 | define KFEATURE_DESCRIPTION "Build XOR blocks as a module" | ||
2 | |||
3 | define KFEATURE_COMPATIBILITY all | ||
4 | |||
5 | kconf 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 @@ | |||
1 | From b91730ba705d151577974d5fb9f5371a4569b467 Mon Sep 17 00:00:00 2001 | ||
2 | From: Adrian Calianu <adrian.calianu@enea.com> | ||
3 | Date: Tue, 6 Jun 2017 15:47:54 +0200 | ||
4 | Subject: [PATCH 1/1] printk: add Enea Linux boot start/end messages | ||
5 | |||
6 | Signed-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 | |||
12 | diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c | ||
13 | index 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 | } | ||
77 | diff --git a/init/main.c b/init/main.c | ||
78 | index 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 | -- | ||
94 | 2.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 @@ | |||
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-boot-start-end-messages.patch | ||