You are not logged in.
Hi
I want to make a little ArchBMC settopbox. The hardware is based on the mainboard of my old Acer 1810TZ. Runs pretty nice already, but I am not satisfied with the output of lsmod and systemd-analyze blame. There are a lot of modules that I dont need anymore. Right now I this is the first time I dive into kernel stuff. So please bear with me. My first try was to disable autodetect in mkinitcpio.conf. But this had not the desired effect. lsmod is still full of (acer)crap. Yes I know I could blacklist all the stuff, but 1. I want to make it clean, 2 I want to learn something about kernel related stuff 3. blacklisting is not able to exclude all I want. I already tried it. So can you please give me some hints on how to reduce the kernel and answer some questions? I'll begin slow
Is mkinitcpio related to kernel compiling? I know it packs the initramfs but does it so it imlpicitely?
How can I compile a Kernel, can I decide on what shall be integrated statically?
For the RTFMers: If you can give me reasonble and comprehensible! literature I will of course read it.
Thank you. Regards
Last edited by manuelschneid3r (2014-07-15 17:58:22)
Please feel free to correct my english.
Offline
mkinitcpio is about kernel image, not about the linux kernel.
Read the wiki :-)
https://wiki.archlinux.org/index.php/Mkinitcpio
https://wiki.archlinux.org/index.php/Kernels
I don't think you're going to make it boot much faster this way. Can you post the output that you're dissatisfied with?
Last edited by karol (2014-07-15 18:24:06)
Offline
This is the stuff that I think I dont need. Maybe I dont even know what some of them do, but imho I need nothing but ethernet for remotecontrol, graphics, sound, sdcard readerfor the os, fancontrol for reducing the noise. Sorry for not using the code block, but it doesn't let me highlight stuff.
[root@xbmc ~]# lsmod
Module Size Used by
keucr 58699 0
uas 17010 0
i915 796361 4
drm_kms_helper 39643 1 i915
drm 244846 6 i915,drm_kms_helper
i2c_algo_bit 5480 1 i915
i2c_i801 11364 0
i2c_core 41648 5 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit
joydev 10367 0
snd_hda_codec_hdmi 40396 1
snd_hda_codec_realtek 54803 1
snd_hda_codec_generic 56366 1 snd_hda_codec_realtek
arc4 2064 2
iTCO_wdt 5663 0
iwldvm 170799 0
acer_wmi 24550 0
sparse_keymap 3242 1 acer_wmi
led_class 3611 2 acer_wmi,iwldvm
iTCO_vendor_support 1929 1 iTCO_wdt
coretemp 6388 0
hwmon 3346 1 coretemp
microcode 17157 0
acerhdf 8897 0
pcspkr 2059 0
snd_hda_intel 22831 3
snd_hda_controller 22911 1 snd_hda_intel
atl1c 38362 0
psmouse 94918 0
evdev 11784 12
mac_hid 3273 0
lpc_ich 14008 0
snd_hda_codec 104665 5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
serio_raw 5073 0
snd_hwdep 6652 1 snd_hda_codec
mac80211 495361 1 iwldvm
iwlwifi 148746 1 iwldvm
snd_pcm 83207 4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
intel_agp 11504 0
cfg80211 437959 3 iwlwifi,mac80211,iwldvm
rfkill 15971 2 cfg80211,acer_wmi
intel_gtt 12856 3 i915,intel_agp
battery 7885 0
snd_timer 19294 1 snd_pcm
acpi_cpufreq 10170 0
snd 61276 14 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
shpchp 25706 0
wmi 8539 1 acer_wmi
ac 3595 0
video 12057 2 i915,acer_wmi
button 4765 1 i915
soundcore 5551 2 snd,snd_hda_codec
processor 25153 3 acpi_cpufreq
ext4 494292 1
crc16 1359 1 ext4
mbcache 9155 1 ext4
jbd2 82948 1 ext4
sd_mod 37554 2
crc_t10dif 1135 1 sd_mod
crct10dif_common 1436 1 crc_t10dif
hid_generic 1217 0
usbhid 41250 0
hid 93052 2 hid_generic,usbhid
usb_storage 50327 2 uas
atkbd 17006 0
libps2 4571 2 atkbd,psmouse
ahci 24299 0
libahci 21772 1 ahci
libata 174089 2 ahci,libahci
scsi_mod 138333 5 uas,keucr,usb_storage,libata,sd_mod
ehci_pci 4152 0
uhci_hcd 34795 0
ehci_hcd 64619 1 ehci_pci
usbcore 188381 7 uas,keucr,uhci_hcd,usb_storage,ehci_hcd,ehci_pci,usbhid
usb_common 1712 1 usbcore
i8042 13666 2 acer_wmi,libps2
serio 11018 9 serio_raw,atkbd,i8042,psmouse
[root@xbmc ~]# systemd-analyze blame
1.518s systemd-logind.service
1.298s dhcpcd.service
545ms systemd-tmpfiles-setup.service
328ms polkit.service
220ms systemd-remount-fs.service
212ms dev-hugepages.mount
211ms sys-kernel-debug.mount
200ms dev-mqueue.mount
197ms sys-kernel-config.mount
193ms systemd-vconsole-setup.service
189ms systemd-udev-trigger.service
187ms systemd-sysctl.service
187ms tmp.mount
187ms systemd-rfkill@rfkill0.service
161ms systemd-backlight@backlight:acpi_video0.service
152ms systemd-update-utmp.service
137ms systemd-journal-flush.service
133ms kmod-static-nodes.service
73ms systemd-udevd.service
48ms user@420.service
35ms systemd-tmpfiles-setup-dev.service
26ms systemd-random-seed.service
24ms systemd-backlight@backlight:intel_backlight.service
21ms user@0.service
15ms systemd-user-sessions.service
13ms rtkit-daemon.service
9ms systemd-tmpfiles-clean.service
Last edited by manuelschneid3r (2014-07-15 18:46:12)
Please feel free to correct my english.
Offline
Try https://wiki.archlinux.org/index.php/Systemd-networkd instead of dhcpcd.
Offline
The systemd-analyze output is unrelated to the kernel or initramfs. As for kernels, you can compile a custom kernel with the necessary components (such as your root filesystem) built in, eliminating the need for an initramfs. I think that would speed up boot (though probably not by much), but it would require a recompile with every new kernel release.
"Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it."—Linus Torvalds
s/ftp/git/
https://iandouglasscott.com | https://github.org/ids1024 | https://keybase.io/ids1024
Offline
TAs for kernels, you can compile a custom kernel with the necessary components (such as your root filesystem) built in, eliminating the need for an initramfs. I think that would speed up boot (though probably not by much), but it would require a recompile with every new kernel release.
That's it to a T.
I'd start by downloading the source files for the ARCH kernel and using one of the make menuconfig/nconfig to modify your config down. by commenting the appropriate line out in the PKGBUILD.
Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository
Offline
...it would require a recompile with every new kernel release.
It is pretty trivial to automate this, should OP want to head down this path.
Offline
If you do stick with having an initramfs then you could probably shave a few ms off your boot time by playing about with the compression settings. If you have a fast processor and a slow drive then a highly compressed image will be quicker to load, if you have a slow processor and and a fast drive then uncompressed will be quickest. Play about with the setting in mkinitcpio.conf and do some benchmarks for your system. You can also play with the compression settings for the kernel itself, but it will take a lot longer to benchmark though as you'll have to recompile between runs.
If you're compiling a kernel specific to your system then look into localmodconfig during the make process, it will include only the modules that are currently loaded. I know that you're trying to optimize that list but the kernel has auto-detected those modules for a reason, in my experience it's always a good one.
Although all of the advice in this thread is good, you have to ask yourself - 'Is it worth it?'
I don't know how much your time is worth but days of kernel compiling and testing is not worth it just to shave tenths of a second off your boot time IMHO.
Last edited by Slithery (2014-07-15 23:11:11)
Offline
There are scripts called autokernconf and diet-kconfig for compiling a kernel with only the necessary modules.
6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.
Offline