summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/cmd_fastboot.c18
-rw-r--r--include/configs/mx6sabreandroid_common.h2
-rw-r--r--include/configs/mx6slevkandroid.h2
-rw-r--r--include/configs/mx6sxsabresdandroid.h2
4 files changed, 24 insertions, 0 deletions
diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
index fc3bdba..a8ad8e2 100644
--- a/common/cmd_fastboot.c
+++ b/common/cmd_fastboot.c
@@ -67,6 +67,7 @@
#include <libfdt.h>
#include <fdt_support.h>
#endif
+#include <asm/bootm.h>
#ifdef CONFIG_FASTBOOT
@@ -1748,7 +1749,24 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* If no bootargs env, just use hdr command line */
if (!commandline) {
commandline = (char *)hdr->cmdline;
+#ifdef CONFIG_SERIAL_TAG
+ char appended_cmd_line[FASTBOOT_BOOT_ARGS_SIZE];
+ struct tag_serialnr serialnr;
+ get_board_serial(&serialnr);
+ if (strlen((char *)hdr->cmdline) +
+ strlen("androidboot.serialno") + 17 < FASTBOOT_BOOT_ARGS_SIZE) {
+ sprintf(appended_cmd_line,
+ "%s androidboot.serialno=%08x%08x",
+ (char *)hdr->cmdline,
+ serialnr.high,
+ serialnr.low);
+ commandline = appended_cmd_line;
+ } else {
+ printf("Cannot append androidboot.serialno\n");
+ }
+
setenv("bootargs", commandline);
+#endif
}
/* XXX: in production, you should always use boot.img 's cmdline !!! */
diff --git a/include/configs/mx6sabreandroid_common.h b/include/configs/mx6sabreandroid_common.h
index 1645b1b..6602c7d 100644
--- a/include/configs/mx6sabreandroid_common.h
+++ b/include/configs/mx6sabreandroid_common.h
@@ -7,6 +7,8 @@
#ifndef MX6_SABRE_ANDROID_COMMON_H
#define MX6_SABRE_ANDROID_COMMON_H
+#define CONFIG_SERIAL_TAG
+
#define CONFIG_USB_DEVICE
#define CONFIG_IMX_UDC 1
diff --git a/include/configs/mx6slevkandroid.h b/include/configs/mx6slevkandroid.h
index 0bf67c5..a2447c1 100644
--- a/include/configs/mx6slevkandroid.h
+++ b/include/configs/mx6slevkandroid.h
@@ -10,6 +10,8 @@
#include <asm/imx-common/mxc_key_defs.h>
+#define CONFIG_SERIAL_TAG
+
#define CONFIG_USB_DEVICE
#define CONFIG_IMX_UDC 1
diff --git a/include/configs/mx6sxsabresdandroid.h b/include/configs/mx6sxsabresdandroid.h
index bf78de4..0c16fe8 100644
--- a/include/configs/mx6sxsabresdandroid.h
+++ b/include/configs/mx6sxsabresdandroid.h
@@ -8,6 +8,8 @@
#ifndef __MX6SX_SABRESD_ANDROID_H
#define __MX6SX_SABRESD_ANDROID_H
+#define CONFIG_SERIAL_TAG
+
#define CONFIG_USB_DEVICE
#define CONFIG_IMX_UDC 1