[Android Software Development] celoxocis:
How to find out partition sizes to put in BoardConfig.mk?

Hi guys,

Im about to compile TWRP for my unsupported device but im stock at

how do i find out the "exact" partition sizes to put in BoardConfig.mk?

from the BoardConfig.mk

BOARD_BOOTIMAGE_PARTITION_SIZE :=
BOARD_RECOVERYIMAGE_PARTITION_SIZE :=
BOARD_SYSTEMIMAGE_PARTITION_SIZE :=
BOARD_USERDATAIMAGE_PARTITION_SIZE :=
BOARD_FLASH_BLOCK_SIZE := # (BOARD_KERNEL_PAGESIZE * 64)
BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true

# ls -l /dev/block/bootdevice/by-name/
lrwxrwxrwx root root 1970-05-08 13:00 DDR -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 1970-05-08 13:00 DRIVER -> /dev/block/mmcblk0p32
lrwxrwxrwx root root 1970-05-08 13:00 LOGO -> /dev/block/mmcblk0p21
lrwxrwxrwx root root 1970-05-08 13:00 aboot -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 1970-05-08 13:00 abootbak -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 1970-05-08 13:00 [B]boot[/B] -> /dev/block/mmcblk0p22
lrwxrwxrwx root root 1970-05-08 13:00 cache -> /dev/block/mmcblk0p26
lrwxrwxrwx root root 1970-05-08 13:00 config -> /dev/block/mmcblk0p30
lrwxrwxrwx root root 1970-05-08 13:00 devinfo -> /dev/block/mmcblk0p25
lrwxrwxrwx root root 1970-05-08 13:00 fsc -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 1970-05-08 13:00 fsg -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 1970-05-08 13:00 grow -> /dev/block/mmcblk0p38
lrwxrwxrwx root root 1970-05-08 13:00 hyp -> /dev/block/mmcblk0p15
lrwxrwxrwx root root 1970-05-08 13:00 hypbak -> /dev/block/mmcblk0p16
lrwxrwxrwx root root 1970-05-08 13:00 keystore -> /dev/block/mmcblk0p29
lrwxrwxrwx root root 1970-05-08 13:00 misc -> /dev/block/mmcblk0p28
lrwxrwxrwx root root 1970-05-08 13:00 modem -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 1970-05-08 13:00 modemst1 -> /dev/block/mmcblk0p17
lrwxrwxrwx root root 1970-05-08 13:00 modemst2 -> /dev/block/mmcblk0p18
lrwxrwxrwx root root 1970-05-08 13:00 oem -> /dev/block/mmcblk0p31
lrwxrwxrwx root root 1970-05-08 13:00 oppodycnvbk -> /dev/block/mmcblk0p19
lrwxrwxrwx root root 1970-05-08 13:00 oppostanvbk -> /dev/block/mmcblk0p20
lrwxrwxrwx root root 1970-05-08 13:00 persist -> /dev/block/mmcblk0p27
lrwxrwxrwx root root 1970-05-08 13:00 [B]recovery[/B] -> /dev/block/mmcblk0p23
lrwxrwxrwx root root 1970-05-08 13:00 reserve1 -> /dev/block/mmcblk0p33
lrwxrwxrwx root root 1970-05-08 13:00 reserve2 -> /dev/block/mmcblk0p34
lrwxrwxrwx root root 1970-05-08 13:00 reserve3 -> /dev/block/mmcblk0p35
lrwxrwxrwx root root 1970-05-08 13:00 reserve4 -> /dev/block/mmcblk0p36
lrwxrwxrwx root root 1970-05-08 13:00 rpm -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 1970-05-08 13:00 rpmbak -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 1970-05-08 13:00 sbl1 -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 1970-05-08 13:00 sbl1bak -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 1970-05-08 13:00 sec -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 1970-05-08 13:00 ssd -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 1970-05-08 13:00 [B]system[/B] -> /dev/block/mmcblk0p24
lrwxrwxrwx root root 1970-05-08 13:00 tz -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 1970-05-08 13:00 tzbak -> /dev/block/mmcblk0p14
lrwxrwxrwx root root 1970-05-08 13:00 [B]userdata[/B] -> /dev/block/mmcblk0p37

# cat /proc/partitions
major minor #blocks name

179 0 30535680 mmcblk0
179 1 65536 mmcblk0p1
179 2 32 mmcblk0p2
179 3 1536 mmcblk0p3
179 4 16 mmcblk0p4
179 5 1 mmcblk0p5
179 6 8 mmcblk0p6
179 7 512 mmcblk0p7
179 8 512 mmcblk0p8
179 9 1024 mmcblk0p9
179 10 1024 mmcblk0p10
179 11 512 mmcblk0p11
179 12 512 mmcblk0p12
179 13 512 mmcblk0p13
179 14 512 mmcblk0p14
179 15 512 mmcblk0p15
179 16 512 mmcblk0p16
179 17 1536 mmcblk0p17
179 18 1536 mmcblk0p18
179 19 10240 mmcblk0p19
179 20 10240 mmcblk0p20
179 21 16384 mmcblk0p21
179 22 32768 mmcblk0p22
179 23 32768 mmcblk0p23
179 24 3145728 mmcblk0p24
179 25 1024 mmcblk0p25
179 26 131072 mmcblk0p26
179 27 32768 mmcblk0p27
179 28 1024 mmcblk0p28
179 29 512 mmcblk0p29
179 30 32 mmcblk0p30
179 31 65536 mmcblk0p31
259 0 32768 mmcblk0p32
259 1 2048 mmcblk0p33
259 2 16384 mmcblk0p34
259 3 2048 mmcblk0p35
259 4 16384 mmcblk0p36
259 5 26214400 mmcblk0p37
259 6 350671 mmcblk0p38
179 32 4096 mmcblk0rpmb

and if i use fdisk on the partition named "BOOT"

# fdisk -l /dev/block/mmcblk0p22

Disk /dev/block/mmcblk0p22: 33 MB, 33554432 bytes
4 heads, 16 sectors/track, 1024 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Disk /dev/block/mmcblk0p22 doesn't contain a valid partition table
#

would "33554432" be the correct BOARD_BOOTIMAGE_PARTITION_SIZE ?