TianoCore UEFI Development Kit build configuration, TargetTool produces unexpected configuration - firmware

I'm building UEFI application for x86-64 based board. My application shall be based on UDK2018 and utilizes its' build system. My build host is Ubuntu 17. I'm trying to use TargetTool to setup the build configuration for the emulation environment (that is, at this stage I'm like to build and to run my application on the emulator). I'm using the tool accordingly to the documented at the "EDK II BaseTools User Guides":
TargetTool --arch=X64 --platform=EmulatorPkg/EmulatorPkg.dsc --target=DEBUG --tagname=GCC5 Set
I'm expecting that after the above command finishes, the build environment will be configured. But this is not what actually happens:
TargetTool Print
generates the follow output:
BUILD_RULE_CONF = Disable
TOOL_CHAIN_TAG = Disable
TARGET = Disable
TOOL_CHAIN_CONF = Disable
TARGET_ARCH = Disable
MAX_CONCURRENT_THREAD_NUMBER = Disable
ACTIVE_PLATFORM = EmulatorPkg/EmulatorPkg.dsc
What I'm doing wrong? What I miss in my understanding of how the tool is expected to work?

Did you check to make sure there was an existing target.txt in the Conf directory of the workspace before running TargetTool? If you haven't run edksetup.sh in the workspace directory then target.txt doesn't exist.
https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions

Related

How configure Azure function project in Intellij/Pycharm run/debug configurations on mac

How to configure Azure function project in Intellij/Pycharm run/debug configurations on Mac because I've tried to set it by my own but it doesnt work.
I would like to replace shell command: func start with run config
The image below from Pycharm
UPDATE
I've added path to Azure-CLI and imported my app-settings
I'm trying to configure the run configs but it asks to select the module but there is no any module in dropdown (see pic)
UPDATE-UPDATE:
Here is what azure-tools-for-intellij team me answered:
They dont support pure python functions run yet
I think you shouldn't use row shell scrip with IntelliJ/PyCharm instead of this you should use Azure Toolkit for IntelliJ and run/debug your functions like in this guide.
Also when you install Azure Toolkit for IntelliJ you will have the opportunity to create run/debug configuration with predefined Azure Function ready template.
Just example:
I found the way to debug in Intellij Idea/PyCharm.
add these lines at the top of your file/module:
import pydevd_pycharm
pydevd_pycharm.settrace('127.0.0.1', port=9091, stdoutToServer=True, stderrToServer=True)
set Python Debug Server with host and port in Run/Debug Configs
run your azure functions as used to (func host start) and press debugging button.
The way I do it in PyCharm is to define a shell script configuration (Edit Configurations > Shell Script) and set:
Execute: Script set
Script text: func start
Working directory: should be to project directory where host.json etc. is located
Environment variables: leave empty
Execute in the terminal: checked
Run this configuration, which will start the test server in terminal. Then go to Run > Attach to Process... and select the process (usually it's the one without any path after the number).

how to start Leingen with java -Djavax.net.debug=true option?

I am trying to diagnose a few issues with ssl connectivity with Leingen. I am trying to find what SSL Key Store and Trust Store is being Used by Leingen,
I am behind a corporate firewall and we have self signed certificates deployed on all our desktops . I am running lein.bat on a windows 10.
Hence I have to start Leingen with java -Djavax.net.debug=true option.
The :jvm-opts in the project.clj wont work -- I need to make sure the Liengen's JVM is started with this option
You can set leiningen JVM options by setting LEIN_JVM_OPTS environment variable before running lein in the same terminal session.
The lein command is just a shell script which eventually invokes java with various options. You can edit this script to see what options are used and/or to modify them.
As Piotrek mentioned, the LEIN_JVM_OPTS environment variable is the canonical way of passing options to the jvm in which lein runs. You can see it used on line 372 of the source code.
For your case:
> export LEIN_JVM_OPTS='-Djavax.net.debug=true'
> lein clean
> lein run
Since you're running windows, you'll want to actually look at the lein.bat file. You'll still need to update LEIN_JVM_OPTS, but how you go about it will be a bit different. If you're using windows command terminal (cmd.exe) you will want to use the set command.
set LEIN_JVM_OPTS="-Djavax.net.debug=true"
The command is likely different if you're using powershell, and you can likely find out how to set that on this page on environment variables.

Cannot run Cordova Applications using Visual Studio 2013

I have installed all third party setups required for "Multi Device Hybrid Apps" successfully. But when i go to run my app using Visual Studio 2013 it gives me following two errors :
Error 1: cmd: Command failed with exit code 255
Error 2: The command ""C:\Users\PC-Name\AppData\Roaming\npm\node_modules\vs-mda\vs-cli"
prepare --platform Android --configuration Debug --projectDir . --projectName "Test2"
--language "en-US"" exited with code 8.
I have checked all Environment Variables which are at there right variables.
Kindly tell me how to get rid off from above errors.....
Exit code 8 often indicates that at least one of the environment variables that Cordova requires for build has not been added to your path.
There are three environment variables that must be defined:
1) %JAVA_HOME% -- C:\Program Files(x86)\Java\jdk1.7.0_55
2) %ADT_HOME% -- C:\Users\YOUR_NAME_GOES_HERE\AppData\Local\Android\android-sdk
3) %ANT_HOME% -- C:\apache-ant-1.9.3
Note -- The paths for these tools may be different on your PC. You need to verify the actual install paths for each.
Once you have defined these variables, copy the entry below into your System path variable. Reboot PC after making these changes.
%JAVA_HOME%\bin;%ADT_HOME%\tools;%ADT_HOME%\platform-tools;%ANT_HOME%\bin;
A similar question was covered in an earlier post.
I figured out the real cause, just update your node.js or either remove spaces from project directory path.
For Example :
Before Project Directory Path : C:/Users/Jon Snow/MyProjects/ProjectName
After Project Directory Path : C:/Users/JonSnow/MyProjects/ProjectName

