Confirmed users
125
edits
Line 22: | Line 22: | ||
<br> | <br> | ||
This partition contains 2-3 distinct entities. The kernel, the ramdisk, and (optionally, based on how the kernel was configured) the device tree binary. The instructions outlined [https://developer.mozilla.org/en-US/Firefox_OS/Porting#Rebuild_boot.img here] for splitting a boot.img are only mostly sufficient on a flame. The tool specified only detects the kernel and ramdisk. | This partition contains 2-3 distinct entities. The kernel, the ramdisk, and (optionally, based on how the kernel was configured) the device tree binary. The instructions outlined [https://developer.mozilla.org/en-US/Firefox_OS/Porting#Rebuild_boot.img here] for splitting a boot.img are only mostly sufficient on a flame. The tool specified only detects the kernel and ramdisk. | ||
The device tree binary is the last section (after which is zero padding), and it begins with the 4 byte magic |QCDT|. To extract this blob I simply used dd on the partition image skipping to whatever offset the magic was found at, and then trimming the trailing zeros similarly. This is not the most elegant of procedures, however I have not as of yet found a better way. (The correct solution I suppose would be extending the unmkbootimg utility appropriately). | |||
If you are going through this procedure it is unlikely that you want to change the kernel, and especially unlikely to want to change the device tree blob, so it would be wise to keep those somewhere safe. The porting guide explains how to unpack the ramdisk and repackage it. This is where thing such as '''init''' and '''init.rc''' (and various other *.rc's) live. | |||
Assuming one has run the unmkbootimg utility, a command to reconstruct the partition with the same parameters should have been output. That is exactly the command necessary, except with the addition of |--dt dtblobname| if applicable. | |||
W.I.P | W.I.P |