hope I made no mistake (the kernel works fine but I need a regress test) Suggested by: thorpej
NOTE: this branch (kame) is used just for refernce. this may not compile due to multiple reasons.