[yocto] [meta-security][PATCH] checksec: update to 1.11.1

2019-05-15 Thread Armin Kuster
* checksec.sh: Updated to 1.11.1
* checksec.sh: resolved issues with readelf
* checksec.sh: Added docker images for testing
* checksec.sh: Added armhf and aarch64 libc locations
* checksec.sh: Replace FS_COUNT with fgrep
* checksec.sh: Fixed symbols count in csv
* checksec.sh: Fixed RW-RPATH and RW-RUNPATH
* checksec.sh: Added stack canaries generated by intel compiler
* checksec.sh: Mute stat errors for non-existent directories
* checksec.sh: Removed invalid json structures and duplicate kernel checks
* checksec.sh: fixed spaces in -d option
* checksec.sh: Added stack-protector-string check
* checksec.sh: Add arm64 specific kernel checks
* checksec.sh: Add REFCOUNT_FULL to kernel tests
* checksec.sh: Remove OSX support

Signed-off-by: Armin Kuster 
---
 .../checksec/{checksec_1.11.bb => checksec_1.11.1.bb}   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename recipes-security/checksec/{checksec_1.11.bb => checksec_1.11.1.bb} (91%)

diff --git a/recipes-security/checksec/checksec_1.11.bb 
b/recipes-security/checksec/checksec_1.11.1.bb
similarity index 91%
rename from recipes-security/checksec/checksec_1.11.bb
rename to recipes-security/checksec/checksec_1.11.1.bb
index 59a67bd..835dffc 100644
--- a/recipes-security/checksec/checksec_1.11.bb
+++ b/recipes-security/checksec/checksec_1.11.1.bb
@@ -6,7 +6,7 @@ HOMEPAGE="https://github.com/slimm609/checksec.sh;
 
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=93fddcca19f6c897871f9b5f9a035f4a"
 
-SRCREV = "a57e03c4f62dbaca0ec949bbc58491fb0c461447"
+SRCREV = "3c15cb89641c700096fdec0c1904a0cf9b83c5e2"
 SRC_URI = "git://github.com/slimm609/checksec.sh"
 
 S = "${WORKDIR}/git"
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Upgrading to Sumo triggered issue with python3 autopackaging - "ERROR: Nothing RPROVIDES 'python3-signal'"

2019-05-15 Thread Davis Roman
Hi,

Upon further inspection, I found a previous commit that appears to
have a bit more information:

python: Restructure python packaging and replace it with autopackaging
(http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=8d94b9db221d1def42f091b991903faa2d1651ce)


The following text appears helpful:


How to add a new package:
 - If a user wants to add a new package all that has to be done is
   modify the python2-manifest.json file, and add the required file(s)
   to the FILES list, the script should handle all the rest.
   Real example:
   We want to add a web browser package, including the file webbrowser.py
   which at the moment is on python-misc.
   "webbrowser": {
   "files": ["${libdir}/python2.7/lib-dynload/webbrowser.py"],
   "rdepends": [],
   "summary": "Python Web Browser support"}

 Run bitbake python -c create_manifest and the resulting manifest
 should  be completed after a few seconds, showing something like:
   "webbrowser": {
  "files": ["${libdir}/python2.7/webbrowser.py"],
  "rdepends": ["core","fcntl","io","pickle","shell","subprocess"],
  "summary": "Python Web Browser support"}


So I add a section to my python3-manifest.json for the signal library
that I'm looking for:

"signal": {
"files": [
"${libdir}/python3.5/lib-dynload/signal.py"
],
"rdepends": [
],
"summary": "Python signal library"
}


I then re-run bitbake python -c create_manifest like the instructions
state however my python3-manifest.json is sadly unmodified and bitbake
still indicates that nothing rprovides 'python3-signal'

Any ideas would be greatly appreciated.

Thank you

Davis





On Wed, May 15, 2019 at 11:28 PM Davis Roman  wrote:
>
> Hello,
>
> I upgraded to Sumo(2.5) and now bitbake is complaining that nothing
> rprovides python3-signal.
>
> ERROR: Nothing RPROVIDES 'python3-signal' (but
> /home/worker/building/sources/meta-bluetooth/recipes-bluetooth/bluetooth-app/bluetooth-app.bb
> RDEPENDS on or otherwise requires it)
>
> After some searching I found that this is related to the restructuring
> of python3 packaging in Sumo
> (http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=b6777878ff03c3e956386020a19d11c875c835ae)
>
> So according to the instructions in the above commit, I'm supposed to
> first create a manifest file using:
>
> $ bitbake python -c create_manifest
>
> and then the json file appears to get created:
>
> build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/python3-manifest.json
>
> After a quick inspection of the created python3-manifest.json, I see
> that signal.py already appears on the list.
>
> "core": {
> "cached": [
> ...
> "${libdir}/python3.5/__pycache__/signal.*.pyc",
> ...
> ],
> "files": [
>  ...
> "${libdir}/python3.5/signal.py",
>  ...
> ],
> "rdepends": [],
> "summary": "Python interpreter and core modules"
> },
>
> Assuming that nothing else needs to be done, I then proceed to again
> bitbake my application but unfortunately the original error persists.
>
> What am I missing?
>
> Thank you,
>
> Davis Roman
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Upgrading to Sumo triggered issue with python3 autopackaging - "ERROR: Nothing RPROVIDES 'python3-signal'"

2019-05-15 Thread Davis Roman
Hello,

I upgraded to Sumo(2.5) and now bitbake is complaining that nothing
rprovides python3-signal.

ERROR: Nothing RPROVIDES 'python3-signal' (but
/home/worker/building/sources/meta-bluetooth/recipes-bluetooth/bluetooth-app/bluetooth-app.bb
RDEPENDS on or otherwise requires it)

After some searching I found that this is related to the restructuring
of python3 packaging in Sumo
(http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=b6777878ff03c3e956386020a19d11c875c835ae)

So according to the instructions in the above commit, I'm supposed to
first create a manifest file using:

$ bitbake python -c create_manifest

and then the json file appears to get created:

build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/python3-manifest.json

After a quick inspection of the created python3-manifest.json, I see
that signal.py already appears on the list.

"core": {
"cached": [
...
"${libdir}/python3.5/__pycache__/signal.*.pyc",
...
],
"files": [
 ...
"${libdir}/python3.5/signal.py",
 ...
],
"rdepends": [],
"summary": "Python interpreter and core modules"
},

Assuming that nothing else needs to be done, I then proceed to again
bitbake my application but unfortunately the original error persists.

What am I missing?

Thank you,

Davis Roman
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [linux-yocto] [PATCH 1/2] netfilter/netfilter.cfg: remove CONFIG_NF_NAT_IPV4

2019-05-15 Thread Mittal, Anuj
Hi Bruce,

Both these changes are only for master and are specific to v5.1.

On Thu, 2019-05-16 at 10:26 +0800, Anuj Mittal wrote:
> This has been removed starting v5.1 and nf_nat_ipv4,6 have been
> merged
> in nat core.
> 
> https://github.com/torvalds/linux/commit/3bf195ae6037e310d693ff3313401cfaf1261b71
> 
> Signed-off-by: Anuj Mittal 
> ---
>  features/netfilter/netfilter.cfg | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/features/netfilter/netfilter.cfg
> b/features/netfilter/netfilter.cfg
> index 3d61881e..820c222e 100644
> --- a/features/netfilter/netfilter.cfg
> +++ b/features/netfilter/netfilter.cfg
> @@ -77,7 +77,6 @@ CONFIG_IP_NF_FILTER=m
>  CONFIG_IP_NF_TARGET_REJECT=m
>  CONFIG_NF_NAT=m
>  CONFIG_NF_NAT_NEEDED=y
> -CONFIG_NF_NAT_IPV4=m
>  CONFIG_IP_NF_NAT=m
>  CONFIG_IP_NF_TARGET_SYNPROXY=m
>  CONFIG_IP_NF_TARGET_MASQUERADE=m
> -- 
> 2.20.1
> 

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 1/2] netfilter/netfilter.cfg: remove CONFIG_NF_NAT_IPV4

2019-05-15 Thread Anuj Mittal
This has been removed starting v5.1 and nf_nat_ipv4,6 have been merged
in nat core.

https://github.com/torvalds/linux/commit/3bf195ae6037e310d693ff3313401cfaf1261b71

Signed-off-by: Anuj Mittal 
---
 features/netfilter/netfilter.cfg | 1 -
 1 file changed, 1 deletion(-)

diff --git a/features/netfilter/netfilter.cfg b/features/netfilter/netfilter.cfg
index 3d61881e..820c222e 100644
--- a/features/netfilter/netfilter.cfg
+++ b/features/netfilter/netfilter.cfg
@@ -77,7 +77,6 @@ CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_NF_NAT=m
 CONFIG_NF_NAT_NEEDED=y
-CONFIG_NF_NAT_IPV4=m
 CONFIG_IP_NF_NAT=m
 CONFIG_IP_NF_TARGET_SYNPROXY=m
 CONFIG_IP_NF_TARGET_MASQUERADE=m
-- 
2.20.1

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 2/2] fs/ext4.cfg: remove EXT4_FS_ENCRYPTION and EXT4_ENCRYPTION

2019-05-15 Thread Anuj Mittal
These have been removed and are now controlled by CONFIG_FS_ENCRYPTION
which is enabled by standard/preempt-rt.cfg.

