How do you build and run the PM kernel?

52 views
Skip to first unread message

Quist

unread,
Sep 24, 2009, 7:13:21 AM9/24/09
to Beagle Board
How do you guys build the PM kernel by Kevin Hilman, and what .config-
file do you use?
http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=summary

I am able to build the kernel, and run it with "ramdisk.gz" and
"boot.scr" taken from:
http://code.google.com/p/beagleboard/wiki/BeagleboardRevCValidation

-but I do not have the features Kevin describe here, fx. "cpufreq-
info":
http://elinux.org/OMAP_Power_Management

My questions:
-How do you configure the kernel after checkout?
-What root-file-system do you use?
-What "bootcmd" and "bootargs" do you use?

Thanks,
Quist


This is what I do:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git
cd linux-omp-pm
git checkout -b pm origin/pm
#apply patch from http://patchwork.kernel.org/patch/47089/ (else it
will stall after "... done, booting the kernel")
ARCH=arm
PATH=/OE/angstrom-dev/cross/armv7a/bin:/OEangstrom-dev/staging/i686-
linux/usr/bin:$PATH
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- distclean
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- omap3_beagle_defconfig
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig # enable
all in "CPU Power Management" and "Power management options". Enable
"Kernel low-level debugging functions" and disable "USB Gadget
Support"
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

Koen Kooi

unread,
Sep 24, 2009, 7:45:43 AM9/24/09
to beagl...@googlegroups.com

Op 24 sep 2009, om 13:13 heeft Quist het volgende geschreven:

>
> How do you guys build the PM kernel by Kevin Hilman, and what .config-
> file do you use?

I use openembedded to build pm and non-pm kernels. OE includes patches
and known good configs to make them work.

regards,

Koen

Joep Schroen

unread,
Sep 24, 2009, 7:55:52 AM9/24/09
to beagl...@googlegroups.com
Hi Koen,
 
Maybe you can write a short Wiki on how to choose which Kernel OE/Bitbake/Angstrom will build?
Default is a .21 kernel I believe?
 
If this already exist then a pointer of where would be great!
 
Wkr,
 Joep

2009/9/24 Koen Kooi <ko...@beagleboard.org>

Karsten Quist Jensen

unread,
Sep 24, 2009, 8:22:41 AM9/24/09
to beagl...@googlegroups.com
That sounds good Koen, it makes it a lot easier!

How do I tell OE to use pm-kernel instead? Do I need to specify it in the local.conf file? And How?

Thanks,
Quist

2009/9/24 Koen Kooi <ko...@beagleboard.org>

Koen Kooi

unread,
Sep 24, 2009, 8:27:06 AM9/24/09
to beagl...@googlegroups.com

Op 24 sep 2009, om 13:55 heeft Joep Schroen het volgende geschreven:

> Hi Koen,
>
> Maybe you can write a short Wiki on how to choose which Kernel OE/
> Bitbake/Angstrom will build?

I don't write wikis since they go out of date way too quickly to be
usefull and I end up with people following outdated instructions.

> Default is a .21 kernel I believe?

.21 is so 5 years ago, try .29.

Joep Schroen

unread,
Sep 24, 2009, 12:49:05 PM9/24/09
to beagl...@googlegroups.com
Hi Koen,

ACK! The question is how to select which Kernel to build with
OE/BB/Angstrom?

-----Oorspronkelijk bericht-----
Van: beagl...@googlegroups.com [mailto:beagl...@googlegroups.com]
Namens Koen Kooi
Verzonden: donderdag 24 september 2009 14:27
Aan: beagl...@googlegroups.com
Onderwerp: [beagleboard] Re: How do you build and run the PM kernel?

tarek.attia

unread,
Nov 13, 2009, 12:43:34 PM11/13/09
to Beagle Board
I got stuck in the same problem,,the linux kernel isn't compatible
with the root file system,,i want to build a root file system image
with the linux kernel i choose (enabled pm )

how ca I make tht???

plz helpppppppp

John (USP)

unread,
Nov 13, 2009, 1:53:32 PM11/13/09
to beagl...@googlegroups.com


