Nitdroid stuff

Keyboard fix for Nitdroid Alpha 5 (N950 only)

Extract this tarball into /home to fix the hardware keyboard buttons in Nitdroid Alpha 5 (should work for Alpha 4 as well if you prefer to use that):

Example usage (via Terminal or SSH): tar xzvf nitdroid_alpha5_n950_fixes.tgz -C /home/

(old:) Keypad mapping with fixes (N950 only)

Protip

Extract the separate Nitdroid releases into, e.g. /home/nitdroid.alphaX (where X is the release number), and then use a symlink /home/nitdroid to point to the release you want to use, so that it looks like that:

    /home/nitdroid.alpha4/...                   # Nitdroid Alpha 4 ICS install
    /home/nitdroid.alpha5/...                   # Nitdroid Alpha 5 JB install
    /home/nitdroid -> /home/nitdroid.alpha4     # Symlink to the active Nitdroid

Of course, you can also use that to "clone" an existing Nitdroid install for experimentation, or have multiple Nitdroid installs in parallel.

Related links

Build the Nitdroid kernel from source

Preconditions:

Instructions:

    cd ~/sdk/
    git clone git://gitorious.org/android-n900/kernel-ng.git
    scratchbox
    cd kernel-ng
    sed -i -e 's/rm581_defconfig/rm581_nitdroid_defconfig/' debian/rules
    sed -i -e 's/rm581_crashkernel_defconfig/rm581_nitdroid_defconfig/' debian/rules
    sed -i -e 's/rm581_debug_defconfig/rm581_nitdroid_defconfig/' debian/rules
    fakeroot apt-get install fiasco-gen lzop # build-dependencies of kernel
    dpkg-buildpackage -rfakeroot -b
        

Building Kernel from Source (new version)

cp arch/arm/configs/rm581_nitdroid_defconfig .config
make oldconfig

Edit: scripts/setlocalversion
dpkg-parsechangelog -ldebian/changelog | grep Version | sed 's/.*-/-/' | cut -b -9

CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm make -j4

Related links

Build Android AOSP (Nitdroid flavor) from source

Preconditions:

Instructions:

    mkdir -p ~/src/nitdroid
    cd ~/src/nitdroid
    GIT_URL=git://gitorious.org/android-n900/nitdroid_platform_manifest.git
    repo init -u $GIT_URL -b ics
    repo sync
        

If during the repo sync operation it gets stuck, abort it and retry. If it gets stuck again, use repo --trace sync to check which repository is causing problems and remove the local checkout, then use repo sync again to re-download the repo. Repeat until all sources are downloaded.

    bash # only needed if you use e.g. zsh as your default shell
    source build/envsetup.sh
    lunch n9-userdebug
    make -j4
        

I had to fix issue 20795 by applying the change suggested there: Edit build/core/combo/HOST_linux-x86.mk and apply the following changes to line 61:

    -HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
    +HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
        

I also had to fix issue 22006 by editing frameworks/compile/slang/slang_rs_export_foreach.cpp and commenting out the following line (line 249 for me):

    //llvm::StringRef ParamName = PVD->getName();
        

And (d'oh!) I was also hit by issue 23206, so fire up the editor and open external/mesa3d/src/glsl/linker.cpp and include the following at the top of the file:

    #include <cstddef>
        

..and issue 22003 (external/oprofile/libpp/format_output.h):

    mutable counts_t & counts;
        

..and issue 22011 (external/llvm/llvm-host-build.mk):

    LOCAL_LDLIBS := -lpthread -ldl
        

..and issue 22055 (external/gtest/include/gtest/internal/gtest-param-util.h):

    #include <cstddef>
        

Most of these issues seem to be related to the default compiler in Ubuntu 12.04 (judging by the comments on the linked issues). Try to build it without these fixes first, and then apply each after the other as you encounter them.

After a cozy afternoon, the build should finally go through, and it will leave you with some files in out/target/product/n9/, compare this to the contents of nitdroid_n9_ics_alpha3.tar.bz2: nitdroid_diff_2012-06-23.txt

TODO: Figure out which of the missing files can be extracted from a Harmattan rootfs. The filesystem layout also seems to be a bit different, but that might be because I didn't really assemble the image / directory structure correctly. Files like ueventd.nokiarm-696board.rc are found in vendor/nitdroid/n9/, these should probably be added to the target directory somehow, too (are they added to system.img? I wasn't able to loop mount it here..).

Sillyboot modifications (v1 to v2)

diff -ru sillyboot/sbin/preinit sillyboot2/sbin/preinit
--- sillyboot/sbin/preinit       2012-03-07 21:58:48.000000000 +0100
+++ sillyboot2/sbin/preinit      2012-04-02 23:09:13.000000000 +0200
@@ -371,7 +371,7 @@

                #/usr/bin/strace -o /init.strace.log -f -s 128 /usr/sbin/chroot /mnt /init
                stop_watchdog_kicker
-               exec chroot /mnt /init
+               exec chroot /mnt/nitdroid /init
         fi
 }

Related links


thp | 2012 | thp.io | contact info