| |
Sparc 64
CHOST="sparc64-unknown-linux-gnu"
CFLAGS="-O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-O3 -pipe -fomit-frame-pointer"
c emerge Gentoo Linux的最新unstable版本
# Advanced Masking
# ================
#
# Gentoo is using a new masking system to allow for easier stability testing
# on packages. KEYWORDS are used in ebuilds to mask and unmask packages based
# on the platform they are set for. A special form has been added that
# indicates packages and revisions that are expected to work, but have not yet
# been approved for the stable set. '~arch' is a superset of 'arch' which
# includes the unstable, in testing, packages. Users of the 'x86' architecture
# would add '~x86' to ACCEPT_KEYWORDS to enable unstable/testing packages.
# '~ppc', '~sparc', '~sparc64' are the unstable KEYWORDS for their respective
# platforms. DO NOT PUT ANYTHING BUT YOUR SPECIFIC ~ARCHITECTURE IN THE LIST.
# IF YOU ARE UNSURE OF YOUR ARCH, OR THE IMPLICATIONS, DO NOT MODIFY THIS.
#
ACCEPT_KEYWORDS="~x86"(去掉ACCEPT_KEYWORDS="~x86"前的注释符即可)
b打开PROZILLA的多线程下载功能,加快下载速度(在做这一步之前应该先emerge prozilla,这样才能用prozilla来下载。如果是stage1,因为没有c++编译器,可以先不emerge prozilla和修改下面这一步,到stage2以后再改。)
# Fetching files
# ==============
#
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
# all users on your system should use them.
#
# Portage uses wget by default. Here are some settings for some alternate
# downloaders -- note that you need to merge these programs first before they
# will be available.
#
# Lukemftp (BSD ftp):
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
#RESUMECOMMAND="/usr/bin/lukemftp -s -a -R -o \${DISTDIR}/\${FILE} \${URI}"
#
# Prozilla (turbo downloader)
FETCHCOMMAND='/usr/bin/proz --no-getch -s ${URI} -P ${DISTDIR}'
(请注意,b和c优化项在执行完emerge -u world系统更新命令前是没有的,你可以把上述的内容cp到make.conf文件里稍做修改即可)
#emerge prozilla(因为stage3解压的基本系统里没有prozilla命令,如果我们要使用多线程下载软件包的话,就必需先把prozilla dwon下来)
#emerge -u world(全面更新系统,需要很长时间)
6.安装编译内核
#emerge gentoo-sources
#cd /usr/src/linux
#make menuconfig
#make dep
#make bzImage
#make modules
#make modules_install
#cp /usr/src/linux/System.map /boot/System.map-2.4.20
#cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.20
(关于2.4内核的详悉配置方法,请参阅以下文章 http://www.tldp.org/linuxfocus/Chin...rticle252.shtml
)
7.安装vcron和metalog以及update modules
#emerge vcron
#rc-update add vcron default
#emerge metalog
#rc-update add metalog default
#update-modules
8.安装ADSL拨号软件。
#emerge ppp
#USE="-X" emerge rp-pppoe (因为rp-pppoe和xfree 等X软件包存在倚赖关系,我们要先在字符环境下使用,就要用USE="-X" 参数来安装rp-pppoe)
9.设置时区和Host主机名
#cd /usr/share/zoneinfo/Asia
#ln –sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#nano –w /etc/hostname
10.加入文件系统工具(如果是使用ext2或ext3,可以忽略这一步,系统自带了e2fsprogs)
#emerge reiserfsprogs
11.在Gentoo Linux系统里打开硬盘的DMA
#nano -w /etc/conf.d/local.start
在文件末尾加上 hdparm -c 1 -d 1 /dev/hda
12.设置root用户密码
#passwd
13.修改/etc/fstab文件,以符合你实际的分区情况,这是我的fstab文件,参考一下:)
#nano -w /etc/fstab
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/ROOT / reiserfs noatime 0 0
/dev/SWAP none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,owner,ro,iocharset=cp936 0 0 0 0
proc /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink). Adding the following
# line to /etc/fstab should take care of this:
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will use almost no
# memory if not populated with files)
tmpfs /dev/shm tmpfs defaults 0 0
/dev/hda1 /winc vfat defaults,rw,iocharset=cp936 0 0
/dev/hda5 /wind vfat defaults,rw,iocharset=cp936 0 0
dev/hda6 /wine ntfs defaults,rw,iocharset=cp936 0 0
/dev/hda7 /winf ntfs defaults,rw,iocharset=cp936 0 0
#mkdir /iwnc /wind /wine /winf(根据自己机器的情况加载windows分区)
qing兄补充道:
quote:修改/etc/fstab文件很重要的
ROOT
BOOT
SWAP
都换成你具体的分区
在启动时
若出现Activating swap [ok]
这是假相
并没有加载swap分区
要出现
Activating swap xxxxxxxk -swap space [ok]
xxxxxx是具体数字,才是真的加载了swap分区
说这么多的目的是,SWAP很重要
14.配置Grub,以便启动系统。
#nano -w grub.conf (建立Grub启动列表文件)
以下是我的menu.lst
default 0
timeout 30
splashimage=(hd0,7) /boot/grub/splash.xpm.gz
title Mandrake Linux 9.0 (Kernel-2.4.19-16mdk)
root (hd0,8)
kernel (hd0,8) /boot/vmlinuz root=/dev/hda9 quiet devfs=mount hdc=ide-scsi vga=788
initrd (hd0,8) /boot/initrd.img
title Gentoo Linux 1.4 RC2 (Kernel-2.4.20gentoo)
root (hd0,7)
kernel /boot/vmlinuz-2.4.20gentoo ro root=/dev/hda8 hdc=ide-scsi
#cp /usr/share/grub/i386-pc/* /boot/grub (cp升级过的grub的stage文件到/boot/grub目录)
#grub (配置Grub,让Grub写入MBR,管理整个机器里所有系统的启动)
grub> root (hd0,7) (指定root分区位置)
grub> kernel /boot/vmlinuz-2.4.20gentoo ro root=/dev/hda8 hdc=ide-scsi (指定系统内核的位置以及加入其他参数选项)
grub>setup (hd0) (写入MBR)
grub>quit (退出)
15.进入Gentoo Linux字符环境,配置ADSL。
#adsl-setup
//以下是屏幕显示:
Welcome to the Roaring Penguin ADSL client setup. First, I will run some checks on your system to make sure the PPPoE client is installed properly...
Looks good! Now, please enter some information:
USER NAME
>>> Enter your PPPoE user name :
输入连入宽带网的账号
>>> Enter the Ethernet interface connected to the ADSL modem
For Linux, it will be ethn, where 'n' is a number.
(default eth0):
输入准备接入互联网的网卡名,如果是缺省的就直接敲回车键。
>>> Enter the demand value (default no):
直接回车。
DNS
>>> Enter the DNS information here:
输入有服务商提供的域名服务器地址,或输入server,由服务商自动提供。
PASSWORD
>>> Please enter your PPPoE password:
>>> Please re-enter your PPPoE password:
输入上网密码。
FIREWALLING
>>> Choose a type of firewall (0-2):
选择防火墙,选0。
** Summary of what you entered **
Ethernet Interface: eth0
User name: xxxx //你的用户名
Activate-on-demand: No
DNS: server
Firewalling: NONE
>>> Accept these settings and adjust configuration files (y/n)?
最后,对上述配置进行确认。确认后的配置系统会写入/etc/ppp/pppoe.conf文件,熟练的用户可直接对其进行修改。
拨号
配置完成后,就可以进行拨号了。
#adsl-start
如果屏幕上出现:“... Connected!”就说明拨号成功了。一般而言做到这一步是没什么问题的。这时可以用ifconfig命令查看,结果除了原本有的eth0、lo外又增添了ppp0。
13.安装配置最新的XFree和KDE3
#emerge xfree qt arts
#USE="-gnome -gtk" emerge kdelibs kdebase (去掉gnome和gtk以及多余kde组件的支持,安装最小化的KDE)
#xf86config (检测配置XFree86,根据自己具体配置选择,配置完毕会在/etc/X11/下生成XF86Config )
#echo "exec startkde" > ~/.xinitrc (让我们直接用startx命令进入KDE而不是原来的twm)
保存修改退出后,用startx命令就可以进入KDE了。
#reboot
OK,Gentoo现在就落户你的硬盘了.Enjoy Your
Gentoo |
|