diff options
Diffstat (limited to 'hook-functions')
-rw-r--r-- | hook-functions | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/hook-functions b/hook-functions index 5db7d27..8642af9 100644 --- a/hook-functions +++ b/hook-functions @@ -4,6 +4,12 @@ catenate_cpiogz() { cat "$1" >>${__TMPCPIOGZ} } +force_load() +{ + manual_add_modules ${module} + echo ${@} >>${DESTDIR}/conf/modules +} + add_modules_from_file() { # Sanity check @@ -12,8 +18,7 @@ add_modules_from_file() fi sed -e '/^#/d' ${1} | while read module rest; do - manual_add_modules ${module} - echo ${module}.ko "${rest}" >>${DESTDIR}/conf/modules + force_load ${module} "${rest}" done } @@ -42,8 +47,18 @@ copy_exec() { /linux-gate/d; /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/}; s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do + + # Try to use non-optimised libraries where possible. + # We assume that all HWCAP libraries will be in tls. + nonoptlib=$(echo ${x} | sed -e 's#/lib/tls.*/\(lib.*\)#/lib/\1#') + + if [ -e ${nonoptlib} ]; then + x=${nonoptlib} + fi + libname=$(basename ${x}) dirname=$(dirname ${x}) + mkdir -p ${DESTDIR}/${dirname} if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then ln -s ${x} ${DESTDIR}/${dirname} @@ -56,7 +71,7 @@ copy_modules_dir() { tmpdir_modbase=${DESTDIR}/lib/modules/${version} mkdir -p $(dirname ${tmpdir_modbase}/${1}) - cp -a /lib/modules/${version}/${1} ${tmpdir_modbase}/${1} + cp -a ${MODULESDIR}/${1} ${tmpdir_modbase}/${1} } dep_add_modules() @@ -103,7 +118,7 @@ auto_add_modules() done # Ethernet - for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx dl2k e1000 e100 epic100 eql fealnx famachi hp100 mace mv643xx_eth natsemi ne2k-pci netconsole ns83820 pcnet32 r8169 s2io sis900 skge slhc starfire sundance sungem sungem_phy sunhme tg3 tlan de2104x de4x5 dmfe tulip winbond-840 xircom_cb xircom_tulip_cb typhon via-rhine via-velocity yellowfin; do + for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx dl2k e1000 e100 epic100 eql fealnx famachi forcedeth hp100 mace mv643xx_eth natsemi ne2k-pci netconsole ns83820 pcnet32 r8169 s2io sis900 skge slhc starfire sundance sungem sungem_phy sunhme tg3 tlan de2104x de4x5 dmfe tulip winbond-840 xircom_cb xircom_tulip_cb typhon via-rhine via-velocity yellowfin; do manual_add_modules ${x} done |