Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹¹½¨»ù±¾µÄǶÈëʽLinux¸ùÎļþϵͳ


¹¹½¨»ù±¾µÄǶÈëʽLinux¸ùÎļþϵͳ
 
 
¹¹½¨»ù±¾µÄǶÈëʽLinux¸ùÎļþϵͳ
£¨1£©´´½¨¸ùÎļþϵͳµÄ»ù±¾Ä¿Â¼½á¹¹¡£
ÎÒ°ÑÕâ¸ö¹ý³Ì×ö³ÉÁËshell½Å±¾(ÎļþÃûΪmkroot) £¬ºÜ·½±ã£¡
#! /bin/sh
    echo "creatint rootfs dir......"
    mkdir rootfs
    cd rootfs
    echo "making dir : bin dev etc lib proc sbin sys usr"
    mkdir bin dev etc lib proc sbin sys usr #±Ø±¸µÄ8¸öĿ¼
    mkdir usr/bin usr/lib usr/sbin lib/modules
# Don't use mknod ,unless you run this Script as root !
# mknod -m 600 dev/console c 5 1
# mknod -m 666 dev/null c 1 3
 
    echo "making dir : mnt tmp var"
    mkdir mnt tmp var
    chmod 1777 tmp
    mkdir mnt/etc mnt/jffs2 mnt/yaffs mnt/data mnt/temp
    mkdir var/lib var/lock var/log var/run var/tmp 
    chmod 1777 var/tmp
 
    echo "making dir : home root boot"
    mkdir home root boot
    echo "done"
 
ÔÚÄãÏëÒª½¨Á¢¸ùÎļþϵͳµÄµØ·½£¬ÔËÐУº
[tekkamanninja@Tekkaman-Ninja nfs]$ ./mkroot
creatint rootfs dir......
making dir : bin dev etc lib proc sbin sys usr
making dir : mnt tmp var
making dir : home root boot
done
[tekkamanninja@Tekkaman-Ninja nfs]$ cd rootfs/dev/
[tekkamanninja@Tekkaman-Ninja dev]$ su
¿ÚÁ
[root@Tekkaman-Ninja dev]# mknod -m 600 console c 5 1;mknod -m 666 null c 1 3;exit
exit
[tekkamanninja@Tekkaman-Ninja dev]$
£¨2£©ÅäÖᢱàÒëºÍ°²×°Busybox-1.9.1-----ÎÒûÓñ¾ÎÄÕµÄbusyboxÅäÖ㬲μûͬÎļþ¼ÐϵÄÎĵµ£¬ÎÒµÄÊǾ²Ì¬µÄ£¬Èç¹ûÒÔºóÒª¸Ä³É¶¯Ì¬µÄ£¬¿É²Î¼û±¾ÎÄÕÂ
[tekkamanninja@Tekkaman-Ninja source]$ tar -xjvf busybox-1.9.1.tar.bz2
ÐÞ¸ÄMakefileÎļþ£º
[tekkamanninja@Tekkaman-Ninja busybox-1.9.1]$ pwd
/home/tekkamanninja/working/source/busybox-1.9.1
[tekkamanninja@Tekkaman-Ninja bu


Ïà¹ØÎĵµ£º

¿ªÊ¼ÔÚlinuxÏÂ×öcÓïÑÔ¿ª·¢

¿ªÊ¼ÔÚlinuxÏÂ×öcÓïÑÔ¿ª·¢
±¾ÆªÎÄÕÂÖ¼ÔÚ½éÉÜÈçºÎ¿ªÊ¼ÔÚlinuxÏÂÃæ½øÐÐCÓïÑÔ³ÌÐòÉè¼Æ£¬ÒÔ¼°ÈçºÎʹÓóÌÐòÉè¼Æ¼°µ÷ÊÔ¹¤¾ß½øÐбàдC³ÌÐò¡£Ñ§»áʹÓÃgcc¼°gdbµÈ¹¤¾ß½øÐÐlinuxϵÄc±àдºÍµ÷ÊÔ¡£
ÔÚ¿ªÊ¼Ö®Ç°£¬Ê×ÏÈҪ˵Ã÷µÄÊÇ£¬linux¿ª·¢³ÌÐò×îÖ÷ÒªµÄ±à¼­Æ÷ÊÇvi/vim±à¼­Æ÷£¬µ±È»»¹ÓÐemacs,gedit£¬Ö»ÊÇvi/vimµÄÓû§ÊµÔÚÊÇѹµ¹ÐԵĶàÊ ......

LinuxÏÂÎļþ²éÕÒʵÀý

»¨ÁËÒ»¸öÖÜÄ©µÄʱ¼äÁгöÀ´µÄ¡£¹²Ïí³öÀ´£¬Ï£Íû´ó¼Ò»¨¼¸·ÖÖÓ¿´¿´¡£ÕâÒ²ËãÊÇLINUXϱȽÏʵÓõIJéÕÒ·½Ê½ÁË
which(Ñ°ÕÒ“Ö´ÐÐÎļþ”)
[root@localhost home]# which [-a] command
-a : ½«ËùÓпÉÕÒµ½µÄÃüÁî¾ùÁгö£¬¶ø²»½ö½öÁгöµÚÒ»¸öÕÒµ½µÄÃüÁîÃû³Æ
·¶Àý£º
[root@localhost home]# which passwd
/usr/bin/passwd ......

cygwin ʹÓÃmake menuconfig ÅäÖÃlinuxÎÊÌâ¼°½â¾ö·½·¨

ÔÚÖ´ÐÐmake menuconfig ÃüÁî½øÐÐÄÚºËÅäÖÃʱ£¬Êä³öÏÂÃæµÄ³ö´íÐÅÏ¢£º
yyh:~/clfs/sources/linux-2.6.17.13$ make ARCH=i386 CROSS_COMPILE=${CLFS_TARGET}- menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
HOSTCC scripts/kconfig/conf.o
HOSTCC scri ......

±àÒë linux 2.6.18³ö´í½â¾ö·½·¨

HOSTCC scripts/mod/sumversion.o
scripts/mod/sumversion.c: In function ‘get_src_version’:
scripts/mod/sumversion.c:384: error: ‘PATH_MAX’ undeclared (first use in
this function)
scripts/mod/sumversion.c:384: error: (Each undeclared identifier is reported
only once
script ......

linuxѧϰÈÕ¼Ç

  µÚÒ»ÌìÉϰ࣬ÕùÈ¡Ò»¸öÔÂÄÚlinux¸øŪÊìϤÁË
 ÌøתÃüÁcd /tmpÌøתµ½tmpĿ¼       cd ../../   Ìøתµ½¸úĿ¼
 Ð½¨Îļþ£º touch test.html  н¨Ò»¸ötest.html Îļþ
 ×°µÄÊÇredhatϵͳ  ĬÈϵÄapache·þÎñûÓдò¿ª£¬ÐèÒª´òÃüÁî
/etc/init.d/{·þÎñÃû} start»ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