> -----Original Message-----
> From: tarek.attia [mailto:tarek....@gmail.com]
> Sent: Friday, November 13, 2009 9:44 AM
> To: Beagle Board
> Subject: [beagleboard] Re: How do you build and run the PM kernel?
>
> I got stuck in the same problem,,the linux kernel isn't compatible
> with the root file system,,i want to build a root file system image
> with the linux kernel i choose (enabled pm )
>
> how ca I make tht???
>
> plz helpppppppp
The way this works is that we help you and then you get to write the wiki.
First, you have to give us some background on what it is that you want to
do. Also, tell us what you have tried so far and then we will help guide
you. If you want to build a PM kernel, you can do this using Angstrom, or
you can build the PM kernel directly from GIT and add the patches that
Angstrom use. If you have installed Angstrom, then the PM recipes in
openembedded/recipes/linux will show you how to build a PM kernel. Look at
linux-omap-pm_git.bb for example. The SRC_URI shows you the GIT used to
retrieve the source, the SRCREV gives you the Shar1 to checkout the correct
release in GIT, and the SRC_URI_append are the patches you should apply.

You should learn how to use Angstrom and also how to use GIT.

I think with Angstrom, you can just use
bitbake linux-omap-pm
and this will build the PM kernel for you.

If you want to do this manually, then it is a little more complicated:
Create a folder for your GIT repositories.
git clone
git://git.kernel.org/pub/scm/linux/kernel/git/khlman/liinux-omap-pm.git;prot
ocol=git;branch=pm
cd linux-omap-pm
git checkout 7c5cb78 -b MyPMKernel
cp $OETREE/openembedded/recipes/linux/linux-omap-pm/beagleboard/defconfig
.config
make xconfig
"Make any changes you need, such as enabling specific drivers, etc"
make uImage
"The file you will need, which is uImage in this folder arch/arm/boot"

I hope this helps.

Regards
John
>
>
>
> On Sep 24, 6:49 pm, "Joep Schroen" <joepschr...@gmail.com> wrote:
> > Hi Koen,
> >
> > ACK! The question is how to select which Kernel to build with
> > OE/BB/Angstrom?
> >
> > -----Oorspronkelijk bericht-----
> > Van: beagl...@googlegroups.com
> [mailto:beagl...@googlegroups.com]
> > Namens Koen Kooi
> > Verzonden: donderdag 24 september 2009 14:27
> > Aan: beagl...@googlegroups.com
> > Onderwerp: [beagleboard] Re: How do you build and run the PM kernel?
> >
> > Op 24 sep 2009, om 13:55 heeft Joep Schroen het volgende geschreven:
> >
> > > Hi Koen,
> >
> > > Maybe you can write a short Wiki on how to choose which Kernel OE/
> > > Bitbake/Angstrom will build?
> >
> > I don't write wikis since they go out of date way too quickly to be
> > usefull and I end up with people following outdated instructions.
> >
> > > Default is a .21 kernel I believe?
> >
> > .21 is so 5 years ago, try .29.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Beagle Board" group.
> To post to this group, send email to beagl...@googlegroups.com.
> To unsubscribe from this group, send email to
> beagleboard...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/beagleboard?hl=.


Duckyduck

unread,
Dec 11, 2009, 3:41:21 PM12/11/09
to Beagle Board
Hi John and everyone reading,

One question remains;
- Where/what do we need to change to build a linux-omap-pm instead of
linux-omap kernel when building e.g. beagleboard-demo-image ?

It should be defined somewhere, but can't find it :-(

Thanks for your time,
Joep

Philip Balister

unread,
Dec 11, 2009, 3:42:58 PM12/11/09
to beagl...@googlegroups.com
On Fri, Dec 11, 2009 at 3:41 PM, Duckyduck <joeps...@gmail.com> wrote:
> Hi John and everyone reading,
>
> One question remains;
> - Where/what do we need to change to build a linux-omap-pm instead of
> linux-omap kernel when building e.g. beagleboard-demo-image ?
>
> It should be defined somewhere, but can't find it :-(

conf/machine/beagleboard.conf

Philip
> --
>
> You received this message because you are subscribed to the Google Groups "Beagle Board" group.
> To post to this group, send email to beagl...@googlegroups.com.
> To unsubscribe from this group, send email to beagleboard...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beagleboard?hl=en.
>
>
>

Duckyduck

unread,
Dec 11, 2009, 4:35:27 PM12/11/09
to Beagle Board
Philip,

I've added: PREFERRED_PROVIDER_virtual/kernel = "linux-omap-pm"
Should that work?

Wkr,
Joep

On Dec 11, 3:42 pm, Philip Balister <philip.balis...@gmail.com> wrote:

Joep Schroen

