Yocto extra image feature seems to be not in the image - yocto

I've started to work with the Yocto project on a raspberry pi 3 and therefore followed the instructions in this guide.
It adds the dropbear ssh server for remote access
EXTRA_IMAGE_FEATURES_append = " ssh-server-dropbear"
After the creation of the image I checked the image manifest and it seems like dropbear has been added.
dropbear aarch64 2019.78
But it seems like when I run the image the application is not really there. I'd expect something inside /etc/init.d/ but there are no dropbear artifacts.
Also, altough the python meta-layer should be added, the py/python command is unknown on the target.
Can someone tell me what exactly I'm missing?

You're not specifying why you believe dropbear is not part of the image, if it is present on EXTRA_IMAGE_FEATURES (and you even see it in the manifest) I don't see any reason why it wouldn't be there, perhaps you are looking for it in the wrong location?
If you can post an update with the actual error you are getting that would help.
python3 does not come from the meta-python layer, it is part of the core layer (meta), meta-python contains other python related recipes which extend python's functionality.
To install python3 on your image do:
IMAGE_INSTALL += "python3"

Related

Const command not found

I am setting up Nagios check_hpjd plugin, but it doesn't recognize "const" command.
I am using Nagios 4.x on a Linux server, and was setting up some network printers to monitor and decided to add check_hpjd plugin, for more detailed information, but unfortunately it started to give me:
/libexec/check_hpjd: line 1: const: command not found.
I think it is pointless to copy the whole check_hpjd plugin code here, I just copy the first line here, the system gave me error on:
const char *option_summary = "-H host [-C community]\n";
Should I define the const character somehow or how can I fix it, tried to look from several sources on web aswell, but there is very little info about it unfortunately.
You are using source code of that plugin, so the behavior is correct... You need use builded version, like here for Centos7/RHEL7.

Running mapbox-gl-js locally (unable to serve debug page)

Edit:
Summary, I tried to follow only the steps listed in the below two links as applies to windows:
https://github.com/mapbox/mapbox-gl-js/blob/master/CONTRIBUTING.md
https://github.com/stackgl/headless-gl#windows
Here I have reattached the screenshot of the commands that I had problems with:
https://imgur.com/RCQCNU5
One more step I took that I should mention is I also did not find the headless gl when I downloaded the repository, when the install headless gl command did not work I manually copied the file and put it in my local copy under the nodemodules directory thinking it would work but it didnt solve anything. I do think this is related to access issues but I dont know what else I should try to get it working?
First, let's clarify your problem: you want a version of mapbox-gl.js which contains a recently fixed bug.
Your best option is to just wait a couple of weeks for a release.
Failing that, you should build your own, from master. You don't need to set up a debug server for that. You can skip straight to the "Creating a Standalone Build" section.
If the steps for building on Windows don't work for some reason, you could set up a local virtual machine running Ubuntu and use that.
But honestly, just wait a couple of weeks. :)
Just in case some one else need to run this on local server.
After clone
Run npm install
npm run start-debug
It will start listening on port 9966.
Test the debug html files entering to
localhost:9966/debug/FILE_NAME_TO_TEST.html

Adding python internal modules (cgi.py) to yocto image

I am trying to add some python libraries to my custom image.
So far, I successfully added some libraries.
Some others, like sqlalchemy, was requiring some python internal module named “dummy_threading” and thus producing some error output stating "No module named ‘dummy_threading’ ".
I found out you can solve this issue by adding ‘python-threading’ to the image.
Unfortunately, I came across a similar issue with the ‘python-requests’ library, which cannot be imported throwing 'No module named ‘cgi’ ".
cgi.py seems to be a python internal module, much like ‘dummy_threading’, but I can’t find a way to include it to my image.
I already tried to add 'python-cgi' with no success.
Does anyone have a solution to this ?
Lucas
Additionnal info:
Yocto 1.7 (I cannot upgrade it to the newest)
Python 2.7.3
Despite poky already contains maybe all what you need regarding python, as you mention, there are some internal parts of python which are provided in a different way.
A good idea to find out how to get what you miss is to inspect the manifest files. Such files can be found in your layers (basically poky and openembedded-core). For example, in poky is located in:
poky/meta/recipes-devtools/python/python-x.y-manifest.inc
If I check inside mine I can see:
FILES_${PN}-netserver="${libdir}/python2.7/cgi.* ${libdir}/python2.7/*HTTPServer.* ${libdir}/python2.7/SocketServer.* "
Notice the cgi. and the FILES_${PN}-netserver.
Finally that would mean that the package you need is actually "python-netserver".

Confusion: GitHub Project broken(?), Instructions not clear: Mercurial setup(?)

first of all, i've never done something with github, this is my first try, so please be polite and help me on the train.
I would like to use this github-project:
https://github.com/jmmcatee/cracklord which is completly in go language.
from the instructions:
If you'd like to get things build from source, it will first require you to have a working Go build environment with the GOPATH setup. Additionally, you'll probably want Git and Mercurial setup to gather the various libraries and plugins that we've used in the code.
Here are my Questions:
I've done installing git and i'm able to clone the repro, which works fine.
I've installed mercurial, but have no idea how to "setup" mercurial.
Can someone explain what mercurial setup togehter with this githubproject example means?
why i'm asking
after creating a directory git-repos
changing into this directory with cd git-repos
path is now /root/git-repos
# set GOPATH to /root/git-repos
export GOPATH=/root/git-repos
and doing go get github.com/jmmcatee/cracklord
gives this error-message:
go get github.com/jmmcatee/cracklord
can't load package: package github.com/jmmcatee/cracklord: no Go files in /root/git-repos/src/github.com/jmmcatee/cracklord
okay.
So, when i'm following the instructions i'm not able to finish. Can someone explain what i'm doing wrong?
Thank you
Paul
You don't need to set gopath anymore, it is set by default to:
~/go
You don't say which os you're using, but given your paths I assume linux. I suspect you haven't exported the environment variable correctly. You might want to try setting up a simpler package first and verifying you have your go setup right. Follow the instructions here (including verifying your setup is working, and just using the default gopath):
https://golang.org/doc/install
And try downloading and running something simpler (which doesn't require several components installed) to verify your setup first.

Yocto: why is a package included?

I am currently using yocto for building an embedded linux image for TI AM335x (I am using hob, since I find it more comfortable than using command-line).
I start using the recipe for building 'core-image-base' and here is the selection of packages which are included:
Now I would like to exclude the package alsa-utils-1.0.28-r0 from build, since it has some problems compiling for my target and I really do not need it... so, as far as I can understand, I have to remove all the dependencies which brought alsa-utils in (that is: alsa-state and packagegroup-base, looking at following screenshot):
So I move to Package groups tab and I remove packagegroup-base and then I remove alsa-state and alsa-utils from the Included recipes:
Now it seems that alsa-utils is there no more... but if I try to build the image, this is the result:
Why? Who is still bringing-in alsa-utils? What am I doing wrong? Is there a way (even command-line) to know why a package is brought-in by yocto?
Use
bitbake -g alsa-utils -u depexp
to display a dependency tree you should be able to see who's depending on it.
See the openembedded wiki.