kernel build script for latest mainline manjaro kernel
#1
greetings,

included is a kernel build script for debian-based systems (and you can modify for other systems easily... ).

this fetches the tsys/manjaro *v5.5* branch from the manjaro git, applies a config of your choice, preps, builds, and debianizes a custom kernel. build time is about 90min for the pbp. i actually crossbuilt my kernel and will have a script for that shortly. crossbuilding on my old i7 was 20min.

you can also choose any branch in the manjaro git by changing the VAR.

note my warning regarding arm64 erratum 1319367 - big cores disabled if configured:
https://forum.pine64.org/showthread.php?...0#pid58700

enjoy!

p.s.1 if you require additional package requirements please add those in your reply and i'll add to the script for others to benefit.

p.s.2 success reports and/or feedback welcome.

dependencies
Quote:sudo apt-get -y  install ncurses-dev make kernel-package build-essential git wget

build script
Quote:#!/bin/sh

### v0.20200130.1438
### COMPILE PBP KERNEL FROM MANJARO GIT

# VARS
DEVDIR=~/Development/UPSTREAM/PBP
GITTREE=linux-pinebook-pro
GITBRANCH=v5.5
PKGDIR=$DEVDIR/$GITTREE

# GIT CLONE
mkdir -p $DEVDIR;
cd $DEVDIR;
git clone --depth=1 --branch=$GITBRANCH https://gitlab.manjaro.org/tsys/$GITTREE.git;

# GIT UPDATE (RERUN)
cd $PKGDIR;
git clean -f && git reset --hard && git pull;

# CLEAN (RERUN)
make mrproper;

# USE DEFCONFIG
# if you want to reconfigure for some reason...
# cp arch/arm64/configs/pinebook_pro_defconfig .config;

# USE DANIELT CONFIG
# rm zbnV33Ey;
# wget https://pastebin.com/raw/zbnV33Ey;
# mv zbnV33Ey .config;

# USE XMIXAHLX CONFIG
# if you want (less) work in make oldconfig
# 5.5-rc7: iALkBwDi
# 5.5: 88HC0d6e
rm 88HC0d6e;
wget https://pastebin.com/raw/88HC0d6e;
mv 88HC0d6e .config;

# OLDCONFIG
# important: do NOT enable ARM64_ERRATUM_1319367 or your big cores won't work!
# you should see in your processed config: # CONFIG_ARM64_ERRATUM_1319367 is not set
make oldconfig;

# MAKE MENUCONFIG (MOSTLY OPTIONAL)
# you probably want to change LOCALVERSION under General to something else
make menuconfig;

# BUILD
make -j6 INITRD=yes KBUILD_IMAGE=arch/arm64/boot/Image bindeb-pkg;

# EXIT
exit

# INSTALL
# sudo dpkg -i linux-image*.deb
# reboot
# enjoy
  Reply
#2
v5.5 branch working well. script updated. thank you @tsys !

Linux pbp-deb-arm64-emmc 5.5.0-1-pinebookpro-arm64-custom+ #1 SMP PREEMPT Thu Jan 30 13:38:40 PST 2020 aarch64 GNU/Linux
  Reply
#3
crosscompile pbp kernel script:
Quote:#!/bin/sh

### v0.20200216.1614
### CROSSCOMPILE PBP KERNEL
###
### execute in clean kernel source directory after
### placing your .config and applying any patches

## VARS
BUILDCONFIG="ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu-"
KERNELCONFIG="INITRD=yes KBUILD_IMAGE=arch/arm64/boot/Image"
GCCARMDIR=/usr/local/linaro-arm-gcc9
NPROC=10
TCPU=cortex-a72.cortex-a53
TOPTS=+crypto+crc
TARCH=armv8-a

## USE LINARO ARM GCC
## https://developer.arm.com/tools-and-soft.../downloads
## https://developer.arm.com/-/media/Files/...gnu.tar.xz
## untar to GCCARMDIR
export PATH=$GCCARMDIR/bin:$PATH &&\

## CONFIGURE
make -j $NPROC $BUILDCONFIG oldconfig &&\
make -j $NPROC $BUILDCONFIG menuconfig &&\

## BUILD
KCFLAGS="-O2 -pipe -march=$TARCH$TOPTS -mcpu=$TCPU -mtune=$TCPU" \
KCPPFLAGS="-O2 -pipe -march=$TARCH$TOPTS -mcpu=$TCPU -mtune=$TCPU" \
make -j $NPROC $BUILDCONFIG $KERNELCONFIG bindeb-pkg;

## EXIT
exit
  Reply
#4
a note about big cores: you can either disable the noted erratum, or remove maxcpus=4 from your u-boot defaults.
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  mesa-git build script for latest panfrost xmixahlx 22 1,080 02-27-2020, 04:20 PM
Last Post: xmixahlx
  full disk encryption with luks on manjaro xfce limxr 8 466 02-19-2020, 08:03 AM
Last Post: as400
  sway-git build script for latest wayland wm xmixahlx 1 194 02-13-2020, 04:19 AM
Last Post: alxndr.psclt
  How to boot Manjaro from NVME with uboot on eMMC as400 39 964 01-30-2020, 02:23 AM
Last Post: mamboman777
  openarena build script xmixahlx 2 103 01-29-2020, 04:05 PM
Last Post: xmixahlx
  How to get kernel boot messages on screen on Manjaro as400 2 160 01-23-2020, 04:35 PM
Last Post: as400
  Manjaro: Enable Natural Scrolling (Reverse scrolling direction) kiddailey 0 132 01-22-2020, 08:10 PM
Last Post: kiddailey
Music working play/pause media keys in Manjaro KDE clover 0 123 01-14-2020, 06:46 PM
Last Post: clover
  Adjust brightness of backlight i3w-Manjaro Gerhard 0 130 01-05-2020, 04:06 PM
Last Post: Gerhard
  i3blocks Manjaro battery status script Gerhard 0 184 01-05-2020, 02:35 PM
Last Post: Gerhard

Forum Jump:


Users browsing this thread: 1 Guest(s)