Update on building mips64el cross toolchain
1. git clone git://www.gentoo-cn.org/var/git/loongson.git
2. Don't include loongson overlay's directory directly in your PORTDIR_OVERLAY. But in your own overlay, like /usr/local/portage, create symlinks pointing to sys-devel/ and sys-libs/glibc in loongson overlay. This is because you may not want to install packages from loongson overlay in your host machine. Also you need to make sure your own overlay is the first overlay containing binutils/gcc/glibc in your PORTDIR_OVERLAYS list. You may check the value of this list using command:
2. Don't include loongson overlay's directory directly in your PORTDIR_OVERLAY. But in your own overlay, like /usr/local/portage, create symlinks pointing to sys-devel/ and sys-libs/glibc in loongson overlay. This is because you may not want to install packages from loongson overlay in your host machine. Also you need to make sure your own overlay is the first overlay containing binutils/gcc/glibc in your PORTDIR_OVERLAYS list. You may check the value of this list using command:
portageq envvar PORTDIR_OVERLAY3. Then, just run crossdev -t mips64el-unknown-linux-gnu. This command installed the following components on my host machine:
- linux-headers-2.6.27-r2 from portage.
- binutils-2.19.1-r1 from loongson overlay.
- gcc-4.4.2 from portage. The gcc in loongson overlay currently is just a symlink to portage gcc.
- glibc-2.9_p2009042 from loongson overlay. However if you build the toolchain now, glibc-2.10.1 will be installed instead, I just updated it.
Comments