LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 01-01-2014, 03:47 AM   #1
dirtyrobinson
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Rep: Reputation: Disabled
How to add an unsupported mach to kernel source


To elaborate, I have a linux kernel source 2.6.30 for an ARM device but I want to compile an older kernel (2.4.20). I have the arch/arm/mach folder but can I, in a sense, splice it into an older kernel without errors?

I tried looking for a guide on this but I didn't have much luck since I'm not really sure what to search for.

Thanks,
Jason
 
Old 01-01-2014, 06:41 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,709
Blog Entries: 54

Rep: Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965
Quote:
Originally Posted by dirtyrobinson View Post
can I, in a sense, splice it into an older kernel without errors?
There's 7 years worth of non-trivial development between kernel 2.4.20 (rel.: 2002) and 2.6.30 (2009) including conceptual changes, bug fixes, improvements, optimizations, versioning changes, function renaming and code location changes. So in theory the answer is yes but in practice the answer is no. Back porting code between major kernel versions should be the exclusive domain of those who truly understand kernel internals, truly understand the consequences and have no viable alternative. Running a 2.4 kernel is ill advised, well maybe not if you're a vendor in a specialist embedded device niche market. OTOH if you're an ace coder already then maybe this could provide an interesting crash course introduction into kernel programming. And Linux always has a need for more kernel programmers...
 
Old 01-01-2014, 01:23 PM   #3
dirtyrobinson
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
I never looked at the dates so I didn't realize there was such a difference in time between the 2 releases. I have a device with an application running on MontaVista and while I can get the operating system to boot on a different device, the application fails to start. Naturally, I thought the issue might lie with the kernels being different (the board that runs the application is 2.4.20 and the new board is 2.6.30), so I started looking on what it would take to add the machine files from my 2.6.30 source to the untouched linux kernel source 2.4.20. I love messing around with this stuff but I didn't know what keywords to actually search for.

Would you know of any links to some great references on this subject that would give enough information that I could try my luck on back porting?
 
Old 01-01-2014, 06:15 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,709
Blog Entries: 54

Rep: Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965Reputation: 2965
Quote:
Originally Posted by dirtyrobinson View Post
(..) while I can get the operating system to boot on a different device, the application fails to start. Naturally, I thought the issue might lie with the kernels being different (..)
So it's only assumptions? Are you sure that's the most efficient approach for troubleshooting? Personally I'd first aim for device logs / (serial line?) debug data and such...
And no, I don't know of any references wrt back porting. I think it's like with a lot of jobs: you may have had formal training (or not ;-p) and you may be qualified (or not ;-p) and in the end it's only doing actual work that'll teach you the hurdles, pitfalls and gotcha's.
 
Old 01-02-2014, 10:26 AM   #5
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,455

Rep: Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172
Well, "dirty," perhaps the best response is to step back from the lake with a number of quick steps, now that someone's warned you that there are piranhahs in that innocent-looking pool (with the bones on the shoreline). Look around for another way to get where you're going.

"The problem to be solved here" is ... "why does this application fail to start?" It would surprise me rather a lot to find that it actually has anything to do with the kernel or OS-version at all. Probably a purely user-land difference in libraries and so-forth. "Your original idea sounded like an okay strategy at first glance," but lots of original-ideas are like that.
 
  


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
How to boot Darwin's mach-kernel in grub? gabeyg *BSD 1 11-13-2007 03:38 PM
clamd upgradation in remote mach through local mac by script to be run on local mach Narayandutt Programming 3 11-29-2006 11:00 AM
LXer: Should Apple switch Mac OS X from Mach to Linux kernel? LXer Syndicated Linux News 0 12-15-2005 11:01 AM
How to add kernel module to kernel source? cranium2004 Programming 7 05-12-2005 11:34 PM
how can i add the kernel source kudos Slackware 9 04-17-2003 12:42 AM


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

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration