Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FB:< with multi-line output script #413

Open
vlahan opened this issue Feb 1, 2024 · 2 comments
Open

FB:< with multi-line output script #413

vlahan opened this issue Feb 1, 2024 · 2 comments

Comments

@vlahan
Copy link

vlahan commented Feb 1, 2024

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 && ...

@nxpfrankli
Copy link
Contributor

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

  1. Host sends a command, which is an ascii string in a single
      | packet no greater than 64 bytes.

@vlahan
Copy link
Author

vlahan commented Feb 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants