Merge "hikey: Change TARGET_KERNEL_USE to access kernel version"
am: ee455b6056
Change-Id: I1b24d653738e2c14f1f91cc66861353c5b110aa1
diff --git a/hikey.mk b/hikey.mk
index 2368566..db48242 100644
--- a/hikey.mk
+++ b/hikey.mk
@@ -1,7 +1,12 @@
-ifeq ($(TARGET_KERNEL_USE_4_1), true)
-TARGET_PREBUILT_KERNEL := device/linaro/hikey-kernel/Image-dtb-4.1
-TARGET_PREBUILT_DTB := device/linaro/hikey-kernel/hi6220-hikey.dtb-4.1
-TARGET_FSTAB := fstab.hikey-4.1
+ifndef TARGET_KERNEL_USE
+TARGET_KERNEL_USE=4.4
+endif
+TARGET_PREBUILT_KERNEL := device/linaro/hikey-kernel/Image-dtb-$(TARGET_KERNEL_USE)
+TARGET_PREBUILT_DTB := device/linaro/hikey-kernel/hi6220-hikey.dtb-$(TARGET_KERNEL_USE)
+ifeq ($(TARGET_KERNEL_USE), 4.1)
+TARGET_FSTAB := fstab.hikey-$(TARGET_KERNEL_USE)
+else
+TARGET_FSTAB := fstab.hikey
endif
#
diff --git a/hikey/BoardConfig.mk b/hikey/BoardConfig.mk
index 6d17130..d10a51c 100644
--- a/hikey/BoardConfig.mk
+++ b/hikey/BoardConfig.mk
@@ -1,7 +1,7 @@
include device/linaro/hikey/BoardConfigCommon.mk
TARGET_BOARD_PLATFORM := hikey
-ifeq ($(TARGET_KERNEL_USE_4_1), true)
+ifeq ($(TARGET_KERNEL_USE), 4.1)
BOARD_KERNEL_CMDLINE := console=ttyAMA3,115200 androidboot.console=ttyAMA3 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime
else
BOARD_KERNEL_CMDLINE := console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime
diff --git a/hikey/device-hikey.mk b/hikey/device-hikey.mk
index 0347358..9c84e60 100644
--- a/hikey/device-hikey.mk
+++ b/hikey/device-hikey.mk
@@ -14,19 +14,9 @@
# limitations under the License.
#
-ifeq ($(TARGET_PREBUILT_KERNEL),)
-LOCAL_KERNEL := device/linaro/hikey-kernel/Image-dtb
-LOCAL_DTB := device/linaro/hikey-kernel/hi6220-hikey.dtb
-LOCAL_FSTAB := fstab.hikey
-else
-LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
-LOCAL_DTB := $(TARGET_PREBUILT_DTB)
-LOCAL_FSTAB := $(TARGET_FSTAB)
-endif
-
-PRODUCT_COPY_FILES += $(LOCAL_KERNEL):kernel \
- $(LOCAL_DTB):hi6220-hikey.dtb \
- $(LOCAL_PATH)/$(LOCAL_FSTAB):root/fstab.hikey \
+PRODUCT_COPY_FILES += $(TARGET_PREBUILT_KERNEL):kernel \
+ $(TARGET_PREBUILT_DTB):hi6220-hikey.dtb \
+ $(LOCAL_PATH)/$(TARGET_FSTAB):root/fstab.hikey \
device/linaro/hikey/init.common.rc:root/init.hikey.rc \
device/linaro/hikey/init.common.usb.rc:root/init.hikey.usb.rc \
device/linaro/hikey/ueventd.common.rc:root/ueventd.hikey.rc \