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).
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.
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]
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]
rootfs / rootfs rw 0 0
/dev/mmcblk0p1 / ext2 rw,nogrpid 0 0
/dev/mtdblock2 / jffs2 ro,noatime 0 0
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
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]
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
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.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.)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102167\"][{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.
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]
I'm glad to see that you finally manage to compile hostap. well done!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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=101328\"][{POST_SNAPBACK}][/a][/div]