Re: [yocto] Power off IC over Yocto

2015-12-16 Thread simo
Hi, 

right now we solved executing an external tool we wrote in C to send the
I2C command to the external expansion board.

I had to modify the kernel_halt() function as follows:

void kernel_halt(void)
{

/* added by simo */

/* external environment declaration */
char i2c_shutdown_cmd[] = "/home/root/i2c-shutdown";
char **argv;
static char *envp[] = 
{
"HOME=/",
"PATH=/home/root:/sbin:/usr/sbin:/bin:/usr/bin",
NULL
};

argv = argv_split(GFP_KERNEL, i2c_shutdown_cmd, NULL);

// WORKS HERE
pr_emerg("Turning off.\n");
call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC);

/* no more executed */
kernel_shutdown_prepare(SYSTEM_HALT);

migrate_to_reboot_cpu();
syscore_shutdown();
//pr_emerg("System halted\n");
kmsg_dump(KMSG_DUMP_HALT);

/* commented while(1); in machine_halt for arm */
machine_halt();
}
EXPORT_SYMBOL_GPL(kernel_halt);

I cannot execute call_usermodehelper after kernel_shutdown_prepare()
because this function disables user space access.

So I have a question: how much is important to execute the code until
machine_halt() ?

I am using a kernel version 3.18.18.

Regards,
Simon


El mar, 15-12-2015 a las 19:46 +0100, Christian Ege escribió:
> 
> Am 15.12.2015 7:45 nachm. schrieb "Christian Ege" :
> >
> > Hi,
> >
> > Am 15.12.2015 6:45 nachm. schrieb "simo"
> :
> > >
> > > I am using a Gumtix Overo board and we create and expansion board
> that
> > > power Overo and other devices by external power supply IC.
> > >
> > > Our expansion board with power supply are connected by I2C bus 2
> in
> > > overo (not the same i2C that TW4030 or tps6595 is connected).
> > >
> > > Using the Linux  command shutdown we would like to power off the
> hole
> > > system.
> > > We would like to close the linux and last thing send a command
> over I2C
> > > to our power supply IC in order it disconnect the physical power.
> > >
> > > Our question is:
> > >
> > > Where we have to implement that function?
> > > Is there any example of it?
> > I guess you can use 
> > http://lxr.free-electrons.com/source/kernel/reboot.c
> >
> register_reboot_notifier is your friend
> > You have to create some kernel module doing this or write a kernel
> patch.
> >
> > Regards,
> > Christian
> >
> > > --
> > > ___
> > > yocto mailing list
> > > yocto@yoctoproject.org
> > > https://lists.yoctoproject.org/listinfo/yocto
> 
> 


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


[yocto] How to move the initramfs manifest into the rootfs?

2015-12-16 Thread Travis Pressler
I am using bitbake to build a recipe which requires 
meta/recipes-core/images/core-image-minimal-dev.bb. I would like to include the 
references of the symbolic links 
core-image-minimal-initramfs-.manifest and -.manifest 
within the build/tmp/deploy//images directory to the rootfs of the 
resulting operating system.

It was pretty straightforward to add -.manifest to the image 
by adding an IMAGE_PREPROCESS_COMMAND like this:

move_manifests() {
   mkdir -p ${IMAGE_ROOTFS}/home/root
   ls -lah ${DEPLOY_DIR_IMAGE} > ${IMAGE_ROOTFS}/home/root/lslog
   install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest 
${IMAGE_ROOTFS}/home/root
}
The lslog helped me understand what exactly the deploy/images directory looks 
like during the image preprocess step, and the initramfs manifest isn't in 
there at that point; the initramfs manifest must be created shortly thereafter 
(during , because after bitbake's build tasks have been completed, the 
deploy/images does include the initramfs manifest.

Is it possible to move the core-image-minimal-initramfs-.manifest into 
the rootfs of my recipe-generated operating system?
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-mono PATCH] mono-4.xx.inc: Inherit gettext class

2015-12-16 Thread Otavio Salvador
The mono uses gettext for build, by default, so we ought to ensure it
is available during the build.

This fixes follow error:

