Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1006832
  • 博文数量: 327
  • 博客积分: 9995
  • 博客等级: 中将
  • 技术积分: 4319
  • 用 户 组: 普通用户
  • 注册时间: 2009-05-25 11:21
文章存档

2011年(31)

2010年(139)

2009年(157)

我的朋友

分类: LINUX

2010-10-29 13:04:04

Vim Makefile:

init:   scripts/build-init.sh
        @. ./ttylinux.dist-config.sh;                                   \
        if [ -f var/run/init ]; then                                    \
                t=`cat var/run/init`;                                   \
                echo "Already builing for $$t";                         \
                echo "Maybe \"make clean\" first.";                     \
                unset t;                                                \
                exit 1;                                                 \
        fi;                                                             \
        t=$${TTYLINUX_TARGET_TAG};                                      \
        echo "Initialize the $$t ttylinux build.";                      \
        (scripts/build-init.sh);                                        \
        if [ $$? -ne 0 ]; then                                          \
                echo "Initialize FAILED.";                              \
                exit 1;                                                 \
        fi;                                                             \
        echo "$${TTYLINUX_TARGET_TAG}" >var/run/init;                   \
        [ -f site/build-init.sh ] && (site/build-init.sh) || true
pkgs:   scripts/build-packages.sh var/run/init coherent_build
        @echo "Make the ttylinux packages.";                            \
        rm -f var/run/pkgs;                                             \
        (scripts/build-packages.sh);                                    \
        if [ $$? -ne 0 ]; then                                          \
                echo "Build FAILED.";                                   \
                exit 1;                                                 \
        fi;                                                             \
        touch var/run/pkgs;                                             \
        [ -f site/build-packages.sh ] && (site/build-packages.sh) || true
loader: scripts/build-loader.sh var/run/init coherent_build
        @echo "Make the ttylinux-resident loader.";                     \
        rm -f var/run/loader;                                           \
        (scripts/build-loader.sh);                                      \
        if [ $$? -ne 0 ]; then                                          \
                echo "Loader FAILED.";                                  \
                exit 1;                                                 \
        fi;                                                             \
        touch var/run/loader;                                           \
        [ -f site/build-loader.sh ] && (site/build-loader.sh) || true
kernel: scripts/build-kernel.sh var/run/init coherent_build
        @echo "Make the ttylinux kernel.";                              \
        rm -f var/run/kernel;                                           \
        (scripts/build-kernel.sh);                                      \
        if [ $$? -ne 0 ]; then                                          \
                echo "Kernel FAILED.";                                  \
        touch var/run/loader;                                           \
        [ -f site/build-loader.sh ] && (site/build-loader.sh) || true
kernel: scripts/build-kernel.sh var/run/init coherent_build
        @echo "Make the ttylinux kernel.";                              \
        rm -f var/run/kernel;                                           \
        (scripts/build-kernel.sh);                                      \
        if [ $$? -ne 0 ]; then                                          \
                echo "Kernel FAILED.";                                  \
                exit 1;                                                 \
        fi;                                                             \
        touch var/run/kernel;                                           \
        [ -f site/build-kernel.sh ] && (site/build-kernel.sh) || true
fsys:   scripts/build-filesystem.sh var/run/pkgs coherent_build
        @echo "Make ttylinux file system image.";                       \
        rm -f var/run/fsys;                                             \
        (scripts/build-filesystem.sh);                                  \
        if [ $$? -ne 0 ]; then                                          \
                echo "File system FAILED.";                             \
                exit 1;                                                 \
        fi;                                                             \
        touch var/run/fsys;                                             \
        [ -f site/build-filesystem.sh ] && (site/build-filesystem.sh) || true
iso:    scripts/build-iso.sh var/run/fsys var/run/kernel
        @echo "Make a ttylinux ISO image.";                             \
        rm -f var/run/iso;                                              \
        (scripts/build-iso.sh);                                         \
        if [ $$? -ne 0 ]; then                                          \
                echo "ISO FAILED.";                                     \
                exit 1;                                                 \
        fi;                                                             \
        touch var/run/iso;                                              \
        [ -f site/build-iso.sh ] && (site/build-iso.sh) || true
dist:   clean init pkgs loader fsys kernel iso
 
