一.环境介绍http://www.Sina.com/Ubuntu第18.0464
3358 www.Sina.com/http://www.Sina.com /龙芯二世(2K1000 ) ) ) ) ) ) ) ) ) )。
二.资料下载交叉编译器:3358 FTP.loong nix.org/loongsonpi/pi _2/toolchain /
Linux内核:3358 FTP.loong nix.org/loongsonpi/pi _2/source /
三.编译内核3.1配置交叉编译器对交叉编译器进行解压缩。 为了便于使用交叉编译器,可以将交叉编译器的路径添加到系统环境PATH中。
3.2部署配置编译内核(1)部署内核
wbyq @ wbyq : (/loong son $ tar xvf/mnt/hgfs/Linux-share-dir/Linux-3.10-loongsonpai.tar.gz ) .内核配置文件
wbyq@wbyq:~~/Loongson/Linux-3.10 $ lsarchfsmakefileramdisk.cpiotmpblockincludemakefile.qlockreadmetoolsconfig-ls2kinit make.sh reporting-bing scriptsvmlinuxcryptokconfigmodules.ordersecurityvmlinux.32 documentationkernelmodule.32 odriverslibmymakesystem.mapvmlinem @ wbyq :~/loong son/Linux-3.10 $ wbyq @ wbyq 3360 Linux-3.10 $ CP config-ls2k.config (3) .配置内核。 如果要定制内核,可以访问和配置内核配置菜单
wbyq @ wbyq ://loong son/Linux-3.10 $ make arch=MIPS cross _ compile=MIPS 64 El-Linux-menuconfig
(4) .编译内核:为了便于编译,首先编写编译脚本,执行脚本即可
wbyq @ wbyq 3360~~/loong son/Linux-3.10 $ touch make.sh内容如下:#!/cqd pw/bashexportpath=/home/wbyq/loong son/gcc-4.9.3-64-GNU/cqd pw : $ { path } exportmakeflags=' cc=MIPS 64 El-Linux-gcc ' make-J2 arch=MIPS cross _ compile=MIPS 64 El-Linux make-J2 arch=MIPS ch tmp modules _ installwbyq @ wbyq : (/loong son/Linux-3.10 $ chmod 777 make.shwbyq @ wbyq 3360 )/loongson/loongson