Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - agraef

Pages: [1] 2 3 4
1
Angstrom & OpenZaurus / Dropbear Keeps Regenerating Machine Key
« on: December 29, 2006, 09:36:52 am »
Ok, I've reported this issue in the OE bugtracker (#1723).

2
Angstrom & OpenZaurus / Dropbear Keeps Regenerating Machine Key
« on: December 29, 2006, 09:11:38 am »
Quote
But not visited by 95% of the OE developers, so this forum is not a good place for such discussions.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=149446\"][{POST_SNAPBACK}][/a][/div]

I can't verify this number, it might be true. But you post regularly here, Mickey, Hrw, CoreDump, ... I'd say that's already a sizable fraction of the OE/OZ core developers.  

3
Angstrom & OpenZaurus / Dropbear Keeps Regenerating Machine Key
« on: December 29, 2006, 08:31:03 am »
Quote
Why o why is it so hard for people to understand that you should *always* file a bugreport. The bugtracker is the canonical place to report issues and fixes, not some random forum.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=149438\"][{POST_SNAPBACK}][/a][/div]

Why oh why? Maybe I'm just talking to myself here because I'm not sure yet what the bug actually is, so that I can file a decent bug report? So that someone who knows this system better than me (like you for instance) can say "Scratch that, the script is ok, it's a bug in altboot, file a report under that title instead". Also, like it or not, this is not just some random forum here, it gets visited by many Z users and developers alike, so it's a good place for such discussions IMHO.

I know that at times as a developer who has so many things to do, it's not easy to stay calm and well-tempered when users make silly remarks or ask silly questions. But remember that some of us "lusers" may also be experienced developers, albeit in other areas of expertise.

Ok, with that off my chest, I'll file a bug report now.   If anyone else has an idea whether this is really an issue with init.d/dropbear or whether there's actually a problem with altboot, please let me know.

Cheers,
Albert

4
Angstrom & OpenZaurus / Dropbear Keeps Regenerating Machine Key
« on: December 29, 2006, 07:32:31 am »
Ok, I figured this one out. In fact the rootfs *is* mounted rw when the dropbear init script runs, but I found that after booting from SD with altboot, / is actually mounted *thrice*. Here are the relevant lines from the output of "cat /proc/mounts":

Code: [Select]
rootfs / rootfs rw 0 0
/dev/mmcblk0p1 / ext2 rw,nogrpid 0 0
/dev/mtdblock2 / jffs2 ro,noatime 0 0

Is that normal?? Anyway, if you take a look at the awk command which parses that output in the init.d/dropbear script:

Code: [Select]
awk '{ if ($2 == "/") { split($4,FLAGS,",") } }; END { for (f in FLAGS) print FLAGS[f] }'
you'll notice that it collects the options from the *last* "/" mount it finds, which is wrong. The solution is to munge the awk command so that it picks up the *first* mount instead:

Code: [Select]
awk '{ if ($2 == "/") { split($4,FLAGS,","); for (f in FLAGS) print FLAGS[f]; nextfile } }'
Works now.  Patch to the init.d/dropbear script attached. Let me know whether it's useful to file a bug report on that; I'm still not sure whether it's not actually an altboot bug that "/" appears thrice in the mount table.

EDIT: Hmm, attachments still don't work? So here's the patch as a code section:

Code: [Select]
--- dropbear.orig    2006-12-28 13:10:55.000000000 +0000
+++ dropbear    2006-12-29 12:11:33.000000000 +0000
@@ -20,7 +20,7 @@
 test ! -h /var/service/dropbear || exit 0
 
 readonly_rootfs=0
-for flag in `awk '{ if ($2 == "/") { split($4,FLAGS,",") } }; END { for (f in FLAGS) print FLAGS[f] }' +for flag in `awk '{ if ($2 == "/") { split($4,FLAGS,","); for (f in FLAGS) print FLAGS[f]; nextfile } }'    case $flag in
    ro)
      readonly_rootfs=1

5
Angstrom & OpenZaurus / Dropbear Keeps Regenerating Machine Key
« on: December 28, 2006, 09:44:10 pm »
Quote
if [ $readonly_rootfs = "1" ]

