tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Files missing in /usr/include?
On Wed, 26 May 2010 12:10:44 -0500
Matt Smith <mattjsm%gmail.com@localhost> wrote:
> Hello,
>
> I'm working on porting the OpenAFS client over to NetBSD 5.0.2. In
> trying to compile the LKM for it, the files cpu.h and intr.h in
> /usr/include/x86/ are included. These headers include additional
> headers. The problem, however, is that a couple of the headers they
> try to include are not in /usr/include/x86. For example:
>
> /usr/include/x86/cpu.h includes /x86/via_padlock.h
> /usr/include/x86/intr.h includes /machine/pic.h
>
> Instead, these included headers are located in the src tree
> (/usr/src/sys/arch/x86/include). They can be linked in to satisfy the
> dependency, but intr.h errors out due to missing some expected
> characters.
>
> Does anyone know why these files would be missing from /usr/include?
> Additionally, why would non-compilable files be placed for use in
> /usr/include?
>
> Thanks!
> Matt Smith
Yeah building 3rd party kernel modules is sadly unsupported.
However, I use this own hacked up script to generate a ddk:
$ cat ddk.sh
#!/bin/sh -e
if [ -z $1 ]; then
DEST=/usr/ddk
else
DEST=$1
fi
if [ ! $(uname -m) = i386 ]; then
echo "Platform not supported..."
exit
fi
# i386
mkdir -p ${DEST}/include
cp -r /usr/src/sys/sys ${DEST}/include/
cp -r /usr/src/common/include/????* ${DEST}/include/ # XXX CVS
cp -r /usr/src/sys/arch/i386/include ${DEST}/include/i386
cp -r /usr/src/sys/arch/x86/include ${DEST}/include/x86
cp -r ${DEST}/include/i386 ${DEST}/include/machine
ln -s ${DEST}/include/i386 ${DEST}/include/machine
mkdir -p ${DEST}/include/lib/libkern
cp -r /usr/src/sys/lib/libkern/libkern.h ${DEST}/include/lib/libkern
for i in $(find /usr/src/sys/crypto/ -name '*.h'); do
pax -rw -s '/usr\/src\/sys\///' $i ${DEST}/include
done
for i in $(find /usr/src/sys/dev/ -name '*.h'); do
pax -rw -s '/usr\/src\/sys\///' $i ${DEST}/include
done
--
NetBSD - Simplicity is prerequisite for reliability
Home |
Main Index |
Thread Index |
Old Index