Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys-kernel/asahi-kernel: Use gentoo-kernel's base config #75

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sys-kernel/asahi-kernel/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST asahi-kernel-6.6.0_p16.tar.gz 229861406 BLAKE2B e8f90373fe3cfb0ee8824158c59d548af05d1e68626715a65dcf086b35cfe7f4d44b184f02bbfad33474040b86f488e4fa99c8886ae329cf138933161658f94c SHA512 fc62cf346b95229aa31bc1483c9fcffaeacf94d09d13801a3e8e50ed3ba7f3d1b1d4dd8083051879955e1f99bffa61bf411cd38fcc45e176d372fc1d205b9c76
DIST kernel-aarch64-16k-fedora.config-6.6.0_p16 272164 BLAKE2B 27de91eb46c467015d18eac1fe3c96c71112caae73c9818ee4a5c476f57732e7a7b1fd18feaf008e61d1fc775e1b1cb32b32c0fdda3b3ebfeb8e6f7e79a34e6d SHA512 e4196f46f92e5c8d0e681d42fe6392ac2a150530a71e189d7abeff877c76a0a86c4619d794f181ea784f12ad0a1d1f6d639bbcd4209396436b03b5baa4d6998b
DIST gentoo-kernel-config-g11.tar.gz 5077 BLAKE2B dc17ded74f79baddd703a78084113b85e7130877b300b5fe60453cde515fe37c52ece7877049bb0ef384f74ecfc73d59d7d4a513f8fef7bf4f651599946383e8 SHA512 e91156765ef2a48396370f884fdecd7bb1d600e5167f6bad51130520f886e9198adae375adf3e40fa803abc5d5482057775fb0275ab2589bd8f94d8af4a03c4e
DIST kernel-aarch64-16k-fedora.config-6.6.3-414-gentoo 272164 BLAKE2B 27de91eb46c467015d18eac1fe3c96c71112caae73c9818ee4a5c476f57732e7a7b1fd18feaf008e61d1fc775e1b1cb32b32c0fdda3b3ebfeb8e6f7e79a34e6d SHA512 e4196f46f92e5c8d0e681d42fe6392ac2a150530a71e189d7abeff877c76a0a86c4619d794f181ea784f12ad0a1d1f6d639bbcd4209396436b03b5baa4d6998b
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ else
MY_TAG="$(ver_cut 5)"
MY_P="asahi-$(ver_cut 1-2)-${MY_TAG}"
fi
CONFIG_VER=6.6.3-414-gentoo
GENTOO_CONFIG_VER=g11

DESCRIPTION="Asahi Linux kernel sources"
HOMEPAGE="https://asahilinux.org"
KERNEL_URI="https://github.com/AsahiLinux/linux/archive/refs/tags/${MY_P}.tar.gz -> ${PN}-${PV}.tar.gz"
SRC_URI="${KERNEL_URI}
https://copr-dist-git.fedorainfracloud.org/cgit/@asahi/kernel/kernel.git/plain/kernel-aarch64-16k-fedora.config?id=be420b20d9a73b16a6ee7b6cdb34194efd89bb91 -> kernel-aarch64-16k-fedora.config-${PV}
https://github.com/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
-> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
https://copr-dist-git.fedorainfracloud.org/cgit/@asahi/kernel/kernel.git/plain/kernel-aarch64-16k-fedora.config?id=be420b20d9a73b16a6ee7b6cdb34194efd89bb91
-> kernel-aarch64-16k-fedora.config-${CONFIG_VER}
"

S="${WORKDIR}/linux-${MY_P}"
Expand All @@ -41,13 +46,19 @@ DEPEND="
>=dev-lang/rust-bin-1.72.0[rust-src,rustfmt]
)
dev-util/bindgen
dev-util/pahole
debug? ( dev-util/pahole )
"

PDEPEND="
=virtual/dist-kernel-${PV}
"

QA_FLAGS_IGNORED="
usr/src/linux-.*/scripts/gcc-plugins/.*.so
usr/src/linux-.*/vmlinux
usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
"

