trouble porting pci kld

Emiel Kollof coolvibe at hackerheaven.org
Sun Jul 18 22:49:06 PDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 19 July 2004 03:05, Chuck Tuffli wrote:
> Hi. I have a KLD that works under the FreeBSD 4.x and am in the
> process of porting it to DFly, but am running into some basic compile
> problems. If I have something that built under 4.x, should typing
> 'make' just work? 

No, the kernel in DragonFly is way different than 4.x. You'll have to do more 
than just twiddling headers. AFAICR, you need to use struct thread_t, 
eliminate PZERO, modify ioctl (proc arg isn't needed anymore), curproc 
becomes curthread, you need to replace destroy_dev calls with cdevsw_remove 
ones. and you have to add cdevsw_add calls close to make_dev devices.

I am probably forgetting something.

> Changing
>
> #include <stdint.h>
> to
> #include <sys/stdint.h>
[in a system header]

This is most certainly the wrong way to go about it.

> in src/sys/sys/types.h makes this problem go away. The next problem
> seems to be that typedefs are missing for uint32_t

[snip]

> Any ideas?

Look in stdint.h.

Cheers,
Emiel

- -- 
"My life is a soap opera, but who has the rights?"
		-- MadameX
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFA+2Bz4hAlCajuF/wRAuDnAKCOaiP3fHvdGyCp7HnnWoVX03V1XgCglHDB
PsCfRiYa9Vl0CXtTgRQtXKs=
=orTJ
-----END PGP SIGNATURE-----






More information about the Kernel mailing list