Building and adding modules

Hi,

I’m building the linux kernel from source, but I’m having a little difficulty with going through with the steps. I am using the repository cloned from – 
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git linux-omap-2.6
for the build.

Once I create the uImage using the commands –

~/linux-omap-2.6$ make distclean
~/linux-omap-2.6$ make omap3_beagle_defconfig
~/linux-omap-2.6$ make menuconfig 
~/linux-omap-2.6$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage

I get a uImage in my arch/arm/boot folder, which I copy to the FAT partition of the SD card. (over-write old uImage)

After this, one builds the modules with

~/linux-omap-2.6$ make –j2 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules

~/linux-omap-2.6$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules_install INSTALL_MOD_PATH=/media/sdext

(where sdext is the mount point of the ext partition of the SD card)

Now after this, are there any other steps that require to be done? Or can the card be booted right away?

Do I need to replace the old root file system (or any part of the old root file system) on the SD card with anything else?

I am struggling to get the BeagleBoard up and running with my newly compiled uImage and u-boot.

Cheers!

Kedar

Hi,

I’m building the linux kernel from source, but I’m having a little difficulty with going through with the steps. I am using the repository cloned from – 
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git linux-omap-2.6
for the build.

Once I create the uImage using the commands –

  1. If you want to learn how to build your own kernel, you should start by learning how to use GIT.

  2. Start by checking out the same SHA1 used by Angstrom and then apply the patches that Angstrom applies when building a kernel.

  3. Go to www.angstrom-distribution.com and install Angstrom

  4. Look at oe/openembedde/recipes/linux/linux-2.6.29.bb to see the kernel SHA1 and Patches

  5. Use git checkout 58cf2f1425 –b oekernel

  6. Use git apply

  7. Alternatively, Robert Nelson has a single patch which is a concatenation of the Angstrom patches

  8. You may want to create a script to do 6 above.

  9. Now you can build the kernel and it will work correctly.

  10. If you want 2.6.31, look at the appropriate Angstrom recipe.

~/linux-omap-2.6$ make distclean
~/linux-omap-2.6$ make omap3_beagle_defconfig
Use the defconfig from oe/openembedded/recipes/linux/linux-omap-2.6.29/beagleboard. Copy this file to .config
~/linux-omap-2.6$ make menuconfig 
~/linux-omap-2.6$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage

I get a uImage in my arch/arm/boot folder, which I copy to the FAT partition of the SD card. (over-write old uImage)

After this, one builds the modules with

~/linux-omap-2.6$ make –j2 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules

~/linux-omap-2.6$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules_install INSTALL_MOD_PATH=/media/sdext

(where sdext is the mount point of the ext partition of the SD card)

You have to do the same for the module Firmware

Now after this, are there any other steps that require to be done? Or can the card be booted right away?

Do I need to replace the old root file system (or any part of the old root file system) on the SD card with anything else?

All you need to do is replace the kernel modules and firmware in /lib

I hope this helps

John

I am struggling to get the BeagleBoard up and running with my newly compiled uImage and u-boot.

Cheers!

Kedar

I have two boards. One is a BeagleBoard C3 and the other is a new TI OMAP3EVM and would like to build linux for both. So, … with that in mind, I have a tree completely from openembedded and it builds minimal-image, base-image and beagleboard-demo-image just fine and all three images load into the beagleboard and run.

I have done a ‘git stash, git pull --rebase, git stash pop’ and think I have all the latest stuff.

In conf/local.conf, I then change MACHINE = “beagleboard” to MACHINE = “omap3evm”.

I can build minimal-image with no errors, but, … when I ‘bitbake base-image’, I have a failure in recipes/powervr-drivers/omap3-sgx-modules-…

The log file says:

