mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-22 20:45:37 +08:00
README.waf: Change BSP, add QEMU command line
This commit is contained in:
parent
1fd5083234
commit
2c4840fba0
31
README.waf
31
README.waf
@ -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
|
||||
-----
|
||||
@ -61,11 +61,11 @@ 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"
|
||||
@ -73,9 +73,12 @@ 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:
|
||||
@ -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
|
||||
|
||||
@ -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:
|
||||
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user