Porting /dev/random to DFly
Matthew Dillon
dillon at apollo.backplane.com
Wed Jun 2 10:26:04 PDT 2004
:Hey, everyone!
:
:I ported the last set of changes to rand.c (unless there are newer
:updates I don't know about) from FreeBSD RELENG_5 to DFly.
:
:However, I am also interested in porting the /dev/random code over to
:DFly as well, and it seems some people would be happy with this code.
:So, I started doing a small bit of research with porting over the code.
: Sorry that I'm late starting on this; I'm still reading 4.4BSD and
:taking other real-life stuff.
:
:Currently, I have copied the src/sys/dev/random directory from FreeBSD
:over to DFly. However, I'm having problems determining how I tell the
:DFly build system to try and compile this into the system.
:
:Firstly, I notice that FBSD has a src/sys/conf/files that lists some
:files in there. I couldn't determine how this was used, but I imagine
:it is some way of saying this file is a standard/optional module:
:1) Go ahead and build it if it's standard, or 2) build it only if it's
:listed in the kernel config using the name I specify in conf/files. Am
:I wrong about this?
:
:Secondly, is there some other place I should tell the build system to
:look when looking for files to compile into the kernel? I didn't notice
:a Makefile in src/sys/dev/random; so, I can only assume the conf/files
:thus far.
:
:Any help on getting me started would be appreciated. I didn't notice
:any immediate documents concerning conf/files.
:
:Thanks again,
:Mike
I think this was answered already but the best thing to do is to
build it as a module, which means that you don't have to mess around
with conf/files.
Instead what you do is hook dev/random into dev/Makefile. Actually,
what you really should do is probably put dev/random in the crypto
subdirectory. e.g. in the DFly tree call it dev/crypto/random
and hook it into the dev/crypto/Makefile.
If that isn't enough to get you started please feel free to ask
me questions!
-Matt
Matthew Dillon
<dillon at xxxxxxxxxxxxx>
More information about the Kernel
mailing list