This commit is contained in:
Fabio Belavenuto 2022-12-06 15:56:26 -03:00
parent 823ba20f1a
commit 55bdd9ff12
63 changed files with 56 additions and 10 deletions

View File

@ -1,3 +1,4 @@
epyc7002 5.10.55
bromolow 3.10.108
apollolake 4.4.180
broadwell 4.4.180
@ -6,4 +7,3 @@ denverton 4.4.180
geminilake 4.4.180
v1000 4.4.180
r1000 4.4.180
epyc7002 5.10.55

View File

@ -1131,7 +1131,7 @@ while true; do
x) cmdlineMenu; NEXT="i" ;;
i) synoinfoMenu; NEXT="d" ;;
d) make; NEXT="v" ;;
v) advancedMenu; NEXT="b" ;;
v) advancedMenu; NEXT="d" ;;
b) boot ;;
k) keymapMenu ;;
c) dialog --backtitle "`backtitle`" --title "Cleaning" --aspect 18 \

View File

@ -13,3 +13,4 @@ available-for:
geminilake-4.4.180:
v1000-4.4.180:
r1000-4.4.180:
epyc7002-5.10.55:

View File

@ -13,3 +13,4 @@ available-for:
geminilake-4.4.180:
v1000-4.4.180:
r1000-4.4.180:
epyc7002-5.10.55:

View File

@ -15,3 +15,4 @@ available-for:
geminilake-4.4.180:
v1000-4.4.180:
r1000-4.4.180:
epyc7002-5.10.55:

View File

@ -15,3 +15,4 @@ available-for:
geminilake-4.4.180:
v1000-4.4.180:
r1000-4.4.180:
epyc7002-5.10.55:

View File

@ -13,3 +13,4 @@ available-for:
geminilake-4.4.180:
v1000-4.4.180:
r1000-4.4.180:
epyc7002-5.10.55:

View File

@ -14,3 +14,4 @@ available-for:
geminilake-4.4.180:
v1000-4.4.180:
r1000-4.4.180:
epyc7002-5.10.55:

View File

@ -13,3 +13,4 @@ available-for:
geminilake-4.4.180:
v1000-4.4.180:
r1000-4.4.180:
epyc7002-5.10.55:

View File

@ -14,3 +14,4 @@ available-for:
geminilake-4.4.180:
v1000-4.4.180:
r1000-4.4.180:
epyc7002-5.10.55:

View File

@ -3,7 +3,6 @@ name: reducelog
description: "Addon to reduce DSM log"
all:
install-script: "install.sh"
copy: "all"
available-for:
bromolow-3.10.108:
apollolake-4.4.180:
@ -13,3 +12,4 @@ available-for:
geminilake-4.4.180:
v1000-4.4.180:
r1000-4.4.180:
epyc7002-5.10.55:

View File

@ -12,3 +12,4 @@ available-for:
geminilake-4.4.180:
v1000-4.4.180:
r1000-4.4.180:
epyc7002-5.10.55:

Binary file not shown.

Binary file not shown.

BIN
kpatch/kpatch Executable file

Binary file not shown.

View File

@ -60,6 +60,7 @@ void errorMsg(char *fmt, ...) {
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
fprintf(stderr, "\n");
exit(1);
}
@ -307,15 +308,39 @@ int main(int argc, char *argv[]) {
Elf_Scn *section;
GElf_Shdr sectionHeader;
char *sectionName;
char *fileIn = NULL, *fileOut = NULL;
int onlyBoot = 0, onlyRD = 0, onlyCMOS = 0, c;
if (argc != 3) {
errorMsg("Use: kpatch <vmlinux> <output>\n");
if (argc < 3) {
errorMsg("Use: kpatch (option) <vmlinux> <output>\nOptions:\n -b Only bootparams\n -r Only ramdisk\n -c Only CMOS");
}
c = 1;
while (c < argc) {
if (strcmp(argv[c], "-b") == 0) {
onlyBoot = 1;
} else if (strcmp(argv[c], "-r") == 0) {
onlyRD = 1;
} else if (strcmp(argv[c], "-c") == 0) {
onlyCMOS = 1;
} else if (fileIn == NULL) {
fileIn = argv[c];
} else {
fileOut = argv[c];
break;
}
++c;
}
if (NULL == fileIn) {
errorMsg("Please give a input filename");
}
if (NULL == fileOut) {
errorMsg("Please give a output filename");
}
if (elf_version(EV_CURRENT) == EV_NONE)
elfErrno();
if ((fd = open(argv[1], O_RDONLY)) == -1)
if ((fd = open(fileIn, O_RDONLY)) == -1)
errorNum();
if ((elfHandle = elf_begin(fd, ELF_C_READ, NULL)) == NULL)
@ -367,10 +392,22 @@ int main(int argc, char *argv[]) {
printf("Found .init.text offset @ %lX\n", initTextOffs);
printf("Found .rodata address @ %lX\n", rodataAddr);
printf("Found .rodata offset @ %lX\n", rodataOffs);
patchBootParams();
patchRamdiskCheck();
patchCmosWrite();
if ((fd = open(argv[2], O_WRONLY | O_CREAT, 0644)) == -1) {
if (onlyBoot == 0 && onlyCMOS == 0 && onlyRD == 0) {
patchBootParams();
patchRamdiskCheck();
patchCmosWrite();
} else {
if (onlyBoot == 1) {
patchBootParams();
}
if (onlyRD == 1) {
patchRamdiskCheck();
}
if (onlyCMOS == 1) {
patchCmosWrite();
}
}
if ((fd = open(fileOut, O_WRONLY | O_CREAT, 0644)) == -1) {
errorNum();
}
if (fileSize != write(fd, fileData, fileSize)) {