|
楼主 |
发表于 2009-9-13 22:59:36
|
显示全部楼层
是不是我敲入的命令错了?哎呀,编译太慢了,敲入命令不连续,很多时间在等待,很容易就弄错了。
root:/sources/glibc-build#
root:/sources/glibc-build# history
1 mkdir -pv /{bin,boot,etc/opt,home,lib,mnt,opt}
2 mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
3 install -dv -m 0750 /root
4 install -dv -m 1777 /tmp /var/tmp
5 mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
6 mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
7 mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo}
8 mkdir -pv /usr/{,local/}share/man/man{1..8}
9 for dir in /usr /usr/local; do ln -sv share/{man,doc,info} $dir; done
10 mkdir -pv /var/{lock,log,mail,run,spool}
11 mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
12 ln -sv /tools/bin/{bash,cat,echo,grep,pwd,stty} /bin
13 ln -sv /tools/bin/perl /usr/bin
14 ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib
15 ln -sv /tools/lib/libstdc++.so{,.6} /usr/lib
16 ln -sv bash /bin/sh
17 touch /etc/mtab
18 cat > /etc/passwd << "EOF"
19 cat > /etc/group << "EOF"
20 exec /tools/bin/bash --login +h
21 touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
22 chgrp -v utmp /var/run/utmp /var/log/lastlog
23 chmod -v 664 /var/run/utmp /var/log/lastlog
24 cd /sources
25 export LFS=/sources
26 tar xvf $LFS/linux-2.6.22.5.tar.bz2
27 cd linux-2.6.22.5
28 sed -i '/scsi/d' include/Kbuild
29 make mrproper
30 make headers_check
31 make INSTALL_HDR_PATH=dest headers_install
32 cp -rv dest/include/* /usr/include
33 cd ..
34 rm -rf linux-2.6.22.5
35 tar xvf $LFS/man-pages-2.63.tar.bz2
36 cd man-pages-2.63
37 make install
38 cd ..
39 rm -rf man-pages-2.63
40 tar xvf $LFS/glibc-2.5.1.tar.bz2
41 cd glibc-2.5.1
42 tar -xvf $LFS/glibc-libidn-2.5.1.tar.gz
43 mv glibc-libidn-2.5.1 libidn
44 sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
45 sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' scripts/test-installation.pl
46 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
47 mkdir -v ../glibc-build
48 cd ../glibc-build
49 ../glibc-2.5.1/configure --prefix=/usr --disable-profile --enable-add-ons --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc
50 make
51 make -k check 2>&1 | tee glibc-check-log
52 grep Error glibc-check-log
53 touch /etc/ld.so.conf
54 make install
55 make localedata/install-locales
56 cat > /etc/nsswitch.conf << "EOF"
57 cp -v --remove-destination /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
58 cat > /etc/ld.so.conf << "EOF"
59 cd ..
60 rm -rf glibc-build
61 rm -rf glibc-2.5.1
62 mv -v /tools/bin/{ld,ld-old}
63 mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
64 mv -v /tools/bin/{ld-new,ld}
65 ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
66 gcc -dumpspecs | sed -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > `dirname $(gcc --print-libgcc-file-name)`/specs
67 echo 'main(){}' > dummy.c
68 cc dummy.c -v -Wl,--verbose &> dummy.log
69 readelf -l a.out | grep '/lib'
70 grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
71 grep -B1 '^ /usr/include' dummy.log
72 grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
73 grep "/lib/libc.so.6 " dummy.log
74 grep found dummy.log
75 rm -v dummy.c a.out dummy.log
76 halt
77 exit
78 ls
79 ls /sources/
80 cd /sources
81 export LFS=/sources
82 tar xvf $LFS/linux-2.6.22.5.tar.bz2
83 cd linux-2.6.22.5
84 sed -i '/scsi/d' include/Kbuild
85 make mrproper
86 make headers_check
87 make INSTALL_HDR_PATH=dest headers_install
88 cp -rv dest/include/* /usr/include
89 cd ..
90 rm -rf linux-2.6.22.5
91 tar xvf $LFS/man-pages-2.63.tar.bz2
92 cd man-pages-2.63
93 make install
94 cd ..
95 rm -rf man-pages-2.63
96 ls | glibc
97 ls | grep glibc
98 tar xvf $LFS/glibc-2.5.1.tar.bz2
99 cd glibc-2.5.1
100 tar -xvf $LFS/glibc-libidn-2.5.1.tar.gz
101 mv glibc-libidn-2.5.1 libidn
102 sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
103 sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' scripts/test-installation.pl
104 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
105 mkdir -v ../glibc-build
106 cd ../glibc-build
107 ../glibc-2.5.1/configure --prefix=/usr --disable-profile --enable-add-ons --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc
108 make
109 history
root:/sources/glibc-build# |
|