At the end of the modules-update script, depmod is run. But this cause a problem when building livecd. Catalyst runs modules-update for each builded kernel but on hppa, one kernel is for 32 bit box and on other for 64bit. When you run depmod for the kernel arch you're not running, depmod produce errors like "modules not for this arch" unless you set UNAME_MACHINE to the right arch AND leaves the modules.dep empty even if a correct one was build previously. This leaves a broken modprobe for either 32 or 64 bit depending the arch you build it with. This is bug #58548. So what are the possibles fixes : 1) do not run modules-update in catalyst 2) find a way to detect which arch is the target kernel and set UNAME_MACHINE correctly either in catalyst or in modules-update 3)do not run depmod in modules-update My personal toughs about thoses solutions : 1) it may be needed for things like alsa so it's not a option. 2) this could produce more bugs and is not easy to do 3) the only reason modules-update runs depmod is to change the timestamp of modules.dep to avoid harmless warning messages. this is a good solution So for me the right solution is the third one. Replacing depmod by touch -r should be enough.
should tie this in with the livecd USE flag
The problem isn't limited to livecd building. Any time you try to boot a kernel that /usr/src/linux happens not to point to at the moment (because you are maintainig more than one kernel in the same root filesystem), that kernel's modules.dep file is broken during the /etc/init.d/modules script, generally causing hotplugging to go completely haywire or even to hang. Hence, it's not really a good idea to tie this to any USE flag. On the other hand, there is something to be said for having modules-update leaving a clean state and reporting unresolved symbols when called interactively. I would like to suggest the following: if [ -d "`depdir`" -a -f /proc/modules ] then if [ -f /usr/src/linux-${KV}/System.map ]; then depmod -a -F /usr/src/linux-${KV}/System.map ${KV} else echo "warning: system map file not found - unable to check symbols" fi fi
the modules init.d script no longer runs modules-update for livecds the proposed change to modules-update also looks good to me ... i think we should merge it into baselayout 1.12.x
Something like this: ----- Index: sbin/modules-update =================================================================== --- sbin/modules-update (revision 1297) +++ sbin/modules-update (working copy) @@ -230,7 +230,7 @@ if [[ -f /usr/src/linux/System.map ]] ; then depmod -a -F /usr/src/linux/System.map ${KV} else - depmod -a ${KV} + ewarn "System.map not found - unable to check symbols" fi fi fi
Added, thanks.