硬件需要软件的配合才能发挥最大功效
这个系统基本上就是目前可以让2F发挥最大功效的一个系统:
http://www.gentoo-cn.org/~zhangle/loongson2f_n32_mplt_20081209.tar.bz2
sha512sum: 18e415652785bc34ae2ce96800c63b6da2e18a9af6098a2569a9d99f82fea018b164ea2c87bf820a9a522b63db658d9e765e7a7b318885c0fd2f4661959af266 loongson2f_n32_mplt_20081209.tar.bz2
为了这样的一个系统的诞生我所做过的努力:
http://www.lemote.com/bbs/viewthread.php?tid=20134
其他条件相同,但使用-march=mips3编译的系统(可用于2e盒子,请用你的2e系统原来的内核,必须为64位内核):
http://www.gentoo-cn.org/~zhangle/loongson_mips3_n32_mplt_20081231.tar.bz2
sha512sum:
a08cea332f32660806d494405ef69dd1de69f35be4e846c76f23a4b26d7642b39b3db4735c8913be7d4eafb0981e38d3c597ff6b9299526fbdbdb5212e0c361a loongson_mips3_n32_mplt_20081231.tar.bz2
最新内核:
http://www.gentoo-cn.org/~zhangle/vmlinux-2.6.28-rc8
内核模块:
http://www.gentoo-cn.org/~zhangle/2.6.28-rc8-r0bertz.tar.bz2
主要亮点:
- 整个系统采用-mabi=n32编译,n32 ABI是int/long/pointer类型的变量长度为32位的n64 ABI。相比o32 ABI,n32能更充分发挥MIPS架构的特点。相比n64,n32程序的体积会更加小。而且在不需要科学运算的场合,n32已经足够应付。
- 整个系统采用-march=loongson2f编译,gcc包含codesourcery贡献的龙芯支持,以及阮贝鸿(jamesr)贡献的经我测试并修正的龙芯2f特有整数乘除法补丁
- 整个系统采用-mplt编译,有了plt的支持,在不需要使用PIC(Position Independent Code)的地方,就不必使用PIC(之前有相当一部分不需要使用PIC的情况会使用PIC),这样可以减少指令数量,减小可执行程序体积,直接和间接的加快软件执行速度
基本信息:
- root密码:loongson
- 不包含X,只有一个基本系统
- 软件版本基本都是最新的
- gcc/binutils是几天前直接从cvs里检出的
- glibc用的是2008年11月24日的快照,而且包含了我的一个有关ld.so.cache的补丁
- 内核在/boot里,版本是2.6.27.5,好像是cjacker还是刘世伟发出来的补丁
最后要特别感谢Redhatter
因为本系统基于Redhatter的一个mips3 n32 Gentoo Linux stage3
http://dev.gentoo.org/~redhatter/mips/cobalt/stages
这省了我很多时间去从头构建这个系统
关于ADLS拨号:
配置一下/etc/conf.d/net,改一下下面的用户名密码
config_ppp0="ppp"
link_ppp0="eth0"
plugins_ppp0="pppoe"
username_ppp0='your_username'
password_ppp0='your_password'
pppd_ppp0="updetach defaultroute"
在/etc/init.d里创建一个net.ppp0的符号连接,指向/etc/init.d/net.lo
cd /etc/init.d
ln -sf net.lo net.ppp0
/etc/init.d/net.ppp0 start
关于/usr/portage目录:
下载这个文件
wget
http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2
tar xvf portage-latest.tar.bz2 -C /usr
关于龙芯overlay:
gentoo里的overlay就相当于其他发行版的第三方源
获得gentoo loongson overlay:
USE="curl" emerge dev-util/git
git clone
http://www.gentoo-cn.org/git/loongson.git
把overlay下载到本地硬盘上之后,然后把路径加入/etc/make.conf里的PORTDIR_OVERLAY变量即可
之后照常emerge,如果portage树(即官方源)和overlay里同时有同一版本的软件,emerge会安装overlay里的版本
就像overlay把portage树给盖住了,这也就是overlay的含义
更新overlay只需要进入overlay的目录,然后执行git pull
关于X:
1. 请使用我前面给的内核
2. 请使用龙芯overlay里的xorg-server-1.5.3,USE="-aiglx minimal"
3.
http://www.gentoo-cn.org/~zhangle/xorg.conf.txt
关于内核源代码
注意:目前循此法编译出来的内核的
硬盘设备文件为
sda而不是
hda,请自行修改
/etc/fstab和
boot.cfg
git clone git://git.linux-mips.org/pub/scm/linux
cd linux
wget
http://www.gentoo-cn.org/~zhangle/linux-2.6.28-rc9.patch -O /tmp/linux-2.6.28-rc9.patch
patch -p1 < /tmp/linux-2.6.28-rc9.patch
git add *
git commit -m "added patch"
git archive --format=tar --prefix=junk/ HEAD | (cd /var/tmp/ && tar xf -)
cd /var/tmp/junk
wget
http://www.gentoo-cn.org/~zhangle/config -O .config
make oldconfig
make
[
本帖最后由 zhllg 于 2009-1-9 20:13 编辑 ]