Increasing the boot partition size on hikey960

My kernel size is now 80MB, But boot partition size is 64MB in hikey960.

I tried using the partition tools in “device/linaro/hikey/l-loader/generate_ptable.sh” and “partition-table-tool”, but after which the userdata flashing fails. Can you please suggest if any other method is available to create partition table(ptable.img) ?

Partition.h (git diff)
Original

  • {PART_BOOT, 2891024, 641024, UFS_PART_3},/* boot 64M sdd7 */
  • {PART_DTS, 3531024, 161024, UFS_PART_3},/* dtimage 16M sdd8 */
  • {PART_TRUSTFIRMWARE, 3691024, 21024, UFS_PART_3},/* trustfirmware 2M sdd9 */
  • {PART_SYSTEM, 3711024, 46881024, UFS_PART_3},/* system 4688M sdd10 */
  • {PART_VENDOR, 50591024, 7841024, UFS_PART_3},/* vendor 784M sdd11 */
  • {PART_RESERVED, 58431024, 1024, UFS_PART_3},/ reserved 1M sdd12 */
  • {PART_USERDATA, 5844*1024, (24646UL)1024, UFS_PART_3},/ userdata 24G sdd13 */

Modified :

  • {PART_BOOT, 2891024, 841024, UFS_PART_3},/* boot 64M sdd7 */
  • {PART_DTS, 3731024, 161024, UFS_PART_3},/* dtimage 16M sdd8 */
  • {PART_TRUSTFIRMWARE, 3891024, 21024, UFS_PART_3},/* trustfirmware 2M sdd9 */
  • {PART_SYSTEM, 3911024, 46881024, UFS_PART_3},/* system 4688M sdd10 */
  • {PART_VENDOR, 50791024, 7841024, UFS_PART_3},/* vendor 784M sdd11 */
  • {PART_RESERVED, 58631024, 1024, UFS_PART_3},/ reserved 1M sdd12 */
  • {PART_USERDATA, 5864*1024, (24646UL)1024, UFS_PART_3},/ userdata 24G sdd13 */

Flashing logs :
partition ‘vendor’ updated
usbloader: - OKAY
usbloader: usb_rx_cmd_complete() ‘getvar:has-slot:userdata’, size is 0x00000018
usbloader: usb_rx_cmd_complete() ‘getvar:max-download-size’, size is 0x00000018
usbloader: usb_rx_cmd_complete() ‘getvar:is-logical:userdata’, size is 0x0000001a
usbloader: usb_rx_cmd_complete() ‘download:0042c19c’, size is 0x00000011
usbloader: usb_rx_cmd_complete() ‘flash:userdata’, size is 0x0000000e
usbloader: writing 4374940 bytes to ‘userdata’…
usbloader: partition ‘userdata’ image is in sparse format
storage: storage_erase: partition userdata
usbloader: partition ‘userdata’ erased before flash
sparse: size 24628 MB exceeded
usbloader: - FAIL
usbloader: usb_rx_cmd_complete() ‘reboot’, size is 0x00000006
ufs: ufs power mode = 0x00000033
usbloader: reboot kernel
reboot_reason: set_reboot_type is 0x00000010.

Thank You,
Murali

I think that rather than trying to figure out a way to make the boot partition bigger, you really need to ask yourself just why your kernel has become so enormous. 80 MB is unreasonable, and while I’m open to listening, I can’t currently envision any kind of justification for it to grow that large.

Are you talking about the kernel itself? Or are you talking about the boot image including ramdisk?
What exactly did you do to make it that big?

Thank you for your reply,

It is actually the boot image including ramdisk which is 80MB

Ok, so what is in there, and why are you putting it all in the ramdisk and not on another partition? The ramdisk should contain only what is needed to get to the point where you can load everything else from other partitions.

No, my requirement is to remove all other partition and use it for other purpose (except the bootloaders, trustfirmware, and boot). So, will be merging all other partitions later point.

You’re doing this… for fun?
There is no justification for this type of configuration. Pick a partition to use to store your operating system, and mount it read-only. Don’t just build up a huge ramdisk. Huge ramdisks waste memory since they have to be loaded. Hence "RAM"disk.