-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: use init and entrypoint from device tree #16
Conversation
2a08055
to
506f21e
Compare
70b67d3
to
0ca8aff
Compare
0ca8aff
to
1d54f45
Compare
30d4840
to
37e3f43
Compare
skel/opt/cartesi/bin/init
Outdated
cd $HOME && | ||
# use entrypoint from device tree when available, otherwise from command line | ||
if [ -s /proc/device-tree/cartesi-machine/entrypoint ]; then | ||
ENTRYPOINT=$(busybox cat /proc/device-tree/cartesi-machine/entrypoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to load this from string if we drop support for entrypoint in the Linux bootargs? Can't we run directly from there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I was running /proc/device-tree/cartesi-machine/entrypoint
directly at first, but then I thought the error messages of invalid commands were less user friendly, so I decided to load in a string.
Example of an error running directly:
cartesi-machine --quiet --no-init-splash -i invalid-command
sh: /proc/device-tree/cartesi-machine/entrypoint: line 1: invalid-command: not found
Example of an error using a string:
cartesi-machine --quiet --no-init-splash -i invalid-command
sh: invalid-command: not found
I could run directly again, which one you think it is better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the first error message is too bad actually. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I changed to run it directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments.
37e3f43
to
1c7ace4
Compare
1c7ace4
to
09fb3f4
Compare
This is related to:
It fixes: