pandaboard: get rid of build variables

get rid of build variables for kernel config and hw graphics.

We were previously setting them based on Build variables.We are
now setting them based on the kernel config available in the
build.Depending on the kernel config available we decide if
kernel supports hardware accelerated graphics. This needs to
be revisited once graphics support is available in 3.4+ kernels.

Change-Id: Ie40ef9e52ebe6a05c8ed89a6059f017ce78b5284
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 047f5f5..4d43f11 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -7,8 +7,10 @@
 TARGET_NO_BOOTLOADER := true # Uses u-boot instead 
 TARGET_NO_KERNEL := false
 DEVICE_TREES := omap4-panda:board.dtb
-ifeq ($(KERNEL_CONFIG),)
+ifneq ($(wildcard $(TOP)/kernel/arch/arm/configs/android_omap4_defconfig),)
 KERNEL_CONFIG := android_omap4_defconfig
+else
+KERNEL_CONFIG := omap4plus_defconfig
 endif
 TARGET_USE_UBOOT := true
 UBOOT_CONFIG := omap4_panda_config
diff --git a/device.mk b/device.mk
index f9b1664..ae00a89 100644
--- a/device.mk
+++ b/device.mk
@@ -50,6 +50,13 @@
 PRODUCT_PROPERTY_OVERRIDES += \
         ro.opengles.version=131072
 
+# 3.4 kernel doesn't have hardware acceleration. We are enabling the
+# support for software graphics by checking if the kernel config is
+# set for 3.4 kernel .TODO: Revisit when 3.4+ kernel supports SGX
+ifneq ($(wildcard $(TOP)/kernel/arch/arm/configs/omap4plus_defconfig),)
+TARGET_NO_HARDWAREGFX=1
+endif
+
 ifeq ($(TARGET_NO_HARDWAREGFX),1)
 PRODUCT_PROPERTY_OVERRIDES += \
         ro.nohardwaregfx=true