* add linux-sophgo-milkv
This commit is contained in:
parent
abefa24226
commit
d5de1b32c0
39
kernels/riscv64/linux-sophgo-milkv/.SRCINFO
Normal file
39
kernels/riscv64/linux-sophgo-milkv/.SRCINFO
Normal file
@ -0,0 +1,39 @@
|
||||
pkgbase = linux-sophgo
|
||||
pkgver = 6.8.12
|
||||
pkgrel = 1
|
||||
url = https://github.com/sophgo/linux-riscv
|
||||
arch = riscv64
|
||||
license = GPL2
|
||||
makedepends = bc
|
||||
makedepends = kmod
|
||||
makedepends = libelf
|
||||
makedepends = pahole
|
||||
makedepends = git
|
||||
options = !strip
|
||||
source = linux-riscv-sophgo::git+https://github.com/sophgo/linux-riscv.git?#commit=f907f5962d0bb2674b597cff9ae10849a4629d88
|
||||
source = config
|
||||
source = 0001-skip-i915-debugfs-code-when-disabled.patch
|
||||
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
|
||||
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
|
||||
validpgpkeys = A2FF3A36AAA56654109064AB19802F8B0D70FC30
|
||||
validpgpkeys = C7E7849466FE2358343588377258734B41C31549
|
||||
sha256sums = bdfefad5b998af5622344564a60624a369bfcd293ae399b6d21b83be21c18fb5
|
||||
sha256sums = 3a2def38f81df20c63be3a0af0d947fb5122f58b9a383fe1811d683d090314df
|
||||
|
||||
pkgname = linux-sophgo
|
||||
pkgdesc = The kernel and modules
|
||||
depends = coreutils
|
||||
depends = initramfs
|
||||
depends = kmod
|
||||
optdepends = wireless-regdb: to set the correct wireless channels of your country
|
||||
optdepends = linux-firmware: firmware images needed for some devices
|
||||
provides = KSMBD-MODULE
|
||||
provides = VIRTUALBOX-GUEST-MODULES
|
||||
provides = WIREGUARD-MODULE
|
||||
replaces = virtualbox-guest-modules-arch
|
||||
replaces = wireguard-arch
|
||||
|
||||
pkgname = linux-sophgo-headers
|
||||
pkgdesc = Headers and scripts for building modules for the kernel
|
||||
provides = linux-headers
|
||||
conflicts = linux-headers
|
@ -0,0 +1,55 @@
|
||||
From 439987f6f471c2d8c99e77d3aa75cda597796b9d Mon Sep 17 00:00:00 2001
|
||||
From: Jani Nikula <jani.nikula@intel.com>
|
||||
Date: Wed, 24 Jan 2024 11:05:15 +0200
|
||||
Subject: [PATCH] drm/xe: don't build debugfs files when CONFIG_DEBUG_FS=n
|
||||
|
||||
If we unconditionally build the debugfs files, we'll get both the static
|
||||
inline stubs from the headers and the real functions for
|
||||
CONFIG_DEBUG_FS=n. Avoid building the debugfs files with that config.
|
||||
|
||||
Reported-by: Randy Dunlap <rdunlap@infradead.org>
|
||||
Closes: https://lore.kernel.org/r/152521f9-119f-4c61-b467-3e91f4aecb1a@infradead.org
|
||||
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
||||
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
|
||||
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
|
||||
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
|
||||
Link: https://patchwork.freedesktop.org/patch/msgid/20240124090515.3363901-1-jani.nikula@intel.com
|
||||
---
|
||||
drivers/gpu/drm/xe/Makefile | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
|
||||
index fe8b266a981918..abb2be8268d0df 100644
|
||||
--- a/drivers/gpu/drm/xe/Makefile
|
||||
+++ b/drivers/gpu/drm/xe/Makefile
|
||||
@@ -222,8 +222,6 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
|
||||
i915-display/intel_ddi.o \
|
||||
i915-display/intel_ddi_buf_trans.o \
|
||||
i915-display/intel_display.o \
|
||||
- i915-display/intel_display_debugfs.o \
|
||||
- i915-display/intel_display_debugfs_params.o \
|
||||
i915-display/intel_display_device.o \
|
||||
i915-display/intel_display_driver.o \
|
||||
i915-display/intel_display_irq.o \
|
||||
@@ -267,7 +265,6 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
|
||||
i915-display/intel_modeset_setup.o \
|
||||
i915-display/intel_modeset_verify.o \
|
||||
i915-display/intel_panel.o \
|
||||
- i915-display/intel_pipe_crc.o \
|
||||
i915-display/intel_pmdemand.o \
|
||||
i915-display/intel_pps.o \
|
||||
i915-display/intel_psr.o \
|
||||
@@ -294,6 +291,13 @@ ifeq ($(CONFIG_DRM_FBDEV_EMULATION),y)
|
||||
xe-$(CONFIG_DRM_XE_DISPLAY) += i915-display/intel_fbdev.o
|
||||
endif
|
||||
|
||||
+ifeq ($(CONFIG_DEBUG_FS),y)
|
||||
+ xe-$(CONFIG_DRM_XE_DISPLAY) += \
|
||||
+ i915-display/intel_display_debugfs.o \
|
||||
+ i915-display/intel_display_debugfs_params.o \
|
||||
+ i915-display/intel_pipe_crc.o
|
||||
+endif
|
||||
+
|
||||
obj-$(CONFIG_DRM_XE) += xe.o
|
||||
obj-$(CONFIG_DRM_XE_KUNIT_TEST) += tests/
|
||||
|
198
kernels/riscv64/linux-sophgo-milkv/PKGBUILD
Normal file
198
kernels/riscv64/linux-sophgo-milkv/PKGBUILD
Normal file
@ -0,0 +1,198 @@
|
||||
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
||||
|
||||
#_tag="sg2042-dev-6.8.0"
|
||||
_commit="f907f5962d0bb2674b597cff9ae10849a4629d88"
|
||||
pkgbase=linux-sophgo
|
||||
pkgver=6.8.12
|
||||
pkgrel=1
|
||||
url="https://github.com/sophgo/linux-riscv"
|
||||
arch=(riscv64)
|
||||
license=(GPL2)
|
||||
makedepends=(
|
||||
bc kmod libelf pahole git
|
||||
)
|
||||
options=('!strip')
|
||||
_srcname=linux-riscv-sophgo
|
||||
source=(
|
||||
"${_srcname}::git+${url}.git?#commit=${_commit}"
|
||||
config
|
||||
0001-skip-i915-debugfs-code-when-disabled.patch
|
||||
)
|
||||
validpgpkeys=(
|
||||
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
|
||||
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
||||
'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig)
|
||||
'C7E7849466FE2358343588377258734B41C31549' # David Runge <dvzrv@archlinux.org>
|
||||
)
|
||||
sha256sums=('bdfefad5b998af5622344564a60624a369bfcd293ae399b6d21b83be21c18fb5'
|
||||
'3a2def38f81df20c63be3a0af0d947fb5122f58b9a383fe1811d683d090314df')
|
||||
|
||||
export KBUILD_BUILD_HOST=archpower
|
||||
export KBUILD_BUILD_USER=$pkgbase
|
||||
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
|
||||
|
||||
export MYARCH="riscv"
|
||||
|
||||
prepare() {
|
||||
cd ${_srcname}
|
||||
echo "Setting version..."
|
||||
echo "-$pkgrel" > localversion.10-pkgrel
|
||||
echo "${pkgbase#linux}" > localversion.20-pkgname
|
||||
|
||||
# fix mkinitcpio that can't cope with githashes in LOCALVERSION
|
||||
echo -n '' > .scmversion
|
||||
|
||||
local src
|
||||
for src in "${source[@]}"; do
|
||||
src="${src%%::*}"
|
||||
src="${src##*/}"
|
||||
[[ $src = *.patch ]] || continue
|
||||
echo "Applying patch $src..."
|
||||
patch -Np1 < "../$src"
|
||||
done
|
||||
|
||||
echo "Setting config..."
|
||||
cp ../config .config
|
||||
#echo "CONFIG_RISCV_ISA_ZICBOM=y" >> .config
|
||||
ARCH=${MYARCH} make oldconfig
|
||||
echo "Config done"
|
||||
|
||||
ARCH=${MYARCH} make -s kernelrelease > version
|
||||
echo "Prepared $pkgbase version $(<version)"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${_srcname}
|
||||
ARCH=${MYARCH} make all
|
||||
}
|
||||
|
||||
_package() {
|
||||
pkgdesc="The $pkgdesc kernel and modules"
|
||||
depends=(
|
||||
coreutils
|
||||
initramfs
|
||||
kmod
|
||||
)
|
||||
optdepends=(
|
||||
'wireless-regdb: to set the correct wireless channels of your country'
|
||||
'linux-firmware: firmware images needed for some devices'
|
||||
)
|
||||
provides=(
|
||||
KSMBD-MODULE
|
||||
VIRTUALBOX-GUEST-MODULES
|
||||
WIREGUARD-MODULE
|
||||
)
|
||||
replaces=(
|
||||
virtualbox-guest-modules-arch
|
||||
wireguard-arch
|
||||
)
|
||||
|
||||
cd $_srcname
|
||||
local modulesdir="$pkgdir/usr/lib/modules/$(<version)"
|
||||
|
||||
echo "Installing boot image..."
|
||||
# systemd expects to find the kernel here to allow hibernation
|
||||
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
|
||||
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
|
||||
|
||||
# Used by mkinitcpio to name the kernel
|
||||
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
|
||||
|
||||
echo "Installing modules..."
|
||||
ARCH=${MYARCH} \
|
||||
ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
|
||||
DEPMOD=/doesnt/exist modules_install # Suppress depmod
|
||||
|
||||
echo "Installing dtbs..."
|
||||
ARCH=${MYARCH} make INSTALL_DTBS_PATH="$pkgdir/usr/share/dtbs/$kernver" dtbs_install
|
||||
|
||||
# remove build link
|
||||
rm "$modulesdir"/build
|
||||
}
|
||||
|
||||
_package-headers() {
|
||||
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
|
||||
provides=('linux-headers')
|
||||
conflicts=('linux-headers')
|
||||
|
||||
cd ${_srcname}
|
||||
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/${MYARCH}" -m644 arch/${MYARCH}/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/${MYARCH}" -a arch/${MYARCH}/include
|
||||
install -Dt "$builddir/arch/${MYARCH}/kernel" -m644 arch/${MYARCH}/kernel/asm-offsets.s
|
||||
|
||||
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
|
||||
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
|
||||
|
||||
# http://bugs.archlinux.org/task/13146
|
||||
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||
|
||||
# http://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
|
||||
|
||||
echo "Installing KConfig files..."
|
||||
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
|
||||
|
||||
echo "Removing unneeded architectures..."
|
||||
local arch
|
||||
for arch in "$builddir"/arch/*/; do
|
||||
[[ $arch = */${MYARCH}/ ]] && 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 "Stripping vmlinux..."
|
||||
riscv64-unknown-linux-gnu-strip -v $STRIP_STATIC "$builddir/vmlinux"
|
||||
|
||||
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() {
|
||||
$(declare -f "_package${_p#$pkgbase}")
|
||||
_package${_p#$pkgbase}
|
||||
}"
|
||||
done
|
||||
|
||||
# vim:set ts=8 sts=2 sw=2 et:
|
8396
kernels/riscv64/linux-sophgo-milkv/config
Normal file
8396
kernels/riscv64/linux-sophgo-milkv/config
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user