-
Notifications
You must be signed in to change notification settings - Fork 5k
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
undable to add device tree overlays larger than 4KiB #1785
Comments
That's cool. Perhaps you should/could submit this as a fix to the upstream kernel. The process is a bit of a pain, but it might be worth it. Check out the document at Documentation/SubmittingPatches for an outline of the process. Anybody can submit changes to the upstream kernel, but you have to send it to a large e-mail list for peer review and it ultimately needs to be applied by the maintainer. |
Yes, @Electron752 is correct, the bug is in the upstream code, so it's best to get it fixed there. |
The bug was already fixed as of kernel 4.7 - see f860898. I've cherry-picked it back to rpi-4.4.y. |
kernel: config: Add CONFIG_DM_CACHE See: raspberrypi/linux#1793 kernel: configfs: Remove ppos increment in configfs_write_bin_file See: raspberrypi/linux#1785
kernel: config: Add CONFIG_DM_CACHE See: raspberrypi/linux#1793 kernel: configfs: Remove ppos increment in configfs_write_bin_file See: raspberrypi/linux#1785
Try with latest rpi-update kernel. |
@cjk32 is this still issue? If resolved then please close. |
@cjk32 can this be closed? |
The fix is present so I'll close. |
I am unable to install a device tree overlay larger than 4KiB, as exemplified:
Adding some tracing to the kernel, we find that by the time the blob reaches
cfs_overlay_item_dtbo_write
, it's become,o 4096b of valid data
o 4096b of zeros
o 1673b of valid data
i.e. we've gained an extra 4KiB in the middle of the blob.
The reason seems simple:
does,
which is wrong:
simple_write_to_buffer
advances ppos itself. Thus, the above code is double counting bytes, and every hunk that reachesconfigfs_write_bin_file
will end up followed by an equally sized hunk of zeroes.The obvious fix of,
solves the problem for me.
The text was updated successfully, but these errors were encountered: