Step by step guild to cross compiling a kernel for the Beagleboard xM

413 views
Skip to first unread message

Ernie

unread,
Jan 16, 2012, 8:54:29 AM1/16/12
to Beagle Board
Hi All,

I have had a Beagleboard xM for some time now and with the use of a
pre built images from Robert Nelson have developed some simple
programs that work successfully. The problem I have is that not all
the images I have tried, have the right combination of devices built
in to the kernel that I require, so I embarked on trying to build my
own ‘tailor made’ kernel. So far without success. I have used various
guilds and instructions found on the Web. In all cases I get so far
long and then get errors I cannot resolve, mainly down to my lack of
knowledge in this subject. In some cases, terms are used like
‘toolchains’ which is not explained, or when down loading an item from
a repositories the item is not found or permission block the download.
It seems a bit confusing to someone new to this environment, not
having been involved with the history of the various development
methods. I have seen procedures using things like ‘git’ or ‘schroot’
and I am not sure which is the best approach to take.

Does anyone have a good ‘Step by Step’ guild on how to build a Linux
(perhaps Ubuntu) kernel for the Beagleboard xM, including the steps
required to get the new kernel on to a SD card so it will boot on the
BB. My preferred method would be to cross compile the kernel under
Ubuntu 10.10 running in a virtual VMWare environment under Windows.

Information on how to configure the kernel build options would also
be useful.

Any help in progressing my problem would be much appreciated.


Ernie

Mark A. Yoder

unread,
Jan 16, 2012, 11:16:35 AM1/16/12
to beagl...@googlegroups.com
Ernie:
  Here [1] is what I use with my students. Most have been able to get it work.

It points you to Angstrom [2] and bitbake but adds some details so the kernel source code isn't removed.

--Mark

Paolo Pisati

unread,
Jan 17, 2012, 5:53:06 AM1/17/12
to beagl...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/16/2012 02:54 PM, Ernie wrote:
>
> Does anyone have a good �Step by Step� guild on how to build a


> Linux (perhaps Ubuntu) kernel for the Beagleboard xM, including the
> steps required to get the new kernel on to a SD card so it will
> boot on the BB. My preferred method would be to cross compile the
> kernel under Ubuntu 10.10 running in a virtual VMWare environment
> under Windows.

cross compilation howto for Ubuntu:

// get the source first
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-precise.git

// tweak the config
cd ubuntu-precise
export $(dpkg-architecture -aarmel); export
CROSS_COMPILE=arm-linux-gnueabi-
fakeroot debian/rules clean editconfigs

// compile it
fakeroot debian/rules binary-omap

// copy the generated .deb on the sd:

cp ../linux-image-$your-own-kernel-version-here.deb /media/$something

// boot the beagle and install it via dpkg:

dpkg -i linux-image-$your-own-kernel-version-here.deb

if you want to mark your kernel in some way (so you can distinguish it
from stock ones), modify debian.master/changelog:

linux (3.2.0-9.16) precise; urgency=low

to

linux (3.2.0-9.16~myownkernel) precise; urgency=low

this way you will get a kernel with "~myownkernel" appended at the end
(and whenever a new offical Ubuntu kernel is available it will
overwrite it).

The same steps are required for a Pandaboard, but you'll have to
switch branch after you checked out the source:

git co ti-omap4

and when you compile it use binary-omap4 insted of binary-omap.

- --
bye,
p.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPFVMNAAoJEJdscTmfuQbQPicQAJhWqWi1NC2ReHmaZCPc2OFz
rPsepST55tL5+STCotHFFpEn0Yc//5rVGtpI8+PvNw/gPiwXzotQKjs5p5yf4uQZ
GiIRk2iGhhjRcSX1VduttnuWHLm+NMQRNGv/kFoDB0EC83I3J52tvrIbt2U+4T58
VUuOnX71Y8VyN4xQa+XmGxp8ebmKhZsGAO2Fa0Aex7Joyl/D63aMqnkkXigz1Slb
0n4ODF0NMvDFAa/MQwUsmhMWaqj+Gr1bUB3kN+RuEVTMp6Bhb0rvNEYCvxDNLe3R
YKdFsEoxZnkFYjEmxdmqwzzRNdPm96gN+dOb8o1NO9tzz97srh4x8V4l9c5hkdB9
0yYRH3u5j1iyz7uUldqzgKU4GTtxqxVX51VZhIwNs71obFChtwZSyYAja5ovvYo+
Khps22TbUwBJJVHXEQV345p1j2tjV+lwUVDve65bYT/l1NvMut4ppyQOqIhp6y9j
aSbLq3fCQgYle7+o1+enDsJ2rApS/PKlR0dVmvZ3aLGPA3GwQFQOjMQGmQveig/2
056WPL+p1oBEqwQgB1rGyDy+Tzy+vN40fJCE+OwtjB4w6ckSAXZIc+V99TrftXPA
VJe5G4yRPV82v+U7O5JjE0VQqRhmGf5F7K7pH/ebhIJSJqJOgTsKmEFA8YuKEK93
hmo/hpN5dAOfeWTYTN2w
=eXXP
-----END PGP SIGNATURE-----

