Reply
Thread Tools
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#31
FWIW, I am able to use certain commands from the SDK image in Harmattan proper just by pointing to different libs. This is how one can use brctl, lvm, iwconfig, etc. without compiling for Harmattan.

For example, I can use lvm with loopback images to add space to a chroot based on dd image files without having to recreate the image. Very flexible. I'm converting an Ubuntu chroot to an LVM-based one now.

I was also trying hostapd with this method, but there still seems to be issues.

I wrote a script that wraps any command to one in my sdk image. It uses the symlink name to proxy to the real command. Here is the contents of my /root dir:

Code:
 
RM696-21-3_PR_006:~# ls -l
total 40
lrwxrwxrwx    1 root     root             6 Apr 30 07:13 brctl -> sdk.sh
-rwxr-xr-x    1 root     root            61 Apr 18 07:44 brctl.bak
lrwxrwxrwx    1 root     root             6 Apr 30 07:53 hostapd -> sdk.sh
-rwxr-xr-x    1 root     root            63 Apr 19 14:51 hostapd.bak
lrwxrwxrwx    1 root     root             6 Apr 30 07:12 iwconfig -> sdk.sh
-rwxr-xr-x    1 root     root            60 Apr 18 07:32 iwconfig.bak
-rw-r--r--    1 root     root           151 Apr 23 21:10 mount.m5sdk
-rw-r--r--    1 root     root           210 Apr  5 08:09 mount.precise
-rw-r--r--    1 root     root           127 Apr  4 08:02 mount.sdk
lrwxrwxrwx    1 root     root             6 Apr 30 07:05 pvs -> sdk.sh
drwxr-xr-x    3 root     root          4096 Apr 19 08:07 sdk
-rw-r--r--    1 root     root            55 Apr  4 07:58 sdk.conf
-rwxr-xr-x    1 root     root           219 Apr 30 07:11 sdk.sh
drwxr-xr-x    3 root     root          4096 Apr 19 08:04 ssk
Here is the proxy/wrapper script:
Code:
RM696-21-3_PR_006:~# cat sdk. sh
#!/bin/sh

EXEC=$(basename ${0})

#point to SDK from here on out
export PATH=/sdk/usr/local/sbin:/sdk/usr/local/bin:/sdk/usr/sbin:/sdk/sbin:/sdk/bin
export LD_LIBRARY_PATH=/sdk/lib

#/sdk/usr/sbin/brctl "$@"
$EXEC "$@"
And here some examples in action:

Code:
RM696-21-3_PR_006:~# ./brctl show
bridge name     bridge id       STP enabled     interfaces
RM696-21-3_PR_006:~# ./pvs
RM696-21-3_PR_006:~# ./iwconfig
lo        no wireless extensions.

phonet0   no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

gprs0     no wireless extensions.

bnep9     no wireless extensions.

bnep8     no wireless extensions.
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#32
Hm, Am I missing something here. Tried to flash your kernel (full flas) on my N9 (PR1.3)
flasher -F img.bin -F emmc.bin -k zImage_2.6.32.54btlc-dfl61 -f -R
But, phone doesnt fully boot after (stuck at Nokia logo) ?

Last edited by nieldk; 2013-08-17 at 18:10.
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#33
Originally Posted by nieldk View Post
Hm, Am I missing something here. Tried to flash your kernel (full flas) on my N9 (PR1.3)
flasher -F img.bin -F emmc.bin -k zImage_2.6.32.54btlc-dfl61 -f -R
But, phone doesnt fully boot after (stuck at Nokia logo) ?
Maybe because your command to flash the kernel isn't correct?
AFAIK, to flash a kernel it should be:
Code:
flasher -a rootfs.bin -k /path/to/zImage --flash-only=kernel
 

The Following User Says Thank You to thedead1440 For This Useful Post:
Guest | Posts: n/a | Thanked: 0 times | Joined on
#34
Originally Posted by thedead1440 View Post
Maybe because your command to flash the kernel isn't correct?
AFAIK, to flash a kernel it should be:
Code:
flasher -a rootfs.bin -k /path/to/zImage --flash-only=kernel
hmm, the rootfs.bin being ?
Or, if I copy the modules to the phone /lib/modules.... and do the depmod -a (after flashing complete with openmode) and then flash this kernel
flasher -F org-img.bin -k zImage --flash-only=kernel -f -R
Would that do the trick ?
I know, its a noo question, but, I reeeaaaaallyy want this NAT enabled kernel
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#35
If you don't copy the modules first and do depmod before you flash you will likely get the boot issue described. It happened to me when I first started, which is how I discovered that.
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#36
The kernel should work as it is what I've been using for months now.

Here is my /lib/modules and kernel version.

Code:
RM696-21-3_PR_006:~# ls /lib/modules/
2.6.32.48c-dfl61-20115101  2.6.32.54btlc-dfl61
2.6.32.54-dfl61-20121301   current
RM696-21-3_PR_006:~# uname -r
2.6.32.54btlc-dfl61
With the modules in /lib/modules/2.6.32.54btlc-dfl61 do:

Code:
 depmod -a 2.6.32.54btlc-dfl61

Last edited by jackburton; 2013-08-17 at 19:58.
 

The Following User Says Thank You to jackburton For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#37
i just unpacked modules to phone and then flashed kernel. and it just working. no additional actions
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#38
Originally Posted by coderus View Post
i just unpacked modules to phone and then flashed kernel. and it just working. no additional actions
Cool, good to know. Thanks.

I bet you don't have to do depmod because I had already done it before creating the modules archive and subsequently updloaded the tarball.

If you compile your own modules, you'll definitely have to do a depmod before rebooting.

Last edited by jackburton; 2013-08-19 at 00:02.
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#39
Shouldn't you point the current symlink also to the correct directory?
At least in fremantle it was definitely needed.
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#40
Originally Posted by peterleinchen View Post
Shouldn't you point the current symlink also to the correct directory?
At least in fremantle it was definitely needed.
Certainly won't hurt. I'm not sure what processes actually read that symlink vs doing the equivalent of evaluating 'uname -r' at runtime.

Anybody know?
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:54.