select CMD_GPT
select RANDOM_UUID
select CMD_GPT_RENAME
+ select CONSOLE_MUX
+ select SYS_STDIO_DEREGISTER
help
The fastboot protocol includes "UCmd" and "ACmd" command.
Be aware that you provide full access to any U-Boot command,
#include "fb_fsl_common.h"
+#include <serial.h>
+#include <stdio_dev.h>
+
#if defined(CONFIG_AVB_SUPPORT) && defined(CONFIG_MMC)
AvbABOps fsl_avb_ab_ops = {
.read_ab_metadata = fsl_read_ab_metadata,
#endif
#endif
}
+
+static void fastboot_putc(struct stdio_dev *dev, const char c)
+{
+ char buff[6] = "INFO";
+ buff[4] = c;
+ buff[5] = 0;
+ fastboot_tx_write_more(buff);
+}
+
+#define FASTBOOT_MAX_LEN 64
+
+static void fastboot_puts(struct stdio_dev *dev, const char *s)
+{
+ char buff[FASTBOOT_MAX_LEN + 1] = "INFO";
+ int len = strlen(s);
+ int i, left;
+
+ for (i = 0; i < len; i += FASTBOOT_MAX_LEN - 4) {
+ left = len - i;
+ if (left > FASTBOOT_MAX_LEN - 4)
+ left = FASTBOOT_MAX_LEN - 4;
+
+ memcpy(buff + 4, s + i, left);
+ buff[left + 4] = 0;
+ fastboot_tx_write_more(buff);
+ }
+}
+
+struct stdio_dev g_fastboot_stdio = {
+ .name = "fastboot",
+ .flags = DEV_FLAGS_OUTPUT,
+ .putc = fastboot_putc,
+ .puts = fastboot_puts,
+};
#include <linux/usb/composite.h>
#include <linux/compiler.h>
#include <g_dnl.h>
+#include <serial.h>
+#include <stdio_dev.h>
#define FASTBOOT_INTERFACE_CLASS 0xff
#define FASTBOOT_INTERFACE_SUB_CLASS 0x42
NULL,
};
+#if CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT)
+extern struct stdio_dev g_fastboot_stdio;
+#endif
+
static void rx_handler_command(struct usb_ep *ep, struct usb_request *req);
static void fastboot_fifo_complete(struct usb_ep *ep, struct usb_request *req)
if (s)
g_dnl_set_serialnumber((char *)s);
+#if CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT)
+ stdio_register(&g_fastboot_stdio);
+#endif
+
return 0;
}
f->os_desc_table = NULL;
list_del(&fb_os_desc.ext_prop);
memset(fastboot_func, 0, sizeof(*fastboot_func));
+
+#if CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT) && CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
+ struct stdio_dev *dev;
+ dev = stdio_get_by_name("fastboot");
+ if (dev)
+ stdio_deregister_dev(dev, 1);
+#endif
+
}
static void fastboot_disable(struct usb_function *f)