Build Ampere CentOS Kernel

Personal Note

Install Necessary Packages

Install packages, it should have to install other packages like openssl-dev.

get package ampere-8.3.0-20191025-dynamic-nosysroot-nativetools.tar.xz from Ampere customer connect.

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
rpm –ivh kernel-4.18.0-80.11.2.el8.<version>.src.rpm


mkdir -p /opt/amp
tar -xf ampere-8.3.0-20191025-dynamic-nosysroot-nativetools.tar -C /opt/amp
export PATH=/opt/amp/ampere-8.3.0-20191025/bin:$PATH;
which gcc
/opt/amp/ampere-8.3.0-20191025/bin/gcc

if gcc is not in /opt/amp, please check your directory in /opt/amy

Build Kernel

command to build kernel

cd /root/rpmbuild/SOURCES/
tar xvf linux-4.18.0-80.11.2.el8_0.tar.xz
cd linux-4.18.0-80.11.2.el8_0
cp ../kernel-aarch64-emag.config .config
make oldconfig

Try build once and make sure everything is ok

make -j `nproc`

If buiild OK, generate RPM files.

make rpm-pkg

if everything is ok, the RPM files will be on /root/rpmbuild/RPMS/aarch64/

Install RPM packages

/root/rpmbuild/RPMS/aarch64
yum localinstall kernel-4.18.0-1.aarch64.rpm kernel-headers-4.18.0-1.aarch64.rpm

On this day..

Comments

comments

Related posts

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>