PATCHES=(
"${FILESDIR}/${P}-enable-speakers-stage1.patch"
"${FILESDIR}/${P}-enable-speakers-stage2.patch"
Expand All @@ -56,10 +67,33 @@ PATCHES=(

src_prepare() {
default
echo "-${MY_TAG}-dist" > localversion.10-pkgrel || die
cp "${DISTDIR}/kernel-aarch64-16k-fedora.config-${PV}" ".config" || die
echo 'CONFIG_LOCALVERSION=""' > "${T}/fakeversion.config"
kernel-build_merge_configs "${T}/fakeversion.config"

# prepare the default config
cp "${DISTDIR}/kernel-aarch64-16k-fedora.config-${CONFIG_VER}" ".config" || die

# localversion.05-asahi already appends "-asahi"
local myversion="-${MY_TAG}-dist"
echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"

local merge_configs=(
"${T}"/version.config
"${dist_conf_path}"/base.config
)
use debug || merge_configs+=(
"${dist_conf_path}"/no-debug.config
)

# deselect all non APPLE arm64 ARCHs
merge_configs+=(
"${FILESDIR}"/linux-$(ver_cut 1-2)_arm64_deselect_non_apple_arch.config
)
# adjust base config for Apple silicon systems
merge_configs+=(
"${FILESDIR}"/linux-$(ver_cut 1-2)_arch_apple_overrides.config
)

kernel-build_merge_configs "${merge_configs[@]}"
}

# Override kernel-install_pkg_preinst() to avoid ${PV}-as-release check
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## prefer simpledrm over frame buffer drivers
CONFIG_DRM_SIMPLEDRM=y
# CONFIG_FB_EFI is not set
# CONFIG_FB_VESA is not set

## enable EFI_ZBOOT for systemd-boot support
CONFIG_EFI_ZBOOT=y

## no ACPI on Apple silicon systems
# CONFIG_ACPI_EXTLOG is not set
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# CONFIG_ARCH_ACTIONS is not set
# CONFIG_ARCH_SUNXI is not set
# CONFIG_ARCH_ALPINE is not set
# CONFIG_ARCH_BCM is not set
# CONFIG_ARCH_BCM2835 is not set
# CONFIG_ARCH_BCM_IPROC is not set
# CONFIG_ARCH_BCMBCA is not set
# CONFIG_ARCH_BRCMSTB is not set
# CONFIG_ARCH_BERLIN is not set
# CONFIG_ARCH_BITMAIN is not set
# CONFIG_ARCH_EXYNOS is not set
# CONFIG_ARCH_SPARX5 is not set
# CONFIG_ARCH_K3 is not set
# CONFIG_ARCH_LG1K is not set
# CONFIG_ARCH_HISI is not set
# CONFIG_ARCH_KEEMBAY is not set
# CONFIG_ARCH_MEDIATEK is not set
# CONFIG_ARCH_MESON is not set
# CONFIG_ARCH_MVEBU is not set
# CONFIG_ARCH_NXP is not set
# CONFIG_ARCH_LAYERSCAPE is not set
# CONFIG_ARCH_MXC is not set
# CONFIG_ARCH_S32 is not set
# CONFIG_ARCH_MA35 is not set
# CONFIG_ARCH_NPCM is not set
# CONFIG_ARCH_QCOM is not set
# CONFIG_ARCH_REALTEK is not set
# CONFIG_ARCH_RENESAS is not set
# CONFIG_ARCH_ROCKCHIP is not set
# CONFIG_ARCH_SEATTLE is not set
# CONFIG_ARCH_INTEL_SOCFPGA is not set
# CONFIG_ARCH_STM32 is not set
# CONFIG_ARCH_SYNQUACER is not set
# CONFIG_ARCH_TEGRA is not set
# CONFIG_ARCH_SPRD is not set
# CONFIG_ARCH_THUNDER is not set
# CONFIG_ARCH_THUNDER2 is not set
# CONFIG_ARCH_UNIPHIER is not set
# CONFIG_ARCH_VEXPRESS is not set
# CONFIG_ARCH_VISCONTI is not set
# CONFIG_ARCH_XGENE is not set
# CONFIG_ARCH_ZYNQMP is not set
Loading