Firefox OS/Performance/Modifying boot.img: Difference between revisions
(Created page with "==Modifying boot.img== This page is meant to illustrate the general steps necessary to make changes to the ramdisk in the boot partition of the device. Ideally, the build sys...") |
|||
Line 1: | Line 1: | ||
==Modifying boot.img== | ==Modifying boot.img== | ||
<br> | |||
This page is meant to illustrate the general steps necessary to make changes to the ramdisk in the boot partition of the device. This may be desired for a number of reasons such as making changes to the init rc scripts or the init program itself, without changing the kernel. | |||
Ideally, the build system would build the kernel and ramdisk, and then create a boot.img which one could then flash. In this case, it's simply a matter of making whatever changes are necessary (and of course init would be automatically included as well). On the flame however, it was not quite so easy. | |||
===Obtaining a boot.img=== | ===Obtaining a boot.img=== | ||
<br> | |||
The way this was originally accomplished was to find the boot partition on the file system and run |adb pull|. So for the flame this was | |||
<pre> | |||
adb pull /dev/block/platform/msm_sdcc.1/by-name/boot . | |||
</pre> | |||
Where the file specified is a friendly symlink to /dev/block/mmcblk0p7. For certain other devices the partitions lived under |/dev/mtd/| and the mappings could be found by executing |cat /proc/mtd| on the device. | |||
====Alternatively==== | |||
If you already have an image from the OEM or elsewhere ready to flash, you don't need to take the image from the device. | |||
===Splitting the boot.img=== | |||
<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. | |||
W.I.P | W.I.P |
Revision as of 21:59, 6 June 2014
Modifying boot.img
This page is meant to illustrate the general steps necessary to make changes to the ramdisk in the boot partition of the device. This may be desired for a number of reasons such as making changes to the init rc scripts or the init program itself, without changing the kernel.
Ideally, the build system would build the kernel and ramdisk, and then create a boot.img which one could then flash. In this case, it's simply a matter of making whatever changes are necessary (and of course init would be automatically included as well). On the flame however, it was not quite so easy.
Obtaining a boot.img
The way this was originally accomplished was to find the boot partition on the file system and run |adb pull|. So for the flame this was
adb pull /dev/block/platform/msm_sdcc.1/by-name/boot .
Where the file specified is a friendly symlink to /dev/block/mmcblk0p7. For certain other devices the partitions lived under |/dev/mtd/| and the mappings could be found by executing |cat /proc/mtd| on the device.
Alternatively
If you already have an image from the OEM or elsewhere ready to flash, you don't need to take the image from the device.
Splitting the boot.img
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 here for splitting a boot.img are only mostly sufficient on a flame. The tool specified only detects the kernel and ramdisk.
W.I.P