Ernie

unread,
Jan 17, 2012, 11:34:51 AM1/17/12
to Beagle Board
Hi Mark,

Ernie

unread,
Jan 17, 2012, 11:35:46 AM1/17/12
to Beagle Board
Hi Mark,

Is this valid for the Beagleboard xM system?

Ernie

On Jan 16, 4:16 pm, "Mark A. Yoder" <mark.a.yo...@gmail.com> wrote:

Ernie

unread,
Jan 17, 2012, 12:34:00 PM1/17/12
to Beagle Board
Paolo,
Thanks for the feedback.

I am trying your instructions at the moment and I have got to the
point of running the command: fakeroot debian/rules binary-omap and
the result was and error: make: *** No rule to make target ‘binary-
omap’. STOP. I have seen this before not sure how to put it right.

What I was also not clear about is when you run the command fakeroot
debian/rules clean editconfigs and I get asks a list of questions
about which component to edit the config for, I chose the armel/
config.flavour.omap option, is this right for BB xM. Do I need to do
anything special when I exit the edit? Do I need to save the config
with a name even if I don’t change anything?

Ernie


On Jan 17, 10:53 am, Paolo Pisati <paolo.pis...@canonical.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 01/16/2012 02:54 PM, Ernie wrote:
>
>
>
> > Does anyone have a good Step by Step guild on how to build a
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/

rafe_b

unread,
Jan 17, 2012, 12:38:35 PM1/17/12
to beagl...@googlegroups.com
Hey kids, this is my first attempt to boot from SD card.

I followed the procedure of Sec. 12.3 of Beagle_SRM_C4.pdf.
(SD Card Configuration).  The tail end of the boot log is listed
below.  Note that this procedure (from the SRM) only involves
one FAT32 partition for the SD card.  All the source files came
from links at this page:

http://code.google.com/p/beagleboard/wiki/BeagleboardRevC3Validation

I did not seek out the Rev-C4-specific files at the angstrom-
distribution site. (Is that the problem?)

I could use a hint or two on where to go from here.  Thanks!

/rafe


...
Disabling unused clock "gpt11_fck"
Disabling unused clock "gpt10_fck"
Disabling unused clock "dpll4_m6x2_ck"
Disabling unused clock "dpll3_m3x2_ck"
Disabling unused clock "sys_clkout1"
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 1
Console: switching to colour frame buffer device 80x30
clock: clksel_round_rate_div: dpll4_m4_ck target_rate 48000000
clock: new_div = 9, new_rate = 48000000
twl4030_rtc twl4030_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
RAMDISK: Compressed image found at block 0
invalid compressed format (err=2)
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 168K
EXT2-fs error (device ram0): ext2_check_page: bad entry in directory #12: : rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
Warning: unable to open an initial console.
EXT2-fs error (device ram0): ext2_check_page: bad entry in directory #143: : rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.





Gerald Coley

unread,
Jan 17, 2012, 1:55:03 PM1/17/12
to beagl...@googlegroups.com
Try this.
 
 
Gerald


 

--
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.

rafe_b

unread,
Jan 17, 2012, 2:32:40 PM1/17/12
to beagl...@googlegroups.com
I'll try that, Gerald.  No problem.

But seriously -- the procedure I tried is probably one
of the first that a newb might try -- it comes straight
from the beagleboard wiki, as referenced from the
BB SRM.  So shouldn't we try to clarify that procedure,
if there's a problem with it?

/rafe

Gerald Coley

unread,
Jan 17, 2012, 2:38:09 PM1/17/12
to beagl...@googlegroups.com
Typically, I send every one to this link. This is my page and this procedure works for me. I plan to update the SRM and add this link in the SRM, removing all that stuff that is there now. That should solve the issue. In reality, most people know enough about Linux and have their own method of creating the image onto a card, using things like scrots, as described on the Angstrom site for example.. This process if for folks that are more on the Window side of the planet..
 
Gerald

Reply all
Reply to author
Forward
0 new messages