Initial commit
This commit is contained in:
commit
6df76dd360
44
.SRCINFO
Normal file
44
.SRCINFO
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
pkgbase = linux-ayn-odin2-stable
|
||||||
|
pkgver = 6.8.0.cc6089c03c04
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://github.com/edk2-porting/linux-next/
|
||||||
|
arch = aarch64
|
||||||
|
license = GPL2
|
||||||
|
makedepends = xmlto
|
||||||
|
makedepends = docbook-xsl
|
||||||
|
makedepends = kmod
|
||||||
|
makedepends = inetutils
|
||||||
|
makedepends = bc
|
||||||
|
makedepends = git
|
||||||
|
makedepends = uboot-tools
|
||||||
|
makedepends = dtc
|
||||||
|
options = !strip
|
||||||
|
source = git+https://gitea.classfun.cn:4443/renegade-project/linux-next.git#branch=ci/odin2/stable
|
||||||
|
source = linux.preset
|
||||||
|
source = linux.install
|
||||||
|
source = 60-linux.hook
|
||||||
|
source = 90-linux.hook
|
||||||
|
md5sums = SKIP
|
||||||
|
md5sums = 86d4a35722b5410e3b29fc92dae15d4b
|
||||||
|
md5sums = 9c795aa7ae26de6c214c20e878ee61bf
|
||||||
|
md5sums = 0a5f16bfec6ad982a2f6782724cca8ba
|
||||||
|
md5sums = 3dc88030a8f2f5a5f97266d99b149f77
|
||||||
|
sha1sums = SKIP
|
||||||
|
sha1sums = 937f93aa6d1a14babea9ff7de12aa2c73763e675
|
||||||
|
sha1sums = cf150e02705c4ba0af34886e50e40e266dd22039
|
||||||
|
sha1sums = 0fb7ac9f742f3b7dec37c2778e1830b8ce588f1b
|
||||||
|
sha1sums = 3b0160191978ebd905891211ef8abe1c17dab9ad
|
||||||
|
sha256sums = SKIP
|
||||||
|
sha256sums = 66644820faa950a5fc59181f5aefcbed6d7ed652b29aee69979a2be2a032025d
|
||||||
|
sha256sums = c5d6f202fad3cb5e4842bc7d06ed7156ae4326d3d6fbf7439e3fbe2ad60514cc
|
||||||
|
sha256sums = 452b8d4d71e1565ca91b1bebb280693549222ef51c47ba8964e411b2d461699c
|
||||||
|
sha256sums = 71df1b18a3885b151a3b9d926a91936da2acc90d5e27f1ad326745779cd3759d
|
||||||
|
sha512sums = SKIP
|
||||||
|
sha512sums = a492aae17ee4a316ce03faf9f1b284b2529c485f4b092cc4a1f865a6c68d482fd356fd30efa296c116975a3bdf3922f5bf03912a8d0e76f4ab24aa6ab9f8c276
|
||||||
|
sha512sums = e0834ac1a5d67aff61c94c057b343b912cea2eae8563874f0938024fdc40d7ac528762a83b6a3117ef89dc787869e5ce10ec7329ba02eb46299e45b5a0a1ae6b
|
||||||
|
sha512sums = 6b57a66b870b2f525e2dedd8f224b89474fd4ec6ea18484b0a67a1a2b9a4fc95d025cac181504406ea42a35d6c1b184c0d4e38c92815022935fc55746c69c7c1
|
||||||
|
sha512sums = b2cdb620fcc6f0b430b0cf0c844887c2c1e290844ea330750cad52c9ec04e835ead973b664c7613d147037c388120affe97dfd2f2e0f9ae224db52aaa4cb8814
|
||||||
|
|
||||||
|
pkgname = linux-ayn-odin2-stable
|
||||||
|
|
||||||
|
pkgname = linux-ayn-odin2-stable-headers
|
54
.gitignore
vendored
Normal file
54
.gitignore
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
*.rej
|
||||||
|
*.orig
|
||||||
|
*.swp
|
||||||
|
*.save*
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
*.out
|
||||||
|
*.lib
|
||||||
|
*.obj
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.exe
|
||||||
|
*.gch
|
||||||
|
*.plist
|
||||||
|
*.mo
|
||||||
|
*.gmo
|
||||||
|
*.fd
|
||||||
|
*.iso
|
||||||
|
*.img
|
||||||
|
*.img.*
|
||||||
|
*.qcow2
|
||||||
|
*.vhd
|
||||||
|
*.vdi
|
||||||
|
*.vmdk
|
||||||
|
*.cpio
|
||||||
|
*.cpio.*
|
||||||
|
*.ttf
|
||||||
|
*.ttc
|
||||||
|
*.pcf
|
||||||
|
*.pcf.*
|
||||||
|
*.efi
|
||||||
|
*.pkg.tar.*
|
||||||
|
vgcore.*
|
||||||
|
/build*
|
||||||
|
initramfs*.*
|
||||||
|
initrd*.*
|
||||||
|
System.map*
|
||||||
|
/cmake-build-*
|
||||||
|
/.idea
|
||||||
|
/.vscode
|
||||||
|
/.cache
|
||||||
|
CMakeCache.txt
|
||||||
|
CMakeFiles
|
||||||
|
Makefile
|
||||||
|
cmake_install.cmake
|
||||||
|
node_modules
|
||||||
|
package.json
|
||||||
|
package-lock.json
|
||||||
|
fonts.scale
|
||||||
|
fonts.dir
|
||||||
|
/src
|
||||||
|
/pkg
|
||||||
|
/jenkins-utils
|
||||||
|
/linux-next
|
11
60-linux.hook
Normal file
11
60-linux.hook
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Trigger]
|
||||||
|
Type = File
|
||||||
|
Operation = Install
|
||||||
|
Operation = Upgrade
|
||||||
|
Operation = Remove
|
||||||
|
Target = usr/lib/modules/%KERNVER%/*
|
||||||
|
|
||||||
|
[Action]
|
||||||
|
Description = Updating %PKGBASE% module dependencies...
|
||||||
|
When = PostTransaction
|
||||||
|
Exec = /usr/bin/depmod %KERNVER%
|
11
90-linux.hook
Normal file
11
90-linux.hook
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Trigger]
|
||||||
|
Type = File
|
||||||
|
Operation = Install
|
||||||
|
Operation = Upgrade
|
||||||
|
Target = boot/Image
|
||||||
|
Target = usr/lib/initcpio/*
|
||||||
|
|
||||||
|
[Action]
|
||||||
|
Description = Updating %PKGBASE% initcpios...
|
||||||
|
When = PostTransaction
|
||||||
|
Exec = /usr/bin/mkinitcpio -p %PKGBASE%
|
200
PKGBUILD
Normal file
200
PKGBUILD
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
# Maintainer: BigfootACA <bigfoot@classfun.cn>
|
||||||
|
|
||||||
|
pkgbase=linux-ayn-odin2-stable
|
||||||
|
pkgver=6.8.0.cc6089c03c04
|
||||||
|
pkgrel=1
|
||||||
|
arch=(aarch64)
|
||||||
|
url="https://github.com/edk2-porting/linux-next/"
|
||||||
|
license=(GPL2)
|
||||||
|
makedepends=(
|
||||||
|
xmlto
|
||||||
|
docbook-xsl
|
||||||
|
kmod
|
||||||
|
inetutils
|
||||||
|
bc
|
||||||
|
git
|
||||||
|
uboot-tools
|
||||||
|
dtc
|
||||||
|
)
|
||||||
|
options=('!strip')
|
||||||
|
source=("git+https://gitea.classfun.cn:4443/renegade-project/linux-next.git#branch=ci/odin2/stable"
|
||||||
|
linux.preset
|
||||||
|
linux.install
|
||||||
|
60-linux.hook
|
||||||
|
90-linux.hook)
|
||||||
|
md5sums=('SKIP'
|
||||||
|
'86d4a35722b5410e3b29fc92dae15d4b'
|
||||||
|
'9c795aa7ae26de6c214c20e878ee61bf'
|
||||||
|
'0a5f16bfec6ad982a2f6782724cca8ba'
|
||||||
|
'3dc88030a8f2f5a5f97266d99b149f77')
|
||||||
|
sha1sums=('SKIP'
|
||||||
|
'937f93aa6d1a14babea9ff7de12aa2c73763e675'
|
||||||
|
'cf150e02705c4ba0af34886e50e40e266dd22039'
|
||||||
|
'0fb7ac9f742f3b7dec37c2778e1830b8ce588f1b'
|
||||||
|
'3b0160191978ebd905891211ef8abe1c17dab9ad')
|
||||||
|
sha256sums=('SKIP'
|
||||||
|
'66644820faa950a5fc59181f5aefcbed6d7ed652b29aee69979a2be2a032025d'
|
||||||
|
'c5d6f202fad3cb5e4842bc7d06ed7156ae4326d3d6fbf7439e3fbe2ad60514cc'
|
||||||
|
'452b8d4d71e1565ca91b1bebb280693549222ef51c47ba8964e411b2d461699c'
|
||||||
|
'71df1b18a3885b151a3b9d926a91936da2acc90d5e27f1ad326745779cd3759d')
|
||||||
|
sha512sums=('SKIP'
|
||||||
|
'a492aae17ee4a316ce03faf9f1b284b2529c485f4b092cc4a1f865a6c68d482fd356fd30efa296c116975a3bdf3922f5bf03912a8d0e76f4ab24aa6ab9f8c276'
|
||||||
|
'e0834ac1a5d67aff61c94c057b343b912cea2eae8563874f0938024fdc40d7ac528762a83b6a3117ef89dc787869e5ce10ec7329ba02eb46299e45b5a0a1ae6b'
|
||||||
|
'6b57a66b870b2f525e2dedd8f224b89474fd4ec6ea18484b0a67a1a2b9a4fc95d025cac181504406ea42a35d6c1b184c0d4e38c92815022935fc55746c69c7c1'
|
||||||
|
'b2cdb620fcc6f0b430b0cf0c844887c2c1e290844ea330750cad52c9ec04e835ead973b664c7613d147037c388120affe97dfd2f2e0f9ae224db52aaa4cb8814')
|
||||||
|
|
||||||
|
export KBUILD_BUILD_USER=ci KBUILD_BUILD_HOST=classfun.cn ARCH=arm64
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$srcdir/linux-next"
|
||||||
|
local VERSION="$(awk '$1=="VERSION"{print $3}' Makefile)"
|
||||||
|
local PATCHLEVEL="$(awk '$1=="PATCHLEVEL"{print $3}' Makefile)"
|
||||||
|
local SUBLEVEL="$(awk '$1=="SUBLEVEL"{print $3}' Makefile)"
|
||||||
|
local EXTRAVERSION="$(awk '$1=="EXTRAVERSION"{print $3}' Makefile)"
|
||||||
|
local COMMIT="$(git rev-parse --short=12 HEAD)"
|
||||||
|
EXTRAVERSION="${EXTRAVERSION//-/.}"
|
||||||
|
echo "${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}.${COMMIT}"
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$srcdir/linux-next"
|
||||||
|
git remote remove github &>/dev/null || true
|
||||||
|
git remote add github https://github.com/edk2-porting/linux-next
|
||||||
|
git pull github ci/odin2/stable
|
||||||
|
echo "Setting version..."
|
||||||
|
echo "-$pkgrel" > localversion.10-pkgrel
|
||||||
|
echo "${pkgbase#linux}" > localversion.20-pkgname
|
||||||
|
rm -f .config
|
||||||
|
make defconfig
|
||||||
|
make odin2.config
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$srcdir/linux-next"
|
||||||
|
make prepare
|
||||||
|
make -s kernelrelease > version
|
||||||
|
unset LDFLAGS
|
||||||
|
make ${MAKEFLAGS} Image Image.gz modules
|
||||||
|
make ${MAKEFLAGS} DTC_FLAGS="-@" dtbs
|
||||||
|
}
|
||||||
|
|
||||||
|
_package() {
|
||||||
|
pkgdesc="The Linux Kernel and modules - AYN Odin 2 (Qualcomm Snapdragon 8 Gen 2, QCS8550)"
|
||||||
|
depends=('coreutils' 'kmod' 'mkinitcpio>=0.7')
|
||||||
|
optdepends=('wireless-regdb: to set the correct wireless channels of your country')
|
||||||
|
provides=("linux=${pkgver}" "linux-aarch64" "WIREGUARD-MODULE")
|
||||||
|
conflicts=('linux' 'linux-aarch64' '')
|
||||||
|
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
||||||
|
install=linux.install
|
||||||
|
|
||||||
|
cd "$srcdir/linux-next"
|
||||||
|
local kernver="$(<version)"
|
||||||
|
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
|
||||||
|
|
||||||
|
echo "Installing boot image and dtbs..."
|
||||||
|
install -Dm644 arch/arm64/boot/Image{,.gz} -t "${pkgdir}/boot"
|
||||||
|
make INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs" dtbs_install
|
||||||
|
|
||||||
|
echo "Installing modules..."
|
||||||
|
make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install
|
||||||
|
|
||||||
|
# remove build and source links
|
||||||
|
rm "$modulesdir"/build
|
||||||
|
|
||||||
|
# sed expression for following substitutions
|
||||||
|
local _subst="
|
||||||
|
s|%PKGBASE%|${pkgbase}|g
|
||||||
|
s|%KERNVER%|${kernver}|g
|
||||||
|
"
|
||||||
|
# install mkinitcpio preset file
|
||||||
|
sed "${_subst}" ../linux.preset | install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||||
|
|
||||||
|
# install pacman hooks
|
||||||
|
sed "${_subst}" ../60-linux.hook | install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
|
||||||
|
sed "${_subst}" ../90-linux.hook | install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
|
||||||
|
}
|
||||||
|
|
||||||
|
_package-headers() {
|
||||||
|
pkgdesc="Header files and scripts for building modules for linux kernel - AYN Odin 2 (Qualcomm Snapdragon 8 Gen 2, QCS8550)"
|
||||||
|
provides=("linux-headers=${pkgver}")
|
||||||
|
conflicts=('linux-headers')
|
||||||
|
|
||||||
|
cd "$srcdir/linux-next"
|
||||||
|
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
|
||||||
|
|
||||||
|
echo "Installing build files..."
|
||||||
|
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
|
||||||
|
localversion.* version vmlinux
|
||||||
|
install -Dt "$builddir/kernel" -m644 kernel/Makefile
|
||||||
|
install -Dt "$builddir/arch/arm64" -m644 arch/arm64/Makefile
|
||||||
|
cp -t "$builddir" -a scripts
|
||||||
|
|
||||||
|
# add xfs and shmem for aufs building
|
||||||
|
mkdir -p "$builddir"/{fs/xfs,mm}
|
||||||
|
|
||||||
|
echo "Installing headers..."
|
||||||
|
cp -t "$builddir" -a include
|
||||||
|
cp -t "$builddir/arch/arm64" -a arch/arm64/include
|
||||||
|
install -Dt "$builddir/arch/arm64/kernel" -m644 arch/arm64/kernel/asm-offsets.s
|
||||||
|
mkdir -p "$builddir/arch/arm"
|
||||||
|
cp -t "$builddir/arch/arm" -a arch/arm/include
|
||||||
|
|
||||||
|
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
|
||||||
|
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
|
||||||
|
|
||||||
|
# https://bugs.archlinux.org/task/13146
|
||||||
|
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||||
|
|
||||||
|
# https://bugs.archlinux.org/task/20402
|
||||||
|
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
|
||||||
|
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
||||||
|
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
||||||
|
|
||||||
|
# https://bugs.archlinux.org/task/71392
|
||||||
|
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
|
||||||
|
|
||||||
|
echo "Installing KConfig files..."
|
||||||
|
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
|
||||||
|
|
||||||
|
echo "Removing unneeded architectures..."
|
||||||
|
local arch
|
||||||
|
for arch in "$builddir"/arch/*/; do
|
||||||
|
[[ $arch = */arm64/ || $arch == */arm/ ]] && continue
|
||||||
|
echo "Removing $(basename "$arch")"
|
||||||
|
rm -r "$arch"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Removing documentation..."
|
||||||
|
rm -r "$builddir/Documentation"
|
||||||
|
|
||||||
|
echo "Removing broken symlinks..."
|
||||||
|
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
|
||||||
|
|
||||||
|
echo "Removing loose objects..."
|
||||||
|
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
|
||||||
|
|
||||||
|
echo "Stripping build tools..."
|
||||||
|
local file
|
||||||
|
while read -rd '' file; do
|
||||||
|
case "$(file -bi "$file")" in
|
||||||
|
application/x-sharedlib\;*) # Libraries (.so)
|
||||||
|
strip -v $STRIP_SHARED "$file" ;;
|
||||||
|
application/x-archive\;*) # Libraries (.a)
|
||||||
|
strip -v $STRIP_STATIC "$file" ;;
|
||||||
|
application/x-executable\;*) # Binaries
|
||||||
|
strip -v $STRIP_BINARIES "$file" ;;
|
||||||
|
application/x-pie-executable\;*) # Relocatable binaries
|
||||||
|
strip -v $STRIP_SHARED "$file" ;;
|
||||||
|
esac
|
||||||
|
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
|
||||||
|
echo "Adding symlink..."
|
||||||
|
mkdir -p "$pkgdir/usr/src"
|
||||||
|
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
|
||||||
|
}
|
||||||
|
|
||||||
|
pkgname=("${pkgbase}" "${pkgbase}-headers")
|
||||||
|
for _p in ${pkgname[@]}; do
|
||||||
|
eval "package_${_p}() {
|
||||||
|
_package${_p#${pkgbase}}
|
||||||
|
}"
|
||||||
|
done
|
10
linux.install
Normal file
10
linux.install
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
post_upgrade() {
|
||||||
|
if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
|
||||||
|
echo "WARNING: /boot appears to be a separate partition but is not mounted."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
post_remove() {
|
||||||
|
rm -f boot/initramfs-linux.img
|
||||||
|
rm -f boot/initramfs-linux-fallback.img
|
||||||
|
}
|
10
linux.preset
Normal file
10
linux.preset
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# mkinitcpio preset file for the '%PKGBASE%' package
|
||||||
|
|
||||||
|
ALL_config="/etc/mkinitcpio.conf"
|
||||||
|
ALL_kver="%KERNVER%"
|
||||||
|
|
||||||
|
PRESETS=('default')
|
||||||
|
|
||||||
|
#default_config="/etc/mkinitcpio.conf"
|
||||||
|
default_image="/boot/initramfs-linux.img"
|
||||||
|
#default_options=""
|
Loading…
Reference in New Issue
Block a user