From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: Building kernel for more than one SoC
Date: Thu, 31 Jul 2014 23:07:37 +0200 [thread overview]
Message-ID: <20140731230737.66e94c3d@free-electrons.com> (raw)
In-Reply-To: <lrdi48$ls1$1@ger.gmane.org>
Dear Grant Edwards,
(Adding Boris and Alexandre in Cc, since they do a lot of AT91 stuff
these days.)
On Thu, 31 Jul 2014 13:59:36 +0000 (UTC), Grant Edwards wrote:
> I'm told that it should be possible to build a kernel that will run on
> two different SoC chips. They're closely related (same ARM9 core,
> many identical internal peripherals -- AT91SAM9G20 and 'G25), and
> would likely have identical external hardware.
>
> In order to handle the internal periphals that differ, it was
> recommended that I use loadable modules to keep the kernel size small.
> However, my root filesystem is in RAM, so I don't see how loadable
> modules helps unless I remove all of the .ko files from the root
> filesystem after the kernel has booted.
>
> It seems it would be simpler to just link in all required drivers for
> both chips and discard the ones that aren't needed after kernel
> initialization. But, I'm not sure if there's a mechanism for doing
> that. I know there's a way to declare a function or data that will be
> discarded after kernel init, but is ther a way to that conditionally
> depending on probed hardware or the device-tree used at boot-time?
I don't think there's much point in worrying about this: the 9G20 and
9G25 will use identical device drivers for the vast majority of the
hardware blocks of the SoC, so the overhead of having the drivers for
both SoCs inside the same kernel is going to be really low.
Make a test, a build a kernel only for 9G20, another only for 9G25, and
another with both.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-07-31 21:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 13:59 Building kernel for more than one SoC Grant Edwards
2014-07-31 21:07 ` Thomas Petazzoni [this message]
2014-08-04 19:11 ` Grant Edwards
2014-08-04 20:17 ` Russell King - ARM Linux
2014-08-11 15:42 ` Nicolas Ferre
2014-08-11 15:47 ` Grant Edwards
2014-08-11 16:12 ` Robert Nelson
2014-08-11 20:43 ` Grant Edwards
2014-08-11 20:59 ` Russell King - ARM Linux
2014-08-11 21:15 ` Grant Edwards
2014-08-11 21:38 ` Robert Nelson
2014-08-11 21:57 ` Grant Edwards
2014-08-11 22:43 ` Russell King - ARM Linux
2014-08-11 23:02 ` Grant Edwards
2014-08-14 1:12 ` Tomasz Figa
2014-08-12 3:52 ` Olof Johansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140731230737.66e94c3d@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.