njosnari
Posts: 7
Joined: Wed Apr 03, 2013 9:23 pm

Problem compiling kernel; No .IMG file!

Sun May 12, 2013 4:50 pm

I'm following this guide for cross compiling on OS x, here:

http://elinux.org/RPi_Kernel_Compilatio ... g_from_OSX

And everything seems to work ok, until the end. The guide says "The fully built kernel will be arch/arm/boot/Image.", but at the end of my build (no errors) there is no kernel image!

I've tried the process listed in the guide several times, I've tried downloading the cross compiler tools separately and and setting CCPREFIX to point to them in my download folder. I have also tried with Yagarto.

I do get 2 errors when compiling modules;

arm-none-eabi-gcc: error: lib/raid6/int1.c: No such file or directory
arm-none-eabi-gcc: fatal error: no input files

Also, when I try to run "./imagetool-uncompressed.py ${KERNEL_SRC}/arch/arm/boot/zImage" from the tools dir, I get "env: python2: No such file or directory"

I don't have any experience compiling kernels, so I hope it's something simple that I am overlooking.
This is being run under osx 10.6.8

edit: I am unable to compile with the cross compile tools git cloned to my downloads folder. I get this error: "/Downloads/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-gcc: cannot execute binary file"

User avatar
mrpi64
Posts: 931
Joined: Sat Feb 16, 2013 5:13 pm

Re: Problem compiling kernel; No .IMG file!

Mon May 13, 2013 10:08 am

try using dd. on a raspberry pi, it works like this:

Code: Select all

cd [i]image file path[/i]
sudo dd if=[i]image-file-name[/i] of=dev/[i]sd-card-id[/i] bs2M
THIS IS PROBABLY NOT THE PROPER CODE. I just did this from the top of my head. (derp)

god luck.
I'm happy to help.
https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=51794 - List of games that work on the Pi.

yottskry
Posts: 73
Joined: Wed Mar 06, 2013 10:11 pm

Re: Problem compiling kernel; No .IMG file!

Mon May 13, 2013 11:02 am

mrpi64 wrote:try using dd. on a raspberry pi, it works like this:

Code: Select all

cd [i]image file path[/i]
sudo dd if=[i]image-file-name[/i] of=dev/[i]sd-card-id[/i] bs2M
THIS IS PROBABLY NOT THE PROPER CODE. I just did this from the top of my head. (derp)

god luck.
Eh? This has nothing whatsoever to do with compiling a kernel. You've clearly either not read or not understood the question and have provided instructions on copying a disk image. He's trying to work out why no KERNEL image has been created after compiling the kernel.

yottskry
Posts: 73
Joined: Wed Mar 06, 2013 10:11 pm

Re: Problem compiling kernel; No .IMG file!

Mon May 13, 2013 11:04 am

njosnari wrote:I'm following this guide for cross compiling on OS x, here:

http://elinux.org/RPi_Kernel_Compilatio ... g_from_OSX

And everything seems to work ok, until the end. The guide says "The fully built kernel will be arch/arm/boot/Image.", but at the end of my build (no errors) there is no kernel image!

I've tried the process listed in the guide several times, I've tried downloading the cross compiler tools separately and and setting CCPREFIX to point to them in my download folder. I have also tried with Yagarto.

I do get 2 errors when compiling modules;

arm-none-eabi-gcc: error: lib/raid6/int1.c: No such file or directory
arm-none-eabi-gcc: fatal error: no input files

Also, when I try to run "./imagetool-uncompressed.py ${KERNEL_SRC}/arch/arm/boot/zImage" from the tools dir, I get "env: python2: No such file or directory"

I don't have any experience compiling kernels, so I hope it's something simple that I am overlooking.
This is being run under osx 10.6.8

edit: I am unable to compile with the cross compile tools git cloned to my downloads folder. I get this error: "/Downloads/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-gcc: cannot execute binary file"

Does ${KERNEL_SRC}/arch/arm/boot/zImage exist? Because that *is* the linux kernel image. It's usually called zImage or bzImage depending on which compressor was used during compilation.

njosnari
Posts: 7
Joined: Wed Apr 03, 2013 9:23 pm

Re: Problem compiling kernel; No .IMG file!

Mon May 13, 2013 3:27 pm

