2008年5月14日 星期三

Slax: how to build a new kernel? slax 5.1.8


1. download and untar Linux, squashfs3.3, aufs
2. make squashfs3.3/squashfs-tools and install them (mksquashfs/unsquashfs) somewhere on the host system
3. "make distclean" the kernel source tree
4. apply the squashfs patch (use patch -Np1 < ...)
5. follow the aufs instructions (copy the fs/ and include/ directories into the Linux source tree and update various config files)
6. configure the kernel (don't forget to include squashfs and aufs, preferably built-in instead of as modules)
7. make the kernel
8. mount the slax iso and copy all the files so you can modify them
9. replace the vmlinuz with your new bzImage
10. take boot/initrd.gz and gunzip it. If you run "file" on it, you can see it is an ext2 filesystem. Mount it somewhere.
11. Remove the old modules in the initrd from lib/modules/xxx/ and install the new ones to this directory (you only need the modules required to boot - I started with Slackware's huge-smp configuration, so I needed only a blank modules.dep in this directory)
12. modify linuxrc to use 'aufs' instead of 'unionfs'
13. in the sample/ folder in the aufs source tree, there is a script called unionctl. Replace bin/unionctl in the initrd with this script.
14. unmount the initrd, recompress it with gzip -9 and put it back in the boot/ directory where it came from.
15. use unsquashfs to extract all the files from base/01_kernel.mo on the cd (the files go into squashfs-root)
16. remove all the kernel modules (lib/modules/xxx/) from the squashfs-root and install the new ones; in the Linux source tree use "make INSTALL_MOD_PATH=xxx modules_install" where xxx is the path of squashfs-root (NOT the path of squashfs-root/lib/modules/xxx/)
17. replace bin/mksquashfs and bin/unsquashfs with the new versions (come to think of it, the squashfs tools you built earlier might be linked against incompatible glibc versions; I was using Slackware so it worked fine for me)
18. delete the old 01_kernel.mo and run mksquashfs squashfs-root /base/01_kernel.mo
19. use mkisofs to make the new cd image, and hope it works


Copy From: http://www.linuxquestions.org/questions/linux-general-1/slax-how-to-build-a-new-kernel-606913/

2008年5月13日 星期二

OpenGL 場景生成步驟

1. The Viewing Transformation - 視點變換
2. The Modeling Transformation - 模型變換
3. The Projection Transformation - 投影變換
4. The Viewport Transformation - 視口變換


A. The Viewing Transformation FUNCTION:
gluLookAt();

B. The Modeling Transformation FUNCTION:
glTranslate*();
glRotate*();
glScale*();

C. The Projection Transformation DUNCTION:
glFrustum();
gluPerspective();
glOrtho();
gluOrtho2D();

D. The Viewport Transformation FUNCTION:
glViewport();
glDepthRange();