Building Linux tip-of-tree on an Ampere based system

I have an Ampere Altra-Max/INGRASYS Yushan Server System running Centos 8 stream.

Because we are a chip manufacteror, we don’t sell end systems, we provide a reference platform that is a starting point for our customers to make a product. This leads to bizarre set of internal versus external names. One thing that you can rely on, however, is the identifier of the processor itself:

# cat /proc/cpuinfo 
processor	: 0
BogoMIPS	: 50.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x3
CPU part	: 0xd0c
CPU revision	: 1
...

TO make this readable, use the utility lscpu:

[root@eng14sys-r
111 ~]# lscpu 
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              80
On-line CPU(s) list: 0-79
Thread(s) per core:  1
Core(s) per socket:  80
Socket(s):           1
NUMA node(s):        1
Vendor ID:           ARM
BIOS Vendor ID:      Ampere(R)
Model:               1
Model name:          Neoverse-N1
BIOS Model name:     Ampere(R) Altra(R) Processor
Stepping:            r3p1
CPU max MHz:         3000.0000
CPU min MHz:         1000.0000
BogoMIPS:            50.00
L1d cache:           64K
L1i cache:           64K
L2 cache:            1024K
NUMA node0 CPU(s):   0-79
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs


I want to build the latest Linus-repo Linux Kernel and run it on the server. Here’s the steps I went through.

Since this was pretty much a clean install, I had none of the development tools installed, to include git. I’ll include here a couple other packages that I learned I needed later in the process. This is the set of successful commands I ended up running.

yum groupinstall "Development Tools"
yum install openssl-devel
yum install python3
yum install ncurses-devel #for menuconfig, which I didn't really need.
dnf config-manager --set-enabled "powertools"
yum install dwarves
git clone https://github.com/torvalds/linux
cd linux
export NPROC=`nproc`
yes "" | make oldconfig 

make -j $NPROC
make -j $NPROC modules
make modules_install
make install
grub2-mkconfig -o /boot/grub2/grub.cfg

Before a reboot I get

[root@eng14sys-r111 linux]# uname -mrs
Linux 4.18.0-365.el8.aarch64 aarch64

After a reboot my grub menu looks like this

      CentOS Stream (4.18.0-365.el8.aarch64) 8                                 
      CentOS Stream (4.18.0-348.el8.aarch64) 8                                 
      CentOS Stream (0-rescue-306ea476c3584adea2089f1980a56ca3) 8              
      System setup

At the start of the boot log I see

[    0.000000] Booting Linux on physical CPU 0x0000120000 [0x413fd0c1]
[    0.000000] Linux version 5.18.0+ (root@eng14sys-r111.scc-lab.amperecomputing.com) (gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-13), GNU ld version 2.30-114.el8) #2 SMP Wed May 25 08:33:07 PDT 2022

After boot and log in:

[root@eng14sys-r111 ~]# uname -a
Linux eng14sys-r111.scc-lab.amperecomputing.com 5.18.0+ #2 SMP Wed May 25 08:33:07 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.