Skip to content

gwr/on-skel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a skeleton of an "ON" (illumos) build.

You can use it to build drivers, libraries, and commands,
that you might plan to later integrate into illumos, but
don't want to wait for full illumos builds while you're
developing your code.

As provided, this skeleton builds one driver, one library,
and one command, all named "foo".  These are intentionally
trivial objects, just to demonstrate how it builds.

The Makefile here is a wrappter to build the whole gate
in a few separate steps.  All steps use the command:
	bldenv myenv.sh "cd ...; make"
to setup the environment expected by the gate and
run make in the necessary places to build it all.
The rapper makefile supports three targets:
	make install
	make package
	make clean

Here is a list of all the places you might want to copy
to add another driver, library, or command:

	uts/common/sys/foo.h
	uts/common/io/foo/*
	uts/common/Makefile.files	(FOO_OBJS += foo.o)
	uts/common/Makefile.rules	(common/io/foo, two places)
	uts/intel/Makefile.intel.shared	(DRV_KMODS += foo)
	uts/intel/foo/Makefile
	uts/sparc/Makefile.sparc.shared	(DRV_KMODS += foo)
	uts/sparc/foo/Makefile

	lib/libfoo/Makefile
	lib/libfoo/Makefile.com
	lib/libfoo/*/Makefile
	lib/libfoo/common/*

	cmd/foo

When doing incremental work in the gate, i.e. fixing
compilation errors, it's handy to run an editor in a
"bldenv" environment, as follows:
	ksh93 tools/bldenv -d myenv.sh

	man/man1/foo.1
	man/man3x/libfoo.3x
	man/man7/foo.7

For more information about developing device drivers for illumos, please read this document: 
https://illumos.org/books/wdd/eqbqn.html