-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RFC: OMG! They ACTUALLY Made config.sh USEFUL?! (Recursive Patching UNLOCKED!) #68 Changes to the PR: * use sub-folder in `patches/` to indicate MAIN/LTS spesific patches, instead of add "skip_lts" in patch's name * Add `-lts` CLI option for manual override (for testing locally) Co-authored-by: taalojarvi <sreedevan05@gmail.com>
- Loading branch information
1 parent
897cf2b
commit 37eb8d1
Showing
10 changed files
with
51 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,49 @@ | ||
# | ||
# Apply dxgkrnl patch | ||
# | ||
git apply ../0001-6.6.y-dxgkrnl.patch | ||
git apply ../0002-driver-hv-dxgkrnl-add-missing-vmalloc-header.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 | ||
|
||
if [ $? != 0 ]; then | ||
echo "Patch conflict!" | ||
exit 1 # so it can be catched by github action | ||
#!/bin/bash | ||
|
||
PATCH_DIR="../patches" | ||
|
||
IS_LTS_OVERRIDE=false | ||
|
||
# Check for -lts argument | ||
for arg in "$@"; do | ||
if [[ "$arg" == "-lts" ]]; then | ||
IS_LTS_OVERRIDE=true | ||
break | ||
fi | ||
# Xxx: other arguments | ||
done | ||
|
||
# Determine the patch directory | ||
if [[ $IS_LTS_OVERRIDE == true || "$IS_LTS" == "YES" ]]; then | ||
SPESIFIC_PATCH_DIR="../patches/LTS" | ||
else | ||
SPESIFIC_PATCH_DIR="../patches/MAIN" | ||
fi | ||
|
||
# | ||
# generate .config | ||
# | ||
function check_patch_error() { | ||
if [ $? -eq 1 ]; then | ||
echo -e "Patch conflict encountered in $patch_file" | ||
echo -e "Halting build!" | ||
exit 1 | ||
fi | ||
} | ||
|
||
# Apply common patches | ||
for patch_file in "$PATCH_DIR/"*.patch; do | ||
git apply "$patch_file" | ||
|
||
# Check for patch conflict (exit code 1) | ||
check_patch_error | ||
done | ||
|
||
# Apply specific patches | ||
for patch_file in "$SPESIFIC_PATCH_DIR/"*.patch; do | ||
git apply "$patch_file" | ||
|
||
# Check for patch conflict (exit code 1) | ||
check_patch_error | ||
done | ||
|
||
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
### Folder Structure | ||
|
||
* `.`: Patches applied to both MAIN and LTS builds | ||
* `MAIN`: Patches only applied to MAIN builds | ||
* `LTS`: Patches only applied to LTS builds |