2

I would like to know the right way to change modules loading priorities in Linux. I want to have hdmi and LCD output the most quickly.

For now it take 3 seconds to came, I know it's not delay due to hdmi or TV because the first stuff I see on screen is some lines about mali init (mali is the name of the GPU here).

I use a A10-Olinuxino-Lime board with an homemade rootfs generated using buildroot and a custom Linux made for this kind of processor (linux-sunxi).

The tree of /etc/:

etc/
├── dhcp
│   ├── dhclient.conf
│   └── dhcpd.conf
├── dropbear
├── fstab
├── group
├── hostname
├── hosts
├── init.d
│   ├── rcK
│   ├── rcS
│   ├── S01logging
│   ├── S20urandom
│   ├── S40network
│   ├── S50dropbear
│   ├── S80dhcp-relay
│   ├── S80dhcp-server
│   ├── S80mali
│   └── S99TVOS
├── inittab
├── inittab~
├── inputrc
├── issue
├── ld.so.cache
├── ld.so.conf
├── ld.so.conf.d
├── mtab -> /proc/mounts
├── network
│   ├── if-down.d
│   ├── if-post-down.d
│   ├── if-post-up.d
│   ├── if-pre-down.d
│   ├── if-pre-up.d
│   ├── if-up.d
│   └── interfaces
├── nsswitch.conf
├── os-release
├── passwd
├── profile
├── protocols
├── random-seed
├── resolv.conf -> ../tmp/resolv.conf
├── securetty
├── services
├── shadow
├── ts.conf
└── wpa_supplicant.conf

Do you have any ideas ?

VivienG
  • 2,143
  • 3
  • 24
  • 43
  • 2
    I'd look at what is loading your modules. Consider putting an explicit load of these early in your init system/script, especially in an initial filesystem if you are using that. Or build them into the kernel rather than as modules. – Chris Stratton Mar 04 '14 at 17:19
  • @VivienG Take a look at the /etc/init.d directory. The 'S##' is the order in which those init scripts are run. Be careful regarding dependencies. Perhaps you can also delay or re-order so non-critical sub-systems are available later. – Peter L. Mar 05 '14 at 05:09
  • @ChrisStratton Build them in kernel is not something I really want, as if I want to make some modifications I will have to re-cross-compile it. – VivienG Mar 05 '14 at 08:28
  • @PeterL. Thanks, but I tried with `mv S80mali S10mali` its still the same :/ Is there any file where I can force loading modules like when I make initramfs ? [Link to what I mean](http://linux-sunxi.org/Initial_Ramdisk) – VivienG Mar 05 '14 at 08:31
  • @VivienG Try using early_initcall() in the driver that you need to load quickly. Also see here: http://stackoverflow.com/questions/11642330/linux-built-in-driver-load-order – Peter L. Mar 05 '14 at 22:16

1 Answers1

0

I'd create an /etc/init.d/S00modules script containing a sequence of insmod (or modprobe if your env supports it) lines.

If that doesn't help, then your modules are loaded even earlier,and you'll have to find how and where that happens. I'd first look at /sbin/init or what is used instead.

tiv
  • 150
  • 1
  • 3
  • Hey ! Sounds a great idea ! Why I haven't think about it earlier... I qill give it a try when I will be back at home and give an update here ! Thanks. – VivienG Mar 05 '14 at 15:29