LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-21-2014, 09:23 PM   #1
su_seven
LQ Newbie
 
Registered: Jun 2014
Posts: 4

Rep: Reputation: Disabled
Thumbs up how to make the Kernel transplantation?


dear all
i want to transplant the linux kernel into the ARM developed board。

PC :ubuntu 12.04
gcc 4.6.3
arm-linux-gcc 4.4.3
kenerl :linux-2.6.32.63
ARM : mini2440

1. i change the Makefile as below

export KBUILD_BUILDHOST := $(SUBARCH)
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-

2. i change the linux-2.6.32.63/arch/arm/mach-s3c2440/mach-mini2440.c file to fit the ARM developed board
Frequency :12000000
MACH_CODE : MINI2440

3. # make mini2440_defconfig showing as below:
root@ubuntu:/opt/linux-2.6.32.63# make mini2440_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
HOSTCC scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function ‘conf_sym’:
scripts/kconfig/conf.c:159:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:231:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]
scripts/kconfig/conf.c:307:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:105:8: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
HOSTCC scripts/kconfig/kxgettext.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
4. make zImage
root@ubuntu:/opt/linux-2.6.32.63# make zImage
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
Generating include/asm-arm/mach-types.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
fixdep: kernel/.bounds.s.d: No such file or directory
make[1]: *** [kernel/bounds.s] Error 2
make: *** [prepare0] Error 2

what was the wrong ? how can i can do for this?
 
Old 06-22-2014, 08:05 AM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Well, first of all, "transplantation" is not the proper English word to use. (The word would refer to, say, moving a heart from one body to another.)

The proper term for what you're intending to do, I believe, is "cross-compile."

A better title, and I suggest you change it, is: "How to cross-compile the kernel for an ARM processor target?" I think you'll get more hits that way. Unfortunately, I'm not myself qualified to respond to the question.
 
Old 06-24-2014, 09:26 AM   #3
su_seven
LQ Newbie
 
Registered: Jun 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by sundialsvcs View Post
Well, first of all, "transplantation" is not the proper English word to use. (The word would refer to, say, moving a heart from one body to another.)

The proper term for what you're intending to do, I believe, is "cross-compile."

A better title, and I suggest you change it, is: "How to cross-compile the kernel for an ARM processor target?" I think you'll get more hits that way. Unfortunately, I'm not myself qualified to respond to the question.
thx , sorry for my poor english....

and do you know how to cross-compile the kernel for ARM board
 
Old 10-01-2015, 02:29 PM   #4
tasdvl9
LQ Newbie
 
Registered: Oct 2015
Posts: 3

Rep: Reputation: Disabled
bounds.c compilation..

Hello,

Was this ever resolved? I am experiencing something similar using Ubuntu 14.04..

CC kernel/bounds.s
> fixdep: kernel/.bounds.s.d: No such file or directory
> make[2]: *** [kernel/bounds.s] Error 2
 
Old 10-01-2015, 04:06 PM   #5
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Rep: Reputation: Disabled
First make sure your cross compiler tools are in your path first.

Code:
export PATH=/place/crossenv:$PATH
which arm-linux-gcc

make ARCH=arm CROSS_COMPILE="arm-linux-" mini2440_defconfig 2>&1 | tee make.log
You don't need to modify anything usually.
 
Old 10-01-2015, 04:21 PM   #6
tasdvl9
LQ Newbie
 
Registered: Oct 2015
Posts: 3

Rep: Reputation: Disabled
Hi,

Yes, the cross compiler is defined. I beieve the make which is being called however is the regular gcc compiler for the bounds.c file not the cross compiler. Am I correct?

Thanks!

QUOTE=Rinndalir;5428472]First make sure your cross compiler tools are in your path first.

Code:
export PATH=/place/crossenv:$PATH
which arm-linux-gcc

make ARCH=arm CROSS_COMPILE="arm-linux-" mini2440_defconfig 2>&1 | tee make.log
You don't need to modify anything usually.[/QUOTE]
 
Old 10-02-2015, 03:39 AM   #7
blue_z
Member
 
Registered: Jul 2015
Location: USA
Distribution: Ubuntu, Lubuntu, Mint, custom embedded
Posts: 104

Rep: Reputation: Disabled
Quote:
Originally Posted by tasdvl9 View Post
I beieve the make which is being called however is the regular gcc compiler for the bounds.c file not the cross compiler. Am I correct?
No, you are not correct.
The command line was `CC kernel/bounds.s`, and CC would invoke the cross-compiler of the toolchain.
HOSTCC would invoke the native compiler of the host.

Regards
 
Old 10-02-2015, 08:33 AM   #8
tasdvl9
LQ Newbie
 
Registered: Oct 2015
Posts: 3

Rep: Reputation: Disabled
Thanks, guys.

Yes, that is indeed correct. I took a look at the Makefile.

I ended up using the newest version of Fedora to recompile my custom Kernel.

All seems to be working well now, however, I'm still a little confused as to why
a different flavor of Linux would affect cross compilation for an ARM based device.
 
  


Reply



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
[SOLVED] xfce,how to make app tabs movable in the taskbar of panel? wubai Linux - Desktop 5 10-30-2012 09:25 AM
[SOLVED] lpr transplantation linuxboy2008 Linux - Software 2 04-19-2011 02:43 AM
How to write a project to grab the UI into a image bitmap??? 1073710317 Programming 2 03-29-2011 12:52 PM
which logs or cmd ? ayongying Linux - Hardware 2 03-11-2010 08:15 PM
How to use Omnitty?? reconcil Linux - Newbie 2 11-05-2007 10:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:17 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration