[Lenovo Vibe P1m Questions & Answers] pareshchouhan:
Having issues with compiling recovery(cyanogenmod) for Lenovo Vibe P1MA40 (MT6735M),

here's my BoardConfig.mk

github.com/pareshchouhan/android_device_lenovo_p1ma40/blob/master/BoardConfig.mk

[ 57% 24/42] Target boot image: /home/paresh/android/android/system/out/target/product/p1ma40/boot.img
FAILED: /bin/bash -c "(/home/paresh/android/android/system/out/host/linux-x86/bin/mkbootimg --kernel /home/paresh/android/android/system/out/target/product/p1ma40/kernel --ramdisk /home/paresh/android/android/system/out/target/product/p1ma40/ramdisk.img --base 0x40080000 --pagesize 2048 --cmdline \"bootopt=64S3,32N2,64N2 buildvariant=userdebug\" --os_version 7.1 --os_patch_level 2016-11-05 --output /home/paresh/android/android/system/out/target/product/p1ma40/boot.img ) && (size=\$(for i in /home/paresh/android/android/system/out/target/product/p1ma40/boot.img; do stat --format \"%s\" \"\$i\" | tr -d '\\n'; echo +; done; echo 0); total=\$(( \$( echo \"\$size\" ) )); printname=\$(echo -n \"/home/paresh/android/android/system/out/target/product/p1ma40/boot.img\" | tr \" \" +); img_blocksize=17301504; twoblocks=\$((img_blocksize * 2)); onepct=\$(((((17301504 / 100) - 1) / img_blocksize + 1) * img_blocksize)); reserve=\$((twoblocks > onepct ? twoblocks : onepct)); maxsize=\$((17301504 - reserve)); echo \"\$printname maxsize=\$maxsize blocksize=\$img_blocksize total=\$total reserve=\$reserve\"; if [ \"\$total\" -gt \"\$maxsize\" ]; then echo \"error: \$printname too large (\$total > [17301504 - \$reserve])\"; false; elif [ \"\$total\" -gt \$((maxsize - 32768)) ]; then echo \"WARNING: \$printname approaching size limit (\$total now; limit \$maxsize)\"; fi ) && (echo \"Made boot image: /home/paresh/android/android/system/out/target/product/p1ma40/boot.img\" )"
/home/paresh/android/android/system/out/target/product/p1ma40/boot.img maxsize=-17301504 blocksize=17301504 total=7809024 reserve=34603008
error: /home/paresh/android/android/system/out/target/product/p1ma40/boot.img too large (7809024 > [17301504 - 34603008])
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

If someone can pinpoint the makefile which contains this check I can comment it out, or better yet give me a solution to this.

root@P1ma40:/ # fdisk -l /dev/block/mmcblk0p7
fdisk -l /dev/block/mmcblk0p7

Disk /dev/block/mmcblk0p7: 16 MB, 16777216 bytes
4 heads, 16 sectors/track, 512 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Disk /dev/block/mmcblk0p7 doesn't contain a valid partition table
root@P1ma40:/ # fdisk -l /dev/block/mmcblk0p8
fdisk -l /dev/block/mmcblk0p8

Disk /dev/block/mmcblk0p8: 16 MB, 16777216 bytes
4 heads, 16 sectors/track, 512 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Disk /dev/block/mmcblk0p8 doesn't contain a valid partition table
root@P1ma40:/ # fdisk -l /dev/block/mmcblk0p20
fdisk -l /dev/block/mmcblk0p20

Disk /dev/block/mmcblk0p20: 2684 MB, 2684354560 bytes
4 heads, 16 sectors/track, 81920 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Disk /dev/block/mmcblk0p20 doesn't contain a valid partition table
root@P1ma40:/ # fdisk -l /dev/block/mmcblk0p22
fdisk -l /dev/block/mmcblk0p22

Disk /dev/block/mmcblk0p22: 12.3 GB, 12303466496 bytes
4 heads, 16 sectors/track, 375472 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Disk /dev/block/mmcblk0p22 doesn't contain a valid partition table
root@P1ma40:/ # fdisk -l /dev/block/mmcblk0p23
fdisk -l /dev/block/mmcblk0p23

Disk /dev/block/mmcblk0p23: 16 MB, 16777216 bytes
4 heads, 16 sectors/track, 512 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

cat /proc/emmc
partno: start_sect nr_sects partition_name
emmc_p1: 00000400 00001800 "proinfo"
emmc_p2: 00001c00 00002800 "nvram"
emmc_p3: 00004400 00005000 "protect1"
emmc_p4: 00009400 00005000 "protect2"
emmc_p5: 0000e400 00000400 "lk"
emmc_p6: 0000e800 00000400 "para"
emmc_p7: 0000ec00 00008000 "boot"
emmc_p8: 00016c00 00008000 "recovery"
emmc_p9: 0001ec00 00004000 "logo"
emmc_p10: 00022c00 00005000 "expdb"
emmc_p11: 00027c00 00000400 "seccfg"
emmc_p12: 00028000 00001000 "oemkeystore"
emmc_p13: 00029000 00003000 "secro"
emmc_p14: 0002c000 00004000 "keystore"
emmc_p15: 00030000 00002800 "tee1"
emmc_p16: 00032800 00002800 "tee2"
emmc_p17: 00035000 00000800 "frp"
emmc_p18: 00035800 00010000 "nvdata"
emmc_p19: 00045800 00012800 "metadata"
emmc_p20: 00058000 00500000 "system"
emmc_p21: 00558000 000d4000 "cache"
emmc_p22: 0062c000 016eac00 "userdata"
emmc_p23: 01d16c00 00008000 "flashinfo"

cat /proc/partitions
major minor #blocks name
179 0 15267840 mmcblk0
179 1 3072 mmcblk0p1
179 2 5120 mmcblk0p2
179 3 10240 mmcblk0p3
179 4 10240 mmcblk0p4
179 5 512 mmcblk0p5
179 6 512 mmcblk0p6
179 7 16384 mmcblk0p7 //boot Disk /dev/block/mmcblk0p7: 16 MB, 16777216 bytes
179 8 16384 mmcblk0p8 //recovery Disk /dev/block/mmcblk0p8: 16 MB, 16777216 bytes
179 9 8192 mmcblk0p9
179 10 10240 mmcblk0p10
179 11 512 mmcblk0p11
179 12 2048 mmcblk0p12
179 13 6144 mmcblk0p13
179 14 8192 mmcblk0p14
179 15 5120 mmcblk0p15
179 16 5120 mmcblk0p16
179 17 1024 mmcblk0p17
179 18 32768 mmcblk0p18
179 19 37888 mmcblk0p19
179 20 2621440 mmcblk0p20 //system Disk /dev/block/mmcblk0p20: 2684 MB, 2684354560 bytes
179 21 434176 mmcblk0p21
179 22 12015104 mmcblk0p22 //userdata Disk /dev/block/mmcblk0p22: 12.3 GB, 12303466496 bytes
179 23 16384 mmcblk0p23 //flash info Disk /dev/block/mmcblk0p23: 16 MB, 16777216 bytes
179 96 4096 mmcblk0rpmb
179 64 4096 mmcblk0boot1
179 32 4096 mmcblk0boot0
179 128 15630336 mmcblk1
179 129 15629312 mmcblk1p1

PS: If you need any other info let me know.