Ck100-crosscc
From Cool-Idea
Contents |
Cross Compiling
- Go into the source tree
# cd CK100-r1.4-src/
- Go to the target directory
# cd CK2442/
- Start compiling!
# make
Key files/directories
- buildrules
- Main build rules script
- tarballs/
- Tarballs of unmodified source code
- patches/
- Patches to the source code
- CK2442/
- CK2442-specific target directory
- CK2442/root/
- All the Linux libraries, configuration files, executables, etc. are installed here
- ramdisk.img is made from this
- CK2442/etc/
- This directory is copied to root/
- contains rc.sysinit, which is the startup script of Linux
- CK2442/sbin/
- This directory is copied to root/
- contains pre-compiled binaries, such as test utilities
- CK2442/mplayer_data/
- The files in this directory is copied to root/.mplayer/
- contains MPlayer's configuration files
- CK2442/Makefile
- Includes definitions of makefile targets
- Useful targets:
- ramdisk
- Generate ramdisk.img (Linux rootfs and modules) and ukernel2 (kernel image with u-boot header)
- linux
- Generate ukernel2
- modules
- Re-compile Linux modules; ramdisk.img will not be re-generated!
- ramdisk
- CK2442/build.sh
- Called by Makefile to generate different targets
Build System
All the temporary files, such as the object files (*.o), are stored under CK2442/.do_not_edit/ directory. The convention of the build system is to first create a soft link of each source file under CK2442/.do_not_edit/ and then start the compilation within the newly duplicated directory. As per the sake of efficiency, some stock files are created to mark the compilation process successful and done. For instance, build_pz2 in build.sh will create:
- CK2442/.do_not_edit/podzilla2/
- Directory containing soft links to podzilla2 source files
- CK2442/.do_not_edit/.pz2
- File to mark the completion of the creation of podzilla2 directory
- If it exists, the next build_pz2 will not re-create the podzilla2 directory
- If you add some file to podzilla2, remove the whole podzilla2 directory in .do_not_edit/ and re-build again.
- CK2442/.do_not_edit/podzilla2/.built
- File to mark the completion of the compilation of podzilla2
- If it exists, the next build_pz2 will not re-compile podzilla2
- If you have modified some source file of podzilla2, remove this file and re-build again.
