]> git.zerfleddert.de Git - ms2-kexec/blame_incremental - README
parse System.map for memory locations
[ms2-kexec] / README
... / ...
CommitLineData
1Android kexec port
2By Matthew Veety, et al.
3
4Contents:
5 Synopsis
6 Cross-compiling on Gentoo and other Linuxes How-to
7 Troubleshooting
8
9================================================================================
10
11Synopsis:
12
13This is the kmod from the project trying to unlock the Milestone. It is still
14localized to that phone, but, with modification, I got working on the Droid X
15and a few others. Currently, this is a work in progress and is not recommended
16for mission critical situations.
17
18To compile:
19Place your kernel sources into kernel/ and build the kernel
20in that directory. Then run make (or gmake on freebsd) to build
21the kernel module. I highly recommend actually doing the build on
22the phone you desire to run the kmod on. I use a gentoo stage3
23chroot environment on my Droid X to do the building.
24
25Targets:
26Droid X
27
28In-progress Targets:
29Droid 2
30Nexus S
31
32Future Targets:
33Droid 2 Global
34Droid Bionic
35
36================================================================================
37
38Cross-compiling on Gentoo and other Linuxes How-to:
39
40 To set this up you need a cross-compiler. A cross-compiler allows your to
41make binaries for something other than your platform. If you've ever built Android
42then you've used one. There are two methods to do this; the first method is using
43Android's cross-compiler to build. There are tools to set this up and it seems
44to be very easy to use, but I've never got that method to work. The method I use
45uses a nice tool that is in portage (I'm a gentoo user) called cross dev.
46
47 ~note from palmercurling~
48 To set up a cross-compiler in Debian or a Debian fork (Ubuntu, Mint, others)
49 follow the steps at http://www.scratchbox.org/
50
51Your first step should be setting up a stage3 chroot. The Gentoo handbook outlines
52how to do this, and the process is pretty simple. It only needs to be very
53minimal and doesn't need X or any other sort of graphical environment.
54I install mine to /opt because I have a nice 300 GB hard drive mounted there to
55hold all of my Android things.
56
57So after you're chrooted into your cross environment install crossdev by running:
58# emerge -avp crossdev # This is to see dependencies
59# emerge -av crossdev # This makes sure you want to go through with it
60
61After crossdev gets done emerging run:
62# emerge --sync
63to get the latest version of the portage tree. If rsync is blocked choose the http
64method outlined in the Gentoo Handbook.
65
66crossdev has pretty simple options that can be seen by invoking:
67$ crossdev
68or
69# crossdev
70
71The option you'll be interested in is --target. This allows your to build the specified
72gcc, libc, and binutils. --target takes its option as ARCH-VENDOR-OS-LIBC. For
73possible choices invoke:
74$ crossdev -t help
75$ crossdev --target help
76# crossdev -t help
77or
78# crossdev --target help
79
80Now because Adnroid is Linux and initx requires glibc your tuple for --target
81will look something like ARCH-VENDOR-linux-glibc. Also because Android
82kexec only supports ARM right now you're going to want either arm or armeb
83for ARCH. That is phone dependent. The Droid X seems to run fine with either,
84but the Nexus One really doesn't like using arm without compiling the kernel with
85softfloat in the vendor.
86
87TIPS: This doesn't work on Gentoo/FreeBSD yet. No idea why either. Cross
88works fine on normal *BSD though. Crossdev is also crazy useful for
89compiling Windows apps. crossdev + wine = windows development bliss.
90
91================================================================================
92
93TROUBLESHOOTING:
94
951. I'm getting segmentation faults!
96 Check your cross setup. The common cause for me is adding in softfloat when I
97 didn't need it. Don't feel bad, it's a common issue.
982. kexec won't load into the kernel!
99 The cross setup needs to be the same configuration as the one that compiles your
100 kernel. Check your CHOST after running make menuconfig in your kernel.
1013. I'm getting errors on compile!
102 Read them and fix them, if it's my fault send me a fix for it.
1034. How do I actually use this?
104 You'll need to write a wrapper to make the system call. I did that so inexperienced
105 users won't damage their phone. kexec is pretty well documented, and you can look
106 at the i686 sources for a really well done reference, plus the man pages have it pretty
107 well documented.
1085. This file looks funny in my emacs window!
109 I know, I didn't format it to 80 cols just to be a dick to you :P. Actually, I use
110 TextEdit.app (it's a GNUstep app because I'm a GNUstep user) which doesn't easily
111 understand the concepts of "wrap the damn line at 80."
Impressum, Datenschutz