https://github.com/torvalds/linux/commit/643fa9612bf1a29153eee46fd398117632f93cbe

Signed-off-by: Anuj Mittal 
---
 cfg/fs/ext4.cfg | 2 --
 1 file changed, 2 deletions(-)

diff --git a/cfg/fs/ext4.cfg b/cfg/fs/ext4.cfg
index 5d4e2c68..430d265b 100644
--- a/cfg/fs/ext4.cfg
+++ b/cfg/fs/ext4.cfg
@@ -1,5 +1,3 @@
 CONFIG_EXT4_FS=y
 CONFIG_EXT4_FS_POSIX_ACL=y
 CONFIG_EXT4_FS_SECURITY=y
-CONFIG_EXT4_ENCRYPTION=y
-CONFIG_EXT4_FS_ENCRYPTION=y
-- 
2.20.1

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [yocto] problem adding a user

2019-05-15 Thread Rudolf Streif
Glad to hear that it works now. I am planning on attending the YP DevDay.

:rjs

On Wed, May 15, 2019, 13:53 Greg Wilson-Lindberg 
wrote:

> Thank you very much, that got me back on the right path.
>
> Maybe I'll see you at the Yocto day at the Embedded Linux Conference.
>
> Regards,
>
> [image: cid:image001.png@01D35D7D.179A7510]
>
> *Greg Wilson-Lindberg  *
>
> *Principal Firmware Engineer | Sakura Finetek USA, Inc.  *
>
>
>
> 1750 W 214th Street | Torrance, CA 90501 | U.S.A.
>
> T: +1 310 783 5075
>
> F: +1 310 618 6902 | E: gwil...@sakuraus.com
>
> www.sakuraus.com
>
>
>
> [image: cid:image002.png@01D35D7D.179A7510]
>
> [image: cid:image003.png@01D35D7D.179A7510]
> --
>
> Confidentiality Notice: This e-mail transmission may contain confidential
> or legally privileged information that is intended only for the individual
> or entity named in the e-mail address. If you are not the intended
> recipient, you are hereby notified that any disclosure, copying,
> distribution, or reliance upon the contents of this e-mail is strictly
> prohibited. If you have received this e-mail transmission in error, please
> reply to the sender, so that Sakura Finetek USA, Inc. can arrange for
> proper delivery, and then please delete the message from your inbox. Thank
> you.
>
>
>
>
>
> *From:* Rudolf J Streif [mailto:rudolf.str...@ibeeto.com]
> *Sent:* Wednesday, May 15, 2019 01:30 PM
> *To:* Greg Wilson-Lindberg ; Yocto list discussion <
> yocto@yoctoproject.org>
> *Subject:* Re: [yocto] problem adding a user
>
>
>
> Instead of
>
>
>
> useradd -p `openssl passwd test` sakura
>
>
>
> which attempts to add the user and set the password which fails if the
> user already exists, use
>
>
>
> usermod -p `openssl passwd test` sakura
>
>
>
> which sets the user's password.
>
>
>
> :rjs
>
>
>
> On 5/15/19 1:18 PM, Greg Wilson-Lindberg wrote:
>
> Ok, I had been using the useradd class in a couple of other recipes to
> allow me to copy files to the sakura user directory and another location,
> but owned by sakura. That seems to have been what was causing the problem.
>
>
>
> I had been using the extrausers class in my top level image recipe.
>
>
> So now how do I get all of this to work together? Do I need to put
> everything that touches the sakura user in the same recipe? It seems that I
> need to use only one of the useradd or extrausers classes?
>
>
>
> Greg
> --
>
> *From:* Rudolf J Streif 
> 
> *Sent:* Wednesday, May 15, 2019 12:31 PM
> *To:* Greg Wilson-Lindberg; Yocto list discussion
> *Subject:* Re: [yocto] problem adding a user
>
>
>
> The ! for the password in /etc/shadow indicates that the account is
> disabled:
>
> sakura:!:18031:0:9:7:::
>
>
>
> Either there is something wrong with the password generation or it gets
> disabled by something else. Maybe it's worth trying with a plain image
> without Boot2Qt or anything else.
>
>
>
> :rjs
>
>
>
>
>
> On 5/15/19 11:46 AM, Greg Wilson-Lindberg wrote:
>
> Hi Rudolf,
>
> 1st, yes I inherit extrausers. Attached are the passwd & shadow files.
>
>
>
> It shouldn't make any difference, but I'm building this for an RPi3 using
> the Qt Boot2Qt version of the Yocto environment, distro 2.5.3.
>
>
>
> Greg
> --
>
> *From:* Rudolf J Streif 
> 
> *Sent:* Wednesday, May 15, 2019 11:26 AM
> *To:* Greg Wilson-Lindberg; Yocto list discussion
> *Subject:* Re: [yocto] problem adding a user
>
>
>
> Hi Greg,
>
>
>
> > I've also tried both the back-quote and the single-quote, no difference.
>
>
>
> Help me to understand this. the back-quotes are the right ones. If you use
> the single ones your password in the /etc/shadow ends up being 'openssl
> passwd test' (without the quotes), unless the build fails because of a
> parsing error (I have not tried it). Silly question, you did inherit
> extrausers class?
>
>
>
> Can you post your /etc/passwd and /etc/shadow
>
>
>
> I am surprised that this does not work with your setup. I have been doing
> this a gazillion times always with success.
>
>
>
> :rjs
>
>
>
>
>
>
>
> On 5/15/19 11:03 AM, Greg Wilson-Lindberg wrote:
>
> Hi Rudolf,
>
> Thanks for the reply, and the information on how openssl works.
>
>
>
> I'm trying to create a user with the same group name so the code that I'm
> using reduces to:
>
> EXTRA_USERS_PARAMS = "\
>
> useradd -p `openssl passwd test` sakura; \
>
> usermod -a -G sudo ${SAKURA_USER}; \
>
> "
>
> I also, as you can see, removed the macros to eliminate as much confusion
> as possible.
>
>
>
> I still can't login in using the password 'test'.
>
>
>
> I've also tried both the back-quote and the single-quote, no difference.
>
> Regards,
>
>
>
> Greg
> --
>
> *From:* Rudolf J Streif 
> 
> *Sent:* Wednesday, May 15, 2019 10:07:47 AM
> *To:* Greg Wilson-Lindberg; Yocto list discussion
> *Subject:* Re: [yocto] problem adding a user
>
>
>
> Hi Greg,
>
> Well, I suppose I wrote the book you are referring to...

[linux-yocto] v4.18.x - stable updates comprising v4.18.38

2019-05-15 Thread Paul Gortmaker
Bruce, Yocto kernel folks:

Here is the next 4.18.x stable update "extension" primarily created
for the Yocto project, continuing from the previous v4.18.37 release.

There is one trivial one line commit to fix a build error on PPC64 from
the MDS patches of v4.18.37 - which was also present in GregKH's stable
releases our v4.18.37 was based on.  That patch is 1st in the queue if
anyone is looking for it.  Greg also has the fix now, and so fingers
crossed that we don't see any more whole releases for a single bug-fix
for months and months.  

There are about 165 commits here, based on commits chosen from what were
used in the 4.19.37 and 4.19.38 stable releases.  I had most of this
work done before MDS came along, hence the close together releases.

There is a slight bias towards networking in the content here; it seems
in v4.19, an ipv6 frag issue was best resolved by importing work that
combined some ipv4/ipv6 code first.  And for 4.18 here, I had to extend
that slightly by getting some related commits between 4.18 and 4.19.
But after doing that, the related commits played nice together during
application, and some basic ping6 tests didn't reveal any issues.

I've put this 4.18.x queue through the usual testing; build testing
on x86-64/32, ARM-64/32, PPC and MIPS, plus some static analysis
and finally some sanity runtime tests on x86-64.

I did the signed tag just as per the previously released versions.
Please find a signed v4.18.38 tag using this key:

http://pgp.mit.edu/pks/lookup?op=vindex=0xEBCE84042C07D1D6

in the repo in the kernel.org directory here:

  
https://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux-4.18.y.git/?h=linux-4.18.y
  git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux-4.18.y.git

for merge to standard/base in linux-yocto-4.18 and then out from there
into the other base and BSP branches.

For those who are interested, the evolution of the commits is here:

  https://git.kernel.org/cgit/linux/kernel/git/paulg/longterm-queue-4.18.git/

This repo isn't needed for anything; it just exists for transparency and
so people can see the evolution of the raw commits that were originally
selected to create this 4.18.x release.

Paul.
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[yocto] [meta-raspberrypi] Screen(s) remain black on Raspberry Pi 3 B+

2019-05-15 Thread Bernhard Mayritsch
Hi!

I'm facing some trouble with the X-Server on the Raspberry Pi 3 B+. No
matter if I use a screen on the HDMI port or running the 7" touch screen,
they remain black. After testing with sumo - where at least a splash screen
was shown - I moved on to thud, as recommended by Andrei Gherzan to sort
out the error "No screen found." The error is gone, but nothing is shown on
the screen, not even a splash screen. Switching the branches of poky,
meta-openembedded and meta-raspberrypi to latest master still shows the
same issue.

In order to make sure not to waste time on some hardware issue, I gave
Raspbian a try; both screens (Raspberry Pi Touchscreen & HDMI) work fine
there.

