Преглед на файлове

u-boot: fsl_updater: handle uboot commands from utp messages

If receiving a message starting with "ubootcmd" string from utp,
the rest of the string will be interpreted as a uboot command and
try to be executed. This way all uboot command functionalities are
exposed to the mfg user.

Signed-off-by: Juan Gutierrez <b44802@freescale.com>
Juan Gutierrez преди 11 години
родител
ревизия
9f2eb216f1
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      drivers/usb/gadget/fsl_updater.c

+ 4 - 0
drivers/usb/gadget/fsl_updater.c

@@ -549,6 +549,10 @@ struct utp_user_data *utp_handle_command(char *cmd, u64 payload)
 		printf("%s\n", cmd);
 		utp_run(argbuf);
 	}
+	else if (strncmp (cmd, "ubootcmd", 8) == 0) {
+		sprintf(argbuf, cmd + 8);
+		utp_run(argbuf);
+	}
 
 	answer = utp_user_data_alloc(0, size);
 	if (flags & UTP_FLAG_STATUS)