Skip to content

Commit

Permalink
README.waf: Change BSP, add QEMU command line
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhub committed Feb 13, 2017
1 parent 1fd5083 commit 2c4840f
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions README.waf
Expand Up @@ -41,8 +41,8 @@ The waf build support for RTEMS requires you provide your BSP name as an
architecture and BSP pair. You must provide both or waf will generate an error
message during the configure phase.

We will build an ARM Realview PBX A9 QEMU BSP using the name
'arm/realview_pbx_a9_qemu'.
We will build an Xilinx Zynq QEMU BSP using the name
'arm/xilinx_zynq_a9_qemu'.

Steps
-----
Expand All @@ -61,21 +61,24 @@ cd "$sandbox"
cd rtems
PATH="$sandbox/rtems-4.12/bin:$PATH" ./bootstrap
cd "$sandbox"
mkdir b-realview_pbx_a9_qemu
cd b-realview_pbx_a9_qemu
mkdir b-xilinx_zynq_a9_qemu
cd b-xilinx_zynq_a9_qemu
PATH="$sandbox/rtems-4.12/bin:$PATH" "$sandbox/rtems/configure" \
--target=arm-rtems4.12 --prefix="$sandbox/rtems-4.12" \
--disable-networking --enable-rtemsbsp=realview_pbx_a9_qemu
--disable-networking --enable-rtemsbsp=xilinx_zynq_a9_qemu
PATH="$sandbox/rtems-4.12/bin:$PATH" make
PATH="$sandbox/rtems-4.12/bin:$PATH" make install
cd "$sandbox"
cd rtems-libbsd
git submodule init
git submodule update rtems_waf
waf configure --prefix="$sandbox/rtems-4.12" \
--rtems-bsps=arm/realview_pbx_a9_qemu
--rtems-bsps=arm/xilinx_zynq_a9_qemu
waf
waf install
qemu-system-arm -no-reboot -serial null -serial mon:stdio -net none \
-nographic -M xilinx-zynq-a9 -m 256M \
-kernel build/arm-rtems4.12-xilinx_zynq_a9_qemu/selectpollkqueue01.exe
-------------------------------------------------------------------------------

1. Create a sandbox directory:
Expand Down Expand Up @@ -107,11 +110,11 @@ waf install
this example the path is /opt/rtems/4.12/bsps:

$ cd "$sandbox"
$ mkdir b-realview_pbx_a9_qemu
$ cd b-realview_pbx_a9_qemu
$ mkdir b-xilinx_zynq_a9_qemu
$ cd b-xilinx_zynq_a9_qemu
$ PATH="$sandbox/rtems-4.12/bin:$PATH" "$sandbox/rtems/configure" \
--target=arm-rtems4.12 --prefix="$sandbox/rtems-4.12" \
--disable-networking --enable-rtemsbsp=realview_pbx_a9_qemu
--disable-networking --enable-rtemsbsp=xilinx_zynq_a9_qemu
$ PATH="$sandbox/rtems-4.12/bin:$PATH" make
$ PATH="$sandbox/rtems-4.12/bin:$PATH" make install

Expand All @@ -127,14 +130,14 @@ waf install
the tools and RTEMS are provided on the command line and so do not need to
be in your path or environment [1]. You can use
'--rtems-archs=arm,sparc,i386' or
'--rtems-bsps=arm/realview_pbx_a9_qemu,sparc/sis,i386/pc586' to build for
'--rtems-bsps=arm/xilinx_zynq_a9_qemu,sparc/sis,i386/pc586' to build for
more than BSP at a time. Note, you must provide the architecture and BSP as
a pair. Providing just the BSP name will fail:

$ cd "$sandbox"
$ cd rtems-libbsd
$ waf configure --prefix="$sandbox/rtems-4.12" \
--rtems-bsps=arm/realview_pbx_a9_qemu
--rtems-bsps=arm/xilinx_zynq_a9_qemu

8. Build and install. The LibBSD package will be installed into the prefix
provided to configure:
Expand All @@ -144,6 +147,12 @@ waf install
$ waf
$ waf install

9. Run the tests on QEMU, for example:

$ qemu-system-arm -no-reboot -serial null -serial mon:stdio -net none \
$ -nographic -M xilinx-zynq-a9 -m 256M \
$ -kernel build/arm-rtems4.12-xilinx_zynq_a9_qemu/selectpollkqueue01.exe

[1] It is good practice to keep your environment as empty as possible. Setting
paths to tools or specific values to configure or control a build is
dangerous because settings can leak between different builds and change
Expand Down

0 comments on commit 2c4840f

Please sign in to comment.