S
S
seiwer-tail2021-05-10 09:57:18
linux
seiwer-tail, 2021-05-10 09:57:18

How to find the memory offset for the kernel?

In general, I am modifying the kernel (porting Debian to the phone)

And I need to fill in these variables

KERNEL_BOOTIMAGE_PAGE_SIZE = 4096
KERNEL_BOOTIMAGE_BASE_OFFSET = 0x00000000
KERNEL_BOOTIMAGE_KERNEL_OFFSET = 0x00008000
KERNEL_BOOTIMAGE_INITRAMFS_OFFSET = 0x01000000
KERNEL_BOOTIMAGE_SECONDIMAGE_OFFSET = 0x00f00000
KERNEL_BOOTIMAGE_TAGS_OFFSET = 0x00000100


The porting guide says:
Вы можете найти смещения, посмотрев на дерево устройств Android или проверив уже построенный boot.img


And since I'm new to this business, I don't know how to check boot.img and find out the offsets.

Can anyone please tell me how to find out the offsets for variables from the already prepared boot.img?

Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
ValdikSS, 2021-05-10
@seiwer-tail

This information can be obtained from the boot.img header (the boot partition on the phone flash) with the android-unpackbootimg program.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question