,[ Build error ]
| configure: error: msgfmt not found. You need to install the 'gettext' 
package, or pass --enable-nls=no to configure.
| Configure failed. The contents of all config.log files follows to aid 
debugging
| 
.../build-default/tmp/work/x86_64-linux/mono-native/4.0.1.34-r0/mono-4.0.1/config.log
`

Signed-off-by: Otavio Salvador 
---

 recipes-mono/mono/mono-4.xx.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/recipes-mono/mono/mono-4.xx.inc b/recipes-mono/mono/mono-4.xx.inc
index f5ba14f..ed27c8d 100644
--- a/recipes-mono/mono/mono-4.xx.inc
+++ b/recipes-mono/mono/mono-4.xx.inc
@@ -30,6 +30,7 @@ FILESPATH =. "${FILE_DIRNAME}/mono-${PV}:"
 
 inherit autotools-brokensep
 inherit pkgconfig
+inherit gettext
 
 EXTRA_OECONF += " mono_cv_uscore=no --with-sigaltstack=no --with-mcs-docs=no "
 
-- 
2.6.4

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


[yocto] Debug custom recipe configuration

2015-12-16 Thread Srinivasan Srivatsan
Hi,

I am working with Yocto and Bitbake to add a recipe which executes a python
script for configuration.

Am currently using the "*bitbake  -c configure*" to configure
the recipe. There is a configuration issue which am looking into for which
I need to add pdb.set_trace() when the configuration is run through
bitbake. I ran the python script configuration locally without using
bitbake, and it seems to work. If I add set_trace(), I see that the bitbake
program bypasses the pdb prompt during the run. Is there a way to have the
bitbake stop at that point in the program and give me access to the pdb
prompt ? Any other alternative way to debug this issue is appreciated.

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


[yocto] populate_sdk fails almost immediately

2015-12-16 Thread Michael Habibi
I decided to built the SDK to play around with the output so I can
understand how it all goes together. According to the documentation, I
simply do:

bitbake  -c populate_sdk

It's worth noting I am running a custom image and distro and not a
poky/yocto image (I do inherit core-image, however). I don't spot any
critical differences between core-image-minimal and my custom image. My
distro conf includes poky.conf to pull in most of the configuration.
However, the first thing I get is this:

DEBUG: Executing python function sysroot_cleansstate
DEBUG: Python function sysroot_cleansstate finished
DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc',
'bit-64', 'x86_64-linux', 'common']
DEBUG: Executing shell function autotools_preconfigure
DEBUG: Shell function autotools_preconfigure finished
DEBUG: Executing python function autotools_copy_aclocals
DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc',
'bit-64', 'x86_64-linux', 'common']
DEBUG: Python function autotools_copy_aclocals finished
DEBUG: Executing shell function do_configure
configure.ac:34: error: Please use exactly Autoconf 2.64 instead of 2.69.
config/override.m4:12: _GCC_AUTOCONF_VERSION_CHECK is expanded from...
configure.ac:34: the top level

for the binutils-crosssdk do_configure task. Am I doing something insane? I
figure since my image build is working correctly, it should be using the
right versions of autoconf, etc.
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] raspberrypi build error

2015-12-16 Thread serhat guner
i m trying to build image for raspberry pi using "bitbake
core-image-minimal"  and getting error
"ERROR: Task 1309 (/home/serhat/yoctoProject/meta/recipes-devtools/gcc/
gcc-cross-initial_5.2.bb, do_compile) failed with exit code '1'"
any help would be appreciated
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] raspberrypi build error

2015-12-16 Thread Burton, Ross
On 16 December 2015 at 22:04, serhat guner  wrote:

> i m trying to build image for raspberry pi using "bitbake
> core-image-minimal"  and getting error
> "ERROR: Task 1309 (/home/serhat/yoctoProject/meta/recipes-devtools/gcc/
> gcc-cross-initial_5.2.bb, do_compile) failed with exit code '1'"
>

This just says that the gcc build failed.  Please put the full compile log
in a pastebin or something so we can see it.

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


[yocto] [PATCH 1/1] raspberrypi0.conf: Add machine configuration for Raspberry Pi Zero

2015-12-16 Thread Andrei Gherzan
Signed-off-by: Andrei Gherzan 
---
 conf/machine/raspberrypi0.conf | 6 ++
 1 file changed, 6 insertions(+)
 create mode 100644 conf/machine/raspberrypi0.conf

diff --git a/conf/machine/raspberrypi0.conf b/conf/machine/raspberrypi0.conf
new file mode 100644
index 000..58468ed
--- /dev/null
+++ b/conf/machine/raspberrypi0.conf
@@ -0,0 +1,6 @@
+#@TYPE: Machine
+#@NAME: RaspberryPi Zero Development Board
+#@DESCRIPTION: Machine configuration for the RaspberryPi Zero board 
(https://www.raspberrypi.org/blog/raspberry-pi-zero)
+
+MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
+include conf/machine/raspberrypi.conf
-- 
2.6.3

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


Re: [yocto] Which OpenSSH packages to use?

2015-12-16 Thread Clay D. Montgomery

On 12/13/2015 12:57 PM, Khem Raj wrote:


On Dec 13, 2015, at 10:35 AM, Clay D. Montgomery 
mailto:c...@montgomery1.com>> wrote:


I'm trying to understand which of these OpenSSH package options I 
should use with the CORE_IMAGE_EXTRA_INSTALL option:


openssh
openssh-sshd
openssh-sftp
openssh-sftp-server

I want OpenSSH server functionality that supports both the scp and 
sftp protocols. I first tried just 'openssh' and found that it 
provides scp but not sftp.
So then I tried the latter 3 options and I got sftp, but not scp. Do 
I really need all 4 of these to get scp and sftp?


I checked this recipe guide and found it lists yet another package 
named 'packagegroup-core-ssh-openssh 
' but it says 
nothing about sftp.

http://recipes.yoctoproject.org/rrs/recipes/2.1/M2/

I would appreciate some advise.


you can just do

EXTRA_IMAGE_FEATURES += “ssh-server-openssl” in local.conf

or

IMAGE_FEATURES += "ssh-server-openssl"

via a bbappend in your layer if you hinging on to same image recipe 
otherwise if you have your own image recipe

then add it to that.



Thanks, Clay Montgomery


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



Raj,

  Thanks for the help, but that does not seem to provide the required 
sftp server that is supposed to be here:

/usr/lib/openssh/sftp-server

I found that I have to add all 3 of these in the 
CORE_IMAGE_EXTRA_INSTALL list to get both scp and sftp clients and servers:

openssh
openssh-sftp
openssh-sftp-server

Thanks, Clay

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