rtems-6.1-rc4 pc386平台示例编译及QEMU 仿真

    rtems官网上最新发布的代码是6.1-rc4,相对于老版本,做了较大的改动, 文件目录组织方式,尤其是编译系统,移除了autoconf/automake,使用waf python脚本编译,当前使用python脚本配置编译,已称为主流,例如yacto、openbmc等,都是基于python开发的编译配置系统

    rtems-6.1-rc4编译工具链编译方式与老版本类似,rtems-source-builder下载编译相关工具链等

解压到如下目录中,

/root/rtems-source-builder-6.1-rc4

新建patches sources目录,结构如下

├── bare

│   └── config

├── CODEOWNERS

├── LICENSE.md

├── README.md

├── rtems

│   ├── build

│   ├── config

│   ├── patches

│   └── sources

├── source-builder

└── VERSION

Index of /pub/rtems/releases/6/rc/6.1-rc4/sources下载的.diff patch等文件复制到patches目录,其他 .tar.gz  .tar.xz等放到sources目录下

运行如下命令,编译生成386平台的工具链

../source-builder/sb-set-builder --prefix=$HOME/development/rtems/6.1-rc4  6/rtems-i386   --no-download     --rtems-bsp     --keep-going

注意,上文中我们已经下载了编译需要的相关文件,所以这个地方选择不下载参数,如果有报错也继续编译

过程中遇到如下报错

config.status: linking mpn/x86_64/k8/gmp-mparam.h to gmp-mparam.h

config.status: executing libtool commands

configure: summary of build options:

  Version:           GNU MP 6.3.0

  Host type:         x86_64-pc-linux-gnu

  ABI:               64

  Install prefix:    /root/rtems-source-builder-6.1-rc4/rtems/build/tmp/sb-0-internal

  Compiler:          gcc -O2 -g -pipe -I/root/rtems-source-builder-6.1-rc4/rtems/build/tmp/sb-0/devel/gmp-internal/root/development/rtems/6.1-rc4/include -I/root/rtems-source-builder-6.1-rc4/rtems/build/tmp/sb-0-internal/include -std=gnu99

  Static libraries:  yes

  Shared libraries:  no

gcc -O2 -g -pipe -I/root/rtems-source-builder-6.1-rc4/rtems/build/tmp/sb-0/devel/gmp-internal/root/development/rtems/6.1-rc4/include -I/root/rtems-source-builder-6.1-rc4/rtems/build/tmp/sb-0-internal/include `test -f 'gen-psqr.c' || echo './'`gen-psqr.c -o gen-psqr -lm

gen-sieve.c: In function 'setmask':

gen-sieve.c:99:3: error: 'for' loop initial declarations are only allowed in C99 mode

   for (unsigned i = 0; i < 2 * a * b; ++i)

   ^

gen-sieve.c:99:3: note: use option -std=c99 or -std=gnu99 to compile your code

make: *** [gen-sieve] Error 1

make: *** Waiting for unfinished jobs....

shell cmd failed: /bin/sh -ex  /root/rtems-source-builder-6.1-rc4/rtems

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值