Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 20, 2024
1 parent 75ff0da commit fa072d8
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 22 deletions.
49 changes: 31 additions & 18 deletions pkgbuild/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,36 @@
# Maintainer: Ray Sherwin <[email protected]>

pkgbase=linux-rpi4
_commit=3f11c402c97dbefd17632b8e11ea738c09117c0a
_commit=49679ed862ff4c05a3710882936182aa86354c13
_srcname=linux-${_commit}
_kernelname=${pkgbase#linux}
_desc="Raspberry Pi 4 64-bit kernel"
pkgver=6.6.60
pkgver=6.12.6
pkgrel=1
arch=('aarch64')
url="http://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'pahole' 'zstd')
options=('!strip')
source=("https://github.com/raspberrypi/linux/archive/${_commit}.tar.gz"
'config-diff-manjaro'
'linux.preset'
'logo_linux_clut224.ppm')
'logo_linux_clut224.ppm'
'config-diff-manjaro'
)

md5sums=('bb2c0947832865acd0ac34253ed52089'
'6060d79aa8e8bc8581da772b47bb8c1e'
md5sums=('76a38a5d92035db224057ccb5feaa6c9'
'38c88d6d573cef3309960a6162b7d3c7'
'7f7ddadea6f4a7d3017380cb83b95b5e'
'SKIP')

prepare() {
cd "${srcdir}/${_srcname}"
make bcm2711_defconfig
cat ../config-diff-manjaro >> .config

### Enable SCHED_EXT
scripts/config -e SCHED_CLASS_EXT

# add pkgrel to extraversion
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile

Expand Down Expand Up @@ -64,22 +68,23 @@ build() {
#msg "Stopping build"
#return 1
####################

#yes "" | make config

# LTO kernel compile
# make LLVM=1 LLVM_IAS=1 ${MAKEFLAGS} Image modules dtbs

make ${MAKEFLAGS} Image.gz modules dtbs
make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1
}

_package() {
pkgdesc="The Linux Kernel and modules - ${_desc}"
depends=('coreutils' 'kmod' 'initramfs' 'firmware-raspberrypi' 'raspberrypi-bootloader')
depends=('coreutils' 'kmod' 'initramfs' 'firmware-raspberrypi' 'raspberrypi-bootloader' 'scx-scheds')
optdepends=('wireless-regdb: Set the correct wireless channels of your country'
'linux-firmware: Extra firmware not provided by RPi or kernel')
provides=("linux=${pkgver}")
conflicts=('linux-rpi4-mainline' 'linux-rpi4-rc' 'uboot-raspberrypi')
conflicts=('linux-rpi4-mainline' 'linux-rpi4-rc')
install=${pkgname}.install
replaces=('linux-raspberrypi-latest')

cd "${srcdir}/${_srcname}"

KARCH=arm64
Expand All @@ -90,7 +95,8 @@ _package() {
_basekernel=${_basekernel%.*}

mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
# make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install

cp arch/$KARCH/boot/dts/broadcom/bcm2710-rpi-cm3.dtb "${pkgdir}/boot"
cp arch/$KARCH/boot/dts/broadcom/bcm2711-rpi-cm4.dtb "${pkgdir}/boot"
Expand All @@ -104,14 +110,14 @@ _package() {
cp arch/$KARCH/boot/Image.gz "${pkgdir}/boot/kernel8.img"

# make room for external modules
local _extramodules="extramodules-${_basekernel}-${_kernelname}"
local _extramodules="extramodules-${_basekernel}${_kernelname}"
ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"

# add real version for building modules and running depmod from hook
echo "${_kernver}" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version"

# remove build and source links
# remove build link
rm "${pkgdir}"/usr/lib/modules/${_kernver}/build

# now we call depmod...
Expand All @@ -137,22 +143,29 @@ _package() {
_package-headers() {
pkgdesc="Header files and scripts for building modules for linux kernel - ${_desc}"
provides=("linux-headers=${pkgver}")
conflicts=('linux-rpi4-mainline-headers' 'linux-rpi4-rc-headers')
replaces=('linux-raspberrypi-latest-headers')
depends=('pahole')
conflicts=('linux-rpi4-headers' 'linux-rpi4-rc-headers')

cd ${_srcname}
local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
mkdir -p ${_builddir}/tools/bpf/bpftool
mkdir -p ${_builddir}/tools/bpf/resolve_btfids

install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
cp tools/bpf/bpftool/vmlinux.h ${_builddir}/tools/bpf/bpftool/vmlinux.h
install -Dt "${_builddir}/kernel" -m644 kernel/Makefile

# required when DEBUG_INFO_BTF_MODULES is enabled
if [ -f tools/bpf/resolve_btfids/resolve_btfids ]; then
cp tools/bpf/resolve_btfids/resolve_btfids ${_builddir}/tools/bpf/resolve_btfids/resolve_btfids
fi

mkdir "${_builddir}/.tmp_versions"

cp -t "${_builddir}" -a include scripts

install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
# arch/$KARCH/kernel/module.lds

cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include

Expand Down
44 changes: 40 additions & 4 deletions pkgbuild/config-diff-manjaro
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ CONFIG_PGTABLE_LEVELS=4
# CONFIG_ARM64_VA_BITS_39 is not set
CONFIG_ARM64_VA_BITS_48=y
CONFIG_ARM64_VA_BITS=48
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
#CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
CONFIG_BLK_DEV_ZONED=y
CONFIG_BLK_WBT=y
CONFIG_BLK_WBT_MQ=y
Expand All @@ -31,6 +31,7 @@ CONFIG_FW_LOADER_COMPRESS=y
CONFIG_FW_LOADER_COMPRESS_XZ=y
# CONFIG_FW_LOADER_COMPRESS_ZSTD is not set
CONFIG_REGMAP_I2C=y
CONFIG_BLK_DEV_RBD=m
CONFIG_BCACHE=m
# CONFIG_BCACHE_DEBUG is not set
# CONFIG_BCACHE_CLOSURES_DEBUG is not set
Expand Down Expand Up @@ -60,7 +61,7 @@ CONFIG_F2FS_FS_LZ4=y
CONFIG_F2FS_FS_LZ4HC=y
CONFIG_F2FS_FS_ZSTD=y
CONFIG_ZONEFS_FS=m
# CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_CAMELLIA is not set
CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_CAMELLIA=y
CONFIG_CEPH_FSCACHE=y
CONFIG_CEPH_FS_POSIX_ACL=y
CONFIG_SMB_SERVER_KERBEROS5=y
Expand Down Expand Up @@ -91,6 +92,41 @@ CONFIG_CRYPTO_KDF800108_CTR=y
CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=m
CONFIG_LZ4_COMPRESS=y
CONFIG_LZ4HC_COMPRESS=y
# CONFIG_DEBUG_CLOSURES is not set
CONFIG_BTRFS_FS=y
CONFIG_MMC_HSQ=y
CONFIG_BCACHEFS_FS=y
# CONFIG_BCACHEFS_ERASURE_CODING is not set
# CONFIG_BCACHEFS_DEBUG is not set
# CONFIG_BCACHEFS_TESTS is not set
# CONFIG_BCACHEFS_LOCK_TIME_STATS is not set
# CONFIG_BCACHEFS_NO_LATENCY_ACCT is not set
CONFIG_BCACHEFS_SIX_OPTIMISTIC_SPIN=y
CONFIG_SECURITY_LANDLOCK=y
CONFIG_LSM="landlock"
CONFIG_LSM="landlock"
# CONFIG_DEBUG_INFO_NONE is not set
CONFIG_SCHED_CLASS_EXT=y
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT=y
CONFIG_DEBUG_INFO_BTF=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
CONFIG_BPF_LSM=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
# CONFIG_DEBUG_INFO_REDUCED is not set
CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
# CONFIG_DEBUG_INFO_COMPRESSED_ZSTD is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
CONFIG_DEBUG_INFO_BTF_MODULES=y
# CONFIG_MODULE_ALLOW_BTF_MISMATCH is not set
# CONFIG_GDB_SCRIPTS is not set
CONFIG_PROBE_EVENTS_BTF_ARGS=y
# CONFIG_DEBUG_EFI is not set
# CONFIG_MODULE_COMPRESS_NONE is not set
# CONFIG_MODULE_COMPRESS_GZIP is not set
# CONFIG_MODULE_COMPRESS_XZ is not set
CONFIG_MODULE_COMPRESS_ZSTD=y
CONFIG_BPF_EVENTS=y
CONFIG_FTRACE=y
17 changes: 17 additions & 0 deletions pkgbuild/linux-rpi4.install
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
_message() {
cat <<END

>>> Sched_ext has been enabled in this kernel.
If you want to test it see this link to get started:

https://forum.manjaro.org/t/raspberry-pi-kernels-2-0/84885/1145

END
}

post_install () {
# Define root partitions partuuid
PART_DEV=`findmnt / -o source -n | cut -f1 -d"["`
Expand Down Expand Up @@ -78,9 +89,13 @@ disable_splash=1
# This line should be remoed if the legacy DWC2 controller is required
otg_mode=1

[cm5]
dtoverlay=dwc2,dr_mode=host

[all]" > /boot/config.txt
fi

_message
}

post_upgrade () {
Expand Down Expand Up @@ -168,6 +183,8 @@ dtoverlay=dwc2,dr_mode=host

[all]" > /boot/config.txt
fi

_message
}

post_remove () {
Expand Down

0 comments on commit fa072d8

Please sign in to comment.