The entire build is pretty much default. The MACHINE is set to
"raspberrypi3-64" and I added:
ENABLE_UART = "1"
RPI_USE_U_BOOT = "1"
... to get the debug interface working and to use U-Boot which at least
shows some lines on the screen during the early boot steps. There are no
custom recipes or meta layers yet.
I have built core-image-x11 and core-image-sato, which both show the same
behaviour.

Xorg.0.log shows the following:

[14.767] (II) LoadModule: "fbdev"
[14.777] (WW) Warning, couldn't open module fbdev
[14.777] (EE) Failed to load module "fbdev" (module does not exist, 0)

[15.393] (II) modeset(0): EDID for output HDMI-1
[15.393] (II) modeset(0): EDID for output Composite-1
[15.393] (II) modeset(0): Printing probed modes for output Composite-1
[15.393] (II) modeset(0): Modeline "720x480"x31.3   13.50  720 734 798
858  480 483 486 502 interlace (15.7 kHz e)
[15.393] (II) modeset(0): Output HDMI-1 disconnected
[15.393] (II) modeset(0): Output Composite-1 disconnected
[15.393] (WW) modeset(0): No outputs definitely connected, trying
again...
[15.393] (II) modeset(0): Output HDMI-1 disconnected
[15.393] (II) modeset(0): Output Composite-1 connected
[15.393] (II) modeset(0): Using sloppy heuristic for initial modes
[15.393] (II) modeset(0): Output Composite-1 using initial mode 720x480
+0+0
[15.393] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
[15.393] (==) modeset(0): DPI set to (96, 96)

It complains to be unable to load the frame buffer driver (is it used on
VC4?) and correctly detects the 7" screen with its 720x480.

The X-Server seems to be up anyways:
root@raspberrypi3-64:/var/log# ps|grep -i xorg
  318 root  3700 Sxinit /etc/X11/Xsession -- /usr/bin/Xorg :0 -br
-pn
  324 root  113m S<   /usr/bin/Xorg :0 -br -pn

As it's the first time I use Yocto to build a X11 image (only worked on
headless systems until now) I think to miss something here.

Does anyone have a hint  on that?
Any help is greatly appreciated!

Thanks in advance,
Mac
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Building Out-of-Tree Modules on the BBB Target

2019-05-15 Thread Bruce Ashfield
On Wed, May 15, 2019 at 4:09 PM Zoran Stojsavljevic <
zoran.stojsavlje...@gmail.com> wrote:

