How to launch weston with Core-Image-Weston Yocto Xilinx? - xilinx

I have made a core image weston with yocto for xilinx board. But I am facing difficulty in launching weston at target board. It is creating weston user and wayland-0 in the /run/ directory. so, I have set the XDG_RUNTIME_DIR=/run. I am trying to launch it with the following command
openvt -c 7 -w -v -- usr/bin/weston --tty=/dev/tty7 --device=/dev/fb0
--log=weston.log
Then when I try to launch weston-terminal, It says Cannot create display: permission denied
Can anyone help me how to launch the weston properly?
Another thing that I didn't get is that weston.service is that it is creating weston user. Can anyone help me this?
I am trying to integrate weston with fb0 device in core-image-weston for xilinx

Related

Problem with Jenkins running Robot Framework script

I am trying to automate the execution of Robot Framework using Jenkins.
But when I run Jenkins I am receiving the error "Permission denied". You can see bellow the error's print screen.
Despite several attenpts Im not able to identify where this restriction is.
I have already include the Jenkins user as SUDO user, but the error is still there.
I also applied o CHMOD 777 /home/eduardo/.local/bin/robot but did not solve.
Can someone please tell me how I can identify where this restriction (Permission denied) is.
Thank in advance.

Errors during first flashing of the android IoT image for Pico Pro Maker Kit

Hello Im trying to create initial flash/build for IoT development following this tutorial https://developer.android.com/things/hardware/imx7d.html#flashing_the_image
Im sorry if my questions is too broad, this is my first IoT attempt, but it seems to me like I have a wrong setup, beacuse Im constantly running into new errors.
Im stuck at step 2.4 Execute the flash-all.sh. Running
sudo ./flash-all.sh
I got this in my logs:
./flash-all.sh: line 52: ./u-boot.imx: Permission denied
If I change permissons
chmod 777 u-boot.imx
I got
./flash-all.sh: line 52: ./u-boot.imx: cannot execute binary file:
Exec format error
I already solved several other issues which werent described in tutorial, including
I have to run script as sudo, otherwise I got
< waiting for any device >
I had to rewrite fastboot command to $(which fastboot) inside flash-all.sh (same with flash and bootloader), otherwise commands are unknown even thought I added them to PATH
I am using
ubuntu 16.14,
android studio with installed sdk 26
Pico Pro Maker Kit with Pico i.MX7 Dual Development Board
What am I doing wrong?
I had to rewrite fastboot command to $(which fastboot) inside flash-all.sh (same with flash and bootloader), otherwise commands are unknown even thought I added them to PATH
This seems like it might be the root of the problem, as somehow the subsequent lines for each command are not being parsed as arguments for fastboot, but rather as their own executable commands.
You also shouldn't need to run the script with sudo. This might be why you can run which fastboot successfully (which would indicate it's in your PATH), but the script cannot see this.

Error when attempting to run UI automation script from jenkins

I am using Xcode 6.1. And i need to run a UI automation script from jenkins as a post build action. The command that i use is shown below.
instruments -t $TRACETEMPLATE -w $DEVICE $APP_PATH -e UIASCRIPT $SCRIPT -e UIARESULTSPATH $RESULTS_PATH | grep "<" > test-reports/test-results.xml
When i run that the following error is thrown by jenkins.
Failed to authorize rights (0x1) with status: -60007.
2014-11-12 16:31:30.685 instruments[488:2607] -[XRSimulatorDevice prepareConnection:]: Unable to authorize simulated daemon (99637): 8
Instruments Trace Error : Target failed to run: Permission to debug com.test.app was denied.
Any help is much appreciated.
The user that invokes Instruments must have developer permissions. The user must be in the _developer group.
Security permissions allowing the user to access Instruments must be set. See the man page for DevToolsSecurity
The user must be logged in to a window server to use the simulator. How to do this will depend somewhat on your Jenkins and OS configuration for that user. In older versions of MacOS creating an SSH connection back into the machine and running Instruments through that connection typically worked. YMMV.
Note that any of the above steps escalates the rights for the Jenkins user, which was security implications.
I got an almost identical error message to yours, and it seemed to be because when Jenkins is launched as a Launch Daemon, it doesn't have access to the screen, even if you log in as "jenkins".
I found the solution from reading this discussion: https://issues.jenkins-ci.org/browse/JENKINS-14421
You can either launch Jenkins from Terminal with java -jar jenkins.war, or you can create a Launch Agent, which runs as the logged-in user and has access to the user's screen.
I achieved the latter solution by moving /Library/LaunchDaemons/org.jenkins-ci.plist to /Library/LaunchAgents/org.jenkins-ci.plist and removing the UserName key and value from the plist. Now Jenkins doesn't start automatically when I boot the machine, but it does start when I log into the desktop, which is required for running UI Automation tests anyway.
It appears that Jenkins still can't actually launch the Simulator app, but if Simulator is already running, the UI Automation scripts proceed just fine.
I also got this error message. Moving service from LaunchDaemons to LaunchAgents didn't solve the problem. My solution was as following:
remove the service by deleting /Library/LaunchAgents/org.jenkins-ci.plist file
create an iOS application using Automator tool. (Which I think exists by default):
I chose "Library" -> "Utilities" -> "Shell Script".
Enter the content of /Library/Application Support/Jenkins/jenkins-runner.sh.
Put export JENKINS_HOME=/path/to/jenkins at the top.
Save the app somewhere
Go to Preferences -> Users & Groups -> choose your user -> Add the saved app.
This way, jenkins is run as an application after login and it has all the privilages of any other application.