unread,
Dec 12, 2009, 8:46:24 AM12/12/09
to Beagle Board
Finally... The solution that works for me:
/openembedded/conf/machine/include/omap3.inc  -> remove PREFERRED_PROVIDER_virtual/kernel line
/openembedded/conf/machine/beagleboard.conf -> add PREFERRED_PROVIDER_virtual/kernel = "linux-omap-pm"
/openembedded/recipes/linux/linux-omap_2.6.29.bb -> remove DEFAULT_PREFERENCE_beagleboard = "1
/openembedded/recipes/linux/linux-omap_2.26.27 till 2.26.28 -> add DEFAULT_PREFERENCE = "-1"
/openembedded/recipes/linux/linux-omap-pm_git.bb -> add DEFAULT_PREFERENCE_beagleboard = "1"

Can someone comment on this; Is this the "preferred way" of doing, or is there a better way?
I had to remove the PREFERRED line from omap3.inc otherwise both the normal and pm kernel got made (with an error that both provide virtual/kernel).

Wkr,
 Joep

2009/12/11 Duckyduck <joeps...@gmail.com>

Joep Schroen

unread,
Dec 13, 2009, 1:22:42 PM12/13/09
to beagl...@googlegroups.com
With steps mentioned in my previous post I can now build a kernel that
identifies with:
Angstrom/2.6.30+2.6.31rc1-pm1+gi
[ 0.000000] Linux version 2.6.31-rc1-omap1 (bea...@localhost.localdomain)
(gcc version 4.3.1 (GCC) ) #1 Sat Dec 12 06:03:21 EST 2009

Unfortunately it doesn't do its job quite well, got these errors and
warnings during boot:
[ 0.000000] twl4030_usb twl4030_usb: Initialized TWL4030 USB module
[ 0.000000] nop_usb_xceiv nop_usb_xceiv: can't register transceiver, err:
-16
[ 0.000000] nop_usb_xceiv: probe of nop_usb_xceiv failed with error -16
[ 0.000000] usbcore: registered new interface driver usbfs

My USB hub connected to the HOST connection does not come up, maybe related
to this one?

Altough later I get this:
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Clock usbhost_48m_fck didn't enable in 100000 tries
ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1

ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.0
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected

This suggests to me that the hub is found??

Beside that I also get warning like:

Platform driver 'musb_hdrc' needs updating - please use dev_pm_ops

Platform driver 'omapdss' needs updating - please use dev_pm_ops
Platform driver 'serial8250' needs updating - please use dev_pm_ops
Platform driver 'gpio-keys' needs updating - please use dev_pm_ops
Platform driver 'twl4030_rtc' needs updating - please use dev_pm_ops
Platform driver 'omap_wdt' needs updating - please use dev_pm_ops
Platform driver 'mmci-omap-hs' needs updating - please use dev_pm_ops
Platform driver 'omap-led' needs updating - please use dev_pm_ops
Platform driver 'soc-audio' needs updating - please use dev_pm_ops

Anyone that has some pointers on where to look?




________________________________
<mailto:beagleboard%2Bunsu...@googlegroups.com> .

> > For more options, visit this group
athttp://groups.google.com/group/beagleboard?hl=en.


--

You received this message because you are subscribed to the Google
Groups "Beagle Board" group.
To post to this group, send email to beagl...@googlegroups.com.
To unsubscribe from this group, send email to
beagleboard...@googlegroups.com
<mailto:beagleboard%2Bunsu...@googlegroups.com> .

haribabu.narayanan

unread,
Jan 3, 2010, 11:34:55 PM1/3/10
to Beagle Board
@Joep:

I tried building using your instructions and got the same Angstrom/
2.6.30+2.6.31rc1-pm1+gi image:

----console message----
## Booting kernel from Legacy Image at 80300000 ...
Image Name: Angstrom/2.6.30+2.6.31rc1-pm1+gi
...
----

Even though it says pm1 as a part of the image name, the kernel does
not seem to be enabled with power management features (there are no
"cpufreq" directory in /sys/devices/system/cpu/cpu0/cpufreq).

is it the same for you? Or am I missing something obvious?

-hari

On Dec 13 2009, 12:22 pm, "Joep Schroen" <joepschr...@gmail.com>
wrote:

