LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3436|回复: 4

how to make world(ZT)

[复制链接]
发表于 2003-11-11 14:29:08 | 显示全部楼层 |阅读模式
Make World
Applicable to: FreeBSD 4.6
Updated: July 8, 2002

This Sheet describes the procedure for updating FreeBSD from source. Before performing this procedure, you should review the FreeBSD Handbook article Using make world.

   1. Run cvsup to update the sources:

      # /usr/local/bin/cvsup -g -L 2 /usr/src/stable-supfile

      If you've created the /usr/local/bin/cvsrun script described in the Updating Sources with CVSup cheat sheet, you can also run:

      # /usr/local/bin/cvsrun

      If you need help setting up /usr/src/stable-supfile, see the Updating Sources with CVSup cheat sheet.

   2. Read /usr/src/UPDATING carefully so that you understand any special procedures that are required. If you do not follow such special procedures, you run the risk of rendering your system unusable. Make sure you have a backup of all the important files on your system!

   3. Edit or create /etc/make.conf and enter the following options to override the defaults (located in /etc/defaults/make.conf):

      CFLAGS= -O -pipe
      COPTFLAGS= -O -pipe
      NOPROFILE= true
      USA_RESIDENT= YES

   4. Backup /etc:

      # cp -Rp /etc /etc.old

   5. Run mergemaster in pre-buildworld mode to update files essential to the success of buildworld and installworld:

      # /usr/sbin/mergemaster -p -v -w 132 (eliminate '-w 132' if 132x43 video mode is not activated)

   6. Remove old /usr/obj:

      # cd /usr/obj
      # chflags -R noschg *
      # rm -rf *

   7. Compile the sources:

      # cd /usr/src
      # make buildworld

   8. Compile and install the new kernel:

      # cd /usr/src (if you've changed directories after the last step)
      # make kernel KERNCONF=YOURKERNEL

      If you don't already have a custom kernel configuration, use GENERIC in place of YOURKERNEL above. If you wish to create a custom kernel, see the Building a Custom Kernel cheat sheet.

   9. Drop to single user mode:

      # shutdown now

      Or reboot into single user mode:

      # shutdown -r now
      ···
      Ok boot -s
      ···
      # fsck -p
      # mount -u /
      # mount -a -t ufs
      # swapon -a
      # adjkerntz -i

  10. Install the new system binaries:

      # cd /usr/src
      # make installworld

  11. Update system configuration files:

      # /usr/sbin/mergemaster -v -w 132 (eliminate '-w 132' if 132x43 video mode is not activated)

  12. Update /dev

      In most cases, mergemaster will realize when it is necessary to update the devices, and will offer to complete it automatically. If you've declined mergemaster's offer, perform these steps to update /dev manually:

      # cd /dev
      # /bin/sh MAKEDEV all

  13. Update /stand:

      This step is included for completeness. It can be safely omitted.

      # cd /usr/src/release/sysinstall
      # make clean
      # make all install

  14. Reboot to multi-user mode:

      # reboot
发表于 2003-11-11 19:16:38 | 显示全部楼层
good, 很详细的文章!
发表于 2003-12-1 09:53:20 | 显示全部楼层

按照此文成功,回个中文贴表示感谢

如何make world
适用于:FreeBSD 4.6
更新日期:2002.7.8
这篇文章描述了从源代码升级BSD的过程。开始执行这个过程以前,你最好复习一下BSD手册中有关make world的内容。
1.用cvsup升级源代码
#/usr/local/bin/cvsup -g -L -2 /usr/src/stable-supfile
如果已经根据cvsup cheat文章的描述创建了/usr/local/bin/cvsrun脚本,你也可以运行
#/usr/local/bin/cvsrun
设置stable-supfile时如果需要帮助,请参照the Updating Sources with CVSup cheat的文章。
2.仔细阅读/usr/src/UPDATING,这样可理解任何特别的过程。如果不按照说明过程,会有使你的系统产生不稳定的危险。请确定你已经备份了系统内所有的重要文件。
3.修改或创建/etc/makde.conf文件,并且用下列选项替换掉默认选项(在/etc/defaults/make.conf下)
CFLAGS= -0 -pipe
COPTFLAGS= -0-pipe
NOPROFILE= true
USA_RESIDENT= YES
4.备份/etc目录
#cp -Rp /etc /etc.old
5.在pre-buildworld模式中对升级文件运行mergemaster命令,对buildworld和installworld是十分重要的。
#/usr/sbin/mergemaster -p -v -w 132
(如果132*43视频模式不可用,去掉'-w 132'参数)
6.删除旧的/usr/obj目录
#cd /usr/obj
# chflags -R noschg *
#rm -rf *
7.编译源代码
#cd /usr/src
#make buildworld
8.编译并安装新内核
#cd /usr/src
(如果上一步后改变了目录)
#make kernel KERNCONF=YOURKERNEL
如果没有准备好的自定义的内核配置文件,用GENERI代替上面的YOURKERNEL。如果想创建一个自定义的内核,可参照the Building a Custom Kernel cheat一文。
9.进入单用户模式
#shutdown now
或者重启进入单用户模式
#shutdown -r now
...
Ok boot -s
...
#fsck -p
#mount -u /
#mount -a -t ufs
#swapon -a
#adjkerntz -i
10.安装新的内核二进制包
#cd /usr/src
#make installworld
11.升级系统配置文件
#/usr/sbin/mergemaster -v -w 132
(如果132*43视频模式不可用,去掉'-w 132'参数)
12.升级/dev目录
多数情况下,需要升级的设备mergemaster会自动识别并完成升级。如果你不用mergemaster,手工执行升级步骤
#cd /dev
#/bin/sh MAKEDEV all
13.升级/stand目录
包括这一步过程才完整,省略也是安全的。
#cd /usr/src/release/sysinstall
#make clean
#make all install
14.重启进入多用户模式
#reboot

英语要学,BSD也要学,痛苦。。。。。
发表于 2004-3-23 21:58:08 | 显示全部楼层
my system is FreeBSD4.8
why can not MAKEDEV all ?

step :
cd /dev
/bin/sh MAKEDEV all

用什么代替这一功能在FreeBSD 4.8 ?
发表于 2004-3-23 22:37:49 | 显示全部楼层
做那步做什么?ft
/dev 下面还是有 MAKEDEV 的,呵呵,找找看
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表