###
### AVM opensrc package used by Freetz
###

# AR7 / OHIO
config FREETZ_AVM_SOURCE_04_30
	bool
config FREETZ_AVM_SOURCE_04_33
	bool
config FREETZ_AVM_SOURCE_04_40
	bool
config FREETZ_AVM_SOURCE_04_49
	bool
config FREETZ_AVM_SOURCE_04_57
	bool
config FREETZ_AVM_SOURCE_04_67
	bool
config FREETZ_AVM_SOURCE_04_70
	bool
config FREETZ_AVM_SOURCE_04_76
	bool
config FREETZ_AVM_SOURCE_04_80
	bool
config FREETZ_AVM_SOURCE_04_87
	bool
config FREETZ_AVM_SOURCE_r7203
	bool

# AR9
config FREETZ_AVM_SOURCE_7320_06_30
	bool
config FREETZ_AVM_SOURCE_7330_06_50
	bool

# AR934x
config FREETZ_AVM_SOURCE_6810_06_21
	bool

# AR10
config FREETZ_AVM_SOURCE_7272_06_20
	bool

# GRX5
config FREETZ_AVM_SOURCE_7580_06_53
	bool
config FREETZ_AVM_SOURCE_7580_06_81
	bool
config FREETZ_AVM_SOURCE_7590_06_92
	bool
config FREETZ_AVM_SOURCE_7590_07_01
	bool
config FREETZ_AVM_SOURCE_7583_07_10
	bool

# IKS
config FREETZ_AVM_SOURCE_7340_06_06
	bool
config FREETZ_AVM_SOURCE_7390_05_21
	bool
config FREETZ_AVM_SOURCE_7390_06_01
	bool
config FREETZ_AVM_SOURCE_7390_06_30
	bool
config FREETZ_AVM_SOURCE_7390_06_51
	bool
config FREETZ_AVM_SOURCE_7390_06_80
	bool

# IPQ40xx
config FREETZ_AVM_SOURCE_4040_07_01
	bool
config FREETZ_AVM_SOURCE_7530_07_02
	bool

# PUMA6
config FREETZ_AVM_SOURCE_6490_06_87
	bool
config FREETZ_AVM_SOURCE_6490_07_02
	bool
config FREETZ_AVM_SOURCE_6490_07_10
	bool
config FREETZ_AVM_SOURCE_6590_06_87
	bool
config FREETZ_AVM_SOURCE_6590_07_02
	bool

# QCA956x
config FREETZ_AVM_SOURCE_4020_06_50
	bool
config FREETZ_AVM_SOURCE_4020_07_01
	bool

# UR8
config FREETZ_AVM_SOURCE_7270_04_86
	bool
config FREETZ_AVM_SOURCE_7270_05_21
	bool
config FREETZ_AVM_SOURCE_7270_05_51
	bool
config FREETZ_AVM_SOURCE_7270_06_05
	bool

# VR9
config FREETZ_AVM_SOURCE_3390_06_51
	bool
config FREETZ_AVM_SOURCE_3490_06_31
	bool
config FREETZ_AVM_SOURCE_5491_07_01
	bool
config FREETZ_AVM_SOURCE_5491_07_12
	bool
config FREETZ_AVM_SOURCE_7360_06_20
	bool
config FREETZ_AVM_SOURCE_7490_06_30
	bool
config FREETZ_AVM_SOURCE_7490_06_51
	bool
config FREETZ_AVM_SOURCE_7490_06_60
	bool
config FREETZ_AVM_SOURCE_7490_06_83
	bool
config FREETZ_AVM_SOURCE_7490_06_93
	bool
config FREETZ_AVM_SOURCE_7490_07_01
	bool
config FREETZ_AVM_SOURCE_7490_07_11
	bool

config FREETZ_AVM_SOURCE_ID
	string
