mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-13 16:29:18 +08:00
README.waf: Make set-up steps self contained
This commit is contained in:
parent
b39854a862
commit
cf72971169
108
README.waf
108
README.waf
@ -47,66 +47,100 @@ We will build an ARM Realview PBX A9 QEMU BSP using the name
|
|||||||
Steps
|
Steps
|
||||||
-----
|
-----
|
||||||
|
|
||||||
1. Clone the RTEMS Source Build (RSB):
|
-------------------------------------------------------------------------------
|
||||||
|
sandbox="$PWD/sandbox"
|
||||||
|
mkdir sandbox
|
||||||
|
cd "$sandbox"
|
||||||
|
git clone git://git.rtems.org/rtems-source-builder.git
|
||||||
|
git clone git://git.rtems.org/rtems.git
|
||||||
|
git clone git://git.rtems.org/rtems-libbsd.git
|
||||||
|
cd "$sandbox"
|
||||||
|
cd rtems-source-builder/rtems
|
||||||
|
../source-builder/sb-set-builder --prefix="$sandbox/rtems-4.12" 4.12/rtems-arm
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
waf
|
||||||
|
waf install
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
1. Create a sandbox directory:
|
||||||
|
|
||||||
|
$ sandbox="$PWD/sandbox"
|
||||||
|
$ mkdir sandbox
|
||||||
|
|
||||||
|
1. Clone the repositories:
|
||||||
|
|
||||||
|
$ cd "$sandbox"
|
||||||
$ git clone git://git.rtems.org/rtems-source-builder.git
|
$ git clone git://git.rtems.org/rtems-source-builder.git
|
||||||
|
$ git clone git://git.rtems.org/rtems.git
|
||||||
|
$ git clone git://git.rtems.org/rtems-libbsd.git
|
||||||
|
|
||||||
2. Build and install the tools. In this example the path is
|
2. Build and install the tools. In this example the path is
|
||||||
/opt/rtems/4.12/tools:
|
$sandbox/rtems-4.12:
|
||||||
|
|
||||||
|
$ cd "$sandbox"
|
||||||
$ cd rtems-source-builder/rtems
|
$ cd rtems-source-builder/rtems
|
||||||
$ ../source-builder/sb-set-builder \
|
$ ../source-builder/sb-set-builder --prefix="$sandbox/rtems-4.12" 4.12/rtems-arm
|
||||||
--prefix=/opt/rtems/4.12/tools 4.12/rtems-arm
|
|
||||||
|
|
||||||
3. Clone RTEMS:
|
3. Bootstrap the RTEMS sources:
|
||||||
|
|
||||||
$ git clone git://git.rtems.org/rtems.git rtems-4.12
|
$ cd "$sandbox"
|
||||||
|
$ cd rtems
|
||||||
4. Bootstrap the RTEMS sources:
|
$ PATH="$sandbox/rtems-4.12/bin:$PATH" ./bootstrap
|
||||||
|
|
||||||
$ cd rtems-4.12
|
|
||||||
$ ./bootstrap
|
|
||||||
|
|
||||||
5. Build and install the RTEMS Board Support Packages (BSP) you want to use. In
|
5. Build and install the RTEMS Board Support Packages (BSP) you want to use. In
|
||||||
this example the path is /opt/rtems/4.12/bsps:
|
this example the path is /opt/rtems/4.12/bsps:
|
||||||
|
|
||||||
|
$ cd "$sandbox"
|
||||||
$ mkdir b-realview_pbx_a9_qemu
|
$ mkdir b-realview_pbx_a9_qemu
|
||||||
$ cd b-realview_pbx_a9_qemu
|
$ cd b-realview_pbx_a9_qemu
|
||||||
$ ../rtems-4.12/configure \
|
$ PATH="$sandbox/rtems-4.12/bin:$PATH" "$sandbox/rtems/configure" \
|
||||||
--target=arm-rtems4.12 --prefix=/opt/rtems/4.12/bsps \
|
--target=arm-rtems4.12 --prefix="$sandbox/rtems-4.12" \
|
||||||
--disable-networking --enable-rtemsbsp=realview_pbx_a9_qemu
|
--disable-networking --enable-rtemsbsp=realview_pbx_a9_qemu
|
||||||
$ make
|
$ PATH="$sandbox/rtems-4.12/bin:$PATH" make
|
||||||
$ make install
|
$ PATH="$sandbox/rtems-4.12/bin:$PATH" make install
|
||||||
|
|
||||||
6. Populate the rtems_waf git submodule:
|
6. Populate the rtems_waf git submodule. Note, make sure you specify
|
||||||
|
'rtems_waf' or the FreeBSD kernel source will be cloned:
|
||||||
|
|
||||||
$ cd rtems-libbsd
|
$ cd "$sandbox"
|
||||||
$ git submodule init
|
$ cd rtems-libbsd
|
||||||
$ git submodule update rtems_waf
|
$ git submodule init
|
||||||
|
$ git submodule update rtems_waf
|
||||||
Note, make sure you specify 'rtems_waf' or the FreeBSD kernel source will be
|
|
||||||
cloned.
|
|
||||||
|
|
||||||
7. Run Waf's configure with your specific settings. In this case the path to
|
7. Run Waf's configure with your specific settings. In this case the path to
|
||||||
the tools and RTEMS are provided on the command line and so do not need to
|
the tools and RTEMS are provided on the command line and so do not need to
|
||||||
be in your path or environment [1]:
|
be in your path or environment [1]. You can use
|
||||||
|
'--rtems-archs=arm,sparc,i386' or
|
||||||
$ waf configure --prefix=/opt/rtems/4.12/bsps \
|
|
||||||
--rtems=/opt/rtems/4.12/bsps \
|
|
||||||
--rtems-tools=/opt/rtems/4.12/tools \
|
|
||||||
--rtems-bsps=arm/realview_pbx_a9_qemu
|
|
||||||
|
|
||||||
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/realview_pbx_a9_qemu,sparc/sis,i386/pc586' to build for
|
||||||
more than BSP at a time.
|
more than BSP at a time. Note, you must provide the architecture and BSP as
|
||||||
|
a pair. Providing just the BSP name will fail:
|
||||||
|
|
||||||
Note, you must provide the architecture and BSP as a pair. Providing just the
|
$ cd "$sandbox"
|
||||||
BSP name will fail.
|
$ cd rtems-libbsd
|
||||||
|
$ waf configure --prefix="$sandbox/rtems-4.12" \
|
||||||
|
--rtems-bsps=arm/realview_pbx_a9_qemu
|
||||||
|
|
||||||
8. Build and install:
|
8. Build and install. The LibBSD package will be installed into the prefix
|
||||||
|
provided to configure:
|
||||||
The LibBSD package will be installed into the prefix provided to configure.
|
|
||||||
|
|
||||||
|
$ cd "$sandbox"
|
||||||
|
$ cd rtems-libbsd
|
||||||
$ waf
|
$ waf
|
||||||
$ waf install
|
$ waf install
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user