* [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails
[not found] <1942547306.3976213.1348739521182.JavaMail.root@zmail.sgconsulting.it>
@ 2012-09-27 10:05 ` Forconi
2012-09-27 12:06 ` Gilles Chanteperdrix
0 siblings, 1 reply; 8+ messages in thread
From: Forconi @ 2012-09-27 10:05 UTC (permalink / raw)
To: xenomai
Hi,
this is my first approach to Xenomai, I'm trying to compile a Xenomai patched Linux kernel to run on a AT91SAM9260 embedded board.
This is my environment:
CROSS-GCC: gcc-4.2.3-glibc-2.3.3
KERNEL: Linux 2.6.38.8
XENOMAI: Xenomai-2.6.1
I'm following the "Installation instructions" on web site (section 3.4. Building for ARM).
The prepare-kernel.sh script runs ok, all files are patched with no errors, this is the command I've used:
$xenomai_root/scripts/prepare-kernel.sh --arch=arm --adeos=$xenomai_root/ksrc/arch/arm/patches/adeos-ipipe-2.6.38.8-arm-1.18-08.patch --linux=$linux_tree
Then I configure/build the kernel:
make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnu- at91sam9260ek_defconfig
make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnu- uImage
But compilation fails:
...
AS arch/arm/nwfpe/entry.o
LD arch/arm/nwfpe/nwfpe.o
LD arch/arm/nwfpe/built-in.o
CC arch/arm/kernel/elf.o
AS arch/arm/kernel/entry-armv.o
AS arch/arm/kernel/entry-common.o
arch/arm/kernel/entry-common.S: Assembler messages:
arch/arm/kernel/entry-common.S:449: Error: bad instruction `ldm sp,{r0-r3}'
make[1]: *** [arch/arm/kernel/entry-common.o] Error 1
make: *** [arch/arm/kernel] Error 2
Maybe I have to try with other versions of xenomai and kernel?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails
2012-09-27 10:05 ` [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails Forconi
@ 2012-09-27 12:06 ` Gilles Chanteperdrix
2012-09-27 13:23 ` Forconi
0 siblings, 1 reply; 8+ messages in thread
From: Gilles Chanteperdrix @ 2012-09-27 12:06 UTC (permalink / raw)
To: Forconi; +Cc: xenomai
On 09/27/2012 12:05 PM, Forconi wrote:
> Hi, this is my first approach to Xenomai, I'm trying to compile a
> Xenomai patched Linux kernel to run on a AT91SAM9260 embedded board.
>
> This is my environment: CROSS-GCC: gcc-4.2.3-glibc-2.3.3 KERNEL:
> Linux 2.6.38.8 XENOMAI: Xenomai-2.6.1
>
> I'm following the "Installation instructions" on web site (section
> 3.4. Building for ARM).
>
> The prepare-kernel.sh script runs ok, all files are patched with no
> errors, this is the command I've used:
> $xenomai_root/scripts/prepare-kernel.sh --arch=arm
> --adeos=$xenomai_root/ksrc/arch/arm/patches/adeos-ipipe-2.6.38.8-arm-1.18-08.patch
> --linux=$linux_tree
>
> Then I configure/build the kernel: make ARCH=arm
> CROSS_COMPILE=arm-unknown-linux-gnu- at91sam9260ek_defconfig make
> ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnu- uImage
>
> But compilation fails: ... AS arch/arm/nwfpe/entry.o LD
> arch/arm/nwfpe/nwfpe.o LD arch/arm/nwfpe/built-in.o CC
> arch/arm/kernel/elf.o AS arch/arm/kernel/entry-armv.o AS
> arch/arm/kernel/entry-common.o arch/arm/kernel/entry-common.S:
> Assembler messages: arch/arm/kernel/entry-common.S:449: Error: bad
> instruction `ldm sp,{r0-r3}' make[1]: ***
> [arch/arm/kernel/entry-common.o] Error 1 make: *** [arch/arm/kernel]
> Error 2
>
>
> Maybe I have to try with other versions of xenomai and kernel?
No, the problem is the toolchain. Are you sure AS is $(CROSS_COMPILE)as
and not the build system as ?
--
Gilles.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails
2012-09-27 12:06 ` Gilles Chanteperdrix
@ 2012-09-27 13:23 ` Forconi
2012-09-27 13:32 ` Gilles Chanteperdrix
0 siblings, 1 reply; 8+ messages in thread
From: Forconi @ 2012-09-27 13:23 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
The command:
make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnu- uImage
is the command I use to cross compile kernels for my AT91 board, and I have successfully cross-compiled several kernels, so I think AS is the cross-as not the system-as.
It seems like my cross-as doesn't support that assembler instruction.. (arm-unknown-linux-gnu-as version is: GNU assembler 2.16.1)
----- Messaggio originale -----
Da: "Gilles Chanteperdrix" <gilles.chanteperdrix@xenomai.org>
A: "Forconi" <forconi@wavecomm.it>
Cc: xenomai@xenomai.org
Inviato: Giovedì, 27 settembre 2012 14:06:26
Oggetto: Re: [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails
On 09/27/2012 12:05 PM, Forconi wrote:
> Hi, this is my first approach to Xenomai, I'm trying to compile a
> Xenomai patched Linux kernel to run on a AT91SAM9260 embedded board.
>
> This is my environment: CROSS-GCC: gcc-4.2.3-glibc-2.3.3 KERNEL:
> Linux 2.6.38.8 XENOMAI: Xenomai-2.6.1
>
> I'm following the "Installation instructions" on web site (section
> 3.4. Building for ARM).
>
> The prepare-kernel.sh script runs ok, all files are patched with no
> errors, this is the command I've used:
> $xenomai_root/scripts/prepare-kernel.sh --arch=arm
> --adeos=$xenomai_root/ksrc/arch/arm/patches/adeos-ipipe-2.6.38.8-arm-1.18-08.patch
> --linux=$linux_tree
>
> Then I configure/build the kernel: make ARCH=arm
> CROSS_COMPILE=arm-unknown-linux-gnu- at91sam9260ek_defconfig make
> ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnu- uImage
>
> But compilation fails: ... AS arch/arm/nwfpe/entry.o LD
> arch/arm/nwfpe/nwfpe.o LD arch/arm/nwfpe/built-in.o CC
> arch/arm/kernel/elf.o AS arch/arm/kernel/entry-armv.o AS
> arch/arm/kernel/entry-common.o arch/arm/kernel/entry-common.S:
> Assembler messages: arch/arm/kernel/entry-common.S:449: Error: bad
> instruction `ldm sp,{r0-r3}' make[1]: ***
> [arch/arm/kernel/entry-common.o] Error 1 make: *** [arch/arm/kernel]
> Error 2
>
>
> Maybe I have to try with other versions of xenomai and kernel?
No, the problem is the toolchain. Are you sure AS is $(CROSS_COMPILE)as
and not the build system as ?
--
Gilles.
--
Ing. Samuele Forconi
Responsabile Sviluppo SW
WaveComm S.r.l.
Sede legale: Via Donizetti 25, 53011 Castellina in Chianti (SI)
Sede operativa: Loc. Belvedere - Ingresso 2, 53034 Colle Val d'Elsa (SI)
Phone: (39) 0577 043101
Fax: (39) 0577 043101
Mobile: (39) 347 5899717
Skype: samueleforconi
E-mail: forconi@wavecomm.it
URL: www.wavecomm.it
_____________________________________________________________________________________________
Ai sensi del D. Lgs. n.196 del 30/06/2003, questo messaggio ed ogni suo allegato sono confidenziali e ad uso esclusivo del destinatario, il quale è l'unico autorizzato ad usarlo, copiarlo e, sotto la propria responsabilità, diffonderlo. Se il ricevente non è il destinatario diretto del presente messaggio, è pregato di contattare l'originario mittente e di cancellare questo messaggio ed ogni suo allegato dal sistema di posta. Se il ricevente non è il destinatario diretto del presente messaggio, sono vietati l'uso, la riproduzione, e la stampa di questo messaggio e di ogni suo allegato, nonché la diffusione del loro contenuto a qualsiasi altro soggetto.
For the D. Lgs. n.196 of 30/06/2003, this message and any attachment are confidential and privileged for the the recipient identified above, who only may use, copy and, under his/her responsibility, further disseminate it. If you are not the intended recipient, please contact the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not use, copy or print this message or attachment or disclose the contents to any other person.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails
2012-09-27 13:23 ` Forconi
@ 2012-09-27 13:32 ` Gilles Chanteperdrix
2012-09-27 13:46 ` Gilles Chanteperdrix
0 siblings, 1 reply; 8+ messages in thread
From: Gilles Chanteperdrix @ 2012-09-27 13:32 UTC (permalink / raw)
To: Forconi; +Cc: xenomai
On 09/27/2012 03:23 PM, Forconi wrote:
> The command:
>
> make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnu- uImage
>
> is the command I use to cross compile kernels for my AT91 board, and I have successfully cross-compiled several kernels, so I think AS is the cross-as not the system-as.
>
> It seems like my cross-as doesn't support that assembler instruction.. (arm-unknown-linux-gnu-as version is: GNU assembler 2.16.1)
I very much doubt an ARM assembler does not support
ldm sp,{r0-r3}
The documentation only has restrictions when compiling thumb, you are
not compiling for thumb?
So, please run make passing V=1 on the command line.
--
Gilles.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails
2012-09-27 13:32 ` Gilles Chanteperdrix
@ 2012-09-27 13:46 ` Gilles Chanteperdrix
2012-09-27 14:07 ` Forconi
0 siblings, 1 reply; 8+ messages in thread
From: Gilles Chanteperdrix @ 2012-09-27 13:46 UTC (permalink / raw)
To: Forconi; +Cc: xenomai
On 09/27/2012 03:32 PM, Gilles Chanteperdrix wrote:
> On 09/27/2012 03:23 PM, Forconi wrote:
>> The command:
>>
>> make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnu- uImage
>>
>> is the command I use to cross compile kernels for my AT91 board, and I have successfully cross-compiled several kernels, so I think AS is the cross-as not the system-as.
>>
>> It seems like my cross-as doesn't support that assembler instruction.. (arm-unknown-linux-gnu-as version is: GNU assembler 2.16.1)
>
> I very much doubt an ARM assembler does not support
> ldm sp,{r0-r3}
You can also try replacing ldm with ldmia, but ldmia is supposed to be
the default for ldm where no suffix is specified, at least it is what
the documentation says.
--
Gilles.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails
2012-09-27 14:07 ` Forconi
@ 2012-09-27 14:06 ` Gilles Chanteperdrix
2012-09-27 19:08 ` Gilles Chanteperdrix
1 sibling, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2012-09-27 14:06 UTC (permalink / raw)
To: Forconi; +Cc: xenomai
On 09/27/2012 04:07 PM, Forconi wrote:
> Thanks for this suggestion, replacing ldm sp,{r0-r3} with ldmia sp,{r0-r3} does the trick!
> Now, the kernel compiles fine, so the problem was the ldm instruction was not recognised from the cross-as.
I would say the cross-as is broken, as it works for everyone else. But
we have to cope with broken toolchains...
--
Gilles.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails
2012-09-27 13:46 ` Gilles Chanteperdrix
@ 2012-09-27 14:07 ` Forconi
2012-09-27 14:06 ` Gilles Chanteperdrix
2012-09-27 19:08 ` Gilles Chanteperdrix
0 siblings, 2 replies; 8+ messages in thread
From: Forconi @ 2012-09-27 14:07 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
Thanks for this suggestion, replacing ldm sp,{r0-r3} with ldmia sp,{r0-r3} does the trick!
Now, the kernel compiles fine, so the problem was the ldm instruction was not recognised from the cross-as.
----- Messaggio originale -----
Da: "Gilles Chanteperdrix" <gilles.chanteperdrix@xenomai.org>
A: "Forconi" <forconi@wavecomm.it>
Cc: xenomai@xenomai.org
Inviato: Giovedì, 27 settembre 2012 15:46:11
Oggetto: Re: [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails
On 09/27/2012 03:32 PM, Gilles Chanteperdrix wrote:
> On 09/27/2012 03:23 PM, Forconi wrote:
>> The command:
>>
>> make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnu- uImage
>>
>> is the command I use to cross compile kernels for my AT91 board, and I have successfully cross-compiled several kernels, so I think AS is the cross-as not the system-as.
>>
>> It seems like my cross-as doesn't support that assembler instruction.. (arm-unknown-linux-gnu-as version is: GNU assembler 2.16.1)
>
> I very much doubt an ARM assembler does not support
> ldm sp,{r0-r3}
You can also try replacing ldm with ldmia, but ldmia is supposed to be
the default for ldm where no suffix is specified, at least it is what
the documentation says.
--
Gilles.
--
Ing. Samuele Forconi
Responsabile Sviluppo SW
WaveComm S.r.l.
Sede legale: Via Donizetti 25, 53011 Castellina in Chianti (SI)
Sede operativa: Loc. Belvedere - Ingresso 2, 53034 Colle Val d'Elsa (SI)
Phone: (39) 0577 043101
Fax: (39) 0577 043101
Mobile: (39) 347 5899717
Skype: samueleforconi
E-mail: forconi@wavecomm.it
URL: www.wavecomm.it
_____________________________________________________________________________________________
Ai sensi del D. Lgs. n.196 del 30/06/2003, questo messaggio ed ogni suo allegato sono confidenziali e ad uso esclusivo del destinatario, il quale è l'unico autorizzato ad usarlo, copiarlo e, sotto la propria responsabilità, diffonderlo. Se il ricevente non è il destinatario diretto del presente messaggio, è pregato di contattare l'originario mittente e di cancellare questo messaggio ed ogni suo allegato dal sistema di posta. Se il ricevente non è il destinatario diretto del presente messaggio, sono vietati l'uso, la riproduzione, e la stampa di questo messaggio e di ogni suo allegato, nonché la diffusione del loro contenuto a qualsiasi altro soggetto.
For the D. Lgs. n.196 of 30/06/2003, this message and any attachment are confidential and privileged for the the recipient identified above, who only may use, copy and, under his/her responsibility, further disseminate it. If you are not the intended recipient, please contact the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not use, copy or print this message or attachment or disclose the contents to any other person.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails
2012-09-27 14:07 ` Forconi
2012-09-27 14:06 ` Gilles Chanteperdrix
@ 2012-09-27 19:08 ` Gilles Chanteperdrix
1 sibling, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2012-09-27 19:08 UTC (permalink / raw)
To: Forconi; +Cc: xenomai
On 09/27/2012 04:07 PM, Forconi wrote:
> Thanks for this suggestion, replacing ldm sp,{r0-r3} with ldmia sp,{r0-r3} does the trick!
> Now, the kernel compiles fine, so the problem was the ldm instruction was not recognised from the cross-as.
The error suggests, as has been told you on the rt-users mailing list,
that you are using a very old toolchain. It is not really recommended.
I would recommend using for instance CodeSourcery toolchain or Denx
ELDK. If you absolutely want to stay with the oldish 2.6.38, with
CodeSourcery, do not use anything newer than 2010q1.
--
Gilles.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-09-27 19:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1942547306.3976213.1348739521182.JavaMail.root@zmail.sgconsulting.it>
2012-09-27 10:05 ` [Xenomai] Xenomai 2.6.1 - Linux 2.6.38.8 on AT91SAM9260 - Kernel compilation fails Forconi
2012-09-27 12:06 ` Gilles Chanteperdrix
2012-09-27 13:23 ` Forconi
2012-09-27 13:32 ` Gilles Chanteperdrix
2012-09-27 13:46 ` Gilles Chanteperdrix
2012-09-27 14:07 ` Forconi
2012-09-27 14:06 ` Gilles Chanteperdrix
2012-09-27 19:08 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.