maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   [HOWTO] Compiling new kernels on Harmattan device (https://talk.maemo.org/showthread.php?t=89507)

nieldk 2013-08-22 18:47

Re: [HOWTO] Compiling new kernels on Harmattan device
 
Yeaaah!

IP redirect in place .
You just made my day :)

ettercap is now armoring my N9 to full throttle

jackburton 2013-08-23 01:10

Re: [HOWTO] Compiling new kernels on Harmattan device
 
Quote:

Originally Posted by nieldk (Post 1368746)
Yeaaah!

IP redirect in place .
You just made my day :)

ettercap is now armoring my N9 to full throttle

Cool. Glad your use case is going well with these additions.

nieldk 2013-08-23 06:49

Re: [HOWTO] Compiling new kernels on Harmattan device
 
Crap.
Cant figure out now (going away for the weekend, may be stress LOL)
I flash

# flasher -F org.img -F emmc.bin -f -R

installs developermode, untar modules to /lib/modules/(new kernel version)
#/sbin/depmod -a (new kernel version)

power-off

#flasher -F org.img -k zImage-lopen --flash-only==kernel -f -R

Now, I finish the setup.
But, crap, it has the keep enter password thing :(

Believe the above was what I did before, but obviously not (actually had it done LOL)

juiceme 2013-08-23 08:26

Re: [HOWTO] Compiling new kernels on Harmattan device
 
Quote:

Originally Posted by nieldk (Post 1368850)
I flash

# flasher -F org.img -F emmc.bin -f -R

installs developermode, untar modules to /lib/modules/(new kernel version)
#/sbin/depmod -a (new kernel version)

power-off

#flasher -F org.img -k zImage-lopen --flash-only==kernel -f -R

Now, I finish the setup.
But, crap, it has the keep enter password thing :(

Believe the above was what I did before, but obviously not (actually had it done LOL)

Well what happens here is the usual "first-boot-to-closed-mode", which messes up your device. The device credentials & whatever get generated in the first boot, and if it is boot to closed mode, the aegis closed mode keys are used and you have no end of trouble when you try to enter open mode later.

The correct way to do it:

flash the device back-to-back closedmode/openmode, without letting it to boot in between. Use the following command:

flasher -F org.img -F emmc.bin -f -R ; flasher -F org.img -k zImage-someopenimage --flash-only==kernel -f -R

(as zImage-someopenimage use some image that has same modules as the original. like l2-fixed open image or whatever. Note that you cannot use the NAT-enchanced image here as it has different module deps...)

and note, that do not unplug the USB cord between the 2 flashes or else the first flash command will reboot the device to closed mode and it does not work correctly.

After this procedure, enable developer mode as usual, unpack the new modules, run depmod and as a last step reflash the new kernel. :)

nieldk 2013-08-23 08:35

Re: [HOWTO] Compiling new kernels on Harmattan device
 
Quote:

Originally Posted by juiceme (Post 1368875)
Well what happens here is the usual "first-boot-to-closed-mode", which messes up your device. The device credentials & whatever get generated in the first boot, and if it is boot to closed mode, the aegis closed mode keys are used and you have no end of trouble when you try to enter open mode later.

The correct way to do it:

flash the device back-to-back closedmode/openmode, without letting it to boot in between. Use the following command:

flasher -F org.img -F emmc.bin -f -R ; flasher -F org.img -k zImage-someopenimage --flash-only==kernel -f -R

(as zImage-someopenimage use some image that has same modules as the original. like l2-fixed open image or whatever. Note that you cannot use the NAT-enchanced image here as it has different module deps...)

and note, that do not unplug the USB cord between the 2 flashes or else the first flash command will reboot the device to closed mode and it does not work correctly.

After this procedure, enable developer mode as usual, unpack the new modules, run depmod and as a last step reflash the new kernel. :)

Love you man :)
Now I have many donations to do :)

juiceme 2013-08-23 08:40

Re: [HOWTO] Compiling new kernels on Harmattan device
 
Quote:

Originally Posted by nieldk (Post 1368876)
Love you man :)
Now I have many donations to do :)