seems to be the offender, check it. the problem may not be that your root FS is RO when you can open a terminal but that it might be RO during boot, which most linux distros do [div align=\"right\"][a href=\"index.php?act=findpost&pid=149399\"][{POST_SNAPBACK}][/a][/div]

Yes, that's my analysis as well. But, as this problem only surfaces when booting from SD (rather than flash) there must be some difference in the boot sequence when altboot boots from SD. Maybe that is the real issue?

Of course I could just get rid of the $readonly_rootfs test (that's essentially what I do if I comment out the code which checks for the rootfs, a few lines above), but that's not a foolproof solution. If the rootfs is mounted read-only and no keyfile exists yet (maybe first boot after a fresh installation), there is no other option than to write the newly created keyfile into ram. The situation where the current script goes wrong is when the rootfs is r/o (during boot), but a keyfile already exists in /etc/dropbear. Then that file should be used, but the current script errorneously chooses to create a new keyfile under /var/lib. You can clearly see that in the few lines of the script I quoted above.

Oh well, I guess I'll just post a fixed script here tomorrow and leave it up to the OE guys to decide what to do about this...  

6
Angstrom & OpenZaurus / Altboot Opie Hangs On Bootsplash
« on: December 28, 2006, 09:22:59 am »
I also have this, running OZ 3.5.4.1 on a C-1000. There are at least two corresponding bug entries, #1197 and #1285. Has anyone looked into this and maybe found a fix or workaround?

7
Angstrom & OpenZaurus / Dropbear Keeps Regenerating Machine Key
« on: December 28, 2006, 09:18:39 am »
First, kudos to the OZ team for this release, it really works great for me except for the "altboot hangs on boot from loopfile" bug and the following minor issue.

I have Oz 3.5.4.1 on a C-1000 installed, altbooted from an SD card (direct install). Network via WLAN works great, but I have troubles with dropbear which regenerates the machine rsa key on every reboot. Of course that means that on my desktop I have to remove the key from .ssh/known_hosts every time I have to reboot the Z. This happens with both Opie and GPE. I don't have this problem with OZ installed in the flash, though.

I took a look at /etc/init.d/dropbear and noticed that on SD I have a dropbear_rsa_host_key file in *both* /etc/dropbear and /var/lib/dropbear. The relevant lines in /etc/init.d/dropbear are:

Code: [Select]
readonly_rootfs=0
for flag in `awk '{ if ($2 == "/") { split($4,FLAGS,",") } }; END { for (f in FLAGS) print FLAGS[f] }'   case $flag in
   ro)
     readonly_rootfs=1
    ;;
  esac
done

if [ $readonly_rootfs = "1" ]; then
  mkdir -p /var/lib/dropbear
  DROPBEAR_RSAKEY_DEFAULT="/var/lib/dropbear/dropbear_rsa_host_key"
  DROPBEAR_DSSKEY_DEFAULT="/var/lib/dropbear/dropbear_dss_host_key"
else
  DROPBEAR_RSAKEY_DEFAULT="/etc/dropbear/dropbear_rsa_host_key"
  DROPBEAR_DSSKEY_DEFAULT="/etc/dropbear/dropbear_dss_host_key"
fi

So it seems that when booting from SD the startup script is invoked while the rootfs is still mounted readonly, in which case the script generates a new key in /var/lib/dropbear even though there is already one in /etc/dropbear.

Just commenting out the lines which check the rootfs (so that readonly_rootfs is always 0) works around this, but of course this will only work if you're sure that there's already a keyfile. It seems that to really solve that issue the logic in the script which tests for an existing keyfile needs an overhaul, but before I do that I wanted to ask whether anyone else has already noticed this and maybe found a proper fix. (I couldn't find anything in OE bugzilla, so I can also submit a bug report if necessary.)

8
Angstrom & OpenZaurus / 3.5.4.x Upgrades
« on: December 26, 2006, 10:46:39 am »
opie-tabmanager? I always found that a pretty convenient utility.

Albert

9
Angstrom & OpenZaurus / Q 7.6 Available For Oz 3.5.4
« on: December 24, 2006, 07:51:20 pm »
Q 7.6 has been released a few days ago, and I have set up an OZ feed here.

Q is an interpreted functional programming language with "batteries included". This release includes the POSIX system interface and the curl, gdbm, octave, sqlite3 and xml modules, as well as Q Yacc and Lex and Rob Hubbard's rational and polynomial libraries. On the Z Q is useful as a sophisticated kind of programmable desktop calculator and for scripting purposes. Please note that at this time Q's fancier extensions such as OpenGL graphics and the multimedia+computer music  library are not available on OZ, but an SDL interface will probably be provided in the future.

See the README file for information on how to get started with Q on OZ. More information about Q is available at q-lang.sf.net.

The packages in the feed should work with both Opie and GPE, but currently are for the armv5tel architecture (Zaurus clamshell models) only. If there's demand for older Zaurii (Collie etc.) then please let me know.

Have nice holidays and a happy new year,
Albert

10
Zaurus - pdaXrom / Q 6.2 For Pdaxrom
« on: November 13, 2005, 01:17:00 pm »
Release 1.0 of the Q-SQLite module is now available, and I've uploaded a corresponding pdaXrom package to the feed.

11
Zaurus - pdaXrom / Rc12 On Sl-c3000! :)
« on: November 04, 2005, 05:35:38 am »
Quote
I haven't gotten hostap to work yet. I'm getting unresolved symbol errors. (iw_handler_set_thrspy, iw_handler_get_thrspy, wireless_spy_update, iw_handler_get_spy, iw_handler_set_spy) Anybody with ideas how to get hostap to work? The wireless network going down anytime I try to do anything significant is really annoying.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102167\"][{POST_SNAPBACK}][/a][/div]
The hostap binaries from that thread have been built for the RC12 C1000/C3100 kernel. If you're running a different kernel, you'll have to rebuild hostap-drivers against the sources of that kernel. (Even if it's also a 2.4.20 kernel, the config is probably different.)

12
Zaurus - pdaXrom / Hostap For Rc12 Anyone?
« on: November 03, 2005, 10:41:02 am »
Laze, that's good news, would really be nice if the newer wlan cards would work out of the box on pdaXrom.

gryning, it would still be nice if you could describe the steps needed to make the firmware loader work. I might give it a try myself (still have a Sandisk Connect Plus lying around here), and this information would probably be useful for the pdaXrom developers, too.

13
Zaurus - pdaXrom / Hostap For Rc12 Anyone?
« on: October 31, 2005, 11:23:04 am »
Quote
...
hostap_cs: first command failed - assuming card does not have primary firmware

hostap_cs: assuming no Primary image in flash - card initialization not completed
...
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
Well, obviously the card is recognized, that's good. However, it looks like this card needs a firmware, so you probably have to install hostap-utils in addition to the driver (my tarball only contains the driver itself, as this is all I needed). The hostap-utils should be straightforward to build with the native or cross devkit, I think you don't need the kernel sources for that. You also need to figure out which firmware you need, and maybe you want to write a little hotplug script to automate the firmware loading process. See this thread: "[a href=\"https://www.oesf.org/forums/index.php?showtopic=12567]Sandisk Connect Plus Wi-fi + 128mb[/url]" for more information (that thread is about the SanDisk Connect plus, so you'll have to adapt this for your card, of course). Taking a look at the hostap* and prism* packages from OpenZaurus might also help to figure out how to get the card to work. It seems that OZ has much better out-of-the-box support for different wlan cards right now.

If that sounds like too much work, then it's probably easiest to buy another card which has the firmware on board.

HTH,
Albert

14
Zaurus - pdaXrom / Hostap For Rc12 Anyone?
« on: October 30, 2005, 04:27:32 am »
Quote
I'm glad to see that you finally manage to compile hostap. well done!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=101328\"][{POST_SNAPBACK}][/a][/div]
Thanks. I think I'm starting to get the hang of it ... The latest builder really works very well. My earlier compile probs stemmed from not being able to build the right 2.95 toolchain with the builder from the RC12-test release. This has all been resolved with the final RC12.

15
Zaurus - pdaXrom / Pdaxrom Rc12 For Sl-c7x0/7500/c860/c1000/c3100
« on: October 29, 2005, 09:04:11 pm »
Just upgraded from the RC12-test release. Works great over here (Akita, Toshiba 1GB CF and 512 MB SD for storage, D-Link DCF-660W for wlan). Being able to play back videos from an NFS-mounted partition with mplayer in fullscreen still amazes me.  Native and cross devkit is also very nice and complete. And KaPI/KoPI makes for a great PIM.

Thanks a lot for this great release! Your "ROM" really turns this device into something useful. A geek's dream come true.

Cheers,
Albert

Pages: [1] 2 3 4