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

RFC: OMG! They ACTUALLY Made config.sh USEFUL?! (Recursive Patching UNLOCKED!) #68

Closed
wants to merge 7 commits into from
4 changes: 2 additions & 2 deletions .github/workflows/build-lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Install dependencies
id: dep
run: |
pacman -Syu --noconfirm pahole xmlto inetutils bc cpio jq llvm-git llvm-libs-git clang-git lld-git
pacman -Syu --noconfirm pahole xmlto inetutils bc cpio jq llvm llvm-libs clang lld

- name: Trust this directory
run: git config --global --add safe.directory '*' # v2.35.3 or later
Expand All @@ -53,7 +53,7 @@ jobs:
export CURL_UA="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"
export VERSION_BRANCH=$(curl -s https://xanmod.org/ -A $CURL_UA | grep -A1 LTS | grep -E '[0-9]+\.[0-9]+' -o | head -n1)
git clone https://github.com/xanmod/linux.git -b $VERSION_BRANCH --depth 1 linux
cd linux && ../config-lts.sh
cd linux && ../config.sh
scripts/config -d GENERIC_CPU3 # avoid override warning for duplicate arch flags
scripts/config -e ${{ matrix.arch }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Install dependencies
id: dep
run: |
pacman -Syu --noconfirm pahole xmlto inetutils bc cpio jq llvm-git llvm-libs-git clang-git lld-git ccache
pacman -Syu --noconfirm pahole xmlto inetutils bc cpio jq llvm llvm-libs clang lld ccache

- name: Trust this directory
run: git config --global --add safe.directory '*' # v2.35.3 or later
Expand Down
19 changes: 0 additions & 19 deletions config-lts.sh

This file was deleted.

47 changes: 31 additions & 16 deletions config.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
#
# Apply dxgkrnl patch
#
git apply ../0001-6.1.y-dxgkrnl.patch
git apply ../0002-dxgkrnl-enable-mainline-support.patch
git apply ../0003-bbrv3-fix-clang-build.patch
git apply ../0004-nf_nat_fullcone-fix-clang-uninitialized-var-werror.patch
git apply ../0005-drivers-hv-dxgkrnl-Remove-argument-in-eventfd_signal.patch
#!/bin/bash

PATCH_DIR="../patches"

# Loop through all patch files and apply them
# If the patch filename contains "skip_lts", patch will be ignored.
# The conditional will also check if the build is LTS before skipping and will peacefully ignore the skip tag if it is a non-LTS build.
# TODO(taalojarvi): Expand conditional check to cover skipping patches according to buildtype.
for patch_file in "$PATCH_DIR/"*.patch; do
if [[ ! "$patch_file" =~ _skip_lts ]]; then
echo -e "Applying patch: $patch_file"
git apply "$patch_file"
else
if [[ "$IS_LTS" = "NO" ]]; then
echo -e "Patch skip ignored as this is a non LTS build."
echo -e "Applying patch: $patch_file"
git apply "$patch_file"
else
echo -e "Skipping patch: $patch_file"
fi

fi

# Check for patch conflict (exit code 1)
if [ $? -eq 1 ]; then
echo -e "Patch conflict encountered in $patch_file"
echo -e "Halting build!"
exit 1
fi
done


if [ $? != 0 ]; then
echo "Patch conflict!"
exit 1 # so it can be catched by github action
fi

#
# generate .config
#
cp ../wsl2_defconfig ./arch/x86/configs/wsl2_defconfig
make LLVM=1 LLVM_IAS=1 wsl2_defconfig
make LLVM=1 LLVM_IAS=1 oldconfig

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
From 196681c8eb287df7dd2487f6bd264c09d27b89b3 Mon Sep 17 00:00:00 2001
From: Yang Jeong Hun <onyxclover9931@gmail.com>
Date: Tue, 16 Jul 2024 07:22:49 +0900
Subject: [PATCH] drivers: hv: dxgkrnl: Add missing include vmalloc header file

* Add missing <linux/vmalloc.h> header file to use vzalloc() and vfree().

Signed-off-by: Yang Jeong Hun <onyxclover9931@gmail.com>
---
drivers/hv/dxgkrnl/dxgadapter.c | 1 +
drivers/hv/dxgkrnl/dxgvmbus.c | 1 +
drivers/hv/dxgkrnl/hmgr.c | 1 +
drivers/hv/dxgkrnl/ioctl.c | 1 +
4 files changed, 4 insertions(+)

diff --git a/drivers/hv/dxgkrnl/dxgadapter.c b/drivers/hv/dxgkrnl/dxgadapter.c
index 6d3cabb24e6f3..0844ef064a4e3 100644
--- a/drivers/hv/dxgkrnl/dxgadapter.c
+++ b/drivers/hv/dxgkrnl/dxgadapter.c
@@ -15,6 +15,7 @@
#include <linux/hyperv.h>
#include <linux/pagemap.h>
#include <linux/eventfd.h>
+#include <linux/vmalloc.h>

#include "dxgkrnl.h"

diff --git a/drivers/hv/dxgkrnl/dxgvmbus.c b/drivers/hv/dxgkrnl/dxgvmbus.c
index abb6d2af89acc..59149b2969a46 100644
--- a/drivers/hv/dxgkrnl/dxgvmbus.c
+++ b/drivers/hv/dxgkrnl/dxgvmbus.c
@@ -19,6 +19,7 @@
#include <linux/mman.h>
#include <linux/delay.h>
#include <linux/pagemap.h>
+#include <linux/vmalloc.h>
#include "dxgkrnl.h"
#include "dxgvmbus.h"

diff --git a/drivers/hv/dxgkrnl/hmgr.c b/drivers/hv/dxgkrnl/hmgr.c
index 24101d0091ab3..528402a9ee491 100644
--- a/drivers/hv/dxgkrnl/hmgr.c
+++ b/drivers/hv/dxgkrnl/hmgr.c
@@ -14,6 +14,7 @@
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/rwsem.h>
+#include <linux/vmalloc.h>

#include "misc.h"
#include "dxgkrnl.h"
diff --git a/drivers/hv/dxgkrnl/ioctl.c b/drivers/hv/dxgkrnl/ioctl.c
index 42f3de31a63cb..d70a4b9153bce 100644
--- a/drivers/hv/dxgkrnl/ioctl.c
+++ b/drivers/hv/dxgkrnl/ioctl.c
@@ -17,6 +17,7 @@
#include <linux/anon_inodes.h>
#include <linux/mman.h>
#include <linux/pid_namespace.h>
+#include <linux/vmalloc.h>

#include "dxgkrnl.h"
#include "dxgvmbus.h"
Loading