> > The core-image-kernel-dev image is how I do all my on target
> > testing when I introduce a new reference kernel for a release.
>
> Maybe you are correct. Maybe I should use/add in my local.conf the
> following:
>
> KERNEL_DEV_TOOLS ?= "packagegroup-core-tools-profile
> packagegroup-core-buildessential kernel-devsrc"
> KERNEL_DEV_MODULE ?= "kernel-modules"
> CORE_IMAGE_EXTRA_INSTALL += "${KERNEL_DEV_MODULE} \
>  ${KERNEL_DEV_TOOLS} \
>  systemtap \
> "
> I need to try these... Maybe this addendum will solve the $1 mio USD
> problem?!
>
> > And IIRC the autobuilders are using a sato based image (Richard
> > could confirm more easily that I could what image type the
> > autobuilders are using for hello-world on target module tests).
>
> I am just advertising something more simple. To have mandatory
> /lib/modules/`uname -r` directory. And introduce few more packages, as
> Fedora distro, for example, has: kernel-headers (assuming YOCTO
> rootfs, the following will be installed: /usr/src/kernel/`uname
> -r`/. This also makes addition of
> /lib/modules/`uname -r`/build file (which is soft link to
> usr/src/kernel/`uname -r`).


These have all been discussed off an on over the past 5 years. I can't get
at bugzilla right now, but all the details are logged in cases. A survey of
all the distros, their kernel package, etc, were all looked at. We had to
balance the traditional packaging with some new concepts and landed with
what we have now.



> Or kernel-devel package. Then, the whole current kernel source code
> will be introduced, and also support for it.
>

There's a case for this one as well, I'll probably have it done for the
fall release. But our devsrc used to pretty much be the full source it has
now been pruned down to something more manageable.  There are definitely
some cases for having the full source on the target again, and it will be a
separate package, just not the minimal one to build out of tree modules,
etc.




>
> SDK building with such a support is good/cool. But sometimes, before
> introducing SDK, some tests should be done on target. NO need to
> optionally include built-in layer hello-world driver example. Since I
> (or you name the person) have own test drivers, which will be imported
> out of tree, externally, to the target test bed!
>
>
I never use the SDK myself, so you are not alone in not going to it first.
Hopefully I'll get some new patches out in the coming month before summer
holidays really kick in.

Bruce



> Just thinking loud...
>
> Zoran
> ___
>
> On Wed, May 15, 2019 at 4:25 PM Bruce Ashfield 
> wrote:
> >
> >
> >
> > On Wed, May 15, 2019 at 3:44 AM Zoran Stojsavljevic <
> zoran.stojsavlje...@gmail.com> wrote:
> >>
> >> > That's correct. That command only adds the kernel source and
> >> > build infrastructure to the SDK, not to your target image. You'd still
> >> > need to arrange to have the kernel-devsrc package installed on the
> >> > target image if you want it on the board's rootfs. How you arrange
> >> > to have the package installed to the image varies with the image
> >> > (since they all don't have the same image install variables, etc).
> >>
> >> And here is a $1,000,000 USD question? How to do it on Poky (as
> >> example of what you have stated in RED)? ;-)
> >>
> >> In other words: how to arrange it on Poky (as a Referent example)?
> >
> >
> > The core-image-kernel-dev image is how I do all my on target testing
> when I introduce a new reference kernel for a release. And IIRC the
> autobuilders are using a sato based image (Richard could confirm more
> easily that I could what image type the autobuilders are using for
> hello-world on target module tests).
> >
> > Bruce
> >
> >
> >>
> >>
> >> Thank you,
> >> Zoran
> >> ___
> >>
> >>
> >> On Wed, May 15, 2019 at 7:41 AM Bruce Ashfield <
> bruce.ashfi...@gmail.com> wrote:
> >>>
> >>>
> >>>
> >>> On Tue, May 14, 2019 at 1:30 PM Zoran Stojsavljevic <
> zoran.stojsavlje...@gmail.com> wrote:
> 
>  Hello Chris, Bruce,
> 
>  I have some additional data to share with you both, since I have tried
>  something. And here is my take on the things!
> 
>  > 1. Build using a bb recipe.
>  > Take a look at meta-skeleton/recipes-kernel/hello-mod for an
> example.
>  > You just need to add meta-skeleton to your bblayers.conf and then
>  >  bitbake hello-mod
> 
>  I looked into this example, and, yes, it is classic kernel module
>  definition out of the tree. With some outdated data, all cool, the
>  YOCTO designer should take care himself to fix these data, if using
>  this stuff.
> 
>  But this is NOT mandatory, since I can add out of the tree module NOT
>  actually using built-in module. I just use .../tmp/deploy/images/bbb/*
>  generated stuff, since I have 

Re: [yocto] problem adding a user

2019-05-15 Thread Greg Wilson-Lindberg
Thank you very much, that got me back on the right path.
Maybe I'll see you at the Yocto day at the Embedded Linux Conference.
Regards,


Greg Wilson-Lindberg

Principal Firmware Engineer | Sakura Finetek USA, Inc.



1750 W 214th Street | Torrance, CA 90501 | U.S.A.

T: +1 310 783 5075

F: +1 310 618 6902 | E: gwil...@sakuraus.com

www.sakuraus.com



[cid:image002.png@01D35D7D.179A7510]

[cid:image003.png@01D35D7D.179A7510]




Confidentiality Notice: This e-mail transmission may contain confidential or 
legally privileged information that is intended only for the individual or 
entity named in the e-mail address. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, or reliance 
upon the contents of this e-mail is strictly prohibited. If you have received 
this e-mail transmission in error, please reply to the sender, so that Sakura 
Finetek USA, Inc. can arrange for proper delivery, and then please delete the 
message from your inbox. Thank you.



From: Rudolf J Streif [mailto:rudolf.str...@ibeeto.com]
Sent: Wednesday, May 15, 2019 01:30 PM
To: Greg Wilson-Lindberg ; Yocto list discussion 

Subject: Re: [yocto] problem adding a user


Instead of



useradd -p `openssl passwd test` sakura



which attempts to add the user and set the password which fails if the user 
already exists, use



usermod -p `openssl passwd test` sakura



which sets the user's password.



:rjs


On 5/15/19 1:18 PM, Greg Wilson-Lindberg wrote:

Ok, I had been using the useradd class in a couple of other recipes to allow me 
to copy files to the sakura user directory and another location, but owned by 
sakura. That seems to have been what was causing the problem.



I had been using the extrausers class in my top level image recipe.

So now how do I get all of this to work together? Do I need to put everything 
that touches the sakura user in the same recipe? It seems that I need to use 
only one of the useradd or extrausers classes?

Greg

From: Rudolf J Streif 

Sent: Wednesday, May 15, 2019 12:31 PM
To: Greg Wilson-Lindberg; Yocto list discussion
Subject: Re: [yocto] problem adding a user


The ! for the password in /etc/shadow indicates that the account is disabled:

sakura:!:18031:0:9:7:::



Either there is something wrong with the password generation or it gets 
disabled by something else. Maybe it's worth trying with a plain image without 
Boot2Qt or anything else.



:rjs




On 5/15/19 11:46 AM, Greg Wilson-Lindberg wrote:

Hi Rudolf,

1st, yes I inherit extrausers. Attached are the passwd & shadow files.



It shouldn't make any difference, but I'm building this for an RPi3 using the 
Qt Boot2Qt version of the Yocto environment, distro 2.5.3.


Greg

From: Rudolf J Streif 

Sent: Wednesday, May 15, 2019 11:26 AM
To: Greg Wilson-Lindberg; Yocto list discussion
Subject: Re: [yocto] problem adding a user


Hi Greg,



> I've also tried both the back-quote and the single-quote, no difference.



Help me to understand this. the back-quotes are the right ones. If you use the 
single ones your password in the /etc/shadow ends up being 'openssl passwd 
test' (without the quotes), unless the build fails because of a parsing error 
(I have not tried it). Silly question, you did inherit extrausers class?



Can you post your /etc/passwd and /etc/shadow



I am surprised that this does not work with your setup. I have been doing this 
a gazillion times always with success.



:rjs






On 5/15/19 11:03 AM, Greg Wilson-Lindberg wrote:

Hi Rudolf,

Thanks for the reply, and the information on how openssl works.



I'm trying to create a user with the same group name so the code that I'm using 
reduces to:

EXTRA_USERS_PARAMS = "\

useradd -p `openssl passwd test` sakura; \

usermod -a -G sudo ${SAKURA_USER}; \

"
I also, as you can see, removed the macros to eliminate as much confusion as 
possible.



I still can't login in using the password 'test'.



I've also tried both the back-quote and the single-quote, no difference.

Regards,



Greg


From: Rudolf J Streif 

Sent: Wednesday, May 15, 2019 10:07:47 AM
To: Greg Wilson-Lindberg; Yocto list discussion
Subject: Re: [yocto] problem adding a user

Hi Greg,

Well, I suppose I wrote the book you are referring to...


Using

useradd -p PASSWORD USER

takes the password hash for PASSWORD hence the use of openssl in:

useadd -p `openssl passwd PASSWORD` USER

openssl password creates the password hash using the original crypt hash
algorithm if no other options are specified. e.g.

$ openssl passwd hello
6hEsTksgRkeiI

With this the first two characters of the output is the salt and the
rest is the password hash. If you want openssl to 

Re: [yocto] problem adding a user

2019-05-15 Thread Rudolf J Streif

Instead of


useradd -p `openssl passwd test` sakura


which attempts to add the user and set the password which fails if the 
user already exists, use



usermod -p `openssl passwd test` sakura


which sets the user's password.


:rjs


On 5/15/19 1:18 PM, Greg Wilson-Lindberg wrote:


Ok, I had been using the useradd class in a couple of other recipes to 
allow me to copy files to the sakura user directory and another 
location, but owned by sakura. That seems to have been what was 
causing the problem.



I had been using the extrausers class in my top level image recipe.


So now how do I get all of this to work together? Do I need to put 
everything that touches the sakura user in the same recipe? It seems 
that I need to use only one of the useradd or extrausers classes?



Greg


*From:* Rudolf J Streif 
*Sent:* Wednesday, May 15, 2019 12:31 PM
*To:* Greg Wilson-Lindberg; Yocto list discussion
*Subject:* Re: [yocto] problem adding a user

The ! for the password in /etc/shadow indicates that the account is 
disabled:


sakura:!:18031:0:9:7:::


Either there is something wrong with the password generation or it 
gets disabled by something else. Maybe it's worth trying with a plain 
image without Boot2Qt or anything else.



:rjs



On 5/15/19 11:46 AM, Greg Wilson-Lindberg wrote:


Hi Rudolf,

1st, yes I inherit extrausers. Attached are the passwd & shadow files.


It shouldn't make any difference, but I'm building this for an RPi3 
using the Qt Boot2Qt version of the Yocto environment, distro 2.5.3.



Greg


*From:* Rudolf J Streif 
*Sent:* Wednesday, May 15, 2019 11:26 AM
*To:* Greg Wilson-Lindberg; Yocto list discussion
*Subject:* Re: [yocto] problem adding a user

Hi Greg,


> I've also tried both the back-quote and the single-quote, no 
difference.



Help me to understand this. the back-quotes are the right ones. If 
you use the single ones your password in the /etc/shadow ends up 
being 'openssl passwd test' (without the quotes), unless the build 
fails because of a parsing error (I have not tried it). Silly 
question, you did inherit extrausers class?



Can you post your /etc/passwd and /etc/shadow


I am surprised that this does not work with your setup. I have been 
doing this a gazillion times always with success.



:rjs




On 5/15/19 11:03 AM, Greg Wilson-Lindberg wrote:


Hi Rudolf,

Thanks for the reply, and the information on how openssl works.


I'm trying to create a user with the same group name so the code 
that I'm using reduces to:


EXTRA_USERS_PARAMS = "\
 useradd -p `openssl passwd test` sakura; \
 usermod -a -G sudo ${SAKURA_USER}; \
 "
I also, as you can see, removed the macros to eliminate as much 
confusion as possible.



I still can't login in using the password 'test'.


I've also tried both the back-quote and the single-quote, no difference.

Regards,


Greg


*From:* Rudolf J Streif 
*Sent:* Wednesday, May 15, 2019 10:07:47 AM
*To:* Greg Wilson-Lindberg; Yocto list discussion
*Subject:* Re: [yocto] problem adding a user
Hi Greg,

Well, I suppose I wrote the book you are referring to...


Using

useradd -p PASSWORD USER

takes the password hash for PASSWORD hence the use of openssl in:

useadd -p `openssl passwd PASSWORD` USER

openssl password creates the password hash using the original crypt 
hash

algorithm if no other options are specified. e.g.

$ openssl passwd hello
6hEsTksgRkeiI

With this the first two characters of the output is the salt and the
rest is the password hash. If you want openssl to create the same 
result

again:

$ openssl passwd -salt "6h" hello
6hEsTksgRkeiI

You can use newer algorithms like MD5 based BSD password algorithm 1:

$ openssl passwd -1 hello
$1$4Mu8Fcs.$eIKgPP7RCYrb3lFZjhADA1

$1 : password algorithm 1
$4Mu8Fcs. : salt
$eIKgPP7RCYrb3lFZjhADA1 : password hash


If you log into the system you have to use the clear password. The
system reads the salt, creates the password hash and compares the 
results.



:rjs


On 5/14/19 5:34 PM, Greg Wilson-Lindberg wrote:
> I'm trying to use the example in "Embedded Linux Systems with the 
Yocto Project" to add a user to my Yocto build. In the book the 
sample code:

>
> useradd -p `openssl passwd ${DEV_PASSWORD}` developer; \
>
> uses openssl to generate the encrypted password string to pass to 
useradd. I have never been able to get this to work. When I run the 
openssl
> command on the cmd line I get a different value every time, this 
seems wrong, How can the password code compare against it if every 
encode

> produces a different value?
>
> I am getting the user added to the system, the home directory 
shows up and the user is in the passwd and group files. I just can't 
login to the

> account.
>
> I've obviously got something confused, any help would 

Re: [yocto] problem adding a user

2019-05-15 Thread Greg Wilson-Lindberg
Ok, I had been using the useradd class in a couple of other recipes to allow me 
to copy files to the sakura user directory and another location, but owned by 
sakura. That seems to have been what was causing the problem.


I had been using the extrausers class in my top level image recipe.

So now how do I get all of this to work together? Do I need to put everything 
that touches the sakura user in the same recipe? It seems that I need to use 
only one of the useradd or extrausers classes?

Greg


From: Rudolf J Streif 
Sent: Wednesday, May 15, 2019 12:31 PM
To: Greg Wilson-Lindberg; Yocto list discussion
Subject: Re: [yocto] problem adding a user


The ! for the password in /etc/shadow indicates that the account is disabled:

sakura:!:18031:0:9:7:::


Either there is something wrong with the password generation or it gets 
disabled by something else. Maybe it's worth trying with a plain image without 
Boot2Qt or anything else.


:rjs



On 5/15/19 11:46 AM, Greg Wilson-Lindberg wrote:

Hi Rudolf,

1st, yes I inherit extrausers. Attached are the passwd & shadow files.


It shouldn't make any difference, but I'm building this for an RPi3 using the 
Qt Boot2Qt version of the Yocto environment, distro 2.5.3.


Greg


From: Rudolf J Streif 

Sent: Wednesday, May 15, 2019 11:26 AM
To: Greg Wilson-Lindberg; Yocto list discussion
Subject: Re: [yocto] problem adding a user


Hi Greg,


> I've also tried both the back-quote and the single-quote, no difference.


Help me to understand this. the back-quotes are the right ones. If you use the 
single ones your password in the /etc/shadow ends up being 'openssl passwd 
test' (without the quotes), unless the build fails because of a parsing error 
(I have not tried it). Silly question, you did inherit extrausers class?


Can you post your /etc/passwd and /etc/shadow


I am surprised that this does not work with your setup. I have been doing this 
a gazillion times always with success.


:rjs




On 5/15/19 11:03 AM, Greg Wilson-Lindberg wrote:

Hi Rudolf,

Thanks for the reply, and the information on how openssl works.


I'm trying to create a user with the same group name so the code that I'm using 
reduces to:

EXTRA_USERS_PARAMS = "\
useradd -p `openssl passwd test` sakura; \
usermod -a -G sudo ${SAKURA_USER}; \
"


I also, as you can see, removed the macros to eliminate as much confusion as 
possible.


I still can't login in using the password 'test'.


I've also tried both the back-quote and the single-quote, no difference.

Regards,


Greg


From: Rudolf J Streif 

Sent: Wednesday, May 15, 2019 10:07:47 AM
To: Greg Wilson-Lindberg; Yocto list discussion
Subject: Re: [yocto] problem adding a user

Hi Greg,

Well, I suppose I wrote the book you are referring to...


Using

useradd -p PASSWORD USER

takes the password hash for PASSWORD hence the use of openssl in:

useadd -p `openssl passwd PASSWORD` USER

openssl password creates the password hash using the original crypt hash
algorithm if no other options are specified. e.g.

$ openssl passwd hello
6hEsTksgRkeiI

With this the first two characters of the output is the salt and the
rest is the password hash. If you want openssl to create the same result
again:

$ openssl passwd -salt "6h" hello
6hEsTksgRkeiI

You can use newer algorithms like MD5 based BSD password algorithm 1:

$ openssl passwd -1 hello
$1$4Mu8Fcs.$eIKgPP7RCYrb3lFZjhADA1

$1 : password algorithm 1
$4Mu8Fcs. : salt
$eIKgPP7RCYrb3lFZjhADA1 : password hash


If you log into the system you have to use the clear password. The
system reads the salt, creates the password hash and compares the results.


:rjs


On 5/14/19 5:34 PM, Greg Wilson-Lindberg wrote:
> I'm trying to use the example in "Embedded Linux Systems with the Yocto 
> Project" to add a user to my Yocto build. In the book the sample code:
>
> useradd -p `openssl passwd ${DEV_PASSWORD}` developer; \
>
> uses openssl to generate the encrypted password string to pass to useradd. I 
> have never been able to get this to work. When I run the openssl
> command on the cmd line I get a different value every time, this seems wrong, 
> How can the password code compare against it if every encode
> produces a different value?
>
> I am getting the user added to the system, the home directory shows up and 
> the user is in the passwd and group files. I just can't login to the
> account.
>
> I've obviously got something confused, any help would be appreciated.
>
> Greg Wilson-Lindberg
>

--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700


--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700

--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Building Out-of-Tree Modules on the BBB Target

2019-05-15 Thread Zoran Stojsavljevic
> The core-image-kernel-dev image is how I do all my on target
> testing when I introduce a new reference kernel for a release.

Maybe you are correct. Maybe I should use/add in my local.conf the following:

KERNEL_DEV_TOOLS ?= "packagegroup-core-tools-profile
packagegroup-core-buildessential kernel-devsrc"
KERNEL_DEV_MODULE ?= "kernel-modules"
CORE_IMAGE_EXTRA_INSTALL += "${KERNEL_DEV_MODULE} \
 ${KERNEL_DEV_TOOLS} \
 systemtap \
"
I need to try these... Maybe this addendum will solve the $1 mio USD problem?!

> And IIRC the autobuilders are using a sato based image (Richard
> could confirm more easily that I could what image type the
> autobuilders are using for hello-world on target module tests).

I am just advertising something more simple. To have mandatory
/lib/modules/`uname -r` directory. And introduce few more packages, as
Fedora distro, for example, has: kernel-headers (assuming YOCTO
rootfs, the following will be installed: /usr/src/kernel/`uname
-r`/. This also makes addition of
/lib/modules/`uname -r`/build file (which is soft link to
usr/src/kernel/`uname -r`).

Or kernel-devel package. Then, the whole current kernel source code
will be introduced, and also support for it.

SDK building with such a support is good/cool. But sometimes, before
introducing SDK, some tests should be done on target. NO need to
optionally include built-in layer hello-world driver example. Since I
(or you name the person) have own test drivers, which will be imported
out of tree, externally, to the target test bed!

Just thinking loud...

Zoran
___

On Wed, May 15, 2019 at 4:25 PM Bruce Ashfield  wrote:
>
>
>
> On Wed, May 15, 2019 at 3:44 AM Zoran Stojsavljevic 
>  wrote:
>>
>> > That's correct. That command only adds the kernel source and
>> > build infrastructure to the SDK, not to your target image. You'd still
>> > need to arrange to have the kernel-devsrc package installed on the
>> > target image if you want it on the board's rootfs. How you arrange
>> > to have the package installed to the image varies with the image
>> > (since they all don't have the same image install variables, etc).
>>
>> And here is a $1,000,000 USD question? How to do it on Poky (as
>> example of what you have stated in RED)? ;-)
>>
>> In other words: how to arrange it on Poky (as a Referent example)?
>
>
> The core-image-kernel-dev image is how I do all my on target testing when I 
> introduce a new reference kernel for a release. And IIRC the autobuilders are 
> using a sato based image (Richard could confirm more easily that I could what 
> image type the autobuilders are using for hello-world on target module tests).
>
> Bruce
>
>
>>
>>
>> Thank you,
>> Zoran
>> ___
>>
>>
>> On Wed, May 15, 2019 at 7:41 AM Bruce Ashfield  
>> wrote:
>>>
>>>
>>>
>>> On Tue, May 14, 2019 at 1:30 PM Zoran Stojsavljevic 
>>>  wrote:

 Hello Chris, Bruce,

 I have some additional data to share with you both, since I have tried
 something. And here is my take on the things!

 > 1. Build using a bb recipe.
 > Take a look at meta-skeleton/recipes-kernel/hello-mod for an example.
 > You just need to add meta-skeleton to your bblayers.conf and then
 >  bitbake hello-mod

 I looked into this example, and, yes, it is classic kernel module
 definition out of the tree. With some outdated data, all cool, the
 YOCTO designer should take care himself to fix these data, if using
 this stuff.

 But this is NOT mandatory, since I can add out of the tree module NOT
 actually using built-in module. I just use .../tmp/deploy/images/bbb/*
 generated stuff, since I have automated scripts which are bringing all
 these on my BBB target. Then I tftp my source code module to the
 target.

 > 2. Build from the SDK:
 > First, add the kernel source to the SDK by adding this to conf/local.conf
 >  TOOLCHAIN_TARGET_TASK_append = " kernel-devsrc"

 YES, this is THE command which should generate
 /usr/src/kernel(s)/`uname -r` or similar... But adding it to
 local.conf and after deleting kernel, then regenerating bitbake -k
 core-image-minimal does not bring this path into the rootfs image!?
>>>
>>>
>>> That's correct. That command only adds the kernel source and build 
>>> infrastructure to the SDK, not to your target image. You'd still need to 
>>> arrange to have the kernel-devsrc package installed on the target image if 
>>> you want it on the board's rootfs. How you arrange to have the package 
>>> installed to the image varies with the image (since they all don't have the 
>>> same image install variables, etc).
>>>
>>>


 I did it actually using meta-bbb, and using poky referent distro as
 two additional layers to the more complex bbb image!
 https://github.com/jumpnow/meta-bbb.git

 The (KAS - you can figure out out of it local.conf) 

Re: [yocto] problem adding a user

2019-05-15 Thread Rudolf J Streif
The ! for the password in /etc/shadow indicates that the account is 
disabled:


sakura:!:18031:0:9:7:::


Either there is something wrong with the password generation or it gets 
disabled by something else. Maybe it's worth trying with a plain image 
without Boot2Qt or anything else.



:rjs



On 5/15/19 11:46 AM, Greg Wilson-Lindberg wrote:


Hi Rudolf,

1st, yes I inherit extrausers. Attached are the passwd & shadow files.


It shouldn't make any difference, but I'm building this for an RPi3 
using the Qt Boot2Qt version of the Yocto environment, distro 2.5.3.



Greg


*From:* Rudolf J Streif 
*Sent:* Wednesday, May 15, 2019 11:26 AM
*To:* Greg Wilson-Lindberg; Yocto list discussion
*Subject:* Re: [yocto] problem adding a user

Hi Greg,


> I've also tried both the back-quote and the single-quote, no difference.


Help me to understand this. the back-quotes are the right ones. If you 
use the single ones your password in the /etc/shadow ends up being 
'openssl passwd test' (without the quotes), unless the build fails 
because of a parsing error (I have not tried it). Silly question, you 
did inherit extrausers class?



Can you post your /etc/passwd and /etc/shadow


I am surprised that this does not work with your setup. I have been 
doing this a gazillion times always with success.



:rjs




On 5/15/19 11:03 AM, Greg Wilson-Lindberg wrote:


Hi Rudolf,

Thanks for the reply, and the information on how openssl works.


I'm trying to create a user with the same group name so the code that 
I'm using reduces to:


EXTRA_USERS_PARAMS = "\
 useradd -p `openssl passwd test` sakura; \
 usermod -a -G sudo ${SAKURA_USER}; \
 "
I also, as you can see, removed the macros to eliminate as much 
confusion as possible.



I still can't login in using the password 'test'.


I've also tried both the back-quote and the single-quote, no difference.

Regards,


Greg


*From:* Rudolf J Streif 
*Sent:* Wednesday, May 15, 2019 10:07:47 AM
*To:* Greg Wilson-Lindberg; Yocto list discussion
*Subject:* Re: [yocto] problem adding a user
Hi Greg,

Well, I suppose I wrote the book you are referring to...


Using

useradd -p PASSWORD USER

takes the password hash for PASSWORD hence the use of openssl in:

useadd -p `openssl passwd PASSWORD` USER

openssl password creates the password hash using the original crypt hash
algorithm if no other options are specified. e.g.

$ openssl passwd hello
6hEsTksgRkeiI

With this the first two characters of the output is the salt and the
rest is the password hash. If you want openssl to create the same result
again:

$ openssl passwd -salt "6h" hello
6hEsTksgRkeiI

You can use newer algorithms like MD5 based BSD password algorithm 1:

$ openssl passwd -1 hello
$1$4Mu8Fcs.$eIKgPP7RCYrb3lFZjhADA1

$1 : password algorithm 1
$4Mu8Fcs. : salt
$eIKgPP7RCYrb3lFZjhADA1 : password hash


If you log into the system you have to use the clear password. The
system reads the salt, creates the password hash and compares the 
results.



:rjs


On 5/14/19 5:34 PM, Greg Wilson-Lindberg wrote:
> I'm trying to use the example in "Embedded Linux Systems with the 
Yocto Project" to add a user to my Yocto build. In the book the 
sample code:

>
> useradd -p `openssl passwd ${DEV_PASSWORD}` developer; \
>
> uses openssl to generate the encrypted password string to pass to 
useradd. I have never been able to get this to work. When I run the 
openssl
> command on the cmd line I get a different value every time, this 
seems wrong, How can the password code compare against it if every encode

> produces a different value?
>
> I am getting the user added to the system, the home directory shows 
up and the user is in the passwd and group files. I just can't login 
to the

> account.
>
> I've obviously got something confused, any help would be appreciated.
>
> Greg Wilson-Lindberg
>

--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700


--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700


--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] problem adding a user

2019-05-15 Thread Greg Wilson-Lindberg
Hi Rudolf,

1st, yes I inherit extrausers. Attached are the passwd & shadow files.


It shouldn't make any difference, but I'm building this for an RPi3 using the 
Qt Boot2Qt version of the Yocto environment, distro 2.5.3.


Greg


From: Rudolf J Streif 
Sent: Wednesday, May 15, 2019 11:26 AM
To: Greg Wilson-Lindberg; Yocto list discussion
Subject: Re: [yocto] problem adding a user


Hi Greg,


> I've also tried both the back-quote and the single-quote, no difference.


Help me to understand this. the back-quotes are the right ones. If you use the 
single ones your password in the /etc/shadow ends up being 'openssl passwd 
test' (without the quotes), unless the build fails because of a parsing error 
(I have not tried it). Silly question, you did inherit extrausers class?


Can you post your /etc/passwd and /etc/shadow


I am surprised that this does not work with your setup. I have been doing this 
a gazillion times always with success.


:rjs




On 5/15/19 11:03 AM, Greg Wilson-Lindberg wrote:

Hi Rudolf,

Thanks for the reply, and the information on how openssl works.


I'm trying to create a user with the same group name so the code that I'm using 
reduces to:

EXTRA_USERS_PARAMS = "\
useradd -p `openssl passwd test` sakura; \
usermod -a -G sudo ${SAKURA_USER}; \
"


I also, as you can see, removed the macros to eliminate as much confusion as 
possible.


I still can't login in using the password 'test'.


I've also tried both the back-quote and the single-quote, no difference.

Regards,


Greg


From: Rudolf J Streif 

Sent: Wednesday, May 15, 2019 10:07:47 AM
To: Greg Wilson-Lindberg; Yocto list discussion
Subject: Re: [yocto] problem adding a user

Hi Greg,

Well, I suppose I wrote the book you are referring to...


Using

useradd -p PASSWORD USER

takes the password hash for PASSWORD hence the use of openssl in:

useadd -p `openssl passwd PASSWORD` USER

openssl password creates the password hash using the original crypt hash
algorithm if no other options are specified. e.g.

$ openssl passwd hello
6hEsTksgRkeiI

With this the first two characters of the output is the salt and the
rest is the password hash. If you want openssl to create the same result
again:

$ openssl passwd -salt "6h" hello
6hEsTksgRkeiI

You can use newer algorithms like MD5 based BSD password algorithm 1:

$ openssl passwd -1 hello
$1$4Mu8Fcs.$eIKgPP7RCYrb3lFZjhADA1

$1 : password algorithm 1
$4Mu8Fcs. : salt
$eIKgPP7RCYrb3lFZjhADA1 : password hash


If you log into the system you have to use the clear password. The
system reads the salt, creates the password hash and compares the results.


:rjs


On 5/14/19 5:34 PM, Greg Wilson-Lindberg wrote:
> I'm trying to use the example in "Embedded Linux Systems with the Yocto 
> Project" to add a user to my Yocto build. In the book the sample code:
>
> useradd -p `openssl passwd ${DEV_PASSWORD}` developer; \
>
> uses openssl to generate the encrypted password string to pass to useradd. I 
> have never been able to get this to work. When I run the openssl
> command on the cmd line I get a different value every time, this seems wrong, 
> How can the password code compare against it if every encode
> produces a different value?
>
> I am getting the user added to the system, the home directory shows up and 
> the user is in the passwd and group files. I just can't login to the
> account.
>
> I've obviously got something confused, any help would be appreciated.
>
> Greg Wilson-Lindberg
>

--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700


--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700


passwd
Description: passwd


shadow
Description: shadow
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] problem adding a user

2019-05-15 Thread Rudolf J Streif

Hi Greg,


> I've also tried both the back-quote and the single-quote, no difference.


Help me to understand this. the back-quotes are the right ones. If you 
use the single ones your password in the /etc/shadow ends up being 
'openssl passwd test' (without the quotes), unless the build fails 
because of a parsing error (I have not tried it). Silly question, you 
did inherit extrausers class?



Can you post your /etc/passwd and /etc/shadow


I am surprised that this does not work with your setup. I have been 
doing this a gazillion times always with success.



:rjs




On 5/15/19 11:03 AM, Greg Wilson-Lindberg wrote:


Hi Rudolf,

Thanks for the reply, and the information on how openssl works.


I'm trying to create a user with the same group name so the code that 
I'm using reduces to:


EXTRA_USERS_PARAMS = "\
 useradd -p `openssl passwd test` sakura; \
 usermod -a -G sudo ${SAKURA_USER}; \
 "
I also, as you can see, removed the macros to eliminate as much 
confusion as possible.



I still can't login in using the password 'test'.


I've also tried both the back-quote and the single-quote, no difference.

Regards,


Greg


*From:* Rudolf J Streif 
*Sent:* Wednesday, May 15, 2019 10:07:47 AM
*To:* Greg Wilson-Lindberg; Yocto list discussion
*Subject:* Re: [yocto] problem adding a user
Hi Greg,

Well, I suppose I wrote the book you are referring to...


Using

useradd -p PASSWORD USER

takes the password hash for PASSWORD hence the use of openssl in:

useadd -p `openssl passwd PASSWORD` USER

openssl password creates the password hash using the original crypt hash
algorithm if no other options are specified. e.g.

$ openssl passwd hello
6hEsTksgRkeiI

With this the first two characters of the output is the salt and the
rest is the password hash. If you want openssl to create the same result
again:

$ openssl passwd -salt "6h" hello
6hEsTksgRkeiI

You can use newer algorithms like MD5 based BSD password algorithm 1:

$ openssl passwd -1 hello
$1$4Mu8Fcs.$eIKgPP7RCYrb3lFZjhADA1

$1 : password algorithm 1
$4Mu8Fcs. : salt
$eIKgPP7RCYrb3lFZjhADA1 : password hash


If you log into the system you have to use the clear password. The
system reads the salt, creates the password hash and compares the results.


:rjs


On 5/14/19 5:34 PM, Greg Wilson-Lindberg wrote:
> I'm trying to use the example in "Embedded Linux Systems with the 
Yocto Project" to add a user to my Yocto build. In the book the sample 
code:

>
> useradd -p `openssl passwd ${DEV_PASSWORD}` developer; \
>
> uses openssl to generate the encrypted password string to pass to 
useradd. I have never been able to get this to work. When I run the 
openssl
> command on the cmd line I get a different value every time, this 
seems wrong, How can the password code compare against it if every encode

> produces a different value?
>
> I am getting the user added to the system, the home directory shows 
up and the user is in the passwd and group files. I just can't login 
to the

> account.
>
> I've obviously got something confused, any help would be appreciated.
>
> Greg Wilson-Lindberg
>

--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700


--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] problem adding a user

2019-05-15 Thread Greg Wilson-Lindberg
Hi Rudolf,

Thanks for the reply, and the information on how openssl works.


I'm trying to create a user with the same group name so the code that I'm using 
reduces to:

EXTRA_USERS_PARAMS = "\
useradd -p `openssl passwd test` sakura; \
usermod -a -G sudo ${SAKURA_USER}; \
"


I also, as you can see, removed the macros to eliminate as much confusion as 
possible.


I still can't login in using the password 'test'.


I've also tried both the back-quote and the single-quote, no difference.

Regards,


Greg


From: Rudolf J Streif 
Sent: Wednesday, May 15, 2019 10:07:47 AM
To: Greg Wilson-Lindberg; Yocto list discussion
Subject: Re: [yocto] problem adding a user

Hi Greg,

Well, I suppose I wrote the book you are referring to...


Using

useradd -p PASSWORD USER

takes the password hash for PASSWORD hence the use of openssl in:

useadd -p `openssl passwd PASSWORD` USER

openssl password creates the password hash using the original crypt hash
algorithm if no other options are specified. e.g.

$ openssl passwd hello
6hEsTksgRkeiI

With this the first two characters of the output is the salt and the
rest is the password hash. If you want openssl to create the same result
again:

$ openssl passwd -salt "6h" hello
6hEsTksgRkeiI

You can use newer algorithms like MD5 based BSD password algorithm 1:

$ openssl passwd -1 hello
$1$4Mu8Fcs.$eIKgPP7RCYrb3lFZjhADA1

$1 : password algorithm 1
$4Mu8Fcs. : salt
$eIKgPP7RCYrb3lFZjhADA1 : password hash


If you log into the system you have to use the clear password. The
system reads the salt, creates the password hash and compares the results.


:rjs


On 5/14/19 5:34 PM, Greg Wilson-Lindberg wrote:
> I'm trying to use the example in "Embedded Linux Systems with the Yocto 
> Project" to add a user to my Yocto build. In the book the sample code:
>
> useradd -p `openssl passwd ${DEV_PASSWORD}` developer; \
>
> uses openssl to generate the encrypted password string to pass to useradd. I 
> have never been able to get this to work. When I run the openssl
> command on the cmd line I get a different value every time, this seems wrong, 
> How can the password code compare against it if every encode
> produces a different value?
>
> I am getting the user added to the system, the home directory shows up and 
> the user is in the passwd and group files. I just can't login to the
> account.
>
> I've obviously got something confused, any help would be appreciated.
>
> Greg Wilson-Lindberg
>

--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] problem adding a user

2019-05-15 Thread Rudolf J Streif

Hi Greg,

Well, I suppose I wrote the book you are referring to...


Using

useradd -p PASSWORD USER

takes the password hash for PASSWORD hence the use of openssl in:

useadd -p `openssl passwd PASSWORD` USER

openssl password creates the password hash using the original crypt hash 
algorithm if no other options are specified. e.g.


$ openssl passwd hello
6hEsTksgRkeiI

With this the first two characters of the output is the salt and the 
rest is the password hash. If you want openssl to create the same result 
again:


$ openssl passwd -salt "6h" hello
6hEsTksgRkeiI

You can use newer algorithms like MD5 based BSD password algorithm 1:

$ openssl passwd -1 hello
$1$4Mu8Fcs.$eIKgPP7RCYrb3lFZjhADA1

$1 : password algorithm 1
$4Mu8Fcs. : salt
$eIKgPP7RCYrb3lFZjhADA1 : password hash


If you log into the system you have to use the clear password. The 
system reads the salt, creates the password hash and compares the results.



:rjs


On 5/14/19 5:34 PM, Greg Wilson-Lindberg wrote:

I'm trying to use the example in "Embedded Linux Systems with the Yocto 
Project" to add a user to my Yocto build. In the book the sample code:

useradd -p `openssl passwd ${DEV_PASSWORD}` developer; \

uses openssl to generate the encrypted password string to pass to useradd. I 
have never been able to get this to work. When I run the openssl
command on the cmd line I get a different value every time, this seems wrong, 
How can the password code compare against it if every encode
produces a different value?

I am getting the user added to the system, the home directory shows up and the 
user is in the passwd and group files. I just can't login to the
account.

I've obviously got something confused, any help would be appreciated.

Greg Wilson-Lindberg
  


--
-
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3396 x700

--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Building Out-of-Tree Modules on the BBB Target

2019-05-15 Thread Bruce Ashfield
On Wed, May 15, 2019 at 3:44 AM Zoran Stojsavljevic <
zoran.stojsavlje...@gmail.com> wrote:

> > That's correct. That command only adds the kernel source and
> > build infrastructure to the SDK, not to your target image. *You'd still*
> *> need to arrange to have the kernel-devsrc package installed on the*
> *> target image if you want it on the board's rootfs.* How you arrange
> > to have the package installed to the image varies with the image
> > (since they all don't have the same image install variables, etc).
>
> And here is a $1,000,000 USD question? How to do it on Poky (as
> example of what you have stated in RED)? ;-)
>
> In other words: how to arrange it on Poky (as a Referent example)?
>

The core-image-kernel-dev image is how I do all my on target testing when I
introduce a new reference kernel for a release. And IIRC the autobuilders
are using a sato based image (Richard could confirm more easily that I
could what image type the autobuilders are using for hello-world on target
module tests).

Bruce



>
> Thank you,
> Zoran
> ___
>
>
> On Wed, May 15, 2019 at 7:41 AM Bruce Ashfield 
> wrote:
>
>>
>>
>> On Tue, May 14, 2019 at 1:30 PM Zoran Stojsavljevic <
>> zoran.stojsavlje...@gmail.com> wrote:
>>
>>> Hello Chris, Bruce,
>>>
>>> I have some additional data to share with you both, since I have tried
>>> something. And here is my take on the things!
>>>
>>> > 1. Build using a bb recipe.
>>> > Take a look at meta-skeleton/recipes-kernel/hello-mod for an example.
>>> > You just need to add meta-skeleton to your bblayers.conf and then
>>> >  bitbake hello-mod
>>>
>>> I looked into this example, and, yes, it is classic kernel module
>>> definition out of the tree. With some outdated data, all cool, the
>>> YOCTO designer should take care himself to fix these data, if using
>>> this stuff.
>>>
>>> But this is NOT mandatory, since I can add out of the tree module NOT
>>> actually using built-in module. I just use .../tmp/deploy/images/bbb/*
>>> generated stuff, since I have automated scripts which are bringing all
>>> these on my BBB target. Then I tftp my source code module to the
>>> target.
>>>
>>> > 2. Build from the SDK:
>>> > First, add the kernel source to the SDK by adding this to
>>> conf/local.conf
>>> >  TOOLCHAIN_TARGET_TASK_append = " kernel-devsrc"
>>>
>>> YES, this is THE command which should generate
>>> /usr/src/kernel(s)/`uname -r` or similar... But adding it to
>>> local.conf and after deleting kernel, then regenerating bitbake -k
>>> core-image-minimal does not bring this path into the rootfs image!?
>>>
>>
>> That's correct. That command only adds the kernel source and build
>> infrastructure to the SDK, not to your target image. You'd still need to
>> arrange to have the kernel-devsrc package installed on the target image if
>> you want it on the board's rootfs. How you arrange to have the package
>> installed to the image varies with the image (since they all don't have the
>> same image install variables, etc).
>>
>>
>>
>>>
>>> I did it actually using meta-bbb, and using poky referent distro as
>>> two additional layers to the more complex bbb image!
>>> https://github.com/jumpnow/meta-bbb.git
>>>
>>> The (KAS - you can figure out out of it local.conf) script I am using
>>> to build such a BBB image is here:
>>>
>>> https://github.com/ZoranStojsavljevic/bbb-yocto/blob/master/bbb-releases/bbb-warrior/kas-bbb-warrior.yml
>>>
>>> I did not try it with BBB reference poky only! Maybe I should try it
>>> as only referent poky? What do you think?
>>>
>>> Does in this case is SDK build really mandatory??? Should NOT be!
>>>
>>>
>> You only do the SDK steps if you want to support building out of tree
>> modules in an SDK install. So it is not mandatory for on target module
>> builds.
>>
>> Bruce
>>
>>
>>
>>> > Once the SDK is installed, generate the kernel headers:
>>> >  sudo -i
>>> >  . /opt/poky/2.6.2/environment-setup-cortexa8hf-neon-poky-linux-gnueabi
>>> >  cd /opt/poky/2.6.2/sysroots/cortexa8hf-neon-poky-linux-gnueabi
>>> >  cd /usr/src/kernel
>>> >  make oldconfig scripts
>>> >  exit
>>>
>>> This is in nutshell the same what I did (a bit different) for Embedded
>>> Debian. This is already on the target BBB, NOT while building YOCTO
>>> BBB image!
>>>
>>> > Finally, build your module using a Makefile like this
>>> >  obj-m := hello-mod.o
>>> >  all:
>>> >make -C $(SDKTARGETSYSROOT)/usr/src/kernel M=$(shell pwd)
>>>
>>> As said before: bringing my own module into the target BBB (I have my
>>> own examples, and I build them on the target with the almost the same
>>> Makefiles)
>>>
>>> Zoran
>>> ___
>>>
>>> On Sun, May 12, 2019 at 3:15 PM Chris Simmonds  wrote:
>>> >
>>> > Hi Zoran,
>>> >
>>> > There are two ways to do this
>>> >
>>> > 1. Build using a bb recipe.
>>> > Take a look at meta-skeleton/recipes-kernel/hello-mod for an example.
>>> > You just need to add meta-skeleton to your bblaysers.conf and then
>>> >   bitbake hello-mod
>>> >
>>> >
>>> > 2. Build 

[yocto] Unable to install additional tools in SDK

2019-05-15 Thread Gabriele Zampieri
Hi all,

I need to include in my native sdk the ODB compiler in order to produce
some sources. Since it is a nativesdk- only package, I wrote the following
nativesdk-odb-compiler_2.5.0.bb

inherit nativesdk

CONFIG_NAME = "odb-gcc-X"
B = "${WORKDIR}/build2"

# We must have a valid configuration before fetching
do_fetch_prepend() {
install -d ${B}
bpkg create -d ${B}/${CONFIG_NAME} cc   \
--wipe  \
config.cxx=g++  \
config.cc.coptions=-O3  \
config.install.root=${D}/usr
}

do_fetch() {
bpkg fetch --trust-yes \
--directory ${B}/${CONFIG_NAME} https://pkg.cppget.org/1/beta
}

do_compile() {
bpkg build odb -y ${PARALLEL_MAKE} --directory ${B}/${CONFIG_NAME}
}

do_install() {
bpkg install odb --verbose 3 --directory ${B}/${CONFIG_NAME}
}

FILES_${PN}_append = " ${SDKPATHNATIVE}"
FILES_${PN}_append = " /usr/*"

Then added the following line in my custom image recipe:

TOOLCHAIN_HOST_TASK_append = " nativesdk-odb-compiler"

Then I run bitbake  -c populate_sdk and the SDK is build. Once
installed, there is no trace about ODB. I digged in the bitbake output
directories (image/, package/ and package-split/) and the file tree is
correct, also the rpm packages are generated (however the main package is
1/10th of the ODB installed tree). Maybe I'm missing something?

Thanks in advance,
Gabriele
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] wic cp doesn't work with ext4 partition

2019-05-15 Thread Belisko Marek
On Wed, May 15, 2019 at 1:47 PM Belisko Marek 
wrote:

> Hi,
>
> I'm trying to update some artifact after image is build using wic tool.
> I've tried wic rm image.wic:2/boot/uImage and this works fine (verified
> with wic ls). While when I want to copy something to ext4 partition (I've
> tried to copy to vfat boot partition and it works fine) like:
> wic cp uImage_modified image.wic:2/boot and verify with wic ls file is not
> copied. Anything I'm missing here? Thanks.
>
Hmm seems that if I remove file first then it works fine. No idea why it
works with vfat though.

>
> BR,
>
> marek
>
> --
> as simple and primitive as possible
> -
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
>

/marek
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] wic cp doesn't work with ext4 partition

2019-05-15 Thread Belisko Marek
Hi,

I'm trying to update some artifact after image is build using wic tool.
I've tried wic rm image.wic:2/boot/uImage and this works fine (verified
with wic ls). While when I want to copy something to ext4 partition (I've
tried to copy to vfat boot partition and it works fine) like:
wic cp uImage_modified image.wic:2/boot and verify with wic ls file is not
copied. Anything I'm missing here? Thanks.

BR,

marek

-- 
as simple and primitive as possible
-
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Custom eSDK build fails

2019-05-15 Thread Priyanshu Sharma
I see that my custom layers are not being copied in
/sdk-ext/image/opt/${DISTRO}/${POKY_VERSION}/layers. Though
the conf files at
/sdk-ext/image/opt/${DISTRO}/${POKY_VERSION}/conf.

How can I include my layers also in this?

Warm Regards,
Priyanshu Sharma

On Thu, May 2, 2019 at 3:12 PM Priyanshu Sharma <
ms.priyanshu.sha...@gmail.com> wrote:

> Hi,
>
> I've a custom Yocto layer and use that as TEMPLATECONF for building. My
> custom layer also contains the image recipe based on pulsar-image (from
> meta-ivi).
>
> I'm using Yocto 2.5. The extensible sdk build fails at do_populate_sdk_ext
> task for my image recipe.
>
> $ bitbake  -f -c populate_sdk_ext
> Error -
> Exception: FileNotFoundError: [Errno 2] No such file or directory:
> '///sdk-ext/image//opt//2.5.1/conf/local.conf.bak'
> ->
> '///sdk-ext/image//opt//2.5.1/conf/local.conf'
>
> If I check the path, <>/sdk-ext/image//opt//2.5.1 , this directory
> is getting created but getting deleted afterwards.
> And  the one left after build fails is -
> <>/sdk-ext/image//opt//layers
>
> Is there any configuration to be modified/added for my custom image?
>
> Warm regards,
> Priyanshu Sharma
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Building Out-of-Tree Modules on the BBB Target

2019-05-15 Thread Zoran Stojsavljevic
> That's correct. That command only adds the kernel source and
> build infrastructure to the SDK, not to your target image. *You'd still*
*> need to arrange to have the kernel-devsrc package installed on the*
*> target image if you want it on the board's rootfs.* How you arrange
> to have the package installed to the image varies with the image
> (since they all don't have the same image install variables, etc).

And here is a $1,000,000 USD question? How to do it on Poky (as
example of what you have stated in RED)? ;-)

In other words: how to arrange it on Poky (as a Referent example)?

Thank you,
Zoran
___


On Wed, May 15, 2019 at 7:41 AM Bruce Ashfield 
wrote:

>
>
> On Tue, May 14, 2019 at 1:30 PM Zoran Stojsavljevic <
> zoran.stojsavlje...@gmail.com> wrote:
>
>> Hello Chris, Bruce,
>>
>> I have some additional data to share with you both, since I have tried
>> something. And here is my take on the things!
>>
>> > 1. Build using a bb recipe.
>> > Take a look at meta-skeleton/recipes-kernel/hello-mod for an example.
>> > You just need to add meta-skeleton to your bblayers.conf and then
>> >  bitbake hello-mod
>>
>> I looked into this example, and, yes, it is classic kernel module
>> definition out of the tree. With some outdated data, all cool, the
>> YOCTO designer should take care himself to fix these data, if using
>> this stuff.
>>
>> But this is NOT mandatory, since I can add out of the tree module NOT
>> actually using built-in module. I just use .../tmp/deploy/images/bbb/*
>> generated stuff, since I have automated scripts which are bringing all
>> these on my BBB target. Then I tftp my source code module to the
>> target.
>>
>> > 2. Build from the SDK:
>> > First, add the kernel source to the SDK by adding this to
>> conf/local.conf
>> >  TOOLCHAIN_TARGET_TASK_append = " kernel-devsrc"
>>
>> YES, this is THE command which should generate
>> /usr/src/kernel(s)/`uname -r` or similar... But adding it to
>> local.conf and after deleting kernel, then regenerating bitbake -k
>> core-image-minimal does not bring this path into the rootfs image!?
>>
>
> That's correct. That command only adds the kernel source and build
> infrastructure to the SDK, not to your target image. You'd still need to
> arrange to have the kernel-devsrc package installed on the target image if
> you want it on the board's rootfs. How you arrange to have the package
> installed to the image varies with the image (since they all don't have the
> same image install variables, etc).
>
>
>
>>
>> I did it actually using meta-bbb, and using poky referent distro as
>> two additional layers to the more complex bbb image!
>> https://github.com/jumpnow/meta-bbb.git
>>
>> The (KAS - you can figure out out of it local.conf) script I am using
>> to build such a BBB image is here:
>>
>> https://github.com/ZoranStojsavljevic/bbb-yocto/blob/master/bbb-releases/bbb-warrior/kas-bbb-warrior.yml
>>
>> I did not try it with BBB reference poky only! Maybe I should try it
>> as only referent poky? What do you think?
>>
>> Does in this case is SDK build really mandatory??? Should NOT be!
>>
>>
> You only do the SDK steps if you want to support building out of tree
> modules in an SDK install. So it is not mandatory for on target module
> builds.
>
> Bruce
>
>
>
>> > Once the SDK is installed, generate the kernel headers:
>> >  sudo -i
>> >  . /opt/poky/2.6.2/environment-setup-cortexa8hf-neon-poky-linux-gnueabi
>> >  cd /opt/poky/2.6.2/sysroots/cortexa8hf-neon-poky-linux-gnueabi
>> >  cd /usr/src/kernel
>> >  make oldconfig scripts
>> >  exit
>>
>> This is in nutshell the same what I did (a bit different) for Embedded
>> Debian. This is already on the target BBB, NOT while building YOCTO
>> BBB image!
>>
>> > Finally, build your module using a Makefile like this
>> >  obj-m := hello-mod.o
>> >  all:
>> >make -C $(SDKTARGETSYSROOT)/usr/src/kernel M=$(shell pwd)
>>
>> As said before: bringing my own module into the target BBB (I have my
>> own examples, and I build them on the target with the almost the same
>> Makefiles)
>>
>> Zoran
>> ___
>>
>> On Sun, May 12, 2019 at 3:15 PM Chris Simmonds  wrote:
>> >
>> > Hi Zoran,
>> >
>> > There are two ways to do this
>> >
>> > 1. Build using a bb recipe.
>> > Take a look at meta-skeleton/recipes-kernel/hello-mod for an example.
>> > You just need to add meta-skeleton to your bblaysers.conf and then
>> >   bitbake hello-mod
>> >
>> >
>> > 2. Build from the SDK:
>> > First, add the kernel source to the SDK by adding this to
>> conf/local/conf
>> >   TOOLCHAIN_TARGET_TASK_append = " kernel-devsrc"
>> >
>> > Then build the SDK
>> >   bitbake -c populate_sdk [your image recipe]
>> >
>> > Once the SDK is installed, generate the kernel headers:
>> >   sudo -i
>> >   . /opt/poky/2.6.2/environment-setup-cortexa8hf-neon-poky-linux-gnueabi
>> >   cd /opt/poky/2.6.2/sysroots/cortexa8hf-neon-poky-linux-gnueabi
>> >   cd /usr/src/kernel
>> >   make oldconfig scripts
>> >   exit
>> >
>> > Finally, build your