forked from ventoy/Ventoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the VTOY_LINUX_REMOUNT option for new linux kernel in intel 11th(…
…and later) gen CPU.
- Loading branch information
Showing
12 changed files
with
277 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
obj-m += dm_patch_ibt.o | ||
|
||
EXTRA_CFLAGS := -Wall -DVTOY_IBT -fcf-protection=branch -mindirect-branch-register | ||
|
||
dm_patch_ibt-objs := dmpatch.o | ||
|
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 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,65 @@ | ||
#!/bin/bash | ||
|
||
FTPIP=168.0.0.209 | ||
FTPUSR='a:a' | ||
|
||
rm -f dmpatch.c Makefile Makefile_IBT | ||
|
||
for f in dmpatch.c Makefile Makefile_IBT; do | ||
curl -s -u $FTPUSR ftp://$FTPIP/$f -o $f | ||
if [ -f $f ]; then | ||
echo "download $f OK ..." | ||
else | ||
echo "download $f FAILED ..." | ||
exit 1 | ||
fi | ||
done | ||
|
||
|
||
|
||
rm -f *.ko | ||
|
||
|
||
echo "build dm_patch.ko ..." | ||
rm -rf ./aa | ||
mkdir ./aa | ||
|
||
cp -a *.c aa/ | ||
cp -a Makefile aa/ | ||
|
||
cd /home/panda/linux-source-5.13.0 | ||
make modules M=/home/panda/build/aa/ | ||
strip --strip-debug /home/panda/build/aa/dm_patch.ko | ||
cd - | ||
|
||
cp -a aa/dm_patch.ko ./ | ||
|
||
|
||
|
||
echo "build dm_patch_ibt.ko ..." | ||
rm -rf ./aa | ||
mkdir ./aa | ||
|
||
cp -a *.c aa/ | ||
cp -a Makefile_IBT aa/Makefile | ||
|
||
cd /home/panda/linux-source-5.13.0 | ||
make modules M=/home/panda/build/aa/ | ||
strip --strip-debug /home/panda/build/aa/dm_patch_ibt.ko | ||
cd - | ||
|
||
cp -a aa/dm_patch_ibt.ko ./ | ||
|
||
rm -rf ./aa | ||
|
||
|
||
curl -s -T dm_patch.ko -u $FTPUSR ftp://$FTPIP/dm_patch_64.ko || exit 1 | ||
curl -s -T dm_patch_ibt.ko -u $FTPUSR ftp://$FTPIP/dm_patch_ibt_64.ko || exit 1 | ||
|
||
|
||
if [ -f ./dm_patch.ko -a -f ./dm_patch_ibt.ko ]; then | ||
echo -e "\n\n=============== SUCCESS =============\n\n" | ||
else | ||
echo -e "\n\n=============== FAILED ==============\n\n" | ||
fi | ||
|
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
Binary file not shown.
Binary file not shown.
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
Oops, something went wrong.