help needed to manually compile kernel

Hi All,

I want to compile my own kernel with my modification of the source
files. This is needed because
I am trying to help porting RTAI real time OS to beagleboard. So I
want to get all the help I can get.
So far I can compile my kernel using OE and bikebake successfully. I
also be able to using a cross
compiler directly to obtain my uImage following the procedure here:

http://elinux.org/BeagleBoard#Linux_kernel

I still have a few questions though.

1) Am I use the right cross compiler?: I can't find compiler mentioned
on the webpage: arm-angstrom-linux-gnueabi, so I used this one:
arm-none-linux-gnueabi-
2) The procedure generated an uImage. Does it also generated a
u-boot.in? Initially make uImage gave
out a warning that mkimage is not installed so no u-boot is produced.
After I have it installed,
it didn't complain. But I can't find u-boot anywhere.
3) I can also issue command to produce modules:

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules

It runs fine. But where is the modules I just produced?

Thanks in advance.

Everett

2010/4/11 Everett Wang <everteq@gmail.com>

  1. Am I use the right cross compiler?: I can’t find compiler mentioned
    on the webpage: arm-angstrom-linux-gnueabi, so I used this one:
    arm-none-linux-gnueabi-

Although I’m using CodeSourcery G++ Lite 2009q3-67 (arm-none-linux-gnueabi- prefix),
I know there is a arm-angstrom-linux-gnueabi prefix cross toolchain from Ångström:

http://www.angstrom-distribution.org/toolchains/
The “armv7a” one.

I think both arm-angstrom-linux-gnueabi and arm-none-linux-gnueabi- are fine for cross compiling, or not?

btw, arm cross compiler… which one is better? (efficient/optimal/stable)
anyone has advice?

Hi All,

I want to compile my own kernel with my modification of the source
files. This is needed because
I am trying to help porting RTAI real time OS to beagleboard. So I
want to get all the help I can get.
So far I can compile my kernel using OE and bikebake successfully. I
also be able to using a cross
compiler directly to obtain my uImage following the procedure here:

http://elinux.org/BeagleBoard#Linux_kernel

I still have a few questions though.

1) Am I use the right cross compiler?: I can't find compiler mentioned
on the webpage: arm-angstrom-linux-gnueabi, so I used this one:
arm-none-linux-gnueabi-

As mentioned in a follow up, both should be fine.

2) The procedure generated an uImage. Does it also generated a
u-boot.in? Initially make uImage gave
out a warning that mkimage is not installed so no u-boot is produced.
After I have it installed,
it didn't complain. But I can't find u-boot anywhere.

You need mkimage tool from U-Boot to create a Linux kernel uImage which can be booted by U-Boot. But compiling the kernel will *not* create U-Boot (u-boot.bin). You have to compile U-Boot package, too, to get U-Boot.

-> compiling the kernel results in uImage (using mkimage tool from U-Boot)
-> compiling U-Boot results in u-boot.bin

3) I can also issue command to produce modules:

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules

It runs fine. But where is the modules I just produced?

In the kernel directories where they are compiled (search for .ko files).

You could try

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=<path to where you want the modules to be installed>

to have them installed in a directory of your choice.

Dirk

Thanks for the answers.

Hi All,

I want to compile my own kernel with my modification of the source
files. This is needed because
I am trying to help porting RTAI real time OS to beagleboard. So I
want to get all the help I can get.
So far I can compile my kernel using OE and bikebake successfully. I
also be able to using a cross
compiler directly to obtain my uImage following the procedure here:

http://elinux.org/BeagleBoard#Linux_kernel

I still have a few questions though.

1) Am I use the right cross compiler?: I can't find compiler mentioned
on the webpage: arm-angstrom-linux-gnueabi, so I used this one:
arm-none-linux-gnueabi-

As mentioned in a follow up, both should be fine.

2) The procedure generated an uImage. Does it also generated a
u-boot.in? Initially make uImage gave
out a warning that mkimage is not installed so no u-boot is produced.
After I have it installed,
it didn't complain. But I can't find u-boot anywhere.

You need mkimage tool from U-Boot to create a Linux kernel uImage which can
be booted by U-Boot. But compiling the kernel will *not* create U-Boot
(u-boot.bin). You have to compile U-Boot package, too, to get U-Boot.

-> compiling the kernel results in uImage (using mkimage tool from U-Boot)
-> compiling U-Boot results in u-boot.bin

3) I can also issue command to produce modules:

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules

It runs fine. But where is the modules I just produced?

In the kernel directories where they are compiled (search for .ko files).

You could try

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install
INSTALL_MOD_PATH=<path to where you want the modules to be installed>

to have them installed in a directory of your choice.

I wish the make can produce a tar file so I can untar the modules in
the root directory
on my flash. If I were to do with your suggestion, do I have to mount
my SDHC card
and give a path to it like
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install
INSTALL_MOD_PATH=/media/Angstrom?
My SDHC card has two partitions: boot and Angstrom where is the root.

Thanks.

Everett