137
3. Extract kernel source package:
4. Install the SRPM.
5. Build the kernel source.
6. Refer to the generic CentOS documentation and RPMBUILD manual on how rpmbuild should work.
Building Ampere Computing CentOS Kernel using Ampere Computing CentOS Patches
1. Clone ampere-centos-kernel
2. Checkout Ampere CentOS 7.5
3. Build Ampere CentOS RPM files
When the above steps are completed, the Ampere CentOS RPM files would be located at:
./amp_sw_centos_7.5-yymmdd.tar.xz ./amp_sw_centos_7.5-yymmdd.ilp32.tar.xz
Where yy is the last two digits of the year, mm is the digit of the month, and dd is the digit of the day. The
amp_sw_centos_7.5-yymmdd.tar.xz is the non-optimized version of the Ampere CentOS kernel. The
amp_sw_centos_7.5-yymmdd.ilp32.tar.xz is the optimized version of the Ampere CentOS kernel.
Building Applications SRPMs
Application builds need to use the CentOS native compiler instead of Ampere Computing native compiler.
Remove the Ampere Computing toolchain’s path from PATH and execute rpmbuild for the applications RPM package in the normal
manner.
$ cd ampere-centos-kernel
$ git checkout amp-centos-7.5-kernel
$ cd ../ampere-centos-build
$ git checkout amp-centos-7.5-build
$ cd ~/rpmbuild
$ ls
SOURCES/ SPECS/
$ rpmbuild --define "%_topdir `pwd`" –bb --without debuginfo --without perf --without tools
SPECS/kernel-xgene.spec
# To build ILP32 kernel, use the ilp32-src package and kernel-xgene-optimized.spec
$ rpmbuild --define "%_topdir `pwd`" –bb --without debuginfo --without perf --without tools
SPECS/kernel-xgene-optimized.spec
$ mkdir ampere-centos
$ cd ampere-centos
$ git clone https://github.com/AmpereComputing/ampere-centos-kernel
$ git clone https://github.com/AmpereComputing/ampere-centos-build