LinuxSir.cn,穿越时空的Linuxsir!

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

[转贴]Gentoo-sources + Reiser4 + Suspend2

[复制链接]
发表于 2006-5-23 16:28:56 | 显示全部楼层 |阅读模式
原贴:http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&t=156081

Ebuild基于gentoo-sources-2.6.16-r7,不过我去掉了ultra1, sparc的东西。我称之为r4sus2-gentoo-sources。安装方法:

  1. # mkdir -p /usr/local/portage/sys-kernel/r4sus2-gentoo-sources
复制代码

将以下r4sus2-gentoo-sources-2.6.16.ebuild拷至刚建的目录:
  1. # Copyright 1999-2006 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: $

  4. ETYPE="sources"
  5. K_WANT_GENPATCHES="base extras"
  6. K_GENPATCHES_VER="9"
  7. R4V="-2"
  8. inherit kernel-2
  9. detect_version
  10. detect_arch

  11. KEYWORDS="~amd64 ~x86"
  12. HOMEPAGE="http://dev.gentoo.org/~dsd/genpatches http://www.suspend2.net http://www.namesys.com/v4/v4.html"

  13. DESCRIPTION="Full sources including the Gentoo patchset, Software Suspend 2 and the Reiser4 patchset"

  14. SUSPEND2_VERSION="2.2.5"
  15. SUSPEND2_TARGET="2.6.16.9"
  16. SUSPEND2_SRC="suspend2-${SUSPEND2_VERSION}-for-${SUSPEND2_TARGET}"
  17. SUSPEND2_URI="http://www.suspend2.net/downloads/all/${SUSPEND2_SRC}.tar.bz2"

  18. UNIPATCH_LIST="${DISTDIR}/${SUSPEND2_SRC}.tar.bz2 ${DISTDIR}/reiser4-for-${PV}${R4V}.patch.gz"
  19. UNIPATCH_STRICTORDER="yes"

  20. RDEPEND="${RDEPEND}
  21.                 >=sys-apps/suspend2-userui-0.6.1
  22.                 >=sys-power/hibernate-script-1.12"

  23. SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ${SUSPEND2_URI} ftp://ftp.namesys.com/pub/reiser4-for-${KV_MAJOR}.${KV_MINOR}/${PV}/reiser4-for-${PV}${R4V}.patch.gz"

  24. pkg_postinst() {
  25.         postinst_sources

  26.         echo

  27.         einfo "For more info on this patchset, and how to report problems, see:"
  28.         einfo "${HOMEPAGE}"
  29. }
复制代码

然后
  1. # echo 'sys-kernel/r4sus2-gentoo-sources ~x86' >> /etc/portage/package.keywords
  2. # ebuild /usr/local/portage/sys-kernel/r4sus2-gentoo-sources/r4sus2-gentoo-sources-2.6.16.ebuild digest
  3. # USE="symlink" emerge -av r4sus2-gentoo-sources
复制代码

如果你只要Reiser4,不要Software Suspend 2,可以将ebuild改成:
  1. # Copyright 1999-2006 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: $

  4. ETYPE="sources"
  5. K_WANT_GENPATCHES="base extras"
  6. K_GENPATCHES_VER="9"
  7. R4V="-2"
  8. inherit kernel-2
  9. detect_version
  10. detect_arch

  11. KEYWORDS="~amd64 ~x86"
  12. HOMEPAGE="http://dev.gentoo.org/~dsd/genpatches http://www.namesys.com/v4/v4.html"

  13. DESCRIPTION="Full sources including the Gentoo patchset and the Reiser4 patchset"

  14. UNIPATCH_LIST="${DISTDIR}/reiser4-for-${PV}${R4V}.patch.gz"

  15. SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ftp://ftp.namesys.com/pub/reiser4-for-${KV_MAJOR}.${KV_MINOR}/${PV}/reiser4-for-${PV}${R4V}.patch.gz"

  16. pkg_postinst() {
  17.         postinst_sources

  18.         echo

  19.         einfo "For more info on this patchset, and how to report problems, see:"
  20.         einfo "${HOMEPAGE}"
  21. }
复制代码
发表于 2006-5-23 16:35:02 | 显示全部楼层
Suspend2怎么用?好不好用?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-23 16:50:08 | 显示全部楼层
Post by ifree
Suspend2怎么用?好不好用?

不知道。wiki里有教程:http://gentoo-wiki.com/HOWTO_Software_Suspend_v2
回复 支持 反对

使用道具 举报

发表于 2006-5-23 20:14:54 | 显示全部楼层
尝试Suspend2 失败了。
回复 支持 反对

使用道具 举报

发表于 2006-5-23 20:19:07 | 显示全部楼层
Suspend是干什么用的?
回复 支持 反对

使用道具 举报

发表于 2006-5-23 20:38:40 | 显示全部楼层
挂起系统到硬盘。

现在在试ubuntu 6.06,他有一个sleep的功能,我在gentoo里面怎么做不出来呢?要安装什么软件?
回复 支持 反对

使用道具 举报

发表于 2006-5-24 12:50:54 | 显示全部楼层
suspend2超好用。尤其是笔记本。不用经常关机了。就算suspend也是很好用的。极少出问题。就算出问题,顶多重启一次。简易使用。
回复 支持 反对

使用道具 举报

发表于 2006-5-24 14:30:59 | 显示全部楼层
Post by ifree
挂起系统到硬盘。

现在在试ubuntu 6.06,他有一个sleep的功能,我在gentoo里面怎么做不出来呢?要安装什么软件?

emerge hibernate-script
回复 支持 反对

使用道具 举报

发表于 2006-5-24 19:31:52 | 显示全部楼层
Post by zhllg
emerge hibernate-script
是不是如果幸运的话,以下几步就可以了:
1 emerge suspend2-sources,编译内核
2 修改grub启动参数,加上resume2=swap:/dev/sda5
3 hibernat
就可以了?
回复 支持 反对

使用道具 举报

发表于 2006-5-24 20:04:07 | 显示全部楼层
如何实现windows的那种“待机”状态?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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