[root@localhost ttylinux-src-mp4]# ll
total 144
drwx------  2 Laa  Laa   4096 Oct 18 09:00 add-ons
drwx------ 19 Laa  Laa   4096 Oct 28 14:51 build-root
drwx------  9 Laa  Laa   4096 Oct 28 15:28 config
drwx------  8 Laa  Laa   4096 Oct 28 13:19 cross-tools-2.12.1-2.6.34.6
drwx------  7 Laa  Laa   4096 Aug 30 02:27 cross-tools-2.9-2.6.20
-r--------  1 Laa  Laa  35368 Mar 12  2010 cross-tools.guide.txt
drwx------  2 Laa  Laa   4096 Oct 18 09:02 doc
-r--------  1 Laa  Laa  17273 Aug  4 08:17 How_To_Build_ttylinux.txt
drwx------  2 Laa  Laa   4096 Oct 28 15:38 img
-r--------  1 Laa  Laa  10805 Oct 18 09:05 Makefile
drwx------  2 Laa  Laa   4096 Oct  7  2008 mnt
drwx------  2 Laa  Laa   4096 Oct 28 14:54 pkg-bin
drwx------  2 Laa  Laa   4096 Oct 18 07:46 pkg-bld
drwx------  2 Laa  Laa   4096 Oct 18 07:46 pkg-cfg
drwx------  2 Laa  Laa   4096 Oct 18 07:46 pkg-src
drwx------  2 Laa  Laa   4096 Oct 17 12:39 scripts
drwx------  2 Laa  Laa   4096 Mar 20  2010 site
-rwxr-xr-x  1 root root   940 Oct 18 03:11 ttylinux-chroot.sh
-rw-------  1 Laa  Laa   4130 Oct 28 14:36 ttylinux.dist-config.sh
drwx------  4 Laa  Laa   4096 Oct 28 14:54 var
drwx------  6 Laa  Laa   4096 Oct 18 02:49 verification
 
