mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
core/linux-aarch64 to 5.15.13-1
This commit is contained in:
parent
1a6de3a588
commit
272b419cce
3 changed files with 39 additions and 72 deletions
|
@ -4,7 +4,6 @@ Operation = Install
|
||||||
Operation = Upgrade
|
Operation = Upgrade
|
||||||
Operation = Remove
|
Operation = Remove
|
||||||
Target = usr/lib/modules/%KERNVER%/*
|
Target = usr/lib/modules/%KERNVER%/*
|
||||||
Target = usr/lib/modules/%EXTRAMODULES%/*
|
|
||||||
|
|
||||||
[Action]
|
[Action]
|
||||||
Description = Updating %PKGBASE% module dependencies...
|
Description = Updating %PKGBASE% module dependencies...
|
||||||
|
|
|
@ -7,7 +7,7 @@ pkgbase=linux-aarch64
|
||||||
_srcname=linux-5.15
|
_srcname=linux-5.15
|
||||||
_kernelname=${pkgbase#linux}
|
_kernelname=${pkgbase#linux}
|
||||||
_desc="AArch64 multi-platform"
|
_desc="AArch64 multi-platform"
|
||||||
pkgver=5.15.5
|
pkgver=5.15.13
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
arch=('aarch64')
|
arch=('aarch64')
|
||||||
url="http://www.kernel.org/"
|
url="http://www.kernel.org/"
|
||||||
|
@ -26,19 +26,24 @@ source=("http://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz"
|
||||||
'60-linux.hook'
|
'60-linux.hook'
|
||||||
'90-linux.hook')
|
'90-linux.hook')
|
||||||
md5sums=('071d49ff4e020d58c04f9f3f76d3b594'
|
md5sums=('071d49ff4e020d58c04f9f3f76d3b594'
|
||||||
'532a136dcabc2a416afeaedc4108209f'
|
'930441d97e2edcd67e5fe2f05dec645d'
|
||||||
'21d3e833437461aed3b6ca68b5d8afa0'
|
'21d3e833437461aed3b6ca68b5d8afa0'
|
||||||
'd679f49645578a193d6e3c220787a40d'
|
'd679f49645578a193d6e3c220787a40d'
|
||||||
'2f0cb91f0749c9947ef8fcd5063e888a'
|
'21f9511feeeb0d06d2edf28a29bd059e'
|
||||||
'7c97cf141750ad810235b1ad06eb9f75'
|
'7c97cf141750ad810235b1ad06eb9f75'
|
||||||
'61c5ff73c136ed07a7aadbf58db3d96a'
|
'61c5ff73c136ed07a7aadbf58db3d96a'
|
||||||
'584777ae88bce2c5659960151b64c7d8'
|
'584777ae88bce2c5659960151b64c7d8'
|
||||||
'41cb5fef62715ead2dd109dbea8413d6'
|
'41cb5fef62715ead2dd109dbea8413d6'
|
||||||
'ce6c81ad1ad1f8b333fd6077d47abdaf'
|
'0a5f16bfec6ad982a2f6782724cca8ba'
|
||||||
'3dc88030a8f2f5a5f97266d99b149f77')
|
'3dc88030a8f2f5a5f97266d99b149f77')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd ${_srcname}
|
cd $_srcname
|
||||||
|
|
||||||
|
echo "Setting version..."
|
||||||
|
scripts/setlocalversion --save-scmversion
|
||||||
|
echo "-$pkgrel" > localversion.10-pkgrel
|
||||||
|
echo "${pkgbase#linux}" > localversion.20-pkgname
|
||||||
|
|
||||||
# add upstream patch
|
# add upstream patch
|
||||||
git apply --whitespace=nowarn ../patch-${pkgver}
|
git apply --whitespace=nowarn ../patch-${pkgver}
|
||||||
|
@ -48,12 +53,6 @@ prepare() {
|
||||||
git apply ../0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch
|
git apply ../0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch
|
||||||
|
|
||||||
cat "${srcdir}/config" > ./.config
|
cat "${srcdir}/config" > ./.config
|
||||||
|
|
||||||
# add pkgrel to extraversion
|
|
||||||
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile
|
|
||||||
|
|
||||||
# don't run depmod on 'make install'. We'll do this ourselves in packaging
|
|
||||||
sed -i '2iexit 0' scripts/depmod.sh
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
@ -61,26 +60,7 @@ build() {
|
||||||
|
|
||||||
# get kernel version
|
# get kernel version
|
||||||
make prepare
|
make prepare
|
||||||
|
make -s kernelrelease > version
|
||||||
# load configuration
|
|
||||||
# Configure the kernel. Replace the line below with one of your choice.
|
|
||||||
#make menuconfig # CLI menu for configuration
|
|
||||||
#make nconfig # new CLI menu for configuration
|
|
||||||
#make xconfig # X-based configuration
|
|
||||||
#make oldconfig # using old config from previous kernel version
|
|
||||||
# ... or manually edit .config
|
|
||||||
|
|
||||||
# Copy back our configuration (use with new kernel version)
|
|
||||||
#cp ./.config ../${pkgbase}.config
|
|
||||||
|
|
||||||
####################
|
|
||||||
# stop here
|
|
||||||
# this is useful to configure the kernel
|
|
||||||
#msg "Stopping build"
|
|
||||||
#return 1
|
|
||||||
####################
|
|
||||||
|
|
||||||
#yes "" | make config
|
|
||||||
|
|
||||||
# build!
|
# build!
|
||||||
unset LDFLAGS
|
unset LDFLAGS
|
||||||
|
@ -99,39 +79,24 @@ _package() {
|
||||||
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
||||||
install=${pkgname}.install
|
install=${pkgname}.install
|
||||||
|
|
||||||
cd ${_srcname}
|
cd $_srcname
|
||||||
|
local kernver="$(<version)"
|
||||||
|
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
|
||||||
|
|
||||||
KARCH=arm64
|
echo "Installing boot image and dtbs..."
|
||||||
|
install -Dm644 arch/arm64/boot/Image{,.gz} -t "${pkgdir}/boot"
|
||||||
# get kernel version
|
|
||||||
_kernver="$(make kernelrelease)"
|
|
||||||
_basekernel=${_kernver%%-*}
|
|
||||||
_basekernel=${_basekernel%.*}
|
|
||||||
|
|
||||||
mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
|
|
||||||
make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
|
|
||||||
make INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs" dtbs_install
|
make INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs" dtbs_install
|
||||||
cp arch/$KARCH/boot/Image{,.gz} "${pkgdir}/boot"
|
|
||||||
|
|
||||||
# make room for external modules
|
echo "Installing modules..."
|
||||||
local _extramodules="extramodules-${_basekernel}${_kernelname}"
|
make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install
|
||||||
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 and source links
|
||||||
rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
|
rm "$modulesdir"/{source,build}
|
||||||
|
|
||||||
# now we call depmod...
|
|
||||||
depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
|
|
||||||
|
|
||||||
# sed expression for following substitutions
|
# sed expression for following substitutions
|
||||||
local _subst="
|
local _subst="
|
||||||
s|%PKGBASE%|${pkgbase}|g
|
s|%PKGBASE%|${pkgbase}|g
|
||||||
s|%KERNVER%|${_kernver}|g
|
s|%KERNVER%|${kernver}|g
|
||||||
s|%EXTRAMODULES%|${_extramodules}|g
|
|
||||||
"
|
"
|
||||||
|
|
||||||
# install mkinitcpio preset file
|
# install mkinitcpio preset file
|
||||||
|
@ -150,13 +115,14 @@ _package-headers() {
|
||||||
provides=("linux-headers=${pkgver}")
|
provides=("linux-headers=${pkgver}")
|
||||||
conflicts=('linux-headers')
|
conflicts=('linux-headers')
|
||||||
|
|
||||||
cd ${_srcname}
|
cd $_srcname
|
||||||
local builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
|
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
|
||||||
|
|
||||||
echo "Installing build files..."
|
echo "Installing build files..."
|
||||||
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map vmlinux
|
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
|
||||||
|
localversion.* version vmlinux
|
||||||
install -Dt "$builddir/kernel" -m644 kernel/Makefile
|
install -Dt "$builddir/kernel" -m644 kernel/Makefile
|
||||||
install -Dt "$builddir/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
|
install -Dt "$builddir/arch/arm64" -m644 arch/arm64/Makefile
|
||||||
cp -t "$builddir" -a scripts
|
cp -t "$builddir" -a scripts
|
||||||
|
|
||||||
# add xfs and shmem for aufs building
|
# add xfs and shmem for aufs building
|
||||||
|
@ -164,8 +130,8 @@ _package-headers() {
|
||||||
|
|
||||||
echo "Installing headers..."
|
echo "Installing headers..."
|
||||||
cp -t "$builddir" -a include
|
cp -t "$builddir" -a include
|
||||||
cp -t "$builddir/arch/${KARCH}" -a arch/${KARCH}/include
|
cp -t "$builddir/arch/arm64" -a arch/arm64/include
|
||||||
install -Dt "$builddir/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
|
install -Dt "$builddir/arch/arm64/kernel" -m644 arch/arm64/kernel/asm-offsets.s
|
||||||
mkdir -p "$builddir/arch/arm"
|
mkdir -p "$builddir/arch/arm"
|
||||||
cp -t "$builddir/arch/arm" -a arch/arm/include
|
cp -t "$builddir/arch/arm" -a arch/arm/include
|
||||||
|
|
||||||
|
@ -189,7 +155,7 @@ _package-headers() {
|
||||||
echo "Removing unneeded architectures..."
|
echo "Removing unneeded architectures..."
|
||||||
local arch
|
local arch
|
||||||
for arch in "$builddir"/arch/*/; do
|
for arch in "$builddir"/arch/*/; do
|
||||||
[[ $arch = */${KARCH}/ || $arch == */arm/ ]] && continue
|
[[ $arch = */arm64/ || $arch == */arm/ ]] && continue
|
||||||
echo "Removing $(basename "$arch")"
|
echo "Removing $(basename "$arch")"
|
||||||
rm -r "$arch"
|
rm -r "$arch"
|
||||||
done
|
done
|
||||||
|
@ -233,8 +199,7 @@ _package-chromebook() {
|
||||||
|
|
||||||
mkdir -p "${pkgdir}/boot"
|
mkdir -p "${pkgdir}/boot"
|
||||||
|
|
||||||
KARCH=arm64
|
image=arch/arm64/boot/Image
|
||||||
image=arch/${KARCH}/boot/Image
|
|
||||||
|
|
||||||
chromeos_boards=(
|
chromeos_boards=(
|
||||||
'elm'
|
'elm'
|
||||||
|
@ -243,10 +208,10 @@ _package-chromebook() {
|
||||||
'trogdor'
|
'trogdor'
|
||||||
'asurada'
|
'asurada'
|
||||||
)
|
)
|
||||||
chromebook_dtbs=($(for b in ${chromeos_boards[@]}; do find arch/${KARCH}/boot -name "*${b}*.dtb" | LC_COLLATE=C sort; done))
|
chromebook_dtbs=($(for b in ${chromeos_boards[@]}; do find arch/arm64/boot -name "*${b}*.dtb" | LC_COLLATE=C sort; done))
|
||||||
|
|
||||||
lz4 -20 -z -f ${image}
|
lz4 -20 -z -f -m ${image}
|
||||||
echo ${chromebook_dtbs[@]} | ../generate_chromebook_its.sh ${image}.lz4 ${KARCH} lz4 > kernel.its
|
echo ${chromebook_dtbs[@]} | ../generate_chromebook_its.sh ${image}.lz4 arm64 lz4 > kernel.its
|
||||||
|
|
||||||
mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg
|
mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg
|
||||||
dd if=/dev/zero of=bootloader.bin bs=512 count=1
|
dd if=/dev/zero of=bootloader.bin bs=512 count=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#
|
#
|
||||||
# Automatically generated file; DO NOT EDIT.
|
# Automatically generated file; DO NOT EDIT.
|
||||||
# Linux/arm64 5.15.5-1 Kernel Configuration
|
# Linux/arm64 5.15.13 Kernel Configuration
|
||||||
#
|
#
|
||||||
CONFIG_CC_VERSION_TEXT="gcc (GCC) 10.2.0"
|
CONFIG_CC_VERSION_TEXT="gcc (GCC) 10.2.0"
|
||||||
CONFIG_CC_IS_GCC=y
|
CONFIG_CC_IS_GCC=y
|
||||||
|
@ -792,9 +792,9 @@ CONFIG_MODULE_UNLOAD=y
|
||||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||||
# CONFIG_MODULE_SIG is not set
|
# CONFIG_MODULE_SIG is not set
|
||||||
# CONFIG_MODULE_COMPRESS_NONE is not set
|
# CONFIG_MODULE_COMPRESS_NONE is not set
|
||||||
CONFIG_MODULE_COMPRESS_GZIP=y
|
# CONFIG_MODULE_COMPRESS_GZIP is not set
|
||||||
# CONFIG_MODULE_COMPRESS_XZ is not set
|
# CONFIG_MODULE_COMPRESS_XZ is not set
|
||||||
# CONFIG_MODULE_COMPRESS_ZSTD is not set
|
CONFIG_MODULE_COMPRESS_ZSTD=y
|
||||||
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
|
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
|
||||||
CONFIG_MODPROBE_PATH="/sbin/modprobe"
|
CONFIG_MODPROBE_PATH="/sbin/modprobe"
|
||||||
# CONFIG_TRIM_UNUSED_KSYMS is not set
|
# CONFIG_TRIM_UNUSED_KSYMS is not set
|
||||||
|
@ -3108,7 +3108,10 @@ CONFIG_NET_VENDOR_NETERION=y
|
||||||
# CONFIG_S2IO is not set
|
# CONFIG_S2IO is not set
|
||||||
# CONFIG_VXGE is not set
|
# CONFIG_VXGE is not set
|
||||||
CONFIG_NET_VENDOR_NETRONOME=y
|
CONFIG_NET_VENDOR_NETRONOME=y
|
||||||
# CONFIG_NFP is not set
|
CONFIG_NFP=m
|
||||||
|
CONFIG_NFP_APP_FLOWER=y
|
||||||
|
CONFIG_NFP_APP_ABM_NIC=y
|
||||||
|
# CONFIG_NFP_DEBUG is not set
|
||||||
CONFIG_NET_VENDOR_NI=y
|
CONFIG_NET_VENDOR_NI=y
|
||||||
# CONFIG_NI_XGE_MANAGEMENT_ENET is not set
|
# CONFIG_NI_XGE_MANAGEMENT_ENET is not set
|
||||||
CONFIG_NET_VENDOR_8390=y
|
CONFIG_NET_VENDOR_8390=y
|
||||||
|
|
Loading…
Reference in a new issue