LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
Search this Thread
Old 12-03-2011, 12:39 PM   #1
markjuggles
Member
 
Registered: Nov 2003
Location: Chicago western suburbs
Distribution: Linux Mint
Posts: 75

Rep: Reputation: 15
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
 
Old 12-04-2011, 09:50 PM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 207Reputation: 207Reputation: 207
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.
 
Old 12-05-2011, 08:10 AM   #3
markjuggles
Member
 
Registered: Nov 2003
Location: Chicago western suburbs
Distribution: Linux Mint
Posts: 75

Original Poster
Rep: Reputation: 15
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?
 
Old 12-05-2011, 10:28 AM   #4
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 207Reputation: 207Reputation: 207
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 ?
 
Old 12-05-2011, 10:17 PM   #5
markjuggles
Member
 
Registered: Nov 2003
Location: Chicago western suburbs
Distribution: Linux Mint
Posts: 75

Original Poster
Rep: Reputation: 15
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?
 
Old 12-05-2011, 10:32 PM   #6
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 207Reputation: 207Reputation: 207
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!
 
Old 12-06-2011, 08:18 AM   #7
markjuggles
Member
 
Registered: Nov 2003
Location: Chicago western suburbs
Distribution: Linux Mint
Posts: 75

Original Poster
Rep: Reputation: 15
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
 
Old 12-06-2011, 10:53 AM   #8
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 207Reputation: 207Reputation: 207
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
 
Old 12-07-2011, 09:16 PM   #9
Signs
LQ Newbie
 
Registered: Nov 2011
Posts: 12

Rep: Reputation: Disabled
Raspberry Pi Wifi dongles

Quote:
Originally Posted by jhwilliams View Post
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.

Last edited by Signs; 12-07-2011 at 09:25 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ARMedSlack and Raspberry Pi? blue_k Slackware 240 06-02-2013 07:32 PM
Raspberry Pi project Dutch Master Linux - General 12 08-05-2012 06:48 AM
$25 Prototype Computer Raspberry Pi Wins Award etech3 General 6 11-02-2011 08:19 AM
LXer: Super-slim Linux on a Raspberry Pi LXer Syndicated Linux News 0 05-18-2011 10:10 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration