As an update to this topic, I went ahead and submitted the second PR:
https://github.com/archlinuxarm/PKGBUILDs/pull/1950Building the kernel in the device, even with distcc, is ridiculously slow, so I decided to cross-compile the package in my main machine. Please note that this process is non-standard, and therefore
unsupported. That said it worked perfectly fine for me
First, clone
my fork of the PKGBUILDs repo:
$this->bbcode_second_pass_code('', '
$ git clone git@github.com:rmsc/PKGBUILDs-archlinuxarm.git -b odroid-m1 --sparse --depth=1 pkgbuilds-odroid-m1
')
Now move the linux-aarch64-rc package to
**outside** of the tree, otherwise all the
git apply commands will fail silently and you'll end up with a good-looking kernel that hangs mid-boot
$this->bbcode_second_pass_code('', '
$ mv pkgbuilds-odroid-m1/core/linux-aarch64-rc .
$ rm pkgbuilds-odroid-m1 -rf
')
Finally make sure you have the
aarch64-linux-gnu-gcc package installed, and just cross-compile the kernel:
$this->bbcode_second_pass_code('', '
$ cd linux-aarch64-rc
$ CARCH=aarch64 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- makepkg -cCAf
')
NOTE: The credit for this method of using makepkg for cross-compilation is not mine. It was proposed somewhere in this forum, but I can't find the original post or author.. will update if I do, and in any case kudos to him/her.
In the end you'll have three packages ready. You should install both the kernel and the headers, but ignore the chromebook one:
$this->bbcode_second_pass_code('', '
ls *.pkg.*
linux-aarch64-rc-6.1.rc1-1-aarch64.pkg.tar.zst
linux-aarch64-rc-headers-6.1.rc1-1-aarch64.pkg.tar.zst
linux-aarch64-rc-chromebook-6.1.rc1-1-aarch64.pkg.tar.zst
')