Build script (rpm_build.sh)

We provide a build script that could help you to rebuild all of the Cell BE Linux components. Before running that script, you have to install the source rpm packages of the components that you want to rebuild.

rpm_build.sh Build script that helps you to rebuild all the packages.

To build the packages you need a ppc64 machine but also a x86 machine for some of the cross-compiling components. Next table shows in which machine type each component need to be built and the package type that is generated (ppc, ppc64 or noarch).

Source ppc64 Build Machine x86 Build Machine
GNU Toolchain for PPU
ppc
i686
PPU Sysroot
N/A
noarch
GNU Toolchain for SPU
ppc
i686
SPU tools
ppc
N/A
SPE Management Library
ppc and ppc64
N/A
SPE 2 Management Library
ppc and ppc64
N/A
Crash SPU Commands
ppc64
N/A
oprofile
ppc
N/A
sysroot
noarch1
N/A
netpbm
noarch
N/A
numactl
ppc and ppc641
x86 and x86_64
1 Even though it is a noarch package, it needs to be built in a ppc64 machine because of the endianness of the RPM database.

The script allows you to build each component independently or all the Cell BE Linux components plus the simulator sysroot image at once. Note than while most of the components have to be built in a ppc64 machine, you can only build the cross-compiling toolchain on a x86 box. This toolchain allows you to develop applications in a x86 box.

To know the options that the rpm_build.sh script has, just type rpm_build.sh --help to get the following:

Usage: rpm_build.sh2
	--help	Prints Usage
	--all	Builds all (default)
	--none	Builds none


 Use the following options only in conjunction with the "--none" option
   Example: rpm_build.sh --none --kernel  (Builds nothing but the kernel)
	--pputoolchain	Builds pputoolchain
	--sputoolchain	Builds sputoolchain
	--sputools	Builds SPU tools
	--crashspu	Builds Crash SPU commands
	--numactl	Builds numactl
	--netpbm	Build netpbm
	--libspe	Builds libspe
	--libspe2	Builds libspe2
	--oprofile	Builds oprofile
	--sysroot	Builds sysroot


 Use the following options only in conjunction with the "--all" option
   Example: rpm_build.sh --all --kernel  (Builds everything but the kernel)
	--nopputoolchain	Does not build pputoolchain
	--nosputoolchain	Does not build sputoolchain
	--nosputools	Does not build SPU tools
	--nocrashspu	Does not build Crash SPU commands
	--nonumactl	Does not build numactl
	--nonetpbm	Does not build netpbm
	--nolibspe	Does not build libspe
	--nolibspe2	Does not build libspe2
	--nooprofile	Does not build oprofile
	--nosysroot	Does not build sysroot
  
2 Remember that you need each src rpm installed on the system where you are building.

Notes:

  • When building on a ppc64 box, the binary rpms of each component that is being built will be copied to /usr/src/redhat/BUILD/PPC-F7/. The simulator sysroot image build process will install all the rpms that are in that directory in the sysroot image.
  • The simulator sysroot image built will download all the FC6 rpm packages that need to be installed in the sysroot image. If you are behind a firewall and you are not able to download from that machine, you should download them manually and copy them to the /usr/src/redhat/BUILD/PPC-F7/ directory before running the rpm_build.sh script. The list of FC7 rpms that you need is at /usr/src/redhat/SPECS/sysroot_image.noarch.spec
  • Before building the sysroot image file, rememeber to disable SELinux.