Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't extract the dtb.img on google-blueline #33

Open
phodina opened this issue Jun 24, 2023 · 2 comments
Open

Can't extract the dtb.img on google-blueline #33

phodina opened this issue Jun 24, 2023 · 2 comments

Comments

@phodina
Copy link

phodina commented Jun 24, 2023

Hi,
I've attempted to extract the dtb out of the boot.img for google-blueline. I've used the https://mirrorbits.lineageos.org/full/blueline/20230620/boot.img

But after running the following commands I get an error

$ tools/unpackbootimg.py boot.img
$ tools/unpackqcdt.py dt.img
Traceback (most recent call last):
  File "/home/cylon2p0/linux-mdss-dsi-panel-driver-generator/tools/unpackqcdt.py", line 34, in <module>
    magic, version, n = struct.unpack(HEADER_FORMAT, b[:HEADER_SIZE])
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 12 bytes

Could it be due to the fact google-blueline requires a special hack due to the implementation in the bootloader?
https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3932/diffs?commit_id=152a7d398fa655a8a686c34654ea9370feef2c3f#2a69d86c24b94fa0c238d1653c5b9a03d14271d6

@phodina
Copy link
Author

phodina commented Jun 24, 2023

I was able to generate the driver for the panel from the dtsi file from the downstream kernel.

@stephan-gh
Copy link
Member

Could it be due to the fact google-blueline requires a special hack due to the implementation in the bootloader?
https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3932/diffs?commit_id=152a7d398fa655a8a686c34654ea9370feef2c3f#2a69d86c24b94fa0c238d1653c5b9a03d14271d6

I don't think this is related. This device is likely using a much newer version of the Android boot image format that isn't supported by the unpackbootimg.py.

It's hard to keep up with all the new boot img standards that are happening. You may want to use a different tool to extract the dtb, such as extract-dtb which works correctly on your boot.img. Perhaps I should remove the ones inside linux-mdss-dsi-panel-driver-generator if they are causing too much confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants