Building Centos Kernel; Setting Up Native Centos Development Environment; Building Ampere Computing Centos Kernel - Lenovo ThinkSystem HR330A User Manual And Hardware Maintenance Manual

Table of Contents

Advertisement

5. Building CentOS Kernel

5.1 Setting up Native CentOS Development Environment

First, install the necessary development packages (if not done already).
# yum groupinstall "Development Tools"
# yum install ncurses-devel
# yum install hmaccalc zlib-devel binutils-devel elfutils-devel libelf-devel newt-devel
python-devel
# yum install audit-libs-devel numactl-devel pciutils-devel openssl-devel
# yum install bc bison perl-ExtUtils-Embed.noarch xmlto asciidoc

5.2 Building Ampere Computing CentOS Kernel

Ampere Computing provides the Ampere Computing CentOS kernel source in SRPM package and patch forms. The SRPM package
allows the user to install and build the kernel immediately. The Ampere Computing CentOS patch is for users who wish to apply Ampere
Computing changes on top of CentOS vanilla kernel source and build instead.
Both SRPM and patch forms allow the user to build a generic Linux kernel based on default CentOS configuration, and an ILP32-
enabled Linux kernel with Ampere Computing's optimized configuration. While either CentOS native toolchain or Ampere Computing
toolchain can be used to build the generic kernel, the Ampere Computing toolchain is specifically required to compile the ILP32-enabled
kernel. Applications compilation, on the other hand, must use the default CentOS provided native toolchain.
Installing Ampere Computing Toolchain
If there is a need to recompile Ampere Computing CentOS kernel, follow the instructions below:
Refer to the appropriate Ampere Computing Release Notes for information about the latest Ampere Computing toolchain
1.
and download it.
Login to http://connect.amperecomputing.com
Go to http://connect.amperecomputing.com/products/pd/system-software
Click on Ampere eMAG Toolchain 9.0.7 to see the actual file
Click on amp-9.0.7-le-20170222-nativetools.tar.bz2 to start downloading it
Install the toolchain on the board.
2.
# mkdir -p /opt/amp/9.0.7-le
# tar --strip-components=1 -xf amp-9.0.7-le-20170222-nativetools.tar.bz2 -C /opt/amp/9.0.7-le
Set PATH to point to the Ampere Computing toolchain.
3.
$ export PATH=/opt/amp/9.0.7-le/usr/bin:$PATH;
$ which gcc
/opt/amp/9.0.7-le/usr/bin/gcc
Building Ampere Computing CentOS Kernel from SRPM
1.
Execute "uname –r"
It should show something similar to "4.14.0-49.el7.yymmdd+amp.aarch64" such as 4.14.0-
49.e17.170125+amp.aarch64
Obtain the matching SRPM kernel source package from the release. The name of the package should be similar to:
2.
amp_sw_centos_7.5-yymmdd.src.tar.xz or – this is the SRPM for the generic kernel
a)
b)
amp_sw_centos_7.5-yymmdd.ilp32-src.tar.xz – this is the SRPM for the ILP32 kernel
136

Advertisement

Table of Contents
loading

Table of Contents