K
K
Kirill2019-09-17 23:30:56
linux
Kirill, 2019-09-17 23:30:56

How to extract symvers from kernel?

I need to extract symvers from the kernel in order to assemble the module. I found a script for this https://github.com/glandium/extract-symvers (but as I understand it is written in python 2). Installed unbootimg , unpacked my kernel (boot.img), received 3 files including zImage. I found out the address (xs how to call 0xffffffc001374000) with this command adb shell dmesg | grep "\.init". And when I write the command

python extract-symvers.py -B 0xffffffc001374000 zImage > Module.symvers
, I get
Traceback (most recent call last):
  File "extract-symvers.py", line 139, in <module>
    main()
  File "extract-symvers.py", line 135, in main
    for s, crc, t in kernel.symbols():
  File "extract-symvers.py", line 102, in symbols
    for t, s in symsearch.items():
AttributeError: 'NoneType' object has no attribute 'items'

Versions of python Python 2.7.15+ and Python 3.6.8. Do I understand correctly, do I need to redo the code for Python 3?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2019-09-18
@jcmvbkbc

I need to extract symvers from the core to build the module.

This is you in continuation How to solve Android kernel compilation error? do you write?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question