Jus thank my posts, that'll do nicely :D

And as for donations, I follow the same path as MSameer. I recommend donating to you local charity.
(and please make sure it's an organization that really gives help to the needy, there are too many that waste donations on "administrative costs" and "running the organization")

jackburton 2013-08-23 13:22

Re: [HOWTO] Compiling new kernels on Harmattan device
 
Quote:

Originally Posted by juiceme (Post 1368877)
And as for donations, I follow the same path as MSameer. I recommend donating to you local charity.

Agreed. Also, you may entertain the idea of becoming a free software foundation member. It's my way of giving back to all the things I have gained from free software.

http://www.fsf.org

nieldk 2013-08-24 05:27

Re: [HOWTO] Compiling new kernels on Harmattan device
 
@juiceme @jackburton
Good :)
I will make donations for FSF and Save the children both, I believe, good causes.

peterleinchen 2013-08-24 08:46

Re: [HOWTO] Compiling new kernels on Harmattan device
 
Quote:

Originally Posted by nieldk (Post 1368850)
# flasher -F org.img -F emmc.bin -f -R

installs developermode, untar modules to /lib/modules/(new kernel version)
#/sbin/depmod -a (new kernel version)

power-off

#flasher -F org.img -k zImage-lopen --flash-only==kernel -f -R

You made two mistakes here. First and important is what juiceme already explained (booting up closed kernel).
And second one is that you flashed also the second time the rootfs image (-F org.img), hereby overwriting your untared new modules. You should have used "-a org.img" instead of "-F org.img".

But what I ask myself is why did it start at all? If you flashed the NAT kernel, it should need its modules at correct location!? Just like juiceme said:
Quote:

Originally Posted by juiceme (Post 1368875)
Note that you cannot use the NAT-enhanced image here as it has different module deps...)

Or?



Quote:

Originally Posted by juiceme (Post 1368875)
Well what happens here is the usual "first-boot-to-closed-mode", ...

flasher -F org.img -F emmc.bin -f -R ; flasher -F org.img -k zImage-someopenimage --flash-only==kernel -f -R

Oops, the -R in first command is definitely wrong, just seen after writing post.
Just for the records. It should be enough to flash the kernel only in second command. And it is not needed to flash also eMMC (but of course you may do so). Just like:
Code:

flasher -F org.img  -f ; flasher -a org.img -k zImage-someopenimage --flash-only==kernel -f -R
Or it should/may also be possible with one flash command only (not tested/confirmed)l
Code:

flasher -F org.img -k zImage-someopenimage -f -R

Then do the developermode, modules and dep stuff and flash NAT kernel:
Code:

flasher -a org.img -k zImage-NATimage --flash-only==kernel -f -R

KTy 2013-08-24 09:14

Re: [HOWTO] Compiling new kernels on Harmattan device
 
Quote:

Originally Posted by juiceme (Post 1368875)
Well what happens here is the usual "first-boot-to-closed-mode", which messes up your device. The device credentials & whatever get generated in the first boot, and if it is boot to closed mode, the aegis closed mode keys are used and you have no end of trouble when you try to enter open mode later.

The correct way to do it:

flash the device back-to-back closedmode/openmode, without letting it to boot in between. Use the following command:

flasher -F org.img -F emmc.bin -f -R ; flasher -F org.img -k zImage-someopenimage --flash-only==kernel -f -R

(as zImage-someopenimage use some image that has same modules as the original. like l2-fixed open image or whatever. Note that you cannot use the NAT-enchanced image here as it has different module deps...)

and note, that do not unplug the USB cord between the 2 flashes or else the first flash command will reboot the device to closed mode and it does not work correctly.

After this procedure, enable developer mode as usual, unpack the new modules, run depmod and as a last step reflash the new kernel. :)

Hey Juiceme, what am I doing wrong ?
I am trying to install Ubiboot, but before getting there, I want to make sure I will stick to open mode.
I followed your advice by doing a back to back flashing close/open mode, but still no luck....; It keeps asking me for password... I am a bit confused.

