Author: justin
Date: 2006-07-12 18:23:08 -0600 (Wed, 12 Jul 2006)
New Revision: 1624

Modified:
   branches/cross/Makefile
Log:
Corrected the essential symlinks section for CLFS, mount --bind /dev instead, 
directory creation optimization as in CLFS.

Modified: branches/cross/Makefile
===================================================================
--- branches/cross/Makefile     2006-07-12 23:55:23 UTC (rev 1623)
+++ branches/cross/Makefile     2006-07-13 00:23:08 UTC (rev 1624)
@@ -137,43 +137,23 @@
        -mkdir -p $(MP)/{proc,sys,dev/shm,dev/pts}
        -mount -t proc proc $(MP)/proc
        -mount -t sysfs sysfs $(MP)/sys
-       -mount -t tmpfs tmpfs $(MP)/dev/shm
-       -mount -t devpts -o gid=4,mode=620 devpts $(MP)/dev/pts
-       -install -d $(MP)/{bin,etc/opt,home,lib,mnt}
-       -install -d $(MP)/{sbin,srv,usr/local,var,opt}
-       -install -d $(MP)/root -m 0750
-       -install -d $(MP)/tmp $(MP)/var/tmp -m 1777
-       -install -d $(MP)/media/{floppy,cdrom}
-       -install -d $(MP)/usr/{bin,include,lib,sbin,share,src}
-       -ln -s share/{man,doc,info} $(MP)/usr
-       -install -d $(MP)/usr/share/{doc,info,locale,man}
-       -install -d $(MP)/usr/share/{misc,terminfo,zoneinfo}
-       -install -d $(MP)/usr/share/man/man{1,2,3,4,5,6,7,8}
-       -install -d $(MP)/usr/local/{bin,etc,include,lib,sbin,share,src}
-       -ln -s share/{man,doc,info} $(MP)/usr/local
-       -install -d $(MP)/usr/local/share/{doc,info,locale,man}
-       -install -d $(MP)/usr/local/share/{misc,terminfo,zoneinfo}
-       -install -d $(MP)/usr/local/share/man/man{1,2,3,4,5,6,7,8}
-       -install -d $(MP)/var/{lock,log,mail,run,spool}
-       -install -d $(MP)/var/{opt,cache,lib/{misc,locate},local}
-       -install -d $(MP)/opt/{bin,doc,include,info}
-       -install -d $(MP)/opt/{lib,man/man{1,2,3,4,5,6,7,8}}
-       -install -d $(MP)/{,usr/{,local},opt}/lib
-       -install -d /usr/lib/locale
-       -ln -s ../lib/locale /usr/lib
        -mknod -m 600 $(MP)/dev/console c 5 1
        -mknod -m 666 $(MP)/dev/null c 1 3
-       -mknod -m 666 $(MP)/dev/zero c 1 5
-       -mknod -m 666 $(MP)/dev/ptmx c 5 2
-       -mknod -m 666 $(MP)/dev/tty c 5 0
-       -mknod -m 444 $(MP)/dev/random c 1 8
-       -mknod -m 444 $(MP)/dev/urandom c 1 9
-       # No chown because this will not affect the permissions in any way.
-       -ln -s /proc/self/fd $(MP)/dev/fd
-       -ln -s /proc/self/fd/0 $(MP)/dev/stdin
-       -ln -s /proc/self/fd/1 $(MP)/dev/stdout
-       -ln -s /proc/self/fd/2 $(MP)/dev/stderr
-       -ln -s /proc/kcore $(MP)/dev/core
+       -mount --bind /dev $(MP)/dev
+       -mount -f -vt tmpfs tmpfs $(MP)/dev/shm
+       -mount -f -vt devpts -o gid=4,mode=620 devpts $(MP)/dev/pts
+       -mkdir -pv /{bin,boot,dev,{etc/,}opt,home,lib,mnt}
+       -mkdir -pv /{proc,media/{floppy,cdrom},sbin,srv,sys}
+       -mkdir -pv /var/{lock,log,mail,run,spool}
+       -mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
+       -install -dv -m 0750 /root
+       -install -dv -m 1777 {/var,}/tmp
+       -mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
+       -mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
+       -mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo}
+       -mkdir -pv /usr/{,local/}share/man/man{1..8}
+       -ln -sv share/{man,doc,info} /usr
+       -ln -sv share/{man,doc,info} /usr/local
 
 # This target builds just a base CLFS system, minus the kernel and bootscripts
 #==============================================================================
@@ -330,11 +310,10 @@
 #==============================================================================
 
 createfiles:
-       @-$(WD)/bin/ln -s $(WD)/bin/{bash,cat,pwd,stty} /bin
-       @-$(WD)/bin/ln -s $(WD)/bin/perl /usr/bin
-       @-$(WD)/bin/ln -s $(WD)/lib/libgcc_s.so{,.1} /usr/lib
-       @-$(WD)/bin/ln -s bash /bin/sh
-       @-$(WD)/bin/ln -s $(WD)/lib64/libgcc_s.so{,.1} /usr/lib64
+       @-ln -sv $(WD)/bin/{bash,cat,grep,pwd,stty} /bin
+       @-ln -sv $(WD)/lib/libgcc_s.so{,.1} /usr/lib
+       @-ln -sv $(WD)/lib/libstd* /usr/lib
+       @-ln -sv bash /bin/bash
        @touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
        @chgrp utmp /var/run/utmp /var/log/lastlog
        @chmod 664 /var/run/utmp /var/log/lastlog

-- 
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to