Manjaro ARM on an Ampere Altra Server

Using the Ampere kernel defconfig and without a device-tree:

$ cat os-release

NAME="Manjaro-ARM"
ID="manjaro-arm"
ID_LIKE="manjaro arch"
PRETTY_NAME="Manjaro ARM"
ANSI_COLOR="1;32"
HOME_URL="https://www.manjaro.org/"
SUPPORT_URL="https://forum.manjaro.org/c/arm/"
LOGO=manjarolinux

$ inxi -Fz

System:    Kernel: 5.10.27AMPERE-AARCH64 aarch64 bits: 64 Console: pty pts/0 Distro: Manjaro ARM
Machine:   Type: Server System: WIWYNN product: Mt.Jade Server System B81.03001.0014 v: PVT serial: <filter>
           Mobo: WIWYNN model: Mt.Jade Motherboard v: B81.03010.0041 serial: <filter> UEFI: Ampere v: 1.4.20210223
           date: 2021/02/23
CPU:       Info: 160-Core (2-Die) model: N/A bits: 64 type: MCP MCM
           Speed: 2800 MHz min/max: 1000/2800 MHz Core speeds (MHz): 1: 2000 2: 2000 3: 2000 4: 2000 5: 2000 6: 2000 7: 2000
           8: 2000 9: 2000 10: 2000 11: 2000 12: 2000 13: 2000 14: 2000 15: 2000 16: 2000 17: 2000 18: 2000 19: 2000 20: 2000
           21: 2000 22: 2000 23: 2000 24: 2000 25: 2000 26: 2000 27: 2000 28: 2800 29: 2800 30: 2000 31: 2000 32: 2000
           33: 2800 34: 2000 35: 2000 36: 2000 37: 2800 38: 2550 39: 2800 40: 2000 41: 2800 42: 2543 43: 2000 44: 2000
           45: 2000 46: 2000 47: 2000 48: 2000 49: 2000 50: 2000 51: 2000 52: 2000 53: 2000 54: 2000 55: 2000 56: 2000
           57: 2000 58: 2000 59: 2000 60: 2000 61: 2000 62: 2000 63: 2000 64: 2000 65: 2792 66: 2000 67: 2000 68: 2000
           69: 2000 70: 2000 71: 2000 72: 2000 73: 2000 74: 2000 75: 2000 76: 2000 77: 2000 78: 2000 79: 2000 80: 2000
           81: 2000 82: 2000 83: 2000 84: 2676 85: 2000 86: 2000 87: 2000 88: 2000 89: 2000 90: 2000 91: 2800 92: 2000
           93: 2000 94: 2000 95: 2000 96: 2000 97: 2000 98: 2000 99: 2000 100: 2000 101: 2000 102: 2000 103: 2000 104: 2000
           105: 2000 106: 2000 107: 2000 108: 2000 109: 2000 110: 2000 111: 2000 112: 2000 113: 2000 114: 2000 115: 2000
           116: 2000 117: 2567 118: 2000 119: 2000 120: 2000 121: 2000 122: 2000 123: 2000 124: 2000 125: 2000 126: 2000
           127: 2000 128: 2800 129: 2000 130: 2000 131: 2000 132: 2000 133: 2000 134: 2000 135: 2000 136: 2000 137: 2000
           138: 2000 139: 2000 140: 2000 141: 2000 142: 2000 143: 2000 144: 2000 145: 2000 146: 2000 147: 2000 148: 2000
           149: 2000 150: 2000 151: 2000 152: 2000 153: 2000 154: 2000 155: 2000 156: 2000 157: 2000 158: 2000 159: 2000
           160: 2000
Graphics:  Device-1: ASPEED Graphics Family driver: ast v: kernel
           Display: server: X.org 1.20.13 driver: loaded: modesetting tty: 161x84
           Message: Advanced graphics data unavailable in console for root.
Audio:     Message: No device data found.
Network:   Device-1: Intel I210 Gigabit Network driver: igb
           IF: enP9p3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
           Device-2: American Megatrends Virtual Ethernet type: USB driver: cdc_ether
           IF: enP4p3s0u1u3c2 state: unknown speed: N/A duplex: N/A mac: <filter>
Drives:    Local Storage: total: 465.76 GiB used: 7.98 GiB (1.7%)
           ID-1: /dev/sda type: USB vendor: JMicron Tech model: Generic size: 465.76 GiB
Partition: ID-1: / size: 456.91 GiB used: 7.87 GiB (1.7%) fs: ext4 dev: /dev/sda2
           ID-2: /boot size: 456.8 MiB used: 103.8 MiB (22.7%) fs: vfat dev: /dev/sda1
Swap:      ID-1: swap-1 type: zram size: 93.58 GiB used: 0 KiB (0.0%) dev: /dev/zram0
Sensors:   Message: No sensor data found. Is lm-sensors configured?
Info:      Processes: 1383 Uptime: 25m Memory: 62.39 GiB used: 8.11 GiB (13.0%) Init: systemd Shell: Bash inxi: 3.3.08

… it will build the kernel in about 90 seconds.

1 Like

Very nice.

What image did you use as a base for that?

I used the Plasma RPI4 image, made with manjaro-arm-installer and booted it to finish the installation. I then built the kernel with RHEL8 that came with it to save time, and copied that over. Then booted on the rpi4 and installed grub with --removable, then built a new initramfs and ran grub-mkconfig. Finally, moved the drive to the server, and it booted right up.

Edit: I did make a couple of small modifications to manjaro-arm-installer, to make a gpt partition table rather than mbr for the “rpi4” and the boot partition to be formatted as fat32. I also used gparted to re-flag the partition as esp+boot.

2 Likes

Does the Red Hat kernel have some custom patches for that device.

Nothing Red Hat that I am aware of, as they also support Ubuntu and Debian. I used this branch with their defconfig.

I know Ampere has been big on upstreaming their stuff the last couple of years, so I wonder if a regular mainline kernel would work with their defconfig…

Also, 160 cores. WTF! :wink:

It looks like to me from looking at their last commit they may be doing like the RPi folks do; merge with upstream and have their own patches. I can not see in their last patch that drivers/firmware/altra_cpuectlr_el1.c exists in the upstream 5.10 kernel.

Yeah, looks like your right. That file does not seem to be in upstream yet.

0n0w1c, can you do me a favor and upload the data in the output file cpus.txt from your system to a pastebin service?

for i in $(ls /sys/devices/system/cpu/cpu*/{topology,cache/index*}/*);do echo -n "$i: ";cat $i;done > cpus.txt

I’m working on a large cpu data refactor for inxi and your system is almost exactly what I need to see in terms of how to deal with more complex scenarios.

Your system will roughly show me if what I’m thinking of doing will work fine for a cross platform solution, ARM/amd64 etc.

That command would be useful to see in any ARM system that has 2 types of cores as well.