[Android] hahagu:
My current BoardConfig.mk [Full ver]

USE_CAMERA_STUB := true

# inherit from the proprietary version
-include vendor/samsung/jaltektt/BoardConfigVendor.mk

TARGET_ARCH := arm
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := unknown
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_VARIANT := cortex-a7
TARGET_CPU_SMP := true
ARCH_ARM_HAVE_TLS_REGISTER := true

TARGET_BOOTLOADER_BOARD_NAME := jaltektt

BOARD_KERNEL_CMDLINE :=
BOARD_KERNEL_BASE := 0x10000000
BOARD_KERNEL_PAGESIZE := 2048

# fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 8650752
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 8650752
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3670016000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 23760732160
BOARD_FLASH_BLOCK_SIZE := 4096

TARGET_PREBUILT_KERNEL := device/samsung/jaltektt/kernel

BOARD_HAS_NO_SELECT_BUTTON := true

My Current BoardConfig.mk [only fs]

# fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 8650752
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 8650752
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3670016000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 23760732160
BOARD_FLASH_BLOCK_SIZE := 4096

BoardConfig.mk for i9500 [Full ver]

#
# Copyright (C) 2013 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

LOCAL_PATH := device/samsung/i9500

BOARD_VENDOR := samsung

# Include path
TARGET_SPECIFIC_HEADER_PATH := $(LOCAL_PATH)/include

# Assert
TARGET_OTA_ASSERT_DEVICE := ja3g,i9500,GT-I9500

# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := universal5410
TARGET_NO_BOOTLOADER := true

# Platform
TARGET_BOARD_PLATFORM := exynos5
TARGET_SLSI_VARIANT := cm
TARGET_SOC := exynos5410

# Architecture
TARGET_ARCH := arm
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_ARCH_VARIANT_CPU := cortex-a15
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_CPU_VARIANT := cortex-a15

# Kernel
BOARD_KERNEL_BASE := 0x10000000
BOARD_KERNEL_PAGESIZE := 2048
TARGET_KERNEL_CONFIG := cyanogenmod_i9500_defconfig
TARGET_KERNEL_SOURCE := kernel/samsung/exynos5410

# ANT+
BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"

# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth
BOARD_BLUEDROID_VENDOR_CONF := $(LOCAL_PATH)/bluetooth/libbt_vndcfg.txt
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_BCM := true

# Boot animation
TARGET_BOOTANIMATION_PRELOAD := true
TARGET_BOOTANIMATION_TEXTURE_CACHE := true
TARGET_BOOTANIMATION_HALF_RES := true

# Camera
BOARD_NEEDS_MEMORYHEAPION := true
BOARD_USE_ANB_OUTBUF_SHARE := true
BOARD_USE_DMA_BUF := true
BOARD_USE_GSC_RGB_ENCODER := true
BOARD_USE_IMPROVED_BUFFER := true
BOARD_USE_METADATABUFFERTYPE := true
BOARD_USE_STOREMETADATA := true

# Charger
BOARD_CHARGER_ENABLE_SUSPEND := true
BOARD_CHARGER_SHOW_PERCENTAGE := true
BOARD_CHARGING_MODE_BOOTING_LPM := /sys/class/power_supply/battery/batt_lp_charging
RED_LED_PATH := "/sys/class/leds/led_r/brightness"
GREEN_LED_PATH := "/sys/class/leds/led_g/brightness"
BLUE_LED_PATH := "/sys/class/leds/led_b/brightness"
BACKLIGHT_PATH := "/sys/class/backlight/panel/brightness"
CHARGING_ENABLED_PATH := "/sys/class/power_supply/battery/batt_lp_charging"

# CMHW
BOARD_HARDWARE_CLASS := hardware/samsung/cmhw

# Filesystems
BOARD_BOOTIMAGE_PARTITION_SIZE := 8388608
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 8388608
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2898264064
BOARD_USERDATAIMAGE_PARTITION_SIZE := 9604956160
BOARD_FLASH_BLOCK_SIZE := 4096

# Fonts
EXTENDED_FONT_FOOTPRINT := true

# Graphics
BOARD_EGL_SYSTEMUI_PBSIZE_HACK := true
BOARD_EGL_WORKAROUND_BUG_10194508 := true
COMMON_GLOBAL_CFLAGS += -DSURFACE_IS_BGR32
COMMON_GLOBAL_CFLAGS += -DUSE_NATIVE_SEC_NV12TILED
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
USE_OPENGL_RENDERER := true

# NFC
BOARD_NFC_HAL_SUFFIX := universal5410

# Radio
BOARD_MODEM_TYPE := xmm6360
BOARD_PROVIDES_LIBRIL := true
BOARD_RIL_CLASS := ../../../device/samsung/i9500/ril

