PINE64
Building custom kernel (5.11.x) for Manjaro? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Building custom kernel (5.11.x) for Manjaro? (/showthread.php?tid=13841)



Building custom kernel (5.11.x) for Manjaro? - ppafin - 05-07-2021

Just received my PBP and would like to rebuild kernel for Manjaro with some custom settings.

I just cannot find any pointers how I'm able to rebuild recent kernel and from what repo's (including patches)?


RE: Building custom kernel (5.11.x) for Manjaro? - Y_Y - 05-14-2021

(05-07-2021, 11:44 PM)ppafin Wrote: Just received my PBP and would like to rebuild kernel for Manjaro with some custom settings.

I just cannot find any pointers how I'm able to rebuild recent kernel and from what repo's (including patches)?

I currently have the kernel which came pre-installed on my new PBP:

Code:
Linux bp 5.12.2-2-MANJARO-ARM #1 SMP Sat May 8 20:04:09 UTC 2021 aarch64 GNU/Linux

I tried to rebuild the kernel using ABS, as documented here: https://wiki.archlinux.org/title/Kernel/Arch_Build_System and left most of the options unchanged (so that it should use the config of the current kernel. I end up with the following error during build

crypto/aegis128-neon-inner.c: In function ‘crypto_aegis128_init_neon’:
crypto/aegis128-neon-inner.c:150:3: error: incompatible types when initializing type ‘unsigned char’ using type ‘uin
t8x16_t
 150 |   k ^ vld1q_u8(const0),
     |   ^
crypto/aegis128-neon-inner.c:151:3: error: incompatible types when initializing type ‘unsigned char’ using type ‘uin
t8x16_t
 151 |   k ^ vld1q_u8(const1),
     |  



This seems to be a known bug in gcc (I'm using the 10.2.0 version from core) which is fixed in later version, so now I'm going to install gccjit and try again.

If anyone has any advice or questions I'd be pleased to hear them.


RE: Building custom kernel (5.11.x) for Manjaro? - Y_Y - 05-14-2021

By the way the gcc bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96377 and it seems like it was fixed in 10.3.


RE: Building custom kernel (5.11.x) for Manjaro? - generaleramon - 05-24-2021

Hey, i started to build the kernel from source too, and the cleanest way i found is to use the PKGBUILD provided by the ManjaroARM guys (https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/blob/master/PKGBUILD) and than add what you want in the script. I simply add commands in the build() section


RE: Building custom kernel (5.11.x) for Manjaro? - ppafin - 06-02-2021

Problem solved, built new kernel for pbp from mege's repository (https://github.com/megous/linux.git):

# Clone mege kernel
git clone https://github.com/megous/linux.git

# Set variables (using buildroot built toolchain)
CWD=`pwd`
OUT=$CWD/builds
mkdir -p $KBUILD_OUTPUT $OUT/pc2
export KBUILD_OUTPUT=$OUT/.tmp/linux-arm64
export PATH="$PATH:~/buildroot/output/host/bin"
export CROSS_COMPILE=aarch64-linux-
export ARCH=arm64

# Checkout orange-pi-x.xx branch
cd linux
git checkout orange-pi-5.13
cd ..

# Use 'pinebook_pro_defconfig' config
make -C linux pinebook_pro_defconfig

# NOTE: Check wifi blob before build
make -j5 -C linux clean
make -j5 -C linux Image dtbs

# Output
ls ~/builds/.tmp/linux-arm64/arch/arm64/boot
dts Image