here are the commands and output (windows):
Code:

D:\Nokia\Flasher>flasher -f -F main.bin -R && flasher -a main.bin -k zImage_2.6
32.54-openmode_l2fix --flash-only=kernel -f -R
flasher 3.12.1 (Oct  6 2011) Harmattan
WARNING: This tool is intended for professional use only. Using it may result
in permanently damaging your device or losing the warranty.

Suitable USB interface (bootloader/phonet) not found, waiting...
Found device RM-696, hardware revision 1601
NOLO version 2.3.6
Version of 'sw-release': DFL61_HARMATTAN_40.2012.21-3_PR_001
Sending ape-algo image (7096 kB)...
100% (7096 of 7096 kB, avg. 20392 kB/s)
Suitable USB interface (phonet) not found, waiting...
Ping attempt 1 (250 ms)
Server application: 1.7.2
Found product RM-696 rev. 1601
Server implements softupd protocol version 1.8
Image SW version DFL61_HARMATTAN_40.2012.21-3_PR_001
Image moslo not present
Image mmc not present
Image tar skipped
Image config skipped

Battery level 79 %, continuing.

    image        [state    progress        transfer    flash speed]
---------------------------------------------------------------------
[x] cert-sw      [finished  100 %      1 /      1 kB      NA    ]
[x] cmt-2nd      [finished  100 %      95 /      95 kB      NA    ]
[x] cmt-algo    [finished  100 %    789 /    789 kB      NA    ]
[_] cmt-mcusw    [init      100 %    6050 /    6050 kB      NA    ]
[x] xloader      [finished  100 %      23 /      23 kB      NA    ]
[x] secondary    [finished  100 %      94 /      94 kB      NA    ]
[x] kernel      [finished  100 %    2714 /    2714 kB    1811 kB/s]
[_] rootfs      [writing      1 %  30720 / 1170282 kB    5449 kB/s]

    image        [state    progress        transfer    flash speed]
---------------------------------------------------------------------
[x] cert-sw      [finished  100 %      1 /      1 kB      NA    ]
[x] cmt-2nd      [finished  100 %      95 /      95 kB      NA    ]
[x] cmt-algo    [finished  100 %    789 /    789 kB      NA    ]
[x] cmt-mcusw    [finished  100 %    6050 /    6050 kB      NA    ]
[x] xloader      [finished  100 %      23 /      23 kB      NA    ]
[x] secondary    [finished  100 %      94 /      94 kB      NA    ]
[x] kernel      [finished  100 %    2714 /    2714 kB    1811 kB/s]
[x] rootfs      [finished  100 % 1170282 / 1170282 kB  10634 kB/s]
Updating SW release
Success
flasher 3.12.1 (Oct  6 2011) Harmattan
WARNING: This tool is intended for professional use only. Using it may result
in permanently damaging your device or losing the warranty.

Picked ape-algo from a FIASCO file
Suitable USB interface (bootloader/phonet) not found, waiting...
Found device RM-696, hardware revision 1601
NOLO version 2.3.6
Version of 'sw-release': DFL61_HARMATTAN_40.2012.21-3_PR_001
Sending ape-algo image (7096 kB)...
100% (7096 of 7096 kB, avg. 20275 kB/s)
Suitable USB interface (phonet) not found, waiting...
Ping attempt 1 (250 ms)
Server application: 1.7.2
Found product RM-696 rev. 1601
Server implements softupd protocol version 1.8
Image SW version <none>
Image cert-sw not present
Image cmt-2nd skipped
Image cmt-algo skipped
Image cmt-mcusw skipped
Image xloader skipped
Image secondary skipped
Image moslo skipped
Image rootfs skipped
Image mmc skipped
Image tar skipped
Image config skipped

Battery level 83 %, continuing.

    image        [state    progress        transfer    flash speed]
---------------------------------------------------------------------
[x] kernel      [finished  100 %    2712 /    2712 kB    2105 kB/s]
Updating SW release
Success

Any idea ?


All times are GMT. The time now is 02:43.

vBulletin® Version 3.8.8