[Android Software Development] Dmitry87:
I'm trying to build TWRP for SM_G3608: https://xdaforums.com/galaxy-core/h...g3608-twrp-t3825949/post77267636#post77267636

And I ran in to a problem.

After flashing the recovery.img the phone goes to bootloop before TWRP logo appears on the screen. I was told that if it happens that way, than the offsets are most likelly incorrect. I get them form Stok samsung rom this way:

recovery.img-base -> 80000000

recovery.img-kerneloff -> 00008000

recovery.img-pagesize -> 2048

recovery.img-ramdiskoff -> 02000000

recovery.img-secondoff -> 02000000

recovery.img-tagsoff -> 01e00000

Shall they be corrected?

recovery.img-zImage -> kernel

recovery.img-dtbtype-> dt.img

BoardConfig.mk

# Bootloader

TARGET_BOOTLOADER_BOARD_NAME := MSM8916

TARGET_NO_BOOTLOADER := true

# Platform

TARGET_BOARD_PLATFORM := msm8916

TARGET_BOARD_PLATFORM_GPU := qcom-adreno306

# Architecture

TARGET_ARCH := arm

TARGET_ARCH_VARIANT := armv7-a-neon

TARGET_ARCH_VARIANT_CPU := cortex-a9

TARGET_CPU_ABI := armeabi-v7a

TARGET_CPU_ABI2 := armeabi

TARGET_CPU_SMP := true

TARGET_CPU_VARIANT := cortex-a7

BOARD_KERNEL_CMDLINE := console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci

BOARD_KERNEL_BASE := 0x80000000

BOARD_KERNEL_PAGESIZE := 2048

BOARD_KERNEL_SEPARATED_DT := true

BOARD_MKBOOTIMG_ARGS := --dt device/coreprimelte/coreprimelte/dt.img --kernel_offset 0x00008000 --ramdisk_offset 0x02000000 --tags_offset 0x01e00000

# prebuilt kernel

TARGET_PREBUILT_KERNEL := device/coreprimelte/coreprimelte/kernel

# else uncomment below to build from saurce

#TARGET_KERNEL_SOURCE := kernel/samsung/coreprimelte

#TARGET_KERNEL_CONFIG := msm8916_defconfig

BOARD_BOOTIMAGE_PARTITION_SIZE := 13631488

BOARD_RECOVERYIMAGE_PARTITION_SIZE := 15728640

BOARD_SYSTEMIMAGE_PARTITION_SIZE := 943718400

BOARD_CACHEIMAGE_PARTITION_SIZE := 209715200

BOARD_USERDATAIMAGE_PARTITION_SIZE := 1029575168

BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)

BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true

# Recovery

TARGET_USERIMAGES_USE_EXT4 := true

BOARD_HAS_LARGE_FILESYSTEM := true

#TARGET_USERIMAGES_USE_F2FS := true

BOARD_HAS_NO_SELECT_BUTTON := true

# Source format from coreprimelte

# TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565"

TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"

TARGET_USERIMAGES_USE_EXT4 := true

BOARD_HAS_LARGE_FILESYSTEM := true

BOARD_USE_CUSTOM_RECOVERY_FONT := "roboto_10x18.h"

BOARD_SUPPRESS_EMMC_WIPE := true

# TWRP

HAVE_SELINUX := true

DEVICE_RESOLUTION := 480x800

TW_IGNORE_MAJOR_AXIS_0 := true

RECOVERY_GRAPHICS_USE_LINELENGTH := true

BOARD_HAS_NO_REAL_SDCARD := true

TW_DEFAULT_EXTERNAL_STORAGE := true

TW_INTERNAL_STORAGE_PATH := "/data/media"

TW_INTERNAL_STORAGE_MOUNT_POINT := "data"

TW_EXTERNAL_STORAGE_PATH := "/external_sd"

TW_EXTERNAL_STORAGE_MOUNT_POINT := "external_sd"

TW_BRIGHTNESS_PATH := "/sys/devices/soc.0/1a00000.qcom\x2cmdss_mdp/qcom\x2cmdss_fb_primary.133/leds/lcd-backlight/brightness"

Here is my current result:

coreprimelte_src.7z https://yadi.sk/d/wjc2Iqvk3a7j68

recovery.iso.7z https://yadi.sk/d/cLDGE4XV3a7j7U

Maybe I miss something important?