-
Notifications
You must be signed in to change notification settings - Fork 22
PR to update README - Workarounds for MacOS xterm, Docker build issue, and root access #13
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
Open
schnorea
wants to merge
2
commits into
Jyx:ubuntu-22.04
Choose a base branch
from
schnorea:xterm-host-path-pip-install-error
base: ubuntu-22.04
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -41,3 +41,44 @@ $ docker start silly_bhaskara | |||||||
| # Finally re-attach to the running container | ||||||||
| $ docker attach silly_bhaskara | ||||||||
| ``` | ||||||||
|
|
||||||||
| ### Additional Xterm Help | ||||||||
| Once you run the docker run command above and are at the '/home/optee/qemu-optee' | ||||||||
| command line, you run the `./launch_optee.sh` script and you get an error about | ||||||||
| not being able to find the xterm (xQuartz) server that looks like this | ||||||||
| ```bash | ||||||||
| * QEMU is now waiting to start the execution | ||||||||
| * Start execution with either a 'c' followed by <enter> in the QEMU console or | ||||||||
| * attach a debugger and continue from there. | ||||||||
| * | ||||||||
| * To run OP-TEE tests, use the xtest command in the 'Normal World' terminal | ||||||||
| * Enter 'xtest -h' for help. | ||||||||
|
|
||||||||
| xterm: Xt error: Can't open display: /private/tmp/com.apple.launchd.CuNDWxl9fm/org.xquartz:0 | ||||||||
| xterm: Xt error: Can't open display: /private/tmp/com.apple.launchd.CuNDWxl9fm/org.xquartz:0 | ||||||||
| ``` | ||||||||
| you don't need to restart the container to fix it. First, press CNTRL-c. | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add |
||||||||
|
|
||||||||
| Try `export DISPLAY=host.docker.internal:0` at the command line and follow that | ||||||||
| with `make run`. The use of `export DISPLAY=host.docker.internal:0` came from | ||||||||
| this conversation | ||||||||
| https://gist.github.com/cschiewek/246a244ba23da8b9f0e7b11a68bf3285?permalink_comment_id=3477013#gistcomment-3477013 | ||||||||
|
Comment on lines
+64
to
+65
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
|
||||||||
| ### Troubleshooting Docker Build | ||||||||
| If you have built the image more than once and start to get strange errors that a | ||||||||
| package can't be found (acts like you haven't run `apt-get update`) try pruning | ||||||||
| the builder cache like this. | ||||||||
| ```bash | ||||||||
| $ docker builder prune | ||||||||
| ``` | ||||||||
| Then try building again. The issue is that the previous `apt-get update` has | ||||||||
| gotten cached and the `docker builder prune` clears that cache. | ||||||||
|
|
||||||||
| ### Getting Root at the Docker Run Commandline | ||||||||
| After you execute the docker run command (as above) you will be put into a command | ||||||||
| line where the toolchain and the QEMU environment will be built and run. | ||||||||
| At the `/qemu-optee$ ` prompt if you run the `whoami` you will be `optee`. | ||||||||
| If you need to be root (IDK: to add a package) the way to get that access is to | ||||||||
| access the container again using `docker exec -it -u 0 <container_name> /bin/bash` where | ||||||||
| you would replace `<container_name>` with the container name you would find by | ||||||||
| doing the `docker ps` command. This should give you root access. | ||||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What about changing this from
script and you get an error about not being able to find the xterm (xQuartz) server that looks like thisto
script, you might get an error on MacOS saying something about not being able to find the xterm (xQuarts), like this:I think that makes it clear that this is a MacOS issue and not normally seen on Linux.