The steps are similar to building a kernel on x86_64, make sure you have the dependencies for building packages installed. First you will need to grab your configuration file. Arch Linux allows you to do this from /proc/config.gz, as an example on your Pi run $this->bbcode_second_pass_code('', ' zcat /proc/config.gz > piconfig ') You will need to move and rename this later. You will need the realtime patch,
https://rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch Afterwards, download the kernel source from
https://www.kernel.org/ extract it to a build location and prepare it, move your config file to the build directory as .config, apply the RT patch. Then configure the kernel by running make menuconfig, make sure your preemption is set to RT, save, and afterwards build the kernel. You will have to do a little research on building the kernel for arm64, Basically you will need to run $this->bbcode_second_pass_code('', ' make Image Image.gz modules ') and you will also need to build the device tree blobs, which you can do with $this->bbcode_second_pass_code('', ' make DTC_FLAGS="-@" dtbs ') After everything is build, you will need to copy the files to your /boot location. If you plan on doing this often, I would recommend making a PKGBUILD so it is simplifies updating the kernel, and you will be able to install the kernels you build as packages and avoid manually copying the files each time. You could use an existing PKGBUILD from the AUR and modify it to suit your needs. You will need to build a new ramdisk after copying your files. As long as your image file name is not changed, you should be able to use mkinitcpio -P. You can also cross compile the kernel on an x86_64 to speed the process up dramatically, but it is more involved to figure out initially. If you don't have any experience building kernels, you will need to spend some time doing some research before you'll be able to pull this off. Lastly, once your kernel files are copied and it boots properly, be sure to know if you do not uninstall the linux-aarch64 package, when it updates it will replace your files. What are you trying to run on your Pi? Are you sure that you absolutely need a RT kernel?