[Galaxy S Advance I9070 Q&A, Help & Troubleshooting] den191097:
I'm trying to compile cyanogenmod 10.2 from sources for samsung janice (i9070) but i edited files to match my device (Samsung gavini (I8530))

I write here, because my device isn't so popular, but it is very similar to S Advance.

When i try to compile CYanogenmod everything goes well untill it starts to compile kernel. At one moment it stopps with this error:

ARCH=arm CROSS_COMPILE=" /home/denisrus/Documents/CYANOGENMOD/i9070/prebuilt/linux-x86/toolchain/arm-eabi-4.6/bin/arm-eabi-"

...

In file included from /home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:16:0:

...

/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:747:2: error: unknown field 'atchcalst' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:747:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:747:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:748:2: error: unknown field 'atchcalsthr' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:748:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:748:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:749:2: error: unknown field 'tchthr_batt' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:749:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:749:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:750:2: error: unknown field 'tchthr_charging' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:750:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:750:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:751:2: error: unknown field 'tchthr_batt_e' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:751:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:751:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:752:2: error: unknown field 'tchthr_charging_e' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:752:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:752:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:753:2: error: unknown field 'calcfg_batt_e' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:753:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:753:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:754:2: error: unknown field 'calcfg_charging_e' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:754:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:754:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:755:2: error: unknown field 'atchfrccalthr_e' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:755:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:755:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:756:2: error: unknown field 'atchfrccalratio_e' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:756:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:756:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:757:2: error: unknown field 't48_config_batt_e' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:757:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:757:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:758:2: error: unknown field 't48_config_chrg_e' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:758:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:758:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:759:2: error: unknown field 'power_con' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:759:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:759:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:761:2: error: unknown field 'read_ta_status' specified in initializer
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:761:2: warning: excess elements in struct initializer [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:761:2: warning: (near initialization for 'mxt224_data') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1002:3: error: initializer element is not constant
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1002:3: error: (near initialization for 'gavini_r0_1_gpio_i2c5_devices[0].irq')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1955:1: error: 'NMK_GPIO_ALT_A' undeclared here (not in a function)
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1955:1: error: invalid operands to binary << (have 'struct i2c_board_info *' and 'int')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1955:2: error: invalid operands to binary | (have 'int' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1955:2: error: invalid operands to binary | (have 'int' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1955:20: error: 'NMK_GPIO_PULL_UP' undeclared here (not in a function)
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1955:20: error: invalid operands to binary << (have 'struct i2c_board_info *' and 'int')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1955:20: error: invalid operands to binary | (have 'int' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1955:18: error: invalid operands to binary | (have 'struct i2c_board_info *' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1955:2: error: initializer element is not constant
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1955:2: error: (near initialization for 'mop500_pins_uart0[0]')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1956:1: error: invalid operands to binary << (have 'struct i2c_board_info *' and 'int')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1956:2: error: invalid operands to binary | (have 'int' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1956:2: error: invalid operands to binary | (have 'int' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1956:18: error: invalid operands to binary | (have 'struct i2c_board_info *' and 'int')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1956:2: error: initializer element is not constant
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1956:2: error: (near initialization for 'mop500_pins_uart0[1]')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1957:1: error: invalid operands to binary << (have 'struct i2c_board_info *' and 'int')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1957:2: error: invalid operands to binary | (have 'int' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1957:2: error: invalid operands to binary | (have 'int' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1957:20: error: invalid operands to binary << (have 'struct i2c_board_info *' and 'int')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1957:20: error: invalid operands to binary | (have 'int' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1957:18: error: invalid operands to binary | (have 'struct i2c_board_info *' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1957:2: error: initializer element is not constant
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1957:2: error: (near initialization for 'mop500_pins_uart0[2]')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1958:1: error: invalid operands to binary << (have 'struct i2c_board_info *' and 'int')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1958:2: error: invalid operands to binary | (have 'int' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1958:2: error: invalid operands to binary | (have 'int' and 'struct i2c_board_info *')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1958:18: error: invalid operands to binary | (have 'struct i2c_board_info *' and 'int')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1958:2: error: initializer element is not constant
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1958:2: error: (near initialization for 'mop500_pins_uart0[3]')
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:2015:2: warning: initialization from incompatible pointer type [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:2015:2: warning: (near initialization for 'uart0_plat.amba_pl011_wake_peer') [enabled by default]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c: In function 'gavini_init_machine':
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:2342:2: error: implicit declaration of function 'nmk_gpio_clocks_enable' [-Werror=implicit-function-declaration]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:2382:2: error: implicit declaration of function 'mms136_ts_init' [-Werror=implicit-function-declaration]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:2383:2: error: implicit declaration of function 'nmk_gpio_clocks_disable' [-Werror=implicit-function-declaration]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c: At top level:
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:190:37: warning: 'mpu_data' defined but not used [-Wunused-variable]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:517:13: warning: 'tsu6111_reset' defined but not used [-Wunused-function]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:582:13: warning: 'mxt224_register_callback' defined but not used [-Wunused-function]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:734:36: warning: 'mxt224_data' defined but not used [-Wunused-variable]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:999:41: warning: 'gavini_r0_1_gpio_i2c5_devices' defined but not used [-Wunused-variable]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1949:31: warning: 'sec_device_rfkill' defined but not used [-Wunused-variable]
/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500/arch/arm/mach-ux500/board-gavini.c:1999:13: warning: 'bt_wake_peer' defined but not used [-Wunused-function]
cc1: some warnings being treated as errors

make[3]: *** [arch/arm/mach-ux500/board-gavini.o] Error 1
make[2]: *** [arch/arm/mach-ux500] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/denisrus/Documents/CYANOGENMOD/i9070/kernel/samsung/u8500'
make: *** [TARGET_KERNEL_BINARIES] Error 2