i will admit I used GPT to fix that function since it was giving me 0x57
instead of 0x55
for kernver 0x00010001
This commit is contained in:
parent
5a7e0b8ef7
commit
c0ffaa3967
@ -49,11 +49,11 @@ fn is_v0(context: &Vb2Context) -> bool {
|
|||||||
|
|
||||||
fn secdata_kernel_crc(context: &Vb2Context) -> u8 {
|
fn secdata_kernel_crc(context: &Vb2Context) -> u8 {
|
||||||
if is_v0(context) {
|
if is_v0(context) {
|
||||||
let size = std::mem::size_of::<Vb2SecdataKernelV0>() - 1; // Exclude crc8
|
let size = std::mem::size_of::<Vb2SecdataKernelV0>() - 1;
|
||||||
vb2_crc8(&context.secdata_kernel[0..size])
|
vb2_crc8(&context.secdata_kernel[0..size])
|
||||||
} else {
|
} else {
|
||||||
let struct_size = context.secdata_kernel[1] as usize;
|
let struct_size = context.secdata_kernel[1] as usize;
|
||||||
let offset = 3; // Offset for flags in V1
|
let offset = 3;
|
||||||
vb2_crc8(&context.secdata_kernel[offset..struct_size])
|
vb2_crc8(&context.secdata_kernel[offset..struct_size])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user