# Recovery
BOARD_HAS_DOWNLOAD_MODE := true
TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/rootdir/etc/fstab.universal5410
TARGET_USERIMAGES_USE_EXT4 := true

# SELinux
BOARD_SEPOLICY_DIRS += \
device/samsung/i9500/sepolicy

BOARD_SEPOLICY_UNION := \
bluetooth.te \
device.te \
drmserver.te \
file_contexts \
file.te \
gpsd.te \
mediaserver.te \
property_contexts \
property.te \
pvrsrvctl.te \
rild.te \
shell.te \
system_server.te \
ueventd.te \
wpa.te

# Wifi
BOARD_HAVE_SAMSUNG_WIFI := true
BOARD_WLAN_DEVICE := bcmdhd
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/dhd/parameters/firmware_path"
WIFI_DRIVER_FW_PATH_STA := "/system/etc/wifi/bcmdhd_sta.bin"
WIFI_DRIVER_FW_PATH_AP := "/system/etc/wifi/bcmdhd_apsta.bin"
WIFI_DRIVER_NVRAM_PATH_PARAM := "/sys/module/dhd/parameters/nvram_path"
WIFI_DRIVER_NVRAM_PATH := "/system/etc/wifi/nvram_net.txt"
WIFI_BAND := 802_11_ABG

# inherit from the proprietary version
-include vendor/samsung/i9500/BoardConfigVendor.mk

BoardConfig.mk for i9500 [only fs]

# Filesystems
BOARD_BOOTIMAGE_PARTITION_SIZE := 8388608
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 8388608
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2898264064
BOARD_USERDATAIMAGE_PARTITION_SIZE := 9604956160
BOARD_FLASH_BLOCK_SIZE := 4096

Tried compiling with the BoardConfig.mk for i9500 on mine, and this happened

cp: cannot stat `/home/defyworks/cm-build/cm-12.1/out/target/product/jaltektt/root/init.recovery.*.rc': no such file or directory
build/core/Makefile:944: recipe for target '/home/defyworks/cm-build/cm-12.1/out/target/product/jaltektt/ramdisk-recovery.img' failed
make: [/home/defyworks/cm-build/cm-12.1/out/target/product/jaltektt/ramdisk-recovery.img] Error 1 (ignored)
/home/defyworks/cm-build/cm-12.1/out/target/product/jaltektt/recovery.img maxsize=8562048 blocksize=4224 total=8816640 reserve=88704
error: /home/defyworks/cm-build/cm-12.1/out/target/product/jaltektt/recovery.img too large (8816640 > [8650752 - 88704])
build/core/Makefile:978: recipe for target '/home/defyworks/cm-build/cm-12.1/out/target/product/jaltektt/recovery.img' failed
make: *** [/home/defyworks/cm-build/cm-12.1/out/target/product/jaltektt/recovery.img] Error 1
make: *** Deleting file '/home/defyworks/cm-build/cm-12.1/out/target/product/jaltektt/recovery.img'

So... These are what I have, and what do you mean by changing the partition size?

Change the recoveryimage partition size on BoardConfig.mk or the phone?

My partition table

major minor #blocks name

7 0 24024 loop0
179 0 30535680 mmcblk0
179 1 4096 mmcblk0p1
179 2 4096 mmcblk0p2
179 3 20480 mmcblk0p3
179 4 4096 mmcblk0p4
179 5 4096 mmcblk0p5
179 6 4096 mmcblk0p6
179 7 20480 mmcblk0p7
259 0 8192 mmcblk0p8
259 1 8192 mmcblk0p9
259 2 8192 mmcblk0p10
259 3 8192 mmcblk0p11
259 4 8192 mmcblk0p12
259 5 90112 mmcblk0p13
259 6 262144 mmcblk0p14
259 7 4096 mmcblk0p15
259 8 573440 mmcblk0p16
259 9 12288 mmcblk0p17
259 10 4096 mmcblk0p18
259 11 2688000 mmcblk0p19
259 12 3584000 mmcblk0p20
259 13 23203840 mmcblk0p21
179 8 15558144 mmcblk1

and my partition labels

/dev/block/mmcblk0p9	/boot	emmc	default	recoveryonly
/dev/block/mmcblk0p10	/recovery emmc	default	recoveryonly
/dev/block/mmcblk0p20	/system ext4	default	recoveryonly
/dev/block/mmcblk0p21	/data	ext4	default	wait,length=-16384
/dev/block/mmcblk0p19	/cache ext4	default	recoveryonly
/dev/block/mmcblk1p1	/sdcard	vfat	default	recoveryonly
/dev/block/mmcblk0p3	/efs ext4	default	recoveryonly
/dev/block/mmcblk0p13	/modem	emmc	default	recoveryonly
/dev/block/mmcblk0p16	/preload	ext4	default	recoveryonly

btw S4 lollipop does not have proc/mtd