debian下risvc工具链安装编译及qt源码编译

1安装依赖

sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev
sudo apt-get install libnewlib-dev

2下载riscv-gnu-toolchain

①下载gnu
git clone https://gitee.com/mirrors/riscv-gnu-toolchain.git

② 下载子模块

cd riscv-gnu-toolchain

git clone --recursive https://gitee.com/mirrors/riscv-binutils-gdb.git ./binutils
git clone --recursive https://gitee.com/mirrors/riscv-gcc.git ./gcc
git clone --recursive https://gitee.com/mirrors/riscv-glibc.git ./glibc  没有就用下面的(readme.md中有说明)   
#git clone git://sourceware.org/git/glibc.git    ;  git checkout 89d3d81  当时编译,这个版本才能过,否则报错gnu版本太低
git clone --recursive https://gitee.com/mirrors/riscv-dejagnu ./dejagnu
git clone --recursive https://gitee.com/mirrors/riscv-newlib.git ./newlib
git clone --recursive https://gitee.com/mirrors/riscv-binutils-gdb.git ./gdb
git clone https://mirrors.tuna.tsinghua.edu.cn/git/qemu.git ./qemu  不运行可不安装,在目标机运行

③ 编译 Linux 的交叉工具链

mkdir build
cd build

../configure --prefix=/opt/riscv

sudo make  -j8    // 适用于裸机开发(无操作系统支持)
sudo make linux -j12   // 适用于linux

3编译qt源码

下载qt源码,本例程使用 qt-everywhere-src-5.15.2 ,请自行下载并解压

①修改qt配置文件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值