> Van: Joep Schroen [mailto:joepschr...@gmail.com]
> Verzonden: zaterdag 12 december 2009 14:46
> Aan: Beagle Board
> Onderwerp: Re: [beagleboard] Re: How do you build and run the PM kernel?
>
> Finally... The solution that works for me:
> /openembedded/conf/machine/include/omap3.inc  -> remove
> PREFERRED_PROVIDER_virtual/kernel line
> /openembedded/conf/machine/beagleboard.conf -> add
> PREFERRED_PROVIDER_virtual/kernel = "linux-omap-pm"
> /openembedded/recipes/linux/linux-omap_2.6.29.bb -> remove
> DEFAULT_PREFERENCE_beagleboard = "1
> /openembedded/recipes/linux/linux-omap_2.26.27 till 2.26.28 -> add
> DEFAULT_PREFERENCE = "-1"
> /openembedded/recipes/linux/linux-omap-pm_git.bb -> add
> DEFAULT_PREFERENCE_beagleboard = "1"
>
> Can someone comment on this; Is this the "preferred way" of doing, or is
> there a better way?
> I had to remove the PREFERRED line from omap3.inc otherwise both the normal
> and pm kernel got made (with an error that both provide virtual/kernel).
>
> Wkr,
>  Joep
>

> 2009/12/11 Duckyduck <joepschr...@gmail.com>

>         > >> you. If you want to build a PM kernel, you can do this usingAngstrom, or


>         > >> you can build the PM kernel directly from GIT and add the
> patches that

>         > >>Angstromuse. If you have installedAngstrom, then the PM


> recipes in
>         > >> openembedded/recipes/linux will show you how to build a PM
> kernel. Look at
>         > >> linux-omap-pm_git.bb for example. The SRC_URI shows you the GIT
> used to
>         > >> retrieve the source, the SRCREV gives you the Shar1 to checkout
> the correct
>         > >> release in GIT, and the SRC_URI_append are the patches you
> should apply.
>

>         > >> You should learn how to useAngstromand also how to use GIT.


>
>         > >> I think withAngstrom, you can just use
>         > >> bitbakelinux-omap-pm
>         > >> and this will build the PM kernel for you.
>
>         > >> If you want to do this manually, then it is a little more
> complicated:
>         > >> Create a folder for your GIT repositories.
>         > >> git clone
>
> git://git.kernel.org/pub/scm/linux/kernel/git/khlman/liinux-omap-pm.git;pro­t
>         > >> ocol=git;branch=pm

>         > >> cdlinux-omap-pm

>         For more options, visit this group athttp://groups.google.com/group/beagleboard?hl=en.- Hide quoted text -
>
> - Show quoted text -

aji

unread,
Jan 7, 2010, 10:46:55 PM1/7/10
to Beagle Board
Dear All,
I've tried to build the pm kernel as well for the project I'm
currently working on, but as Hari mentioned, the "cpufreq" directory
and commands are not available. Here's what I've done so far:
- pulled both the main branch (2.6.33) and the pm branch (latest as of
this morning) from their respective git repositories;
- enabled all features in both CPU power management and power
management options;
- built both kernels' uImages using gcc (not using OE); and
- copied the uImages to SD card and ran them on beagleboard.

Both run properly and launch the shell, but somehow I can find neither
the cpufreq directory nor the cpufreq- commands in usr/bin. Did I miss
any steps along the way? Or do I need to use OE so that it builds the
file system required? Any help is appreciated. Thanks.

-Aji

On Jan 4, 12:34 pm, "haribabu.narayanan"


<haribabu.naraya...@gmail.com> wrote:
> @Joep:
>
>   I tried building using your instructions and got the same Angstrom/
> 2.6.30+2.6.31rc1-pm1+gi  image:
>
> ----console message----
> ## Booting kernel from Legacy Image at 80300000 ...
>    Image Name:   Angstrom/2.6.30+2.6.31rc1-pm1+gi
>   ...
> ----
>
>   Even though it says pm1 as a part of the image name, the kernel does

