Community
cancel
Showing results for 
Search instead for 
Did you mean: 
HC_R
New Contributor I
1,199 Views

Intel Edison - kernel recomiling for sleep mode patch

Hi

I was trying to patch the Intel edison kernel for the issue while trying to put edison into sleep for the second time as mentioned in this post

So followed the steps http://shawnhymel.com/724/creating-a-custom-linux-kernel-for-the-edison-yocto-2-1/ http://shawnhymel.com/724/creating-a-custom-linux-kernel-for-the-edison-yocto-2-1/

Downloaded the edison-sec-ww25.5-15.tgz andfollowed the steps upto bitbake virtual/kernel -c menuconfig

after that I edited the

edison-src/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/files/upstream_to_edison.patch

so that the edit is incorporated in this patch and this will be applied while recompiling kernel

then did

bitbake virtual/kernel -c clean

bitbake virtual/kernel -c compile

bitbake -f deploy virtual/kernel

and

bitbake edison-image

after that I ran the ./flashall script to flash Edison, and when I tried echo -n "mem" > /sys/power/state two times it failed to put edison in sleep for the second time..

Am I missing some steps while recompiling the kernel ? (please pardon since I'm new to linux yocto compilation)

9 Replies
idata
Community Manager
144 Views

Hello Hari_CR,

 

 

Did you remember to replace the defconfig file after modifying menuconfig? You always need to replace this file for the one created by menuconfig, otherwise the changes will not take place. To learn more about menuconfig and how it works, I'd suggest you to read Yocto's Mega Manual (http://www.yoctoproject.org/docs/1.7.2/mega-manual/mega-manual.html http://www.yoctoproject.org/docs/1.7.2/mega-manual/mega-manual.html).

 

Also, did you try the suggestion made by @JimR in https://communities.intel.com/message/338169# 338169 https://communities.intel.com/message/338169# 338169?

 

 

Peter.
idata
Community Manager
144 Views

Hello Hari_CR,

 

 

Is there any update, have you been able to modify the image to enable sleep?

 

 

Peter.
HC_R
New Contributor I
144 Views

I went through the yocto manual

So this time I tried with a fresh copy of whole sdk/bsp (newly downloaded to enusre previous changes are not messing up)

I download the patch from https://github.com/01org/edison-linux/commit/149de7abd8829bcc009641e215b53fe89fcf29b2 pmu: stop powering up the pci device without driver · 01org/edison-linux@149de7a · GitHub

by

wget -O power.patch https://github.com/01org/edison-linux/commit/149de7abd8829bcc009641e215b53fe89fcf29b2.patch https://github.com/01org/edison-linux/commit/149de7abd8829bcc009641e215b53fe89fcf29b2.patch

Moved it into

edison-src/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/files and updated the linux-yocto_3.10.bbappend by adding the line

SRC_URI += "file://power.patch"

Then did

bitbake virtual/kernel -c menuconfig

cp tmp/work/edison-poky-linux/linux-yocto/3.10.17-r0/linux-edison-standard-build/.config ../../../meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/files/defconfig

bitbake edison-image

cd ../../../meta-intel-edison/utils/flash/

./postBuild.sh ../../../out/linux64/build

cd ../../../out/linux64/build/toFlash/

./flashall.sh

After booting with the new image file the issue still seems to be there, ie; when I try echo -n "mem" > /sys/power/state for the second time Edison is not going to the sleep mode.

(Note: I verified that the file gets patched properly after compilation)

Am I missing something, please help me with your inputs ?

idata
Community Manager
144 Views

In this last build, which image were you using? Did you build it using the 2.1 BSP? Also, how did you verify that file was correctly patched? Have you tried to manually modify the file (instead of using the patch)? Is there any difference?

 

 

Peter.
HC_R
New Contributor I
144 Views

  • which image were you using?

- I'm using the edison-sec-ww25.5-15.tgz downloaded from Intel site and It downloaded yocto project with linux kernel 3.10.17-r0

  • Did you build it using the 2.1 BSP?

- I not sure about the version number of BSP, anyway I downloaded the latest tar/zip file from Edison forum

  • Also, how did you verify that file was correctly patched?

- Yes I checked the file after compilation whether the chnages in the patch is reflected in the actual files, and the actual files got patched.

  • Have you tried to manually modify the file (instead of using the patch)? Is there any difference?

- Earlier when I tried to edit file manually the changes were getting roll-backed after doing the bitbake edison-image, that's why I sticked with the patching method.

So what can cause the issue ? Is it possible to reproduce the same at your end, since our project is running out of date..

Also can you please suggest some place in the kernel file where I can put a printk() and ensure that is working.

idata
Community Manager
144 Views

Let me run some tests, I'm going to try to replicate the issue. I'll get back to you as soon as possible.

Peter.

HC_R
New Contributor I
144 Views

The link helped me solving issue.

Intel should consider seriously on changing the script, like, it should report error without superuser privilege (as of now it reports success even though its not flashed).

idata
Community Manager
144 Views

Hi Hari_CR,

 

 

Could you please share with us the steps you took to resolve the issue? It would be of much help for other users.

 

 

Peter.
HC_R
New Contributor I
144 Views

I just had to run the script in super user privilege ie; sudo ./flashall.sh,

Please update this script so that others wont repeat the mistake again , I think this can be added at the starting of script so that it reports error at the starting itself.

if [[ $EUID -ne 0 ]]; then 

echo "This script must be run as root"

 

exit 1

 

fi
Reply