]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - DMPATCH/readme.txt
Fix the issue that VTOY_LINUX_REMOUNT option does not take effect in latest openSUSE...
[Ventoy.git] / DMPATCH / readme.txt
1 1. install ubuntu 22.04 5.15.0-25
2 2. apt-get install build-essential flex libncurses-dev linux-headers-generic linux-source libssl-dev bison yacc vim libelf-dev ...... and so on
3 3. cp /lib/modules/5.15.0-25-generic/build/Module.symvers ./
4 4. /boot/config-5.15.0-25-generic as .config make oldconfig
5 5. make menuconfig
6 1. close CONFIG_STACKPROTECTOR
7 2. close CONFIG_RETPOLINE
8 3. close CONFIG_UBSAN_BOUNDS
9 4. close CONFIG_UBSAN_ENUM
10
11 6. modify ./scripts/mod/modpost.c
12 1. skip add_srcversion (just return)
13 2. force add_retpoline (#ifdef --> #ifndef)
14 3. force add_intree_flag
15
16 7. make modules_prepare LOCALVERSION=-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
17
18 8. Append padding at the end of struct module <include/linux/module.h>
19 struct module {
20 enum module_state state;
21
22 /* Member of list of modules */
23 struct list_head list;
24
25 /* Unique handle for this module */
26 char name[MODULE_NAME_LEN];
27
28 ....
29
30 char padding[1024];
31 };
32
33 This is because struct module size is different in different kernel versions or with different CONFIG item.
34
35
36 9. make modules M=/home/dmpatch
37 10. strip --strip-debug /home/dmpatch/dm_patch.ko
38