> not seem to be enabled withpowermanagementfeatures (there are no

> >         For more options, visit this group athttp://groups.google.com/group/beagleboard?hl=en.-Hide quoted text -

haribabu.narayanan

unread,
Jan 8, 2010, 2:55:03 AM1/8/10
to Beagle Board
Hi Aji.,

I was working with OE/Angstrom environment and all I had to do was
to choose 2.6.29-r46 PM kernel instead of the default PM kernel (which
is 2.6.31 i guess). If you are not particular about using the latest
PM-kernel, mebbe this can work for you.

For cpufreq-utils, you will have to install it separately. See
http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html.
If you succeed in installing it, please post back your solution. I am
facing the following problem with libtool:

/usr/bin/libtool: line 371: CDPATH: not found
/usr/bin/libtool: line 1079: func_opt_split: not found
libtool: Version mismatch error. This is libtool 2.2.4, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool
2.2.4
libtool: and run autoconf again.

-hari

> > >         For more options, visit this group athttp://groups.google.com/group/beagleboard?hl=en.-Hidequoted text -
>
> > > - Show quoted text -- Hide quoted text -

george

unread,
Feb 9, 2010, 10:24:59 PM2/9/10
to beagl...@googlegroups.com
Hi All,

I have to config kernel:
1. enable [ CPU Power Management->CPU Frequency scaling ]
2. set [ Default CPUFreq governor->performance ]
This sets the frequency statically to the highest frequency
supported
by the CPU.
3. check cpufreq:
cd /sys/devices/system/cpu/cpu0/cpufreq/
cat scaling_available_frequencies
550000 500000 250000 125000
cat scaling_max_freq
550000
cat cpuinfo_cur_freq
550000
cat scaling_cur_freq
550000
so, cpufreq is 550Mhz now.

Best Regards,
George Qiao

>> git://git.kernel.org/pub/scm/linux/kernel/git/khlman/liinux-omap-pm.git;prot


--
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/

Kai

unread,
Feb 11, 2010, 5:50:48 AM2/11/10
to Beagle Board
I see u-boot is built using codesourcery, but the kernel using OE. I
tried to build the kernel
using codesourcery, build failed in some options. Why can't we build u-
boot and uImage using same cross compiler?

On Feb 10, 3:24 am, george <joesensp...@gmail.com> wrote:
> Hi All,
>
> I have to config kernel:
> 1. enable [ CPU Power Management->CPU Frequency scaling ]
> 2. set    [ Default CPUFreq governor->performance ]
>         This sets the frequency statically to the highest frequency  
> supported
> by the CPU.
> 3. check cpufreq:
>             cd /sys/devices/system/cpu/cpu0/cpufreq/
>             cat scaling_available_frequencies
>                 550000 500000 250000 125000
>             cat scaling_max_freq
>                 550000
>             cat cpuinfo_cur_freq
>                 550000
>             cat scaling_cur_freq
>                 550000
>        so, cpufreq is 550Mhz now.
>
> Best Regards,
> George Qiao
>

> ...
>
> read more »

Koen Kooi

unread,
Feb 11, 2010, 8:12:16 AM2/11/10
to beagl...@googlegroups.com

Op 11 feb 2010, om 11:50 heeft Kai het volgende geschreven:

> I see u-boot is built using codesourcery, but the kernel using OE. I
> tried to build the kernel
> using codesourcery, build failed in some options. Why can't we build u-
> boot and uImage using same cross compiler?

For angstrom everything is built with the same compiler

Kai

unread,
Feb 13, 2010, 6:51:16 AM2/13/10
to Beagle Board
After quilting patches, I managed to build kernel image using
codesourcery, then copied Image as uImage.bin. After reboot, I got
Wrong Image Format for bootm command. What makes the kernel image
doesn't work as see follows?

U-Boot 2009.11-rc1 (Jan 08 2010 - 21:19:52)

OMAP3530-GP ES3.1, CPU-OPP2 L3-165MHz
OMAP3 Beagle board + LPDDR/NAND
I2C: ready
DRAM: 256 MB
NAND: 256 MiB
*** Warning - bad CRC or NAND, using default environment

In: serial
Out: serial
Err: serial
Board revision C4
Die ID #1978000400000000040365fa1700e01a
Hit any key to stop autoboot: 0
mmc1 is available
reading boot.scr

603 bytes read
Running bootscript from mmc ...
## Executing script at 82000000
reading uImage.bin

3812320 bytes read
***** Kernel: /dev/mmcblk0p1/uImage.bin *****
reading ramdisk.gz

7999649 bytes read
***** RootFS: /dev/mmcblk0p1/ramdisk.gz *****
Wrong Image Format for bootm command
ERROR: can't get kernel image!

On Feb 11, 1:12 pm, Koen Kooi <k...@beagleboard.org> wrote:
> Op 11 feb 2010, om 11:50 heeftKaihet volgende geschreven:
>
> > I see u-boot is built usingcodesourcery, but the kernel using OE. I


> > tried to build the kernel

> > usingcodesourcery, build failed in some options. Why can't we build u-

Reply all
Reply to author
Forward
0 new messages