How do you compile a Pharo VM without an image?

I have already cloned the VM and installed all dependencies for my platform. Now I am a bit confused because a couple of guides suggests that Pharo image should be started to generate the C sources translated from Slang.
"Unix"
PharoVMBuilder buildUnix32.
"OSX"
PharoVMBuilder buildMacOSX32.
"Windows"
PharoVMBuilder buildWin32.
But how you generate a VM when you cannot start a VM in your platform? This sounds like chicken and egg problem.
This means is not possible to build a VM if you cannot start an image in that platform?
If you download pre-generated sources from the CI server as suggested by Esteban, you don't need the pharo-vm sources cloned from any repository. Just uncompress in a new folder and build from there.
Assuming you have your new sources in c:\phs, open directories.cmake and rename the hardcoded path as follows:
set(topDir "c:/phs/")
set(buildDir "c:/phs/build")
set(thirdpartyDir "${buildDir}/thirdparty")
set(platformsDir "c:/phs/platforms")
set(srcDir "c:/phs/src")
set(srcPluginsDir "${srcDir}/plugins")
set(srcVMDir "${srcDir}/vm")
set(platformName "win32")
set(targetPlatform ${platformsDir}/${platformName})
set(crossDir "${platformsDir}/Cross")
set(platformVMDir "${targetPlatform}/vm")
set(outputDir "c:/phs/results")
As you could not start a VM, I suppose you need to change at least the compilation flags used to generate the sources in the CI server. They are in c:\phs\build\CMakeLists.txt specially the following flags:
-march=... (your processor architecture, search for Safe Cflags)
Removing -g0 which suppress debug options
Remove -O2 (optimizations)
Remove -DNDEBUG
Modify -DDEBUGVM=0 to -DDEBUGVM=1
and finally start the build script
cd /c/phs/build
bash build.sh
You need to pre-generate the sources outside or take pre-generated sources from other place.
Let's assume you want to compile a kind of unix, you can download pre-generated sources from here:
https://ci.inria.fr/pharo/view/3.0-VM/job/PharoSVM/Architecture=32,Slave=vm-builder-linux/lastSuccessfulBuild/artifact/sources.tar.gz (for a stack vm)
https://ci.inria.fr/pharo/view/3.0-VM/job/PharoVM/Architecture=32,Slave=vm-builder-linux/lastSuccessfulBuild/artifact/sources.tar.gz (for a cog vm)

How do I install this service_wrapper for mongrel/rails on my windows server?

I have been given the unpleasant task of installing a Rails 3 app I have written on Windows Server 2008 (definitely not my choice - was promised a linux server but I.T. pulled the rug out at the last minute so please don't suggest a change in environment as a solution).
I followed the instructions on this blog post (with a few minor modifications) and now actually have my app up and running under Windows/IIS (proxying mongrel) after a great deal of frustration. The only thing remaining is to get mongrel running as a service.
Unfortunately the mongrel gem has not been kept up-to-date for Rails 3 and while I can get the app running under mongrel at the command line I am unable to use mongrel_service to get the app running as a service.
The solution to this appears to be to use the service_wrapper project on github which has been mentioned in this previous question. The project is not yet complete but apparently functional but comes without documentation/binaries. I have looked through the source-code and don't really understand what is it/how it works so was wondering if someone can point me in the right direction (or, even better, walk me through how) to get this installed.
So close, yet still so far.....
Alright I have this worked out (with a little help from luislavena himself - thanks).
Download service_wrapper-0.1.0-win32.zip from https://github.com/luislavena/service_wrapper/downloads and extract service_wrapper.exe from bin/. I extracted it to C:\service_wrapper.
Next set up a configuration file. I used the hello example and modified it for my app then placed it in the C:\service_wrapper directory.
; Service section, it will be the only section read by service_wrapper
[service]
; Provide full path to executable to avoid issues when executable path was not
; added to system PATH.
executable = C:\Ruby192\bin\ruby.exe
; Provide there the arguments you will pass to executable from the command line
arguments = C:\railsapp\script\rails s -e production
; Which directory will be used when invoking executable.
; Provide a full path to the directory (not to a file)
directory = C:\railsapp
; Optionally specify a logfile where both STDOUT and STDERR of executable will
; be redirected.
; Please note that full path is also required.
logfile = C:\railsapp\log\service_wrapper.log
Now just create the service with
sc create railsapp binPath= "C:\service_wrapper\service_wrapper.exe C:\service_wrapper\service_wrapper.conf" start= auto
(watch for the spaces after binPath= and start=. It won't work without them)
Then start it with
net start railsapp
And you're home and hosed!
I ought to contribute due to this article. For config of using bundle exec, use the following:
Note that I am setting up rubyCAS! it's a great OpenCAS authentication mechanism!!!
; Service section, it will be the only section read by service_wrapper
[service]
; Provide full path to executable to avoid issues when executable path was not
; added to system PATH.
executable = C:\Ruby\bin\ruby.exe
; Provide there the arguments you will pass to executable from the command line
arguments = D:\rubycas-server bundle exec rackup -s mongrel -p 11011
; Which directory will be used when invoking executable.
; Provide a full path to the directory (not to a file)
directory = D:\rubycas-server
; Optionally specify a logfile where both STDOUT and STDERR of executable will
; be redirected.
; Please note that full path is also required.
logfile = D:\rubycas-server\log\service_wrapper.log