EmcraftSystems / linux-emcraft

uClinux for Cortex-M3 and Cortex-M4, version 2.6.33
http://www.emcraft.com
Other
267 stars 209 forks source link

Error: r15 not allowed here -- `mov r2,pc,lsr#20' #2

Closed thuoeg closed 11 years ago

thuoeg commented 11 years ago

Hi,I keep getting this error at the final stage of cpmplilation when the ZImage is begin created.THe erroris as follows:

SYSMAP System.map OBJCOPY arch/arm/boot/Image Kernel: arch/arm/boot/Image is ready AS arch/arm/boot/compressed/head.o arch/arm/boot/compressed/head.S: Assembler messages: arch/arm/boot/compressed/head.S:440: Error: r15 not allowed here -- `mov r2,pc,lsr#20' make[2]: * [arch/arm/boot/compressed/head.o] Error 1 make[1]: * [arch/arm/boot/compressed/vmlinux] Error 2 make: *\ [uImage] Error 2

What could be the problem, please help

Oh, and by the way Thank a lot for doing this work it's helping a lot . Also do you by any chance have a detailed tutorial on how to port Linux kernel new Soc or a new processor or a given development board, and also the same for u-boot. Thanks

sposelenov-emcraft commented 11 years ago

Hi,

We didn't build the compressed kernels. We are using U-Boot, so we support only the "uImage" kernel format.

On Fri, 21 Sep 2012 14:32:33 -0700 thuoeg notifications@github.com wrote:

Hi,I keep getting this error at the final stage of cpmplilation when the ZImage is begin created.THe erroris as follows:

SYSMAP System.map OBJCOPY arch/arm/boot/Image Kernel: arch/arm/boot/Image is ready AS arch/arm/boot/compressed/head.o arch/arm/boot/compressed/head.S: Assembler messages: arch/arm/boot/compressed/head.S:440: Error: r15 not allowed here -- `mov r2,pc,lsr#20' make[2]: * [arch/arm/boot/compressed/head.o] Error 1 make[1]: * [arch/arm/boot/compressed/vmlinux] Error 2 make: *\ [uImage] Error 2

What could be the problem, please help

Oh, and by the way Thank a lot for doing this work it's helping a lot . Also do you by any chance have a detailed tutorial on how to port Linux kernel new Soc or a new processor or a given development board, and also the same for u-boot. Thanks

I'm afraid there is no such tutorial. Just find a reference port (i.e. the one with the same core), make a clone from it for you board/SoC and start with the basic things - RAM and clocks.

Regards, Sergei


Reply to this email directly or view it on GitHub: https://github.com/EmcraftSystems/linux-emcraft/issues/2

thuoeg commented 11 years ago

Hi, thank for the reply But, I trying to generate the u-boot image as shown above (last line). The command I'm running is: make -j2 ARCH=arm uImage.

sposelenov-emcraft commented 11 years ago

Hi,

You are using wrong kernel config. Line 440 is at setup_mmu(). There is no MMU on Cortex-M3.

Also, I suggest you to disable kernel compression.

Regards, Sergei

On Fri, 21 Sep 2012 14:32:33 -0700 thuoeg notifications@github.com wrote:

Hi,I keep getting this error at the final stage of cpmplilation when the ZImage is begin created.THe erroris as follows:

SYSMAP System.map OBJCOPY arch/arm/boot/Image Kernel: arch/arm/boot/Image is ready AS arch/arm/boot/compressed/head.o arch/arm/boot/compressed/head.S: Assembler messages: arch/arm/boot/compressed/head.S:440: Error: r15 not allowed here -- `mov r2,pc,lsr#20' make[2]: * [arch/arm/boot/compressed/head.o] Error 1 make[1]: * [arch/arm/boot/compressed/vmlinux] Error 2 make: *\ [uImage] Error 2

What could be the problem, please help

Oh, and by the way Thank a lot for doing this work it's helping a lot . Also do you by any chance have a detailed tutorial on how to port Linux kernel new Soc or a new processor or a given development board, and also the same for u-boot. Thanks


Reply to this email directly or view it on GitHub: https://github.com/EmcraftSystems/linux-emcraft/issues/2

sposelenov-emcraft commented 11 years ago

Please disregard my last email in the part about setup_mmu. It shuld be here. You are using wrong toolchain or wrong kernel configuration, apparently.

Regards, Sergei

On Mon, 24 Sep 2012 06:15:54 -0700 thuoeg notifications@github.com wrote:

Hi, thank for the reply But, I trying to generate the u-boot image as shown above (last line). The command I'm running is: make -j2 ARCH=arm uImage.


Reply to this email directly or view it on GitHub: https://github.com/EmcraftSystems/linux-emcraft/issues/2#issuecomment-8818299

thuoeg commented 11 years ago

Hi, thank for the reply.I did find a solution after browsing your commits history, there is a commit about Support booting from compressed and uncompressed kernel. I applied the changes there and disable kernel compression, which I was reluctance to do, because your current a2f_defconfig has kernel compression enable to GZIP, but I disable it and every thing was fine.Thanks

thuoeg commented 11 years ago

Hi, I think this issue has bee solve as I explained above Thanks