LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-01-2014, 02: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, 05:41 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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, 12: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, 05:15 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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, 09:26 AM   #5
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, "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



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

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

All times are GMT -5. The time now is 01:13 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