JBQ
> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.
Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.
JBQ
In all honesty I'd happily switch to a pre-built system from the android-x86 kernel on the fly system if I could guarantee all of the components would work. Don't get me wrong, tweaking the kernel is very useful, but most users would rather see things like sound through the speakers (as opposed to be limited to just the headphones which I'm currently limited to on the vp10 build) than know that I could compile a kernel from scratch.
Al.
> Is there any standardized way of getting the Android build system to
> compile the kernel on the fly while building the rest of the system?
> I don't believe that the phone manufacturers compile the kernel
> separately since that is a setup that is bound to create mistakes.
I can't speak for other OEMs, but we build the kernel together with
the platform in order to ease dependency and compatibility issues and
generally avoid the hassle of storing prebuilt binaries. Those who wish
so can of course build just the kernel to decrease turnaround time for
changes.
> I assume that I would need a Android.mk file in the kernel dir, and
> that it should be placed/linked into the android build tree. Any
> suggestions?
You're on the right track. Assuming what we're doing is right ;-)
You'll indeed need an Android.mk in the kernel directory. Define a
suitable rule to recursively invoke make for the kernel, and tack the
result onto the goal for prebuilt files. Very incomplete example:
TARGET_PREBUILT_KERNEL := <suitable path>/zImage
$(TARGET_PREBUILT_KERNEL):
$(hide) $(MAKE) ARCH=... CROSS_COMPILE=...
ALL_PREBUILT += $(TARGET_PREBUILT_KERNEL)
I'm a complete idiot when it comes to kernel builds, but you'd probably
want to place the kernel objects in a separate tree, build and install
modules, generate the .config file based on the defconfig etc. Also, the
minimal example above doesn't have any proper dependencies set up, so
once $(TARGET_PREBUILT_KERNEL) has been built it won't ever be remade.
Either set up reasonable dependencies or force the rule to execute every
time.
--
Magnus B�ck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson
> On 24 Jan, 22:33, Patrick Georgi <patr...@georgi-clan.de> wrote:
>
> > android-x86.org has a build/core/kernel.mk that takes care of that.
> > It doesn't rewrite everything in Android.mk but uses a sub-make, but
> > that's a trade-off that some take, some not.
> >
> > The main advantage is that kernel modules can be built right before
> > they end up in the system images, no need to first build a kernel,
> > and pick up binary files explicitely, and so I use it for my AOSP
> > system.
>
> Exactly what I was looking for, and for exactly the same reason. How
> do you get the main Android make to call the build/core/kernel.mk?
See the commit below. I'm not sure its change to core/Makefile makes
sense though, unless the system image actually depends on the kernel
image. If you don't want to patch platform/build.git my suggestion from
earlier today works too, or you can add a dependency to the added kernel
build goal to the default goal (i.e. the goal being run with a plain
"make" command):
$(DEFAULT_GOAL): your-kernel-build-goal
http://git.android-x86.org/?p=platform/build.git;a=commit;h=51352905ba7da1b94f1c4a6f87b151fb0ab2b387
There are some other concerns:
-can you build the kernel on MacOS?
-what's the impact on build time?
-what's the best way to deal with multiple kernel trees (android
routinely uses 5 primary kernel trees)?
-what's the impact on the repository size (over-the-wire and on-disk)?
JBQ
Things could get a bit worse as the same platform build might be using
kernels for different devices built from the same kernel tree but at
different revisions (or even from different branches). E.g. sapphire
and passion were both built from the msm kernel tree. That means that
we might actually need multiple simultaneous independent checkouts of
the same kernel tree.
Theoretically, I'm guessing that repo could be taught to initialize
additional kernel trees by seeding their .git from kernel/common.
That'd take care of the initial sync, which is typically where things
are painful.
JBQ
On a pure gerrit instance I know that we've once worked around it by
creating a server-side symlink (ewww). I still feel dirty.
JBQ
> At some point in the past repo wouldn't allow mapping the same remote
> project twice (i.e. same name attribute). This might have changed.
I'm afraid not, the project name is still the (sole) primary key.
Quoting manifest_xml.py:
for node in config.childNodes:
if node.nodeName == 'project':
project = self._ParseProject(node)
if self._projects.get(project.name):
raise ManifestParseError, \
'duplicate project %s in %s' % \
(project.name, self.manifestFile)
self._projects[project.name] = project
But I guess just changing the primary key in Repo's internal data
structures won't solve much; having multiple worktrees from a single git
does work but isn't without caveats. If we'd skip that and just rely on
Git's ability to clone gits locally by using hard links we'd be really
well off right after the initial repo init/sync, but once a shared git
is repacked the used disk space would be back to normal again.
(We're veering off-topic again. Follow-ups to repo-discuss?)
[...]
Things could get a bit worse as the same platform build might be using
kernels for different devices built from the same kernel tree but at
different revisions (or even from different branches). E.g. sapphire
and passion were both built from the msm kernel tree. That means that
we might actually need multiple simultaneous independent checkouts of
the same kernel tree.Theoretically, I'm guessing that repo could be taught to initialize
additional kernel trees by seeding their .git from kernel/common.
That'd take care of the initial sync, which is typically where things
are painful.
JBQ