Building kernels

1,158 views
Skip to first unread message

Steve

unread,
May 17, 2012, 11:00:20 PM5/17/12
to beagl...@googlegroups.com
Okay...so I'm new to a lot of this stuff and the learning curve is catching up.

I'm trying to build a kernel based on the patchs put together by Robert and Koen @
I've pulled it down and run the script which looks like it has patched the mainline kernel it cloned.
So my problem is that the config file it seems to be using is for my ubuntu/x86 
Obviously I need to cross-compile and use a proper config file...but I'm not sure where to start.

Robert Nelson

unread,
May 17, 2012, 11:10:28 PM5/17/12
to beagl...@googlegroups.com
Notes to self, i should probably add a "build.sh" as people are
starting to use that tree for it..

But the basic's.. First copy the defconfig (depending on branch it's
usually /patches/<board>/defconfig ) to the kernel directory as
.config..

Next run in kernel dir..

make ARCH=arm CROSS_COMPILER=<locationg of arm-gcc> uImage modules

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

Steve

unread,
May 17, 2012, 11:35:14 PM5/17/12
to beagl...@googlegroups.com
Thanx Robert...you are the man !


Steve

unread,
May 18, 2012, 12:04:12 AM5/18/12
to beagl...@googlegroups.com

root@silver:~/Project/kernel# make ARCH=arm CROSS_COMPILER=arm-linux-gnueabi-gcc uImage modules
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
cc1: error: unrecognized command line option ‘-mlittle-endian’
cc1: error: unrecognized command line option ‘-mno-thumb-interwork’
cc1: error: unrecognized command line option ‘-mthumb’
kernel/bounds.c:1:0: error: unknown ABI (aapcs-linux) for -mabi= switch
kernel/bounds.c:1:0: error: bad value (armv5t) for -march= switch
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
root@silver:~/Project/kernel# arm-linux-gnueabi-gcc
arm-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.

I've run it with a few different ways and I get the same.

Robert Nelson

unread,
May 18, 2012, 12:15:31 AM5/18/12
to beagl...@googlegroups.com
On Thu, May 17, 2012 at 11:04 PM, Steve <ara...@gmail.com> wrote:
>
> root@silver:~/Project/kernel# make ARCH=arm
> CROSS_COMPILER=arm-linux-gnueabi-gcc uImage modules

Ahh sorry, my bad...

"CROSS_COMPILE=" drop the "R"...

Steve

unread,
May 18, 2012, 12:20:54 AM5/18/12
to beagl...@googlegroups.com

I just don't have enough experience to pick up on these things...soon.
Thnx...compiling
Message has been deleted

Steve

unread,
May 18, 2012, 2:15:15 AM5/18/12
to beagl...@googlegroups.com
Having some problems with the pm firmware...downloading the TI sdk in hopes of resolving it.

Steve

unread,
May 18, 2012, 2:23:42 AM5/18/12
to beagl...@googlegroups.com
 MK_FW   firmware/am335x-pm-firmware.bin.gen.S
make[1]: *** No rule to make target `firmware/am335x-pm-firmware.bin', needed by `firmware/am335x-pm-firmware.bin.gen.o'.  Stop.
make: *** [firmware] Error 2

Andrew Bradford

unread,
May 18, 2012, 9:43:35 AM5/18/12
to beagl...@googlegroups.com
On Thu, 17 May 2012 23:05:09 -0700 (PDT)
Steve <ara...@gmail.com> wrote:

> Any reason why I don't end up with an image under /kernel/arch/arm/boot
> The make seems to complete without complications?

At the end of `make uImage`, do you get a nice summary like this?

Image Name: Linux-3.2.16-12321-g8817669
Created: Fri May 18 09:42:30 2012
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2227096 Bytes = 2174.90 kB = 2.12 MB
Load Address: 0x80008000
Entry Point: 0x80008000
Image arch/arm/boot/uImage is ready

If not, then it didn't complete. If you use `make -j5` or similar, you
may have to scroll up a bit to find the failure.

-Andrew

Robert Nelson

unread,
May 18, 2012, 9:47:00 AM5/18/12
to beagl...@googlegroups.com
The script doesn't take care of the firmware yet..

You can download it from here:

http://arago-project.org/git/projects/?p=am33x-cm3.git;a=tree;f=bin;h=dc6e79180b8c468832e684d631818af31448bd81;hb=HEAD

Just copy it to the firmware directory and rebuild..

ramesha...@gmail.com

unread,
Oct 4, 2013, 7:55:35 AM10/4/13
to beagl...@googlegroups.com

i also faced the same problem.

that is the problem with setting  cross compiler path .

make sure that u have set correct tool chain path. otherwise u will get this problem.

use below command to to check path has been set or not.

 ramesh$      echo $PATH
/home/mramesh/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/mramesh/tizen-sdk/tools:/home/mramesh/mydroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/

each variable path was seperated by :




Reply all
Reply to author
Forward
0 new messages