No, there is no Image, zImage, or bzImage in that location. The build process runs (~20-30min on a quad i7), and nothing at the end.
I cannot use the cross compile tools downloaded from Pi site, which includes mkimage. The guide I used says to use:

sudo port install arm-none-eabi-gcc
sudo port install arm-none-eabi-binutils

which installs to opt/local/. I can't find any mkimage utility there. Could this be my problem?

njosnari
Posts: 7
Joined: Wed Apr 03, 2013 9:23 pm

Re: Problem compiling kernel; No .IMG file!

Fri May 17, 2013 5:54 pm

No one has encountered this problem?

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Problem compiling kernel; No .IMG file!

Fri May 17, 2013 6:11 pm

I've used linux for 15 years or more, I've never compiled a kernel, its something few people do, cross compiling from an alien architecture is even more obscure although fully understandable with a Pi. Do you have a particular reason to want a different kernel ?
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

yottskry
Posts: 73
Joined: Wed Mar 06, 2013 10:11 pm

Re: Problem compiling kernel; No .IMG file!

Sat May 18, 2013 2:23 pm

pluggy wrote:I've used linux for 15 years or more, I've never compiled a kernel, its something few people do, cross compiling from an alien architecture is even more obscure although fully understandable with a Pi. Do you have a particular reason to want a different kernel ?
I've compiled the kernel many times (mostly when I used to use Slackware) but never cross-compiling from another architecture. There must be an easier way to achieve whatever OP is attempting to do.

njosnari
Posts: 7
Joined: Wed Apr 03, 2013 9:23 pm

Re: Problem compiling kernel; No .IMG file!

Sat May 18, 2013 5:39 pm

Do you have a particular reason to want a different kernel ?
Yes, I need to enable a couple HID options to use a touchscreen with ntrig drivers.
There must be an easier way to achieve whatever OP is attempting to do.
I could just compile it on the RPi, I suppose, but I was hoping to compile in less than 22h.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1490
Joined: Sat Sep 10, 2011 11:43 am

Re: Problem compiling kernel; No .IMG file!

Sun May 19, 2013 7:30 am

I've always just used virtual box running linux on my Mac box...

Then you can follow the instructions for building it the way everyone else does (me and dom for a start!)

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Problem compiling kernel; No .IMG file!

Sat Jun 08, 2013 11:24 am

I had the same problem.

The Mac awk implementation is slightly picky about command line syntax.

I had success by changing lines 9 and 10 of the raid6 make file to read:

cmd_unroll = $(AWK) -v N=$(UNROLL) -f $(srctree)/$(src)/unroll.awk \
< $< > [email protected] || ( rm -f [email protected] && exit 1 )

i.e. added spaces between the -f and -v switches and moved -v to be before the -f switch.

The file to change is:

src/lib/raid6/Makefile

HTH,

Derek
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

rolandhii
Posts: 1
Joined: Thu Aug 08, 2013 3:12 am

Re: Problem compiling kernel; No .IMG file!

Thu Aug 08, 2013 3:18 am

Thanks to guzunty, you save my day! I manage to successfully resolve the problem by inserting an extra space right after the -f and -v.

Before change:

Code: Select all

      cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) \
                   < $< > [email protected] || ( rm -f [email protected] && exit 1 )
After change:

Code: Select all

      cmd_unroll = $(AWK) -f $(srctree)/$(src)/unroll.awk -v N=$(UNROLL) \
                   < $< > [email protected] || ( rm -f [email protected] && exit 1 )

macrophone
Posts: 2
Joined: Wed Aug 27, 2014 1:20 pm

Re: Problem compiling kernel; No .IMG file!

Wed Aug 27, 2014 1:24 pm

I've got the same problem.
I'm using the github repo. Are the sources bad configured or the raid6 Makefile thing is just a workaround?

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Problem compiling kernel; No .IMG file!

Wed Aug 27, 2014 4:23 pm

I think the problem is that the build process is not tested on Mac.

I have not submitted a defect report so I can't say I'm disappointed it hasn't been fixed.

It should be reported with the suggested fix for Mac.

In the meantime, I suggest you make the change by hand.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

macrophone
Posts: 2
Joined: Wed Aug 27, 2014 1:20 pm

Re: Problem compiling kernel; No .IMG file!

Mon Sep 01, 2014 6:12 pm

Finaly I've resolved the problem by installing bc. It was a dependency but I did see the compile complaining...

Return to “Troubleshooting”