Problems with Cloud SDK

So I am a complete noob and have no idea how to even navigate these forum as it all sound like a foreign language. My issue is I recent was accepted to use Google page speed service and cannot even get the first step out of the way which is installing Cloud SDK.
Here is step by step what I did:
Extracted all from zip file
Clicked to launch the Batched file (upon clicking the command prompt black screen flashed in the corner, no instructions or anything else)
When attempting to authenticate google cloud platform by clicking windows key + r. THen typing in 'gcloud auth login', I get a message that says, "cannot find 'gcloud'.....".
When you run install.bat, this is an interactive process that should not exit immediately. I'm guessing you don't have Python installed? Install Python 2.7 and try again.
After the installer runs, it will print directions on how to add gcloud to your PATH. In general, though, gcloud is a command line tool that you shouldn't really run using windows+r. It's best to open a cmd prompt so you can more easily run multiple commands.

iphone reboot programmatically

I have code
system("reboot")
The reboot command works in the terminal, but even if I run the app as root, the operation is still denied. Has anyone found any way that works, or can explain a bit about SBSetting's reboot, which makes me curious?
I have finally found a way to programmatically restart an iOS device without rooting a device!!!!
The command line tool to restart an iOS device is called libimobiledevice:
http://krypted.com/mac-os-x/use-libimobiledevice-to-view-ios-logs/
It is truly amazing. One snag I ran into while installing was trying to install this line:
brew install -v --devel --fresh automake autoconf libtool wget libimobiledevice
However I got around the install problem by running this line:
brew install -v --fresh automake autoconf libtool wget libimobiledevice
After that problem, I followed the rest of the instructions and voila!
Most of the commands can be found on this page:
http://krypted.com/uncategorized/command-line-ios-device-management/
The magic command that restarts the iOS device is:
idevicediagnostics restart
What is truly amazing about this tool is not only restarting an iOS device but also outputting iOS device logs to mac's terminal app using the following command:
idevicesyslog
I figured out a way to do it, although it's a bit convoluted. The problem is that even if you setup your app to run as root, when you make system() calls, you're apparently still limited to user mobile privileges. Since mobile cannot call reboot (successfully), this doesn't work.
The way I got around this problem is to take advantage of a new feature that SBSettings supports. SBSettings has a privileged daemon process that runs. It allows you to plug in your own commands, by simply writing a script (or other executable) and dumping it in the appropriate directory (/var/mobile/Library/SBSettings/Commands). Once you then restart the sbsettingsd process, you can get it to run your script by posting a notification. If you name your script
com.mycompany.reboot
then from within your app, you can execute this code:
#import <notify.h>
notify_post("com.mycompany.reboot");
Then, you make com.mycompany.reboot a simple shell script like this:
#!/bin/sh
reboot
And make sure to chmod 755 on your com.mycompany.reboot script. The full details of this SBSettings command feature can be found here:
http://thebigboss.org/guides/sbsettings-toggle-spec (see Calling External Functions and Scripts ...)
Anyway, it does require your app to depend on SBSettings, but it's a free app, and most users would probably want to have it anyway. For now, it accomplishes the goal of rebooting (or anything else that requires root access) programmatically, via notify_post().
This answer might feel hacky to some but I have not found a better solution on how to restart an iOS device that has not been jailbroken so here goes my answer:
In order to restart a device from the command line I do some prep work:
Connect device to computer
Add iTunes shortcut to your dock
Select spotlight and search for an application called Automator [must have Xcode installed in order to launch Automator!]
When Automator launches, select the Application option
Select the record button to start recording following actions
Select the iTunes shortcut
Select your device from the Device options
Select the Restore Backup... button
Select the Restore button
Select the stop button on the Automator app to stop recording.
From the Automator application, select File from the top bar and Save your newly recorded app to a location of your choosing
At this point you have an app file that will execute the steps mentioned above. I tend to leave iTunes open as it will always have the iOS device hooked up and ready to be accessed. When iTunes is closed and relaunched, the device takes time to fully connect with iTunes and this tends to break the flow of the Automator app.
At this point I can go into a terminal, go to the location of the app file and run the following command [EXAMPLE]:
open automator.app
(replace 'automator.app' with the name of your file)
If you are like me and your are running this command in jenkins, you will need to run the following commands:
open [location]/[your_app_name.app]
sleep 30
For some reason, the automator app needs the sleep time to complete all the recorded actions.
Also, I am sure you can also write an applescript to do all of this but I hate applescript and took the easy way out!
did you try NSTask: Execute a terminal command from a Cocoa app
This is not possible if the app is running in its sandbox. on a jailbroken phone you might be able to execute the reboot shell command.

Resources