LOOGSON派二代buildroot文件系统编译

1.下载编译工具gcc-4.9.3-64-gnu.tar.gz并解压

Index of /embedd/ls3a/toolchain (loongnix.cn)

解压命令 sudo tar -zxvf gcc-4.9.3-64-gnu.tar.gz -C /

2.下载buildroot工具并解压

Index of /embedd/ls2h/buildroot (loongnix.cn)

解压命令sudo tar -zxvf buildroot.tar.gz

创建编译脚本cmd.sh

------------------------------------------------------------------------------------

#! /bin/bash

export LANG=C

export PATH=/opt/gcc-4.9.3-64-gnu/bin/:$PATH

make ARCH=mips CROSS_COMPILE=mips64el-linux- -j8

-----------------------------------------------------------------------------------

修改权限 sudo chmod 777 -f cmd.sh

3.配置编译选项

3.1    cp ls2k_docker-systemd-gcc-4.9.3.config .config

3.2   make menuconfig

3.2.1Target options —>

配置CPU参数 小端 MIPS64

3.2.2Toolchain —>

添加默认工具链 gcc-4.9.3-64-gun

3.2.3System configuration —>

root password是登录后的密码,默认的用户名是root,添加密码root

3.2.4Run a getty (login prompt) after boot —>

配置打印串口ttyS0和波特率

3.2.5Kernel —>

这里我们不编译

3.2.6Target packages —>

选择需要的工具 ,我们添加net-tool  openssh vim nano opkg

 

配置修改如下

4.构建./cmd.sh

构建完成:

 

5.编译过程中出现错误

checking size of unsigned long... 8
checking size of mp_limb_t... 8
configure: error: Oops, mp_limb_t is 64 bits, but the assembler code
in this configuration expects 32 bits.
You appear to have set $CFLAGS, perhaps you also need to tell GMP the
intended ABI, see "ABI and ISA" in the manual.
package/pkg-generic.mk:219: recipe for target '/home/ubuntu/Pictures/buildroot/output/build/gmp-6.1.2/.stamp_configured' failed
make[1]: *** [/home/ubuntu/Pictures/buildroot/output/build/gmp-6.1.2/.stamp_configured] Error 1
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2
 

./configure

make

sudo make install

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值