+ stage-manager-ipkg-build -o 0 -g 0 /home/ckrinke/oe/angstrom-dev/work/omap3evm-angstrom-linux-gnueabi/linux-omap-psp-2.6.30+2.6.31rc7-r46/staging-pkg /home/ckrinke/oe/angstrom-dev/deploy/glibc/pstage/angstromglibc
In file included from include/linux/slub_def.h:13,
from include/linux/slab.h:162,
from include/linux/percpu.h:5,
from include/asm-generic/local.h:4,
from include/asm/local.h:1,
from include/linux/module.h:20,
from include/linux/i2c.h:31,
from include/linux/fb.h:5,
from /home/ckrinke/oe/angstrom-dev/work/omap3evm-angstrom-linux-gnueabi/omap3-sgx-modules-1.3.13.1397-r46/omap3-sgx-modules-1.3.13.1397/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c:30:
include/linux/kmemtrace.h:12:31: error: trace/events/kmem.h: No such file or directory
In file included from include/linux/slab.h:162,
from include/linux/percpu.h:5,
from include/asm-generic/local.h:4,
from include/asm/local.h:1,
from include/linux/module.h:20,
from include/linux/i2c.h:31,
from include/linux/fb.h:5,
from /home/ckrinke/oe/angstrom-dev/work/omap3evm-angstrom-linux-gnueabi/omap3-sgx-modules-1.3.13.1397-r46/omap3-sgx-modules-1.3.13.1397/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c:30:
include/linux/slub_def.h: In function ‘kmalloc_large’:
include/linux/slub_def.h:238: error: implicit declaration of function 'trace_kmalloc’

So, … this begs a few questions:

1. Has anyone else seen this?
2. Am I being naive by switching MACHINE in local.conf?
3. Where might I look in the various bb recipes and includes to see if I can figure out where the header file includes seem to be going awry?

Charles




>

|

I have two boards. One is a BeagleBoard C3 and the other is a new TI OMAP3EVM and would like to build linux for both. So, … with that in mind, I have a tree completely from openembedded and it builds minimal-image, base-image and beagleboard-demo-image just fine and all three images load into the beagleboard and run.

I have done a ‘git stash, git pull --rebase, git stash pop’ and think I have all the latest stuff.

In conf/local.conf, I then change MACHINE = “beagleboard” to MACHINE = “omap3evm”.

I can build minimal-image with no errors, but, … when I ‘bitbake base-image’, I have a failure in recipes/powervr-drivers/omap3-sgx-modules-…

The log file says:

+ stage-manager-ipkg-build -o 0 -g 0 /home/ckrinke/oe/angstrom-dev/work/omap3evm-angstrom-linux-gnueabi/linux-omap-psp-2.6.30+2.6.31rc7-r46/staging-pkg /home/ckrinke/oe/angstrom-dev/deploy/glibc/pstage/angstromglibc
In file included from include/linux/slub_def.h:13,
from include/linux/slab.h:162,
from include/linux/percpu.h:5,
from include/asm-generic/local.h:4,
from include/asm/local.h:1,
from include/linux/module.h:20,
from include/linux/i2c.h:31,
from include/linux/fb.h:5,
from /home/ckrinke/oe/angstrom-dev/work/omap3evm-angstrom-linux-gnueabi/omap3-sgx-modules-1.3.13.1397-r46/omap3-sgx-modules-1.3.13.1397/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c:30:
include/linux/kmemtrace.h:12:31: error: trace/events/kmem.h: No such file or directory
In file included from include/linux/slab.h:162,
from include/linux/percpu.h:5,
from include/asm-generic/local.h:4,
from include/asm/local.h:1,
from include/linux/module.h:20,
from include/linux/i2c.h:31,
from include/linux/fb.h:5,
from /home/ckrinke/oe/angstrom-dev/work/omap3evm-angstrom-linux-gnueabi/omap3-sgx-modules-1.3.13.1397-r46/omap3-sgx-modules-1.3.13.1397/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c:30:
include/linux/slub_def.h: In function ‘kmalloc_large’:
include/linux/slub_def.h:238: error: implicit declaration of function 'trace_kmalloc’

So, … this begs a few questions:

1. Has anyone else seen this?
2. Am I being naive by switching MACHINE in local.conf?
3. Where might I look in the various bb recipes and includes to see if I can figure out where the header file includes seem to be going awry?

It should work :slight_smile: It looks like the evm kernel does build with sgx though. Maybe compare the kernel recieps for the beagle and the evm.

Philip

I’ll answer part of my own question and hope someone can either benefit from the answer, correct/complete my answer, or both.

There is a MACHINE_EXTRA_RRECOMENDS = “omap3-sgx-modules” in many of the machine conf files in conf/machine.

It is commented out in some and not others.

I dont yet know the implication of not having this constant defined, but on the omap3evm, commenting this out with a ‘#’ allowed base-image, console-image, bootstrap-image to build.

Charles