I managed to build a kernel with statically linked igb, e1000 and e1000e for 
linux and rtnet, after running the below script to namespace those drivers (I 
only use [rt_]igb, but this driver needs symbols from e1000).
Seems to basically work, with some caveats that might only relate to my changes.

Even if you don't use both drivers at one, I am not sure if there aren't some 
definitions leaking from the linux headers right now, so a cleanup might be 
useful anyway.


Norbert

-----------------------
# run me in kernel/drivers/net/drivers

sedreplace() {
(
    TMPFILE=/tmp/functions.lst
    {
            grep -roh '\bigb_[[:alnum:]_]*[[:space:]]*(' | sed 
's,[[:space:]]*(,,'
            grep -roh 'struct[[:space:]]*igb_[[:alnum:]_]*\b' | sed 
's,struct[[:space:]]*,,'
            grep -roh '\be1000e*_[[:alnum:]_]*[[:space:]]*(' | sed 
's,[[:space:]]*(,,'
            grep -roh 'struct[[:space:]]*e1000e*_[[:alnum:]_]*\b' | sed 
's,struct[[:space:]]*,,'

            for ad; do echo $ad; done
    } | sort -u >$TMPFILE

            while read -r f; do
              printf -- '-e s,\\b%s\\b,rt_%s,g ' $f $f
            done < $TMPFILE
)
}

SEDREP=$(sedreplace igb_driver_name igb_driver_version e1000_driver_name 
e1000_driver_version e1000e_driver_name e1000e_driver_version)

sed $SEDREP -e 's,^#include "rt_e1000_,#include "e1000_,' -i $(find -name '*.c' 
-o -name '*.h')

Mit besten Grüßen / Kind regards

NORBERT LANGE

AT-DES

ANDRITZ HYDRO GmbH
Eibesbrunnergasse 20
1120 Vienna / AUSTRIA
p: +43 50805 56684
norbert.la...@andritz.com<mailto:norbert.la...@andritz.com>
andritz.com<http://www.andritz.com>
________________________________

This message and any attachments are solely for the use of the intended 
recipients. They may contain privileged and/or confidential information or 
other information protected from disclosure. If you are not an intended 
recipient, you are hereby notified that you received this email in error and 
that any review, dissemination, distribution or copying of this email and any 
attachment is strictly prohibited. If you have received this email in error, 
please contact the sender and delete the message and any attachment from your 
system.

ANDRITZ HYDRO GmbH


Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation

Firmensitz/ Registered seat: Wien

Firmenbuchgericht/ Court of registry: Handelsgericht Wien

Firmenbuchnummer/ Company registration: FN 61833 g

DVR: 0605077

UID-Nr.: ATU14756806


Thank You
________________________________

Reply via email to