Tiny Core Base > TCB Talk
tce-load and extensions with a directory named modules
mortegai:
tce-load has a routine (update_system, which includes depmod -a and udevadm trigger) designed for extensions that contain kernel modules, and it's executed if the extension contains a directory named modules.
However, there are some other extensions that contain a directory named modules, such as:
--- Code: ---xorg-server
libfm
glib2
gtk2
xf86-input-lubinput
p11-kit (needed for gnutls)
at-spi2-core
--- End code ---
that when loaded also run update_system unnecessarily, significantly lengthening their loading time.
Could the need to run update_system when loading an extension be refined in some way?
For example, by checking if it also contains *.ko kernel modules
Rich:
Hi mortegai
I'm looking into it.
Rich:
Hi mortegai
What do you think of this:
Replace this:
--- Code: ---[ -n "`find /mnt/test/ -type d -name modules`" ] && MODULES=TRUE
--- End code ---
With this:
--- Code: ---MODULES_DIR=$(find /mnt/test/ -type d -name modules)
[ -n "$MODULES_DIR" ] && [ "$(find $MODULES_DIR -type f -name '*.ko*')" ] && MODULES=TRUE
--- End code ---
And replace this:
--- Code: ---[ -n "`find /tmp/tcloop/$APPNAME -type d -name modules`" ] && MODULES=TRUE
--- End code ---
With this:
--- Code: ---MODULES_DIR=$(find /tmp/tcloop/$APPNAME -type d -name modules)
[ -n "$MODULES_DIR" ] && [ "$(find $MODULES_DIR -type f -name '*.ko*')" ] && MODULES=TRUE
--- End code ---
In both cases, the first line searches for a modules directory. If found, the second line
searches that directory for any *.ko* files. If found, MODULES gets set to TRUE.
This will detect .ko, .ko.gz, .ko.xz, etc.
Comments from you or anyone else reading this thread are welcome and encouraged.
CNK:
Why not just (untested):
--- Code: ---[ -d /mnt/test/usr/local/lib/modules/$KERNELVER ] && MODULES=TRUE
--- End code ---
Then you avoid needing to run 'find'.
Assuming no extensions wrongly install to /lib/modules/, in which case:
--- Code: ---[ -d /mnt/test/usr/local/lib/modules/$KERNELVER -o -d /mnt/test/lib/modules/$KERNELVER ] && MODULES=TRUE
--- End code ---
Rich:
Hi CNK
Thank you. That solves the problem the find command created. Some extensions
contain:
--- Code: ---/usr/local/lib/ExtensionName/modules
--- End code ---
populated with .so files. The find command returned those module directories.
This should work better:
Replace this:
--- Code: ---[ -n "`find /mnt/test/ -type d -name modules`" ] && MODULES=TRUE
--- End code ---
With this:
--- Code: ---[ -d /mnt/test/usr/local/lib/modules ] && MODULES=TRUE
--- End code ---
And replace this:
--- Code: ---[ -n "`find /tmp/tcloop/$APPNAME -type d -name modules`" ] && MODULES=TRUE
--- End code ---
With this:
--- Code: ---[ -d /tmp/tcloop/$APPNAME/usr/local/lib/modules ] && MODULES=TRUE
--- End code ---
I searched provides.db and found:
There are no extensions containing /lib/modules.
There are no /usr/local/lib/modules directories containing .so files.
Navigation
[0] Message Index
[#] Next page
Go to full version