# AR7 / OHIO
	default "04.30"         if FREETZ_AVM_SOURCE_04_30
	default "04.33"         if FREETZ_AVM_SOURCE_04_33 && !FREETZ_TYPE_7140
	default "7140_04.33"    if FREETZ_AVM_SOURCE_04_33 && FREETZ_TYPE_7140
	default "04.40"         if FREETZ_AVM_SOURCE_04_40
	default "04.49"         if FREETZ_AVM_SOURCE_04_49
	default "04.57"         if FREETZ_AVM_SOURCE_04_57
	default "04.67"         if FREETZ_AVM_SOURCE_04_67 && !FREETZ_TYPE_5140
	default "5140_04.67"    if FREETZ_AVM_SOURCE_04_67 && FREETZ_TYPE_5140
	default "04.70"         if FREETZ_AVM_SOURCE_04_70
	default "04.76"         if FREETZ_AVM_SOURCE_04_76
	default "04.80"         if FREETZ_AVM_SOURCE_04_80
	default "04.87"         if FREETZ_AVM_SOURCE_04_87
	default "r7203"         if FREETZ_AVM_SOURCE_r7203
# AR9
	default "7320_06.30"    if FREETZ_AVM_SOURCE_7320_06_30
	default "7330_06.50"    if FREETZ_AVM_SOURCE_7330_06_50
# AR934x
	default "6810_06.21"    if FREETZ_AVM_SOURCE_6810_06_21
# AR10
	default "7272_06.20"    if FREETZ_AVM_SOURCE_7272_06_20
# GRX5
	default "7580_06.53"    if FREETZ_AVM_SOURCE_7580_06_53
	default "7580_06.81"    if FREETZ_AVM_SOURCE_7580_06_81
	default "7590_06.92"    if FREETZ_AVM_SOURCE_7590_06_92
	default "7590_07.01"    if FREETZ_AVM_SOURCE_7590_07_01
	default "7583_07.10"    if FREETZ_AVM_SOURCE_7583_07_10
# IKS
	default "7340_06.06"    if FREETZ_AVM_SOURCE_7340_06_06
	default "7390_05.21"    if FREETZ_AVM_SOURCE_7390_05_21
	default "7390_06.01"    if FREETZ_AVM_SOURCE_7390_06_01
	default "7390_06.30"    if FREETZ_AVM_SOURCE_7390_06_30
	default "7390_06.51"    if FREETZ_AVM_SOURCE_7390_06_51
	default "7390_06.80"    if FREETZ_AVM_SOURCE_7390_06_80
# IPQ40xx
	default "4040_07.01"    if FREETZ_AVM_SOURCE_4040_07_01
	default "7530_07.02"    if FREETZ_AVM_SOURCE_7530_07_02
# PUMA6
	default "6490_06.87"    if FREETZ_AVM_SOURCE_6490_06_87
	default "6490_07.02"    if FREETZ_AVM_SOURCE_6490_07_02
	default "6490_07.10"    if FREETZ_AVM_SOURCE_6490_07_10
	default "6590_06.87"    if FREETZ_AVM_SOURCE_6590_06_87
	default "6590_07.02"    if FREETZ_AVM_SOURCE_6590_07_02
# QCA956x
	default "4020_06.50"    if FREETZ_AVM_SOURCE_4020_06_50
	default "4020_07.01"    if FREETZ_AVM_SOURCE_4020_07_01
# UR8
	default "7270_04.86"    if FREETZ_AVM_SOURCE_7270_04_86
	default "7270_05.21"    if FREETZ_AVM_SOURCE_7270_05_21
	default "7270_05.51"    if FREETZ_AVM_SOURCE_7270_05_51
	default "7270_06.05"    if FREETZ_AVM_SOURCE_7270_06_05
# VR9
	default "3390_06.51"    if FREETZ_AVM_SOURCE_3390_06_51
	default "3490_06.31"    if FREETZ_AVM_SOURCE_3490_06_31
	default "5491_07.01"    if FREETZ_AVM_SOURCE_5491_07_01
	default "5491_07.12"	if FREETZ_AVM_SOURCE_5491_07_12
	default "7360_06.20"    if FREETZ_AVM_SOURCE_7360_06_20
	default "7490_06.30"    if FREETZ_AVM_SOURCE_7490_06_30
	default "7490_06.51"    if FREETZ_AVM_SOURCE_7490_06_51
	default "7490_06.60"    if FREETZ_AVM_SOURCE_7490_06_60
	default "7490_06.83"    if FREETZ_AVM_SOURCE_7490_06_83
	default "7490_06.93"    if FREETZ_AVM_SOURCE_7490_06_93
	default "7490_07.01"    if FREETZ_AVM_SOURCE_7490_07_01
	default "7490_07.11"    if FREETZ_AVM_SOURCE_7490_07_11

#
# FREETZ_AVM_SOURCE convenience symbols
#

# FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_AR7_SANGAM
# not possible, should be box specific

# FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_AR7_OHIO
# not possible, should be box specific

config FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_AR9
	depends on FREETZ_SYSTEM_TYPE_AR9
	select FREETZ_AVM_SOURCE_7320_06_30 if FREETZ_AVM_VERSION_06_2X
	select FREETZ_AVM_SOURCE_7330_06_50 if FREETZ_AVM_VERSION_06_5X
	bool

config FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_AR934x
	depends on FREETZ_SYSTEM_TYPE_AR934x
	select FREETZ_AVM_SOURCE_6810_06_21 if FREETZ_AVM_VERSION_06_2X
	select FREETZ_AVM_SOURCE_6810_06_21 if FREETZ_AVM_VERSION_06_5X
	select FREETZ_AVM_SOURCE_6810_06_21 if FREETZ_AVM_VERSION_06_8X
	bool

config FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_AR10
	depends on FREETZ_SYSTEM_TYPE_AR10
	select FREETZ_AVM_SOURCE_7272_06_20 if FREETZ_AVM_VERSION_06_2X
	select FREETZ_AVM_SOURCE_7272_06_20 if FREETZ_AVM_VERSION_06_5X
	select FREETZ_AVM_SOURCE_7272_06_20 if FREETZ_AVM_VERSION_06_8X
	bool

config FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_GRX5
	depends on FREETZ_SYSTEM_TYPE_GRX5
	select FREETZ_AVM_SOURCE_7580_06_53 if FREETZ_AVM_VERSION_06_5X
	select FREETZ_AVM_SOURCE_7580_06_81 if FREETZ_AVM_VERSION_06_8X
	select FREETZ_AVM_SOURCE_7590_06_92 if FREETZ_AVM_VERSION_06_9X
	select FREETZ_AVM_SOURCE_7590_07_01 if FREETZ_AVM_VERSION_07_0X
	select FREETZ_AVM_SOURCE_7583_07_10 if FREETZ_AVM_VERSION_07_1X
	bool

config FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_IKS
	depends on FREETZ_SYSTEM_TYPE_IKS
	select FREETZ_AVM_SOURCE_7390_05_21 if FREETZ_AVM_VERSION_05_2X
	# no support for 05.5x
	select FREETZ_AVM_SOURCE_7390_06_01 if FREETZ_AVM_VERSION_06_0X &&  FREETZ_TYPE_LANG_DE
	select FREETZ_AVM_SOURCE_7340_06_06 if FREETZ_AVM_VERSION_06_0X && !FREETZ_TYPE_LANG_DE
	select FREETZ_AVM_SOURCE_7390_06_30 if FREETZ_AVM_VERSION_06_2X
	select FREETZ_AVM_SOURCE_7390_06_51 if FREETZ_AVM_VERSION_06_5X
	select FREETZ_AVM_SOURCE_7390_06_80 if FREETZ_AVM_VERSION_06_8X
	bool

config FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_IPQ40xx
	depends on FREETZ_SYSTEM_TYPE_IPQ40xx
	# 07.0X
	select FREETZ_AVM_SOURCE_4040_07_01 if FREETZ_AVM_VERSION_07_0X && FREETZ_TYPE_4040
	select FREETZ_AVM_SOURCE_7530_07_02 if FREETZ_AVM_VERSION_07_0X && FREETZ_TYPE_7530
	# 07.1X
	select FREETZ_AVM_SOURCE_4040_07_01 if FREETZ_AVM_VERSION_07_1X &&  FREETZ_TYPE_4040 # TODO: 07.1x sources
	select FREETZ_AVM_SOURCE_7530_07_02 if FREETZ_AVM_VERSION_07_1X && !FREETZ_TYPE_4040 # TODO: 07.1x sources
	bool

config FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_PUMA6
	depends on FREETZ_SYSTEM_TYPE_PUMA6
	# 06.8X
	select FREETZ_AVM_SOURCE_6490_06_87 if FREETZ_AVM_VERSION_06_8X && FREETZ_TYPE_6490
	select FREETZ_AVM_SOURCE_6590_06_87 if FREETZ_AVM_VERSION_06_8X && FREETZ_TYPE_6590
	# 07.0X
	select FREETZ_AVM_SOURCE_6490_07_02 if FREETZ_AVM_VERSION_07_0X && FREETZ_TYPE_6490
	select FREETZ_AVM_SOURCE_6590_07_02 if FREETZ_AVM_VERSION_07_0X && FREETZ_TYPE_6590
	# 07.1X
	select FREETZ_AVM_SOURCE_6490_07_10 if FREETZ_AVM_VERSION_07_1X
	bool

config FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_QCA955x
	depends on FREETZ_SYSTEM_TYPE_QCA955x
	select FREETZ_AVM_SOURCE_4020_06_50 if FREETZ_AVM_VERSION_06_8X
	select FREETZ_AVM_SOURCE_7530_07_02 if FREETZ_AVM_VERSION_07_0X # TODO: 07.0x sources
	select FREETZ_AVM_SOURCE_7530_07_02 if FREETZ_AVM_VERSION_07_1X # TODO: 07.1x sources
	bool

config FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_QCA956x
	depends on FREETZ_SYSTEM_TYPE_QCA956x
	select FREETZ_AVM_SOURCE_4020_06_50 if FREETZ_AVM_VERSION_06_8X
	select FREETZ_AVM_SOURCE_4020_07_01 if FREETZ_AVM_VERSION_07_0X
	bool

config FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_UR8
	depends on FREETZ_SYSTEM_TYPE_UR8
	select FREETZ_AVM_SOURCE_7270_04_86 if FREETZ_AVM_VERSION_04_XX
	select FREETZ_AVM_SOURCE_7270_05_21 if FREETZ_AVM_VERSION_05_2X
	select FREETZ_AVM_SOURCE_7270_05_51 if FREETZ_AVM_VERSION_05_5X
	select FREETZ_AVM_SOURCE_7270_06_05 if FREETZ_AVM_VERSION_06_0X
	bool

config FREETZ_AVM_SOURCE_FOR_SYSTEM_TYPE_VR9
	depends on FREETZ_SYSTEM_TYPE_VR9
	# 06.2X
	select FREETZ_AVM_SOURCE_7360_06_20 if FREETZ_AVM_VERSION_06_2X && (FREETZ_TYPE_6840 || FREETZ_TYPE_7360)
	select FREETZ_AVM_SOURCE_7490_06_30 if FREETZ_AVM_VERSION_06_2X && (FREETZ_TYPE_7490 && FREETZ_TYPE_LANG_DE)
	# in all other cases use 3490.06.31
	select FREETZ_AVM_SOURCE_3490_06_31 if FREETZ_AVM_VERSION_06_2X && !FREETZ_AVM_SOURCE_7360_06_20 && !FREETZ_AVM_SOURCE_7490_06_30
	# 06.5X
	select FREETZ_AVM_SOURCE_3390_06_51 if FREETZ_AVM_VERSION_06_5X && (FREETZ_TYPE_3370 || FREETZ_TYPE_3390)
	select FREETZ_AVM_SOURCE_7490_06_60 if FREETZ_AVM_VERSION_06_5X && (FREETZ_TYPE_7490 && FREETZ_TYPE_LANG_DE)
	# in all other cases use 7490.06.51
	select FREETZ_AVM_SOURCE_7490_06_51 if FREETZ_AVM_VERSION_06_5X && !FREETZ_AVM_SOURCE_3390_06_51 && !FREETZ_AVM_SOURCE_7490_06_60
	# 06.8X
	select FREETZ_AVM_SOURCE_7490_06_83 if FREETZ_AVM_VERSION_06_8X
	# 06.9X
	select FREETZ_AVM_SOURCE_7490_06_93 if FREETZ_AVM_VERSION_06_9X
	# 07.0X
	select FREETZ_AVM_SOURCE_5491_07_01 if FREETZ_AVM_VERSION_07_0X && FREETZ_TYPE_5491
	select FREETZ_AVM_SOURCE_7490_07_01 if FREETZ_AVM_VERSION_07_0X && !FREETZ_TYPE_5491
	# 07.1X
	select FREETZ_AVM_SOURCE_5491_07_12 if FREETZ_AVM_VERSION_07_1X && FREETZ_TYPE_5491
	select FREETZ_AVM_SOURCE_7490_07_11 if FREETZ_AVM_VERSION_07_1X && !FREETZ_TYPE_5491
	bool
