major fixups. finally a working kernel compiled with gcc 4.6.