LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Error Building Raspberry Pi (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/error-building-raspberry-pi-916936/)

markjuggles 12-03-2011 12:39 PM

Error Building Raspberry Pi
 
Since the Raspberry Pi is due to be released soon, I wanted to play with it first using qemu.

There is a tutorial to do exactly that:

http://www.cnx-software.com/2011/10/...ntu-with-qemu/

So far, I have not succeeded in building the kernel on my Linux Mint 11 (i386) system. After my first attempt, I started over from scratch and carefully followed each step but got the same results.

The first problem appeared to be due to the CROSS_COMPILE make variable being undefined:

CC kernel/bounds.s
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
kernel/bounds.c:1:0: error: unknown ABI (apcs-gnu) for -mabi= switch

Changing CROSS_COMPILE in the Makefile allows some compilation:

CROSS_COMPILE = arm-none-eabi-

(This is with my PATH setup to include the cross compiler.)


The next issue may be due to several warnings:

warning: "__LINUX_ARM_ARCH__" is not defined

which finally results in:

In file included from include/linux/mm_types.h:15:0,
from include/linux/sched.h:64,
from arch/arm/kernel/asm-offsets.c:13:
/home/mark/edev/linux-3.0.4/arch/arm/include/asm/page.h: At top level:
/home/mark/edev/linux-3.0.4/arch/arm/include/asm/page.h:116:2: error: #error Unknown user operations model


Adding this definition to the Makefile eliminated the warnings but resulted in the same error:

KBUILD_CFLAGS_KERNEL := -D__LINUX_ARM_ARCH__=11

Starting over from scratch and following the instructions step by step, as closely as possible did not help.

I can reload the menuconfig configurations and verify the correct settings.


Can someone explain what I am doing wrong or suggest an alternative set of instructions?

Thank you,

Mark

jhwilliams 12-04-2011 09:50 PM

Did you apply the arm patch? Did you specify the prefix for the toolchain in the kernel config? For example, I am used the value

Code:

/usr/bin/arm-linux-gnueabi-
To build with Ubuntu's pre-packaged ARM compiler.

markjuggles 12-05-2011 08:10 AM

The ARM patch was applied and the prefix was set. The prefix in the instructions was "arm-none-eabi-" since that was the toolchain that was specified in the instructions. I tried both the full path and the basename. When only the basename was used, PATH was set to have the toolchain bin as the first entry.

Have you built with a cross compiler from a package? (/usr/bin/arm-linux-gnueabi-) Which package?

jhwilliams 12-05-2011 10:28 AM

Hm, very strange! Oh also, I used version 3.1.4 of the Linux tarball from kernel.org; can hardly imagine that'd make a difference though.

The Ubuntu package I installed was gcc-arm-linux-gnueabi.

Can you post the contents of you .config ?

markjuggles 12-05-2011 10:17 PM

The package version of the arm cross compiler had the same behavior.

The .config line count is 1740 so it seems too large to post. I will try the 3.1.4 kernel version next.

Do you have notes from configuring the kernel for Raspberry Pi? Which version of the ARM patch was used to patch the kernel?

jhwilliams 12-05-2011 10:32 PM

Hi Mark,

To be honest I'm not even sure what Raspberry Pi is, but I thought it would be fun to try and solve your problem. :-)

Sadly no, I have no other notes - I just followed those directions, with the linked patch, using the Ubuntu-packaged toolchain, against kernel 3.1.4.

Hope you can get it working!

markjuggles 12-06-2011 08:18 AM

The Raspberry Pi is a $35 single board computer targeted as an entry level computer platform. It should make a good embedded Linux platform too. It is due to be released very soon.

http://www.raspberrypi.org/

http://en.wikipedia.org/wiki/Raspberry_pi

jhwilliams 12-06-2011 10:53 AM

Hi Mark,

Cool! That's good to know about. Have you looked into adding a Wifi dongle? Have you come across any documentation for that - any 3rd party adapters that are known to work well?

Best,
Jameson

Signs 12-07-2011 09:16 PM

Raspberry Pi Wifi dongles
 
Quote:

Originally Posted by jhwilliams (Post 4543544)
Hi Mark,

Cool! That's good to know about. Have you looked into adding a Wifi dongle? Have you come across any documentation for that - any 3rd party adapters that are known to work well?

Best,
Jameson


You can find further info about wireless dongles here:

I tracked this one down online and I believe it will work with the Raspberry Pi. It is located here.


All times are GMT -5. The time now is 03:12 AM.