Author Topic: how compile n9 nitdroid kernel?  (Read 5252 times)

Offline fedyame

  • NITDroid novice
  • *
  • Posts: 6
how compile n9 nitdroid kernel?
« on: May 18, 2012, 08:13:28 pm »
Hello.
I want to compile own nitdroid n9 kernel

git pull git clone git://gitorious.org/android-n900/kernel-ng.git

in harmattan_sdk i do

make rm581_nitdroid_defconfig (this one seems to be that i need)

make -j5

in out i get zImage
./flasher -a DFL61_HARMATTAN_30.2012.07-1_PR_LEGACY_001-OEM1-958_ARM.bin -k zImage_new --flash-only=kernel -f -

Reboot, and i get "Dragons ahead" warning and phone don't boot.

Any ideas?

Offline fedyame

  • NITDroid novice
  • *
  • Posts: 6
Re: how compile n9 nitdroid kernel?
« Reply #1 on: May 18, 2012, 09:25:40 pm »
At first i think that problem was in kernel cmdline
i changed it from default to

Code: [Select]
CONFIG_CMDLINE="init=/sbin/preinit root=/dev/mmcblk0p2 rootwait rootflags=errors=remount-ro rootfstype=ext4 rw mtdoops.mtddev=log mtdoops.record_size=65536 console=tty0 mtdparts=omap2-onenand:1024k(bootloader),2816k@1024k(config),16384k@3840k(kernel),2048k@20224k(log),469248k@22272k(var),32768k@491520k(moslo) bootreason=sw_rst bootmode=normal nolo=2.3.6 product_name=RM-696 dbi-type=V5JW dbi-vendor=1 dbi-size=73 dbi-uid=01444441570012414A20 imei=357923048311155 g_nokia.iSerialNumber=357923048311155 serialnumber=CRG644011 omap_sec.kci=958 gpio=cmt_apeslpx:93:sysfs:output,cmt_en:23:sysfs:init_active:output,cmt_rst_rq:88:sysfs:init_active:output,sleep_ind:92:sysfs:output omapdss.def_disp_enabled=1 vhash=0ff64214fdeedc558276b1eae8f3e0e6c9683672 product_model=N9 hwid=1603"
but kernel still not bootable

Offline e-yes

  • Administrator
  • I know all there is to know!
  • *****
  • Posts: 296
Re: how compile n9 nitdroid kernel?
« Reply #2 on: May 18, 2012, 10:22:08 pm »
Code: [Select]
e-yes@lightning ~/nitdroid/n9/kernel/source $ cat ../../changelog | head -n 10
kernel (2.6.32-20115101+0m7) natty; urgency=low

  * This entry has been added by BIFH queue processor
    version has been changed to 2.6.32-20115101+0m7

 -- BIFH Bot <sysint@maemo.research.nokia.com>  Tue, 25 Oct 2011 14:08:28 +0300
kernel (2.6.32-20113701.10+0m6) natty; urgency=low

  * This entry has been added by BIFH queue processor
cat support_request.pm > /dev/null

Offline fedyame

  • NITDroid novice
  • *
  • Posts: 6
Re: how compile n9 nitdroid kernel?
« Reply #3 on: May 18, 2012, 10:43:01 pm »
can be more verbose?

Offline e-yes

  • Administrator
  • I know all there is to know!
  • *****
  • Posts: 296
Re: how compile n9 nitdroid kernel?
« Reply #4 on: May 19, 2012, 01:45:09 pm »
To successfully load modules you have to compile kernel using proper kernel version. Kernel source code that came from Nokia parses changelog files to get kernel version (Debian-way?)
Default location of changelog file is  ${KERNEL_DIR}/../../changelog . no idea why (take a look on "stock" nokia source code)
cat support_request.pm > /dev/null

Offline fedyame

  • NITDroid novice
  • *
  • Posts: 6
Re: how compile n9 nitdroid kernel?
« Reply #5 on: May 20, 2012, 11:09:15 pm »
Actually i trying to compile official sources

in SDK

apt-get source kernel
cd  kernel-2.6.32
dpkg-buildpackage -b -uc -rfakeroot
openmode patch applied into debian/rules

in out i get zImage and lots of kernel deb files
seems i needed only zImage
i flashed it again and phone stucks in bootloop after scary screen

Offline juiceme

  • NITDroid pro
  • ***
  • Posts: 167
Re: how compile n9 nitdroid kernel?
« Reply #6 on: December 03, 2012, 09:05:43 am »
Hi!

I am working on N9 "tripleboot" project, meaning ability to boot the device with a GUI-type selector for Harmattan/Nitdroid/Nemo systems (and possibly other nice thingies, forex. single-user mode, backup mode etc...)
On my device I have the Nitdroid kernel version 2.6.32.54-dfl61-20121301 (downloaded as  zImage.pr13 from e-yes repository)

The kernel does not implement kexec functionality that I would like to have as a way to restart the device in Nemo mode from the preinit phase.
Now, I cloned the git repository git://gitorious.org/android-n900/kernel-ng.git but that is of version 2.6.32.48-dfl61.
As I would like to only compile a new kernel implementing kexec, without needing to change all modules I would like to know where to pull the source for 2.6.32.54-dfl61 ?




Offline e-yes

  • Administrator
  • I know all there is to know!
  • *****
  • Posts: 296
Re: how compile n9 nitdroid kernel?
« Reply #7 on: December 04, 2012, 04:05:31 pm »
What about kexec support in original Harmattan kernel? Have you tried to compile it with kexec enabled in config?
(I'm affraid kexec support is broken)
cat support_request.pm > /dev/null

Offline juiceme

  • NITDroid pro
  • ***
  • Posts: 167
Re: how compile n9 nitdroid kernel?
« Reply #8 on: December 05, 2012, 06:53:53 am »
Well, I have tried it on the Nemo loader kernel (2.6.32.20112201-26.1.Nemo.Adaptation.N950.N9-adaptation-n955) which I belive is fairly close to the vanilla Harmattan kernel. At least there it works correctly so I assumed it can be made to work on Nitdroid kernel just by recompiling it with CONFIG_KEXEC=y.

If it is broken it can be fixed, though.

There is also one other thing I would like to do, sooner or later. I have had problems with running encfs-mounted home directory, and I think the problems are due to FUSE. So I would also like to try to patch a newer FUSE version into the kernel or even better compile it as a module so I could experiment with that.