mfgtools
mfgtools copied to clipboard
FB:< with multi-line output script
Hi all,
it seems that at the moment the "PROTOCOL:<" construct (for using stdout as command source) works only with single-line output.
e.g. for test.sh
#!/bin/bash
echo "ucmd setenv env1 value1"
echo "ucmd setenv env2 value2"
FB:< sh -c "test.sh"
would only process the first command.
Adding multi-line / multi-command support for < (in which each output line is interpreted as separate command) would be extremely beneficial for production-time customization tasks.
Alternatively, it would be beneficial if the command line buffer is increased so one can use longer command concatenation chains like:
echo "ucmd setenv env1 value1 && setenv env2 value2 && ...
multi-line is good idea. let me check. command length limited by uboot fastboot. Standard fastboot define is 64byte
https://android.googlesource.com/platform/system/core/+/2ec418a4c98f6e8f95395456e1ad4c2956cac007/fastboot/fastboot_protocol.txt
- Host sends a command, which is an ascii string in a single | packet no greater than 64 bytes.
Thanks for the quick feedback!
Yes, it seems that the buffer extension is not possible, thus the support for multiple lines seems like the way to go here.