mirror of
https://github.com/elseif/MikroTikPatch.git
synced 2025-01-23 05:25:00 +03:00
modified: patch.py
This commit is contained in:
parent
d1c7aed294
commit
3811e39409
6
patch.py
6
patch.py
@ -28,7 +28,11 @@ def patch_bzimage(data:bytes,key_dict:dict):
|
||||
new_vmlinux = vmlinux.replace(initramfs,new_initramfs)
|
||||
new_vmlinux_xz = lzma.compress(new_vmlinux,check=lzma.CHECK_CRC32,filters=[
|
||||
{"id": lzma.FILTER_X86},
|
||||
{"id": lzma.FILTER_LZMA2, "preset": 8,'dict_size': 32*1024*1024},
|
||||
{"id": lzma.FILTER_LZMA2,
|
||||
"preset": 9 | lzma.PRESET_EXTREME,
|
||||
'dict_size': 32*1024*1024,
|
||||
"lc": 4,"lp": 0, "pb": 0,
|
||||
},
|
||||
])
|
||||
new_payload_length = len(new_vmlinux_xz)
|
||||
assert new_payload_length <= payload_length , 'new vmlinux.xz size is too big'
|
||||
|
Loading…
Reference in New Issue
Block a user