problem cross-compiling

Hi,

I am running Suse on a PC and I would like to compile for ARM. So I download the proper kernel and compiler. This is the error that I get:

*> make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/arm/Kconfig


*** You have not yet configured your kernel!
*** (missing kernel config file “.config”)


*** Please run some configurator (e.g. “make oldconfig” or
*** “make menuconfig” or “make xconfig”).


make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target include/config/auto.conf', needed by include/config/kernel.release’. Stop.
>

Now I would like to avoid changing anything with the currently running Suse Linux kernel on the PC. How can I solve this?

This is no usefull answer, but next time for computer text please use CODE tags instead of Italics: Posting in Code Tags - A Guide

On 2011-11-03 17:06, kernel j wrote:
> I am running Suse on a PC and I would like to compile for ARM. So I
> download the proper kernel and compiler. This is the error that I get:

It would be best to ask in the programing forum.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I think the same. Shall I move it?

Hi
You want to look at using osc, you also need to use qemu, check
out some more at;
http://en.opensuse.org/How_To_Work_On_openSUSE_ARM_Distribution

Plus check into IRC #opensuse-arm and the arm mailing list, people are
already hard at work…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 3 days 3:54, 6 users, load average: 1.04, 1.10, 0.98
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

If you feel that’s a more appropriate place, I’m all for it. Anything to help get my answer. :slight_smile:

Malcolm, can you tell me why I need those things? I just hate to see this grow exponentially, where I get more tools, then have questions about those tools, etc. What would happen if I ran “some configurator” like the output suggests? Would it mess up the kernel currently running on the PC? I don’t want to affect the PC’s kernel in ANY manner at all.

Thanks,

Hm, as Malcolm found you here, I leave it. He is the best :wink:

kernel j wrote:

>
> Malcolm, can you tell me why I need those things? I just hate to see
> this grow exponentially, where I get more tools, then have questions
> about those tools, etc. What would happen if I ran “some configurator”
> like the output suggests? Would it mess up the kernel currently running
> on the PC? I don’t want to affect the PC’s kernel in ANY manner at all.
>
> Thanks,
>
You do not need qemu for the cross compilation itself, you will only need it
if you want to run the arm kernel in some virtual environment (how do you
plan to test it otherwise?).


PC: oS 11.4 64 bit | Intel Core i7-2600@3.40GHz | KDE 4.6.0 | GeForce GT 420
| 16GB Ram
Eee PC 1201n: oS 12.1 RC2 64 bit | Intel Atom 330@1.60GHz | KDE 4.7.2 |
nVidia ION | 3GB Ram

Hi
The first issue is the config file… @op, if you get on the irc
channel, there are people working on the kernel issues at the moment.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 3 days 4:47, 6 users, load average: 0.03, 0.10, 0.21
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

I am using a separate hardware environment that has an ARM processor on it. So as soon as I am done with compiling, I would like to take the .bin file and use a copy tool to put it on that environment. It’s a stand-alone board. To test at first, I downloaded a pre-compiled .bin linux kernel for ARM and I copied it to that board and Linux ran just fine. Now, for other reasons, I need to be able to re-compile the kernel first.

malcolmlewis wrote:

> The first issue is the config file… @op, if you get on the irc
> channel, there are people working on the kernel issues at the moment.
>
+1

@kernel j
It is some years ago I had to cross compile a kernel (2.4 something). But
you should in general more specific when you join the irc.
Is your intention to work on the arm port of opensuse or do you want to
cross compile it to run a kernel with whatever else you need on a specific
device like a tablet, arm netbook, mobile phone or is it a cross compilation
to run that kernel on a specific embedded device with specialized hardware?
You cannot simply run a make on the kernel without configuring it for the
very special need of the target (or what would you do with a kerenl with
let’s say the desktop config in it on a blood pressure measurement device
powered by an arm controller?).


PC: oS 11.4 64 bit | Intel Core i7-2600@3.40GHz | KDE 4.6.0 | GeForce GT 420
| 16GB Ram
Eee PC 1201n: oS 12.1 RC2 64 bit | Intel Atom 330@1.60GHz | KDE 4.7.2 |
nVidia ION | 3GB Ram

kernel j wrote:
> I am using a separate hardware environment that has an ARM processor on
> it. So as soon as I am done with compiling, I would like to take the
> .bin file and use a copy tool to put it on that environment. It’s a
> stand-alone board. To test at first, I downloaded a pre-compiled .bin
> linux kernel for ARM and I copied it to that board and Linux ran just
> fine. Now, for other reasons, I need to be able to re-compile the
> kernel first.
>
That answers my other question.
Of course you run the make menuconfig with the proper switches (make
menuconfig ARCH=arm …) on that kernel source, it does not affect your
systems kernel (as long as you don’t do that on the kernel sources of the
opensuse system).


PC: oS 11.4 64 bit | Intel Core i7-2600@3.40GHz | KDE 4.6.0 | GeForce GT 420
| 16GB Ram
Eee PC 1201n: oS 12.1 RC2 64 bit | Intel Atom 330@1.60GHz | KDE 4.7.2 |
nVidia ION | 3GB Ram

On Thu, 03 Nov 2011 17:26:04 +0000, kernel j wrote:

> What would happen if I ran “some configurator”
> like the output suggests?

No, the ‘make config’ and ‘make xconfig’ only affect the configuration of
the kernel being built. They don’t affect the running kernel unless you
install the freshly built kernel.

You can always get the default configuration back as well for the running
kernel - it’s located at /proc/config.gz (it’s compressed, easy enough to
pull out).

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

The openSUSE ARM release is also concentrating on the 3.1.0 release at
present.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 3 days 7:58, 5 users, load average: 0.12, 0.08, 0.11
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

Thanks, this worked, and I believe I have a compiled kernel now. After the ‘make’ was finished, I saw 2 files in arch/arm/boot:

Image (3218976 bytes)
zImage (1613300 bytes)

but when I copy either of these files to the board and then boot up, I get a message “Wrong Image Format for bootm command
ERROR: can’t get kernel image!”

So is there some other flag somewhere that I have to set to make the output in a certain format?

What does the documentation of your board say about that?
Which cross compiler chain did you use?
Which board? Which manufacturer?
Which kernel sources and from where?

There is nothing like “the board” or “the format” or “the command switch”
for compilation to make such things work.
These things are highly vendor specific, you may even need a third party
tool from the board manufacturer to create the correct bin file.


PC: oS 11.4 (dual boot 12.1 RC2) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram

When I compile, I use the option


CROSS_COMPILE=arm-none-linux-gnueabi-

and so I assume the compiler is arm-none-linux-gnueabi-gcc. The board is an Atmel at91sam9g20-ek eval board. The kernel sources came from LinuxKernel - Linux4SAM

I’ve seen other people use this compiler before and I should be able to trust the kernel sources. In the ‘make menuconfig’ I can’t say I understood every option there. Is there any chance that some kernel config option could be causing this? If not, then at least I can focus my attention elsewhere.

And did you follow this guide? (I do not know this board, so have no experience with it)
http://www.at91.com/linux4sam/bin/view/Linux4SAM/U-Boot#Load_Linux_with_u_boot_on_AT91_b


PC: oS 11.4 (dual boot 12.1 RC2) 64 bit | Intel Core i7-2600@3.40GHz | KDE 4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia ION | 3GB Ram

Ah, thanks. That does help. I’ve encountered a new issue, but at least the kernel now comes up. It doesn’t uncompress, but at least it’s recognized. Thanks again.