1,应该首先下载git-core的安装包。尽量用最新版本的。下载地址为:
http://www.kernel.org/pub/software/scm/git
http://www.kernel.org/pub/software/scm/git/git-
http://www.kernel.org/pub/software/scm/git...1.5.3.8.tar.bz2
然后通过以下命令进行安装 :
tar jxf git-
cd git-1.5.3.8
./configure
make
sudo make install
2,登记你的邮箱地址和用户名,通过以下命令:
git config --global user.email "you@email.com"
git config --global user.name "Your Name"
3,下载uclinux源代码包uClinux-dist-20071107.tar.bz2,下载地址为:
然后进行解压:
tar jxf uClinux-dist-20071107.tar.bz2
4,通过以下的命令来选择分支:
cd uClinux-dist
git branch -a
master
* nios2
origin/HEAD
origin/master
origin/nios2
5. Only if you are blocked by firewall to use git:// port 9418, you can use http:// instead. But it will be slower than using git:// . Don't use http:// unless you have no choice.
Edit file .git/config, and change to http:// .
[remote "origin"]
url = http://sopc.et.ntust.edu.tw/git/uClinux-dist.git
fetch = +refs/heads/*:refs/remotes/origin/*
6. 决定用哪个内核 通过以下命令:(uClinux-dist-20070130是个比较稳定的版本推荐用)
git checkout master #uClinux-dist-20070130 stable, kernel v
Or,
git checkout nios2 # uClinux-dist-20071107 development, kernel v2.6.23
7,更新内核和打一些补丁通过下面的命令:
git pull
当连接好网络的情况下,电脑会自动连接到sopc server,下载更新,当更新完成之后就代表着uclinux系统已经在niosii上移植好了,安装交叉编译工具后就可以编译内核了,详细步骤请见另外一篇笔记--------------uclinux_nios记录
如果你的电脑没有连接到internet,你将不能从服务器上下载到更新,你就应该先到:
http://sopc.et.ntust.edu.tw/pub/uclinux/patches-20070130/然后自己进行打补丁
If your Linux PC doesn't connect to internet, you won't be able to pull from the server. You can download the patches for master branch, and use "git am" to apply them (but don't use them on nios2 branch).
Apply them in the numbered sequences, and apply each patch only once. eg,
git am 0001-nios2-Merged-MTD-CFI-driver-patch-from-Mictrotronix.patch
git am 0002-....
Or using wildcard,
git am 00*patch
8. Build as usual, ("make romfs" is not needed now),通过以上的几步后,就不需要在make romfs 了,直接用以下的命令即可:
make menuconfig
make vendor_hwselect SYSPTF=/path_to/your_system_ptf
make