# architecture
BR2_mipsel=y
BR2_mips_32r2=y

# linux header same as custom kernel ie 4.4.x
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y

# kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,CreatorDev,linux,openwrt-4.4.14)/linux-openwrt-4.4.14.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="pistachio"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
# vmlinux.gz.itb image includes img/pistachio_marduk device tree
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="vmlinux.gz.itb"

# bootloader flash support
BR2_PACKAGE_MTD=y

# wireless firmware
BR2_PACKAGE_UCCP420WLAN=y

# wireless package
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y

# bootloader
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pistachio_marduk"
BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,CreatorDev,u-boot,v1.0.5)/u-boot-CreatorDev-v1.0.5.tar.gz"
BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-pistachio_marduk-2015.10-v1.0.5.img"

# fitimage / image generation
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
BR2_ROOTFS_POST_BUILD_SCRIPT="board/ci40/post-build.sh"

# image generation
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ci40/genimage.cfg"