[root@localhost ttylinux-src-mp4]# make dist
Remove the 12.1:i686:pc built items.
=> Removing development build directories.
=> Removing boot CD configuration.
=> Removing binary packages.
=> Removing build logs.
Initialize the 12.1:i686:pc ttylinux build.
=> Creating preliminary development build directories ... DONE
=> Creating build-root base file system directories ... DONE
Building for 12.1:i686:pc
Make the ttylinux packages.
=> ttylinux project folder
=> /home/Leo/work/ttylinux-src-mp4
=> building ttylinux-12.1 [atheling]
=> with i686 cross-building Binutils binutils-2.20
=> with i686 cross-building GCC gcc-4.4.4
=> with GLIBC version glibc-2.12.1 having Linux kernel interface
=>      GLIBC interface to Linux kernel i386 architecture
=>      GLIBC interface to Linux kernel linux-2.6.34.6
=> for 8 MB target file system image size
##### START cross-building packages
g - getting the source and configuration packages
b - building and installing the package into build-root
f - finding installed files
m - looking for man pages to compress
p - creating installable package
c - cleaning
glibc-2.12.1 ............. g.b.f.m__0.p.c ... DONE [ 0 minutes 41 seconds]
tlwstools-1.2 ............ g.b.f.m__0.p.c ... DONE [ 0 minutes  0 seconds]
ncurses-5.6 .............. g.b.f.m__0.p.c ... DONE [ 1 minutes 19 seconds]
busybox-1.17.2 ........... g.b.f.m__0.p.c ... DONE [ 1 minutes 48 seconds]
e2fsprogs-1.41.12 ........ g.b.f.m__0.p.c ... DONE [ 1 minutes 10 seconds]
iptables-1.4.9.1 ......... g.b.f.m__0.p.c ... DONE [ 0 minutes 25 seconds]
bash-4.1 ................. g.b.f.m__0.p.c ... DONE [ 2 minutes  4 seconds]
dropbear-0.52 ............ g.b.f.m__0.p.c ... DONE [ 0 minutes 36 seconds]
retawq-0.2.6c ............ g.b.f.m__0.p.c ... DONE [ 0 minutes 18 seconds]
=> 8 minutes 21 seconds
##### DONE cross-building packages
Make the ttylinux-resident loader.
=> Build the ttylinux loader package.
=> ttylinux project folder
=> /home/Leo/work/ttylinux-src-mp4
=> building ttylinux-12.1 [atheling]
=> with i686 cross-building Binutils binutils-2.20
=> with i686 cross-building GCC gcc-4.4.4
=> with GLIBC version glibc-2.12.1 having Linux kernel interface
=>      GLIBC interface to Linux kernel i386 architecture
=>      GLIBC interface to Linux kernel linux-2.6.34.6
=> for 8 MB target file system image size
##### START cross-building packages
g - getting the source and configuration packages
b - building and installing the package into build-root
f - finding installed files
m - looking for man pages to compress
p - creating installable package
c - cleaning
lilo-22.8 ................ g.b.f.m__0.p.c ... DONE [ 0 minutes  8 seconds]
=> 0 minutes 8 seconds
##### DONE cross-building packages
Make ttylinux file system image.
=> ttylinux project folder
=> /home/Leo/work/ttylinux-src-mp4
=> building ttylinux-12.1 [atheling]
=> with i686 cross-building Binutils binutils-2.20
=> with i686 cross-building GCC gcc-4.4.4
=> with GLIBC version glibc-2.12.1 having Linux kernel interface
=>      GLIBC interface to Linux kernel i386 architecture
=>      GLIBC interface to Linux kernel linux-2.6.34.6
=> for 8 MB target file system image size
=> Creating ttylinux file system image (8 MB)...
8+0 records in
8+0 records out
8388608 bytes (8.4 MB) copied, 0.017533 seconds, 478 MB/s
...DONE
Mounting..... OK
Unmounting... OK
##### START installing
Mounting..... OK
i> Installing base file system.
i> Installing packages.
=> bash-4.1
=> busybox-1.17.2
=> dropbear-0.52
=> e2fsprogs-1.41.12
=> glibc-2.12.1
=> iptables-1.4.9.1
=> lilo-22.8
=> ncurses-5.6
=> retawq-0.2.6c
=> tlwstools-1.2
i> Updating birthdays ... DONE
Unmounting... OK
tune2fs 1.39 (29-May-2006)
Setting maximal mount count to 3
Setting current mount count to 0
-rw-r--r-- 1 root root 8.0M Oct 29 11:49 img/file_sys-i686-12.1.img
i> File system image file file_sys-i686-12.1.img is ready.
##### DONE installing
Make the ttylinux kernel.
=> ttylinux project folder
=> /home/Leo/work/ttylinux-src-mp4
=> building ttylinux-12.1 [atheling]
=> with i686 cross-building Binutils binutils-2.20
=> with i686 cross-building GCC gcc-4.4.4
=> with GLIBC version glibc-2.12.1 having Linux kernel interface
=>      GLIBC interface to Linux kernel i386 architecture
=>      GLIBC interface to Linux kernel linux-2.6.34.6
=> for 8 MB target file system image size
##### START cross-building the kernel
g - getting the source and configuration packages
b - building and installing the package into build-root
f - finding installed files
m - looking for man pages to compress
p - creating installable package
c - cleaning
i686 linux-2.6.34.6 ...... g.b.f.m__0.p.c ... DONE [33 minutes 21 seconds]
##### DONE cross-building the kernel
Make a ttylinux ISO image.
##### START cross-building the boot CD
i> Recreating ISO directory .......................... DONE
i> Gathering boot files .............................. DONE
i> Compress the file system .......................... DONE
i> Set the initrd file system size ................... DONE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
default ttylinux
display boot.msg
prompt  1
timeout 150
F1 boot.msg
F2 help_f2.msg
F3 help_f3.msg
label ttylinux
        kernel /boot/vmlinuz
        append initrd=/boot/filesys.gz ramdisk_size=8192 root=/dev/ram0 ro ttylinux-cdrom
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i> Copying configuration data and tools to Boot CD ... DONE
i> Copying documentation files to Boot CD ............ DONE
i> Creating CD-ROM ISO image ...
Size of boot image is 4 sectors -> No emulation
 53.29% done, estimate finish Fri Oct 29 12:23:25 2010
Total translation table size: 2048
Total rockridge attributes bytes: 2864
Total directory bytes: 8192
Path table size(bytes): 64
Max brk space used 11000
9401 extents written (18 MB)
... DONE
-rw-r--r-- 1 root root 19M Oct 29 12:23 img/ttylinux-i686-12.1.iso
i> ISO image file ttylinux-i686-12.1.iso is ready.
##### DONE cross-building the boot CD
You have new mail in /var/spool/mail/root
[root@localhost ttylinux-src-mp4]# ll img
total 27032
-rw-r--r-- 1 root root  8388608 Oct 29 11:49 file_sys-i686-12.1.img
-rw-r--r-- 1 root root 19253248 Oct 29 12:23 ttylinux-i686-12.1.iso
[root@localhost ttylinux-src-mp4]#
阅读(2059) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~