[Setup-tool-hackers] Creating backends for FreeBSD



I've been looking over some of the backend modules to see what it would
take to get GST working on FreeBSD.  It looks like it's going to require
some serious work as very few of the specific configuration files and
commands are the same as Linux.  Some modules would either need to be
severely hacked, or redone completely.  This brings me to my questions. 
Is there a guide for creating GST backends?  What is the recommended way
of adding platform-specific code to a module?  Should I rewrite the
module entirely, or do I merge in the code using hash mappings?

Just as an example, take the memory module.  FreeBSD's proc file system
is _very_ different from Linux's.  There is no meminfo.  However, I can
do a sysctl hw.physmem to get the physical memory in bytes, and a
swapinfo -k to get the total swap in kilobytes.  To create swap files, I
would create a file using dd using the seek argument, then do vnconfig
vn0c /path/to/swapfile swap, then use swapon to activate it.  (Though,
adding swap files is probably something that wouldn't be done for
FreeBSD.)

Any help you can provide would be appreciated.  Thanks.

Joe
-- 
Joe Marcus Clarke
FreeBSD GNOME Team	::	marcus@FreeBSD.org
http://www.FreeBSD.org/gnome

This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]