linuxemu install

unpack the linux filesystem to /386/linux,
	this must be done with extfs, linuxemu filesystems cannot be transferred
	(at present) using tar or zip as they contain files with the append only
	and exclusive bits set which tar ignores.

	I suggest you "chmod +t /386/linux" as there should be no user files under here,
	if it is damaged you can just re-download it.

unpack the linuxemu application to /sys/src/linuxemu

unpack the kernel patch somwhere convientent.

	The kernel patch is built against the labs distribution of a September 2011.
	I have a suspicion I also included some changes to /dev/irqalloc to add some 
	stats, this is harmless but you may not want to include that.

	don't forget to add segdesc to /sys/src/9/pc/pcf (or which ever kernel you use).

	If the patch is working you should get '#P/ldt' and '#P/gdt' when you reboot

	if your kernel patch is not working your linux apps will all die with:

	"cannot set up thread-local storage: set_thread_area failed when setting up thread-local storage"

rebuild the app
	cd /sys/src/cmd/linuxemu
	mk
	mk install
	mk nuke

	this puts linuxemu (the app) and le (the driver script)
	in /386/bin and /386/rc respectively

you may (or may not) want to build and install some of the apps
in the /sys/src/cmd/linuxemu/tools directory. These can make life
under linuxemu a little more plesant.

If you want GUI apps you will want to run you will need to install X11,
contrib/install fgb/equis (a framebuffer interface is in the works,
see bugs below).

look at the le script - you may want to hack it a little.

by default you run as root, this is probably fine as you are always running
as your plan9 user anyway. if you want to be somone else you can use the -u
and -g options to set your UID and GID.

Things worth knowing
	consdev.c tries to be intelligent about stripping carriage returns, this may bite me
	but makes apt-get more paletable

	/etc/group, etc/passwd and /etc/resolv.conf are virtual, generated by devetc.c and
	so are not writable. this may cause problems for some tools...

	running le(1) with a single -d causes it to print the command and args on exec(2),
	and to call abort(2) if any unhandled signals are raised - normally these just kill the
	application. running with -dd (or -d -d) causes a full trace of all system calls to
	be printed.

	there are a few virtual files in /proc/plan9 which may be of interest:
		- pathcache dumps the contents of the internal path cache.
		- syscalls dumps a histogram of system call service times
		- rootpath is the path to the root of the linux filesystem, used by B.c

	le(1) differs from cinaps linux(1) command in how it sets up the apps namespace
	and that it starts a shell by default

Debugging:
	see cinap's README file

Known bugs

	the framebuffer (/dev/fb/0) driver is not finished and is still very experiemntal,
	it doesn't work, don't go there!

	the handling of symlinks, fifos block and character devices etc is all experimental
	and is currently correct but slow.

	the completeness of the TTY driver supported by /dev/cons is under review, it has enough
	to disable echo for ssh, cvs and friends to keey your password hidden, it also returns
	the window size correctly for mc(1), though I don't send SIGWINCH - not really
	worth it as its only curses driven probs which care and I don't support curses.
	remember - more is not always better.


