aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Scott <michael.scott@linaro.org>2014-09-28 16:28:16 -0700
committerRob Herring <robh@kernel.org>2014-11-14 15:35:57 -0600
commitdd689a37af47eb6b54f30d30893fd4bc88fbf414 (patch)
treec2278bb274e08c077c86cde209c7719c85c9a301 /include
parented24d67d9955b39731b7663784d1e51b74ca03d1 (diff)
distro_bootcmd: add support for android bootimg (via CONFIG_CMD_BOOTAI)
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/config_distro_bootcmd.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index be616e8bfd..56cc33745c 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -28,6 +28,25 @@
#define BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) \
#devtypel #instance " "
+#ifdef CONFIG_CMD_BOOTAI
+#define BOOTENV_DEV_BLKDEV_ANDROID(devtypeu, devtypel, instance) \
+ "bootcmd_" #devtypel #instance "=" \
+ "if mmc dev " #instance "; " \
+ "then setenv devtype mmc; " \
+ "setenv devnum " #instance "; " \
+ "bootai " #instance "; fi\0"
+
+#define BOOTENV_SHARED_ANDROID
+#define BOOTENV_DEV_ANDROID BOOTENV_DEV_BLKDEV_ANDROID
+#define BOOTENV_DEV_NAME_ANDROID BOOTENV_DEV_NAME_BLKDEV
+#else
+#define BOOTENV_SHARED_ANDROID
+#define BOOTENV_DEV_ANDROID \
+ BOOT_TARGET_DEVICES_references_ANDROID_without_CONFIG_CMD_BOOTAI
+#define BOOTENV_DEV_NAME_ANDROID \
+ BOOT_TARGET_DEVICES_references_ANDROID_without_CONFIG_CMD_BOOTAI
+#endif
+
#ifdef CONFIG_CMD_MMC
#define BOOTENV_SHARED_MMC BOOTENV_SHARED_BLKDEV(mmc)
#define BOOTENV_DEV_MMC BOOTENV_DEV_BLKDEV