Skip to content
Open
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
23 changes: 23 additions & 0 deletions .github/actions/setup-os/setup-cachyos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2024 Emil Velikov <emil.l.velikov@gmail.com>
# SPDX-FileCopyrightText: 2024 Lucas De Marchi <lucas.de.marchi@gmail.com>
#
# SPDX-License-Identifier: LGPL-2.1-or-later

# Semi-regularly the packager key may have (temporarily) expired. Somewhat
# robust solution is to wipe the local keyring and regenerate/reinstall it
# prior to any other packages on the system.
rm -rf /etc/pacman.d/gnupg
pacman-key --init
pacman-key --populate
pacman --noconfirm -Sy archlinux-keyring

pacman --noconfirm -Su \
clang \
git \
gtk-doc \
linux-cachyos-headers \
lld \
mbedtls \
meson \
scdoc
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@ jobs:
- container: 'archlinux:multilib-devel'
only_bits: '64'
only_compiler: 'clang'
custom: 'ldd-as-linker'
custom: 'lld-as-linker'
linker: 'lld'

# Variant with kernel built with clang
- container: 'cachyos/cachyos:latest'
only_bits: '64'
only_compiler: 'clang'
custom: 'clang-kernel'
linker: 'lld'

# Variants with moduledir
Expand Down
10 changes: 8 additions & 2 deletions testsuite/module-playground/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ else ifeq ($(KDIR),any)
KDIR := $(shell find $(MODULE_DIRECTORY) -maxdepth 1 -mindepth 1 -type d | sort -V | tail -n1)/build
endif

KERNEL_MAKE_ARGS := M=$$PWD
ifeq ($(origin LLVM), undefined)
KERNEL_MAKE_ARGS += $(shell grep -qs "^CONFIG_CC_IS_CLANG=y" "$(KDIR)/include/config/auto.conf" && printf 'LLVM=1')
KERNEL_MAKE_ARGS += CONFIG_DEBUG_INFO_BTF_MODULES=
endif

ARCH_SPECIFIC_MODULES := mod-simple-x86_64.ko mod-simple-i386.ko mod-simple-sparc64.ko

default: modules
Expand All @@ -28,9 +34,9 @@ mod-simple-%.ko: mod-simple-%.c Makefile.arch
$(MAKE) KDIR=$(KDIR_$(arch)) ARCH=$(arch) CROSS_COMPILE=$(CROSS_COMPILE_$(arch)) -f Makefile.arch

modules:
$(MAKE) -C $(KDIR) M=$$PWD modules
$(MAKE) -C $(KDIR) $(KERNEL_MAKE_ARGS) modules

arch-modules: $(ARCH_SPECIFIC_MODULES)

clean:
$(MAKE) -C $(KDIR) M=$$PWD clean
$(MAKE) -C $(KDIR) $(KERNEL_MAKE_ARGS) clean
Loading