summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfang hui <hui.fang@nxp.com>2016-09-29 16:42:35 +0800
committerfang hui <hui.fang@nxp.com>2016-09-30 08:43:51 +0800
commit003230d38ea6b2a50cebe5ed5dd9f0d65ff6a036 (patch)
tree6fd07730a4217d2f5725e064b5d48294262c65af
parent7ee244554b4fb048b7086b72fde939a4ce923918 (diff)
downloadu-boot-imx-003230d38ea6b2a50cebe5ed5dd9f0d65ff6a036.zip
u-boot-imx-003230d38ea6b2a50cebe5ed5dd9f0d65ff6a036.tar.gz
u-boot-imx-003230d38ea6b2a50cebe5ed5dd9f0d65ff6a036.tar.bz2
MA-8793 - [brillo] support imx7d-emmc board
support iot on imx7d emmc board use gpt partition not use encrypt lock for imx7d Signed-off-by: fang hui <hui.fang@nxp.com>
-rw-r--r--configs/mx7dsabresdbrillo_defconfig7
-rw-r--r--drivers/usb/gadget/fastboot_lock_unlock.c4
-rw-r--r--drivers/usb/gadget/fastboot_lock_unlock.h1
-rw-r--r--include/configs/mx6ul_14x14_evk_brillo.h2
-rw-r--r--include/configs/mx7dsabresd.h5
-rw-r--r--include/configs/mx7dsabresdandroid.h26
-rw-r--r--include/configs/mx7dsabresdbrillo.h37
7 files changed, 80 insertions, 2 deletions
diff --git a/configs/mx7dsabresdbrillo_defconfig b/configs/mx7dsabresdbrillo_defconfig
new file mode 100644
index 0000000..b273c4e
--- /dev/null
+++ b/configs/mx7dsabresdbrillo_defconfig
@@ -0,0 +1,7 @@
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7dsabresd/imximage.cfg,MX7D,ANDROID_SUPPORT,BRILLO_SUPPORT,EFI_PARTITION"
+CONFIG_ARM=y
+CONFIG_TARGET_MX7DSABRESD=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SYS_MALLOC_F_LEN=0x400
+CONFIG_DM=y
+CONFIG_DM_THERMAL=y
diff --git a/drivers/usb/gadget/fastboot_lock_unlock.c b/drivers/usb/gadget/fastboot_lock_unlock.c
index 7afc33d..89327fd 100644
--- a/drivers/usb/gadget/fastboot_lock_unlock.c
+++ b/drivers/usb/gadget/fastboot_lock_unlock.c
@@ -58,8 +58,10 @@ inline unsigned char decrypt_lock_store(unsigned char* bdata) {
return *bdata;
}
-inline void encrypt_lock_store(unsigned char lock, unsigned char* bdata) {
+inline int encrypt_lock_store(unsigned char lock, unsigned char *bdata)
+{
*bdata = lock;
+ return 0;
}
#else
diff --git a/drivers/usb/gadget/fastboot_lock_unlock.h b/drivers/usb/gadget/fastboot_lock_unlock.h
index ee2d7a5..c4325f1 100644
--- a/drivers/usb/gadget/fastboot_lock_unlock.h
+++ b/drivers/usb/gadget/fastboot_lock_unlock.h
@@ -34,7 +34,6 @@
#define ALIGN_BYTES 64 /*armv7 cache line need 64 bytes aligned */
//#define FASTBOOT_LOCK_DEBUG
-#define FASTBOOT_ENCRYPT_LOCK
#ifdef FASTBOOT_LOCK_DEBUG
#define DEBUG(format, ...) printf(format, ##__VA_ARGS__)
diff --git a/include/configs/mx6ul_14x14_evk_brillo.h b/include/configs/mx6ul_14x14_evk_brillo.h
index 50c0887..d0d824c 100644
--- a/include/configs/mx6ul_14x14_evk_brillo.h
+++ b/include/configs/mx6ul_14x14_evk_brillo.h
@@ -25,4 +25,6 @@
#define CONFIG_CMD_READ
+#define FASTBOOT_ENCRYPT_LOCK
+
#endif
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index 6d2b32d..1819dc1 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -459,4 +459,9 @@
#if defined(CONFIG_ANDROID_SUPPORT)
#include "mx7dsabresdandroid.h"
#endif
+
+#if defined(CONFIG_BRILLO_SUPPORT)
+#include "mx7dsabresdbrillo.h"
+#endif
+
#endif /* __CONFIG_H */
diff --git a/include/configs/mx7dsabresdandroid.h b/include/configs/mx7dsabresdandroid.h
index c8518a6..6dd951b 100644
--- a/include/configs/mx7dsabresdandroid.h
+++ b/include/configs/mx7dsabresdandroid.h
@@ -33,12 +33,38 @@
#define CONFIG_FASTBOOT_STORAGE_MMC
#define CONFIG_ANDROID_MAIN_MMC_BUS 2
+
+
+#ifdef CONFIG_BRILLO_SUPPORT
+
+#ifdef CONFIG_EFI_PARTITION
+#define CONFIG_ANDROID_BOOT_PARTITION_MMC 1
+#define CONFIG_ANDROID_BOOT_B_PARTITION_MMC 2
+#define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 3
+#define CONFIG_ANDROID_SYSTEM_B_PARTITION_MMC 4
+#define CONFIG_ANDROID_MISC_PARTITION_MMC 7
+#define CONFIG_ANDROID_DATA_PARTITION_MMC 8
+#define FSL_FASTBOOT_FB_PART_NUM 9
+
+#else
+#define CONFIG_ANDROID_BOOT_PARTITION_MMC 1
+#define CONFIG_ANDROID_BOOT_B_PARTITION_MMC 7
+#define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 5
+#define CONFIG_ANDROID_SYSTEM_B_PARTITION_MMC 8
+#define CONFIG_ANDROID_MISC_PARTITION_MMC 9
+#define CONFIG_ANDROID_DATA_PARTITION_MMC 4
+#define FSL_FASTBOOT_FB_PART_NUM 10
+#endif
+
+#else
#define CONFIG_ANDROID_BOOT_PARTITION_MMC 1
#define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 5
#define CONFIG_ANDROID_RECOVERY_PARTITION_MMC 2
#define CONFIG_ANDROID_CACHE_PARTITION_MMC 6
#define CONFIG_ANDROID_DATA_PARTITION_MMC 4
#define CONFIG_ANDROID_MISC_PARTITION_MMC 8
+#endif
+
#define CONFIG_CMD_BOOTA
#define CONFIG_SUPPORT_RAW_INITRD
diff --git a/include/configs/mx7dsabresdbrillo.h b/include/configs/mx7dsabresdbrillo.h
new file mode 100644
index 0000000..9f7ae7e
--- /dev/null
+++ b/include/configs/mx7dsabresdbrillo.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __MX7DSABRESDBRILLO_H
+#define __MX7DSABRESDBRILLO_H
+
+
+#define CONFIG_CMD_FAT
+#define CONFIG_DOS_PARTITION
+
+#define CONFIG_FASTBOOT_LOCK
+
+#define FSL_FASTBOOT_FB_DEV "mmc"
+#define FSL_FASTBOOT_DATA_PART_NUM CONFIG_ANDROID_DATA_PARTITION_MMC
+
+#define CONFIG_SHA1
+#define CONFIG_SHA256
+
+#define CONFIG_SYS_BOOTM_LEN 0x1000000
+
+#define CONFIG_CMD_READ
+
+#ifdef CONFIG_SYS_MMC_ENV_DEV
+#undef CONFIG_SYS_MMC_ENV_DEV
+#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
+#endif
+
+#ifdef CONFIG_SYS_MMC_ENV_PART
+#undef CONFIG_SYS_MMC_ENV_PART
+#define CONFIG_SYS_MMC_ENV_PART 1 /* boot0 area */
+#endif
+
+#endif
+