**** BEGIN LOGGING AT Wed Jan 27 02:59:57 2010 Jan 27 03:01:45 cshore: pong Jan 27 03:02:59 nbd: You know how the hostapd (package Makefile; for all it's 'friends') works? Jan 27 03:03:34 nbd: it seems that when using OpenSSL as the TLS provider the compilation fails for wpa_supplicant and wpad-mini Jan 27 03:04:06 nbd: by the way it sounds like the latest patch fixes the brcm-2.4 Jan 27 03:04:11 and 47xx Jan 27 03:10:55 cshore: oh, seems i forgot to test the openssl tls provider. will look into that tomorrow Jan 27 03:13:24 what do you need openssl for? Jan 27 03:13:24 nbd: thnx Jan 27 03:14:24 nbd: well we use packages that require openssl (I forget which ones), so we set all the ssl providers to openssl to save space, rather than have multiple ssl builds Jan 27 03:14:54 i don't think it'll save much space Jan 27 03:14:59 the internal stuff is very small Jan 27 03:15:20 especially for the -mini version Jan 27 03:16:21 nbd: how many k? Jan 27 03:17:04 not sure Jan 27 03:18:23 nbd: we're using the internal for now because of the openssl problems Jan 27 03:18:55 nbd: I'll check the build size and see if it's noticeable Jan 27 03:25:14 i just took a look at the src/crypto/ object files Jan 27 03:25:18 added together they're 77k Jan 27 03:25:40 but that's probably including a lot of overhead that you get from the elf headers and stuff Jan 27 03:25:57 so the space wasted is much less than the space gained by using wpad instead of hostapd+wpa_supplicant ;) Jan 27 03:26:08 nbd: heh Jan 27 03:26:26 So if you compile wpad do you not need wpa_supplicant? Jan 27 03:26:38 it's a multicall binary of hostapd and wpa_supplicant Jan 27 03:26:52 contains full functionality of both Jan 27 03:26:59 and the command line is compatible Jan 27 03:27:10 ok, so one now *only* selects wpad (or wpad-mini)? Jan 27 03:27:21 yes Jan 27 03:27:26 nbd: cool Jan 27 03:33:17 will insmod usb-storage automatically load usbcore? Jan 27 03:33:35 no Jan 27 03:33:38 or usb-ohci ? Jan 27 03:33:45 no dependency tracking in modules Jan 27 03:33:47 that is usb-ohci load usbcore Jan 27 03:33:51 nbd: ah, ok Jan 27 03:34:02 nbd: that's what I needed to know Jan 27 03:34:26 nbd: I'm working on a package for root on usb, now Jan 27 03:35:04 great Jan 27 03:35:15 many people have been waiting for that to be properly supported Jan 27 03:35:44 there were some hacks in the forum/wiki, but iirc none of those were particularly good Jan 27 03:36:36 btw. it would be really useful to have the rootfs configuration configurable in the flash rootfs Jan 27 03:36:52 i.e. have the script mount the jffs2 part once without mini_fo, look for the next filesystem on there Jan 27 03:36:59 and then umount it and proceed Jan 27 03:37:27 nbd: yes, I'm planning on using the jffs2 to store the UUID Jan 27 03:37:33 nbd: as well as for fallback Jan 27 03:37:38 great Jan 27 03:38:04 nbd: there's a lot of pieces to get it right Jan 27 03:39:01 nbd: especially now with hotplug...but I wanted to change 10-mount anyway, so this is as good a reason as any Jan 27 03:40:06 nbd: because for one thing we don't want it to mount on firstboot until we've formatted and copied the squashfs (or /dev/root for ext2 or all_jffs2) Jan 27 03:41:32 yeah, imho the user should run the formatting and partitioning himself Jan 27 03:41:46 with some scripts that make thins process simple without risk of overwriting existing data Jan 27 03:41:49 nbd: I think the system should reboot after firstboot though...I'm not sure we can have it in a suitably consistent state without doing so, unless we forgo the jffs being formatted in firstboot Jan 27 03:42:39 the script that enables the use of external rootfs can check whether the jffs2 initialization has finished Jan 27 03:42:44 after the configuration Jan 27 03:42:56 and when the setup is done, it tells the user to reboot the system Jan 27 03:43:07 because mini_fo unmounting does not work cleanly iirc Jan 27 03:43:12 nbd: hmmm Jan 27 03:43:16 nbd: ah, right Jan 27 03:43:49 nbd: I'm trying to figure out also an automated system for our service provider deployments Jan 27 03:43:57 nbd: but that's a special case Jan 27 03:44:14 nbd: I might make it part of the failsafe/provisioning Jan 27 03:44:14 yeah, the user interaction could be circumvented by setting defaults in openwrt menuconfig Jan 27 03:44:21 nbd: yes Jan 27 03:44:54 nbd: but not enabled by default Jan 27 03:45:05 nbd: so that the user only gets it if they know what they're doing Jan 27 03:45:15 right Jan 27 03:46:33 nbd: okay, time to rewrite my pseudocode a bit then Jan 27 03:58:25 build #19 of ar7-trunk is complete: Failure [failed compile_6 compile_15] Build details are at http://tksite.gotdns.org:8010/builders/ar7-trunk/builds/19 Jan 27 03:59:09 build #31 of brcm63xx-trunk is complete: Failure [failed svn] Build details are at http://tksite.gotdns.org:8010/builders/brcm63xx-trunk/builds/31 Jan 27 03:59:38 nbd: this actually makes my life easier Jan 27 04:00:48 nevermind the builder I am reconfiguring the buildbotr Jan 27 04:06:47 nbd: I suppose for the config file I should actually parse it rather than just eval'ing each line Jan 27 04:06:56 nbd: since it's user writable Jan 27 04:07:56 nbd: guess I need uci...but I have to use the alternate directory thingy Jan 27 04:08:12 nbd: since jffs will still be on /jffs Jan 27 04:08:41 nbd: shouldn't distclean have output with V=99? Jan 27 04:09:00 cshore: uci supports using an alternate config directory Jan 27 04:09:19 thepeople: i don't think it produces much output Jan 27 04:09:33 nbd: yes, but I have to modify the /lib/whatever uci.sh to use it Jan 27 04:09:45 nbd: it doesn't produce any output Jan 27 04:10:27 nbd: causes issues with the buildbot as it will timeout the command if it lasts more than 1200 seconds without output Jan 27 04:10:46 cshore: you could add an optional variable for specifying the config directory Jan 27 04:10:52 cshore: which gets used in config_load() Jan 27 04:11:05 nbd: that's my plan Jan 27 04:11:08 nbd: which is good to have incase something gets stuck (happens to the perl compile from time to time) Jan 27 04:11:34 thepeople: i'll try to find the time to look into it tomorrow Jan 27 04:12:20 nbd: thanks Jan 27 04:21:36 i've tried building the b43 driver in trunk (revision 19331) and i'm getting a whole bunch of unresolved symbols when i try to load the driver on the device (routerstation pro) am I doing something simple wrong here or is the B43 driver not working (i get the same problem with b43legacy) Jan 27 04:21:59 (ath9k is working) Jan 27 04:27:08 nbd how does http://openwrt.pastebin.com/d60ccbc4f look to you? Jan 27 04:29:53 cshore: looks wrong Jan 27 04:30:02 nbd: doh Jan 27 04:30:36 replace /etc/config with $UCI_CONFIG_DIR ;) Jan 27 04:31:11 right...I hate :+ I always get confused Jan 27 04:34:19 http://openwrt.pastebin.com/d214e7cc1 better? Jan 27 04:34:57 yup Jan 27 04:34:59 did you test it? Jan 27 04:35:19 not yet...getting a first blush look at it first... Jan 27 04:42:49 I tested both with and without a config dir using: Jan 27 04:42:52 http://openwrt.pastebin.com/d7f73590b Jan 27 04:43:27 I just edit the file for the non config dir test) Jan 27 04:44:01 do you want me to test all functions? Jan 27 04:49:56 i think the patch is fine Jan 27 04:50:45 nbd: will you commit it, or should I post it to -devel? Jan 27 04:50:56 i'll commit it Jan 27 04:51:03 :-D Jan 27 04:51:39 now I don't have to invent a parser Jan 27 04:51:44 can you try openwrt.pastebin.ca instead of openwrt.pastebin.com? Jan 27 04:51:58 sure: is there a reason? Jan 27 04:51:58 it seems like pastebin corrupted the patch Jan 27 04:52:00 ;) Jan 27 04:54:06 http://openwrt.pastebin.ca/1767620 Jan 27 04:57:17 my poor innocent patch...corrupted by the evil bin of paste Jan 27 04:57:57 I always new Canadians did it better :-P Jan 27 04:58:11 but can't spell, eh? Jan 27 04:59:17 nbd * r19351 /trunk/package/uci/files/lib/config/uci.sh: uci: allow shell scripts to override the config dir (patch by cshore) Jan 27 05:19:43 thnx nbd Jan 27 05:28:53 ping rtz Jan 27 06:24:51 anyone around to close some tickets? Jan 27 06:31:34 swalker: well if you have any to ask me about I can tell you, but I don't have Trac access to actually close any Jan 27 06:33:52 looks like https://dev.openwrt.org/ticket/3775 is the ticket puchu was wanting Jan 27 06:34:26 probably won't be any to ask about unless they patches Jan 27 06:35:06 swalker: I think most of mine have actually been fixed Jan 27 06:35:16 I'd really like a bugzilla system for that type of searching Jan 27 06:35:50 swalker: yeah....I guess the advantage of Trac is that it's lightweight and integrated with source browsing Jan 27 06:36:43 swalker: and I have to admit trac is easier to submit bugs with Jan 27 06:56:06 is wrt600n support still a wip? looks like some netconfig vlan changes are still needed, see https://dev.openwrt.org/ticket/4168 Jan 27 07:20:15 cshore: you still have a few mount tickets around, #5057 being a dupe of #5478 Jan 27 07:20:35 swalker: yes, I'm working on those Jan 27 07:21:53 yeah, I'd like to see the seemingly boatload of tickets closed when that gets fixed Jan 27 07:22:29 swalker: have others been posting tickets? Jan 27 07:23:59 #6540 is fixed btw Jan 27 07:25:44 at least #2752 Jan 27 07:29:44 hmm....well I'm working on root on usb right now Jan 27 07:29:55 which will involve changes to 10-mount as well Jan 27 07:29:58 (hotplug) Jan 27 07:30:48 #5719 is fixed, #5350 needs to be duped to #5779, #6436 was fixed with r19302, #5697 is a dupe of #3531 which was fixed in r17478, #3432 & #3702 should be invalid after r14289 Jan 27 07:32:37 #3554 is another external root ticket Jan 27 07:33:04 swalker: hmmm....one thing that's a problem is if the device gets pulled while it's root...that's bad Jan 27 07:34:59 swalker: but AFAIK not one that I'll worry about because it's pretty much insoluble Jan 27 07:36:22 I mean intractable Jan 27 07:42:04 swalker: you're right there are a boatload Jan 27 07:43:41 what types of USB host controller are there (and what modules do they use?) I know ohci and uhci Jan 27 07:44:30 also, what external fs's are supported that are suitable for root (e.g. not vfat) Jan 27 07:44:54 ext2/3/4, reiserfs? Jan 27 07:47:57 xfs, btrfs? Jan 27 07:48:18 hmmm...ok Jan 27 07:49:46 possibly needing the patch in #6215 for ext4 Jan 27 07:56:54 what are some non-usb sorage controllers (e.g. the IDE ones)? Jan 27 08:21:59 for config (menuconfig) files is there a way to specify optional additional config options? Jan 27 08:22:08 e.g. to load additional modules Jan 27 08:22:21 or do I have to have a slot for it, always Jan 27 08:22:44 (well if a [*] Additional modules is selected) Jan 27 10:46:37 http://www.compex.com.sg/fullDescription.aspx?pID=1 Jan 27 11:19:04 where is the right place to do a brctl? Jan 27 11:22:27 can someone please explain to me how the configuration of network interfaces is supposed to work in openwrt? Jan 27 11:22:39 i find examples with brctl and ifconfig directly in preinit! Jan 27 11:24:15 than i don't understand what is the purpose of etc config network Jan 27 11:32:27 <[Fate]> /etc/config/network is where you should do the configuration Jan 27 11:32:39 <[Fate]> it's largely hardware-independent Jan 27 11:39:07 so no parameters in the kernel? Jan 27 11:40:01 <[Fate]> does configuring as described in http://kamikaze.openwrt.org/docs/openwrt.html not work for you? Jan 27 11:40:50 i have to recheck Jan 27 11:40:57 thx for the link anyway Jan 27 11:41:32 i have an evaluation board with some things in preinit and some others in other etc network Jan 27 11:44:46 Lllaso: preinit's just changed, so whatever was in preinit would have to be updated for it anyway, so now is a good time to switch to a proper /etc/config/network setup Jan 27 11:45:11 Lllaso=Lalloso Jan 27 12:02:26 mmm okay Jan 27 12:02:32 but even before mounting root fs Jan 27 12:02:36 i get a kernel message Jan 27 12:02:51 IP-Config: device 'eth0' not found Jan 27 12:02:59 could this be due to kernel command line? Jan 27 12:04:18 <[Fate]> first thing I'd think would be: missing driver Jan 27 12:04:38 Lalloso: what platform? Jan 27 12:04:47 Lalloso: fresh build? Jan 27 13:12:46 it's my evaluation board cshore Jan 27 13:12:55 and it's unfortunately not a fresh build Jan 27 13:13:11 is it probably something wrong in the kernel command line passed by uboot Jan 27 13:14:09 Lalloso: I would do a fresh build for starters Jan 27 13:14:42 I would like to Jan 27 13:14:52 but I think I have some custom things here and there Jan 27 13:15:05 I should do a check out of openwrt svn Jan 27 13:15:13 and svn diff it against my current tree Jan 27 13:15:35 I've heard you have been very busy these days adjusting the openwrt boot sequence Jan 27 13:15:54 did it have something wrong? Jan 27 13:25:33 swalker * r19352 /packages/net/transmission/Makefile: [packages] transmission: update to 1.82 (#6555) Jan 27 13:28:56 swalker * r19353 /packages/utils/pciutils/Makefile: [packages] pciutils: update to 3.1.6 Jan 27 13:30:41 Lalloso: it was to add the ability to do drop in packages that alter the behaviour of the boot sequence, without the need for always rewriting the preinit and the problems that creates in terms of having to maintain a separate tree, and the difficulty in getting changes merged Jan 27 13:31:32 i see Jan 27 13:32:06 but which is the software entity that should bring up the network interfaces? Jan 27 13:32:25 and which is the software entity that should read /etc/config/network ? Jan 27 13:32:40 Lalloso: actually that normally happens in /etc/init.d/network Jan 27 13:32:51 Lalloso: nothing to do with preinit Jan 27 13:33:11 Lalloso: but your custom stuff may be different, so I can't help you much Jan 27 13:33:19 but that /etc/init.d/network is also involved with br0 or just with eth0 ? Jan 27 13:33:28 Lalloso: all Jan 27 13:33:48 Lalloso: also /lib/network/* Jan 27 13:34:03 well theres one point in the init where the network is touched, to setup the network failsafe ip Jan 27 13:34:13 right Jan 27 13:34:35 it's strange Jan 27 13:34:48 because if i issue /etc/init.d/network start Jan 27 13:34:50 it seems to work Jan 27 13:34:57 but it does not start automatically at boot Jan 27 13:35:05 even if I have /etc/init.d/network enabled Jan 27 13:35:16 jow_laptop: but on brcm63xx there is no iface defined for preinit Jan 27 13:35:24 jow_laptop: that setup has nothing to do with what will happen thereafter Jan 27 13:35:37 Lalloso: does hotplug see your interface Jan 27 13:35:43 Lallso: I forgot about hat Jan 27 13:35:48 ping nbd Jan 27 13:36:09 Lalloso: interfaces are now hotplugged rather than brought up by /etc/init.d/network Jan 27 13:36:20 Lalloso: I keep forgetting that Jan 27 13:36:27 nbd your idea with the openssl dynamic flag is ready ... but u forgot the mention that a Config.in is needed for this .... Jan 27 13:36:28 mmm this add complexity Jan 27 13:37:04 Lallso: when are the iface modules insmod'ed? Jan 27 13:37:24 I think they are not modules but they are in the kernel Jan 27 13:37:27 is that possible? Jan 27 13:38:13 Lalloso: yes...actually, I lied they're generally not modules Jan 27 13:39:02 Lallso: but they should be coldplugged when hotplug is started up Jan 27 13:39:39 how this hotplugging system is supposed to work? Jan 27 13:40:05 Lalloso: when first started events are created for devices already known to the kernel Jan 27 13:40:14 I guess I could remove any brctl command and ifconfig command from preinit Jan 27 13:40:23 Lalloso: then as devices are added addtional events are added Jan 27 13:40:36 put everything in /etc/config/network and keep init.d/network enabled Jan 27 13:40:55 so hotplug is a service in /etc/init.d ? Jan 27 13:41:09 Lalloso: no, it's started in preinit Jan 27 13:41:54 and it has some configuration or? Jan 27 13:42:23 Lalloso: so come to think of it, it could be executing during preinit Jan 27 13:42:52 Lalloso: I'm not sure how it works for dealing with the devices added before jffs is mounted Jan 27 13:43:06 eh this is very interesting indeed Jan 27 13:43:09 without jffs Jan 27 13:43:18 there is no /etc/config/network to read :-) Jan 27 13:43:34 Lalloso: well really the default one in squashfs Jan 27 13:44:10 Lalloso: so in short: jow_laptop, do you know? Jan 27 13:44:41 I have no squashfs on my board it's just jffs2 but i understand your point Jan 27 13:44:46 you are talking about the mini_fo Jan 27 13:44:57 Lalloso: yes Jan 27 13:45:10 preinit could read the squashfs version of /etc/config/network waiting for the modified version in jffs2 to become available Jan 27 13:45:32 Lallso: I don't think that's how it works...I'm a little confused now, myself Jan 27 13:46:01 Check /etc/init.d/boot Jan 27 13:46:12 maybe it does some initialization there Jan 27 13:47:42 Lalloso: because it works correctly here, so I assume I'm missing something Jan 27 13:50:11 but how the coupling of physical ports with labels as eth0 is achieved? Jan 27 13:59:19 Lalloso: I believe the kernel does that Jan 27 14:00:25 preinit_ip Initialize network interface (if one has been defined for as available for preinit) Jan 27 14:00:38 from http://cshore.is-a-geek.com/openwrt/preinit_mount.html#preinitoverview Jan 27 14:00:57 Lalloso: doesn't apply to your build Jan 27 14:01:44 http://cshore.is-a-geek.com/openwrt/preinit_mount.html#customizing Jan 27 14:02:00 because this is the new way while I have the old way? Jan 27 14:02:10 Lalloso: right Jan 27 14:02:15 isn't this site i'm linking your site actually? :) Jan 27 14:02:24 Lalloso: yep Jan 27 14:02:46 Lalloso: it's the wiki now actually: http://wiki.openwrt.org/doc/techref/preinit_mount Jan 27 14:53:12 but /etc/init.d/network at times complain about something regarding iptables Jan 27 14:53:27 but i don't have any iptables stuff in /etc/config/network Jan 27 14:54:13 Lalloso, when the interfaces are brought up it causes firewall events to occur Jan 27 14:54:37 this things is not linear Jan 27 14:54:52 how can I debug if random things happen at random times? Jan 27 14:55:07 I have eth0 which is phisycally bridged within a switch Jan 27 14:55:36 and eth1 which is standalone Jan 27 15:33:43 swalker * r19354 /packages/utils/usb-modeswitch/Makefile: [packages] usb-modeswitch: update to 1.1.0 (#6576) Jan 27 16:01:09 ping xMff Jan 27 16:01:57 . Jan 27 16:04:02 xMff: if one does has an uci section config 'main' Jan 27 16:04:02 will config_get var main option Jan 27 16:04:02 retrieve the option from config section main, or does the section need a name? Jan 27 16:04:45 it needs a name, else you have to resort to config_foreach Jan 27 16:04:59 ok, thanks Jan 27 16:23:38 is there a reason hotplug is enable before root is mounted and init begins? Jan 27 16:24:01 cshore: yes Jan 27 16:24:12 cshore: mainly for coldplugging Jan 27 16:24:41 rtz: what devices need to be coldplugged for preinit? Jan 27 16:25:02 rtz: that is, why can it be delay until either just before init or after init? Jan 27 16:25:16 can't be delayed Jan 27 16:26:42 cshore: sorry, lost connection Jan 27 16:26:44 cshore: network, reset button (that's actually a hotplug event), console, block devices for the filesystem ... Jan 27 16:26:53 I'm sure I forgot some Jan 27 16:27:29 rtz: basically anything that's in the kernel Jan 27 16:27:34 yes Jan 27 16:27:52 well, maybe not Jan 27 16:28:02 there are some things, that could wait a bit Jan 27 16:28:04 rtz: hmmm....this makes life difficult Jan 27 16:28:16 but everything you need, to mount the root fs and enter failsafe Jan 27 16:28:37 rtz: it means some filesystem my be trying to mount before the rootfs Jan 27 16:28:57 rtz: e.g. on x86 if usb is in the kernel but you want root on external usb Jan 27 16:30:43 rtz: does jffs generate a coldplug event? Jan 27 16:31:14 cshore: nothing you need afaik Jan 27 16:31:25 cshore: but you do need the device node for it Jan 27 16:31:48 cshore: i mean, it doesn't create anything useful, when it's mounted Jan 27 16:32:25 rtz: I just mean, before it's mounted, when hotplug is started, does it generate a block device add event Jan 27 16:33:02 rtz: because if it does mounting could be made an entirely hotplug thing Jan 27 16:33:19 rtz: forget about trying to do it partially in preinit Jan 27 16:33:36 cshore: yes Jan 27 16:34:56 rtz: I think IPC is needed...we need to mount certain fs before others Jan 27 16:34:59 cshore: but it creates only a event for a mtd* device, so you would have to check, if it's the rootfs_data partition Jan 27 16:35:04 but that's not that hard Jan 27 16:35:56 rtz: but if you've got both mtd and usb, order is not guaranteed, right? Jan 27 16:38:40 cshore: i'm not exactly sure, what you meen by order, but the answere is most likely no Jan 27 16:39:00 cshore: 1. there is no ordering between the coldplug events afaik Jan 27 16:39:09 I mean usb could come before mtd or vice versa Jan 27 16:39:25 2. usb doesn't create a mtd node, it creates /dev/sda* Jan 27 16:39:26 yes Jan 27 16:41:11 ok....but I know we have tmpfs before hotplug started, so we can use that for IPC Jan 27 16:44:43 current preinit isn't quite right, especially as is, for the fact we now have hotplug Jan 27 16:48:52 rtz: we need dependencies for dealing with hotplug events, and a way to defer decisions on what to do until preconditions are met Jan 27 16:49:44 cshore: I toyed with the idea to stuff hotplug into my init daemon, but not sure if that's a good idea Jan 27 16:50:35 rtz: I thought that was the point Jan 27 16:51:23 well, it was planned as a service startup daemon Jan 27 16:52:44 rtz: I don't see event-based service start as necessary unless it is so that services start in response to events like device adds, and/or for dealing with the dependencies of the events and services Jan 27 16:55:14 dependencies was planned, device add/remove only as an idea, but I can add it Jan 27 16:56:11 rtz: I think I might work on modifying hotplug.rules Jan 27 17:02:59 rtz: is /dev/shm supposed to be a place for things like IPC sockets? Jan 27 17:04:27 <[Fate]> /dev/shm is for shared memory Jan 27 17:17:36 <[Fate]> mhm i2c-gpio does not depend on i2c-core? Jan 27 17:20:20 if you create /dev/console (mknod) can you access the serial console without hotplug doing coldplug? Jan 27 17:20:59 cshore: yes and no Jan 27 17:21:10 cshore: 1. /dev/console is not what you want Jan 27 17:21:34 cshore: it's something like /dev/ptmx (depending on the hotplug daemon) Jan 27 17:21:45 cshore: 2. creating those should be enough Jan 27 17:23:10 I thought ptmx was the pseudo-terminal, which is used if there is no real terminal available Jan 27 17:24:29 rtz: also, can reset button events be detected without hotplug? Jan 27 17:24:36 cshore: something like this Jan 27 17:25:07 cshore: /dev/console is the currently used console, I think Jan 27 17:25:41 cshore: I'm not completly sure about this, I only guess this from the lines with M0 and M1 in the original preinit Jan 27 17:26:12 cshore: as to button events, not easiely Jan 27 17:26:59 cshore: buttons are basically handled as a standard input device like mice or the keyboard Jan 27 17:27:02 cshore: okay, then I know...those are pseudo-terminal and are used for stdin/stdout if there is no serial terminal, because ash doesn't like not having stdio Jan 27 17:27:23 cshore: a button creates a specially keypress event Jan 27 17:27:47 cshore: and you can't access the input devices from the shell afaik Jan 27 17:28:10 cshore: nope Jan 27 17:28:22 cshore: they are used, if the IS a serial terminal Jan 27 17:28:49 cshore: otherwise, /dev/console is used for stdio (not sure what effect this has) Jan 27 17:29:37 or waint Jan 27 17:29:37 rtz2: I'm trying figure the minimal environment that would allow failsafe (including entry via reset button), preferably without hotplug Jan 27 17:29:40 wait Jan 27 17:29:46 maybe I'm wrong Jan 27 17:30:58 cshore: sorry, you were right, I messed it up Jan 27 17:31:17 cshore: /dev/ptmx is only used, if there is no console available Jan 27 17:31:26 rtz2: it's okay...we all have those times Jan 27 17:32:39 rtz2: the reset button is a module, right? Jan 27 17:33:41 cshore: usually Jan 27 17:34:24 cshore: by default you need, input-core, input-polldev, gpio_buttons and button-hotplug Jan 27 17:34:50 cshore: maybe with some other - and _ Jan 27 17:35:03 and it's button-hotplug that generates SIGUSR1? Jan 27 17:35:11 cshore: nope Jan 27 17:35:18 it creates a hotplug event Jan 27 17:35:38 cshore: take a look at /etc/hotplug2-init.rules Jan 27 17:35:58 why does preint trap SIGUSR1 for reset button events? Jan 27 17:36:31 cshore: there is a rule hotplug2-init.rules for buttons: exec kill -USR1 1 Jan 27 17:36:42 rtz2: ah, ok Jan 27 17:36:50 cshore: 2 other things Jan 27 17:37:30 cshore: 1. I don't see a very good reason, why it shouldn't be possible to link the button stuff directly into the kernel, if this helps you Jan 27 17:37:49 cshore: 2. some platfroms my be able to generate irqs for gpio lines Jan 27 17:38:01 those may need a different set of modules Jan 27 17:38:17 rtz2: I actually don't care about irqs, only about being able to access button state Jan 27 17:39:11 cshore: I tried to do the same thing, but I didn't find an easy solution, so i shelfed it Jan 27 17:39:28 rtz2: being able to access a gpio and check if it's pressed or not would be enough Jan 27 17:41:34 cshore: that's easy Jan 27 17:41:50 echo 1 > /sys/class/gpio/export Jan 27 17:42:05 wait Jan 27 17:42:12 echo > /sys/class/gpio/export Jan 27 17:42:40 echo in > /sys/class/gpio/gpio/direction Jan 27 17:42:52 cat /sys/class/gpio/gpio/value Jan 27 17:43:07 cshore: maybe some lightly different paths Jan 27 17:43:12 s Jan 27 17:43:38 cshore: but you have to be careful Jan 27 17:44:14 cshore: if the gpio is already used somewhere in the kernel (say, the gpio_buttons driver), you won't be able to export it Jan 27 17:44:45 what does the gpio_buttons driver do? Jan 27 17:45:34 cshore: provide an input device mapping to gpio lines Jan 27 17:46:07 cshore: you tell him gpio #3 is connected to a button and it does the rest Jan 27 17:46:23 rtz2: the rest as in? Jan 27 17:48:10 cshore: create a polling input device and set it up to poll the requested gpio lines Jan 27 17:48:30 and create the keypress events, in case the button is pressed Jan 27 17:48:58 rtz2: which you can't access without hotplug? Jan 27 17:49:27 rtz2: could you write C program to catch the events? Jan 27 17:49:41 cshore: actually, you normally can't access them with hotplug Jan 27 17:49:56 cshore: that's what the buttons_hotplug driver is for Jan 27 17:50:15 cshore: maybe Jan 27 17:50:37 cshore: I will take a look at it and come back to you later this evening Jan 27 17:50:46 rtz2: thanks! Jan 27 17:50:52 one more question Jan 27 17:51:14 cshore: by the way, you remember your idea with different press patterns leading to different failsafe behavior? Jan 27 17:51:17 can you access ethernet devices without hotplug/coldplug? Jan 27 17:51:21 rtz2: yes? Jan 27 17:51:34 cshore: you are in for a world of hurt Jan 27 17:51:46 rtz2: debounce problems? Jan 27 17:52:20 cshore: actually, no, you shouldn't have those with polled devices Jan 27 17:53:04 cshore: but matching a given pattern to a list of expected patterns won't be easy Jan 27 17:53:28 cshore: not unsolveable, but it will require some toughts and research Jan 27 17:53:43 rtz2: okay Jan 27 17:54:03 cshore: as to ethernet devices, try to delete the dev node and check if ifconfig still works Jan 27 17:54:44 cshore: if not, you manually creating /dev/eth0 will probably be enough Jan 27 17:54:45 rtz2: what device node?....I didn't think ethers had a /dev Jan 27 17:54:56 they aren't? Jan 27 17:54:59 hmm Jan 27 17:55:20 they were some time ago, but not sure how it is now Jan 27 17:55:35 I just checked...no /dev Jan 27 17:55:44 well, it should work then Jan 27 17:56:05 ok, I think I'm going to modify preinit (again) Jan 27 17:56:17 cshore: by the way, did you take a look at devfs 2.0 (I think it's in 2.6.32) Jan 27 17:56:26 rtz2: not yet Jan 27 17:56:45 it should work fine without any hotplug daemon at all Jan 27 17:56:58 rtz2: what happens to hotplug? Jan 27 17:57:11 rtz2: and events? Jan 27 17:58:10 rtz: or does one use hotplug if one wants events, and otherwise it just creates the device nodes? Jan 27 17:58:11 <[Fate]> could someone pls review the patch in https://dev.openwrt.org/ticket/6589 if he/she has the time? Jan 27 17:59:04 cshore: well, if you want to do something on device add/remove events, you will still have to use hotplug, but the dev nodes are managed by the kernel Jan 27 17:59:17 cool Jan 27 17:59:29 rtz2: do you have to mount it? Jan 27 18:00:13 cshore: I think so Jan 27 18:01:27 okay, I think I know what I need to know to minimalize preinit, to do enough to be able to enter failsafe, and then leave everything else up to hotplug events Jan 27 20:01:47 build #1 of brcm47xx is complete: Exception [exception svn compile_15] Build details are at http://tksite.gotdns.org:8010/builders/brcm47xx/builds/1 Jan 27 20:01:53 hi Jan 27 20:01:55 ping nbd Jan 27 20:02:18 puchu: hi Jan 27 20:02:26 hi cshore Jan 27 20:02:36 everything okay? Jan 27 20:02:47 yup Jan 27 20:03:53 goot to hear Jan 27 20:03:55 good Jan 27 20:04:48 puchu: you? Jan 27 20:05:04 yeah im fine have to learn for a test tommorow Jan 27 20:05:10 and i need more time Jan 27 20:05:12 :( Jan 27 20:05:47 i think sleep is overrated ;) Jan 27 20:06:08 let's I went to bed...oh wait...I'm still up :) Jan 27 20:07:12 :) Jan 27 20:08:18 ill drink some coffee ... hope this gives me more time until i fall asleep :) Jan 27 20:08:45 I think the term you're looking for is crash and burn Jan 27 20:09:18 :) Jan 27 20:09:20 yeah Jan 27 20:09:39 crash and burn :) Jan 27 20:32:19 build #1 of brcm_2_4 is complete: Exception [exception failed slave lost compile_15] Build details are at http://tksite.gotdns.org:8010/builders/brcm_2_4/builds/1 Jan 27 21:01:51 juhosg * r19355 /trunk/target/linux/generic-2.6/files/drivers/net/phy/rtl8366s.c: rtl8366s: reset the chip early, this allows ethernet to work as soon as possible Jan 27 21:03:41 would that specific driver handle RTL8366SR Jan 27 21:03:45 I guess so Jan 27 21:04:07 damn, just got overwork permission for 10 hours per week, so my openwrt patching kind of got stalled :/ Jan 27 21:18:03 cshore do u know why this messages are in dmesg on brcm47xx? Jan 27 21:18:06 roboswitch: Probing device eth0: Jan 27 21:18:06 roboswitch: [/mnt/data/Openwrt/trunk_git/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:131] SIOCGETCPHYRD failed! Jan 27 21:18:21 befor the switch to the new init sys there where no messages like this Jan 27 21:26:09 puchu: probably because of the switch config/deconfig for the purposes of sending messages to the network about entering failsafe, and the like. Do you have suppress of stderr on (the old default)? Jan 27 21:26:32 cshore yes suppress is on Jan 27 21:27:00 pi_suppress_stderr="y" Jan 27 21:27:00 pi_init_suppress_stderr="y" Jan 27 21:27:14 puchu: I'm not sure why you didn't have those messages before; they're normal when configuring the switch Jan 27 21:27:36 puchu: maybe it was one of the recent commits for roboswitch Jan 27 21:29:08 puchu: hmm...or maybe it's because it's 2.6 and that part of the code is done the 2.4 way Jan 27 21:29:21 cshore no Jan 27 21:29:31 it wasnt there for 2.6 Jan 27 21:29:44 i just look at the dmesg output i hah.. Jan 27 21:29:44 puchu: oh, this is in 2.4? Jan 27 21:29:55 no 2.6 Jan 27 21:30:07 build #1 of ep93xx is complete: Exception [exception failed slave lost compile_15] Build details are at http://tksite.gotdns.org:8010/builders/ep93xx/builds/1 Jan 27 21:30:34 this is 2.6.32.6 ,,, tried with 2.6.32.5 with old init and there was also no test for eth[23] Jan 27 21:30:57 right so it's a 2.6 kernel right Jan 27 21:31:13 roboswitch: Probing device eth0: Jan 27 21:31:14 roboswitch: [/mnt/data/Openwrt/trunk_git/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:131] SIOCGETCPHYRD failed! Jan 27 21:31:14 roboswitch: [/mnt/data/Openwrt/trunk_git/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:131] SIOCGETCPHYRD failed! Jan 27 21:31:14 No Robo switch in managed mode found, phy_id = 0xffffffff Jan 27 21:31:15 puchu: but the vlan config code is written for 2.4 Jan 27 21:31:16 roboswitch: Probing device eth1: Jan 27 21:31:19 roboswitch: [/mnt/data/Openwrt/trunk_git/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:131] SIOCGETCPHYRD failed! Jan 27 21:31:24 roboswitch: [/mnt/data/Openwrt/trunk_git/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:131] SIOCGETCPHYRD failed! Jan 27 21:31:28 No Robo switch in managed mode found, phy_id = 0xffffffff Jan 27 21:31:31 roboswitch: Probing device eth2: No such device Jan 27 21:31:34 roboswitch: Probing device eth3: No such device Jan 27 21:31:38 diag: Detected 'ASUS WL-500g Premium' Jan 27 21:31:41 b44: eth0: Link is up at 100 Mbps, full duplex. Jan 27 21:32:30 puchu: I think it's the vlan init code Jan 27 21:32:44 puchu: it should be different for 2.6 vs 2.4 Jan 27 21:33:11 puchu 2.6 uses eth0.X numbers while 2.4 uses ethX numbers Jan 27 21:33:48 puchu: but I didn't realize it was running on 2.6 as well as 2.4 Jan 27 21:34:36 cshore i look at the code where the modules are loaded and it seems to me the module loading code is the same Jan 27 21:34:44 so the prob must be at an other place Jan 27 21:34:44 puchu: On the other brcm63xx gives those messages even with the old preinit Jan 27 21:35:03 hmm i didnt had the message befor Jan 27 21:35:03 puchu: so it might not be a bug, just messages you're not used to Jan 27 21:35:19 it is just roboswitch trying to probe for supported hw Jan 27 21:35:22 puchu: maybe the patch is new....I saw a recent roboswtich commit Jan 27 21:35:30 nothing serious Jan 27 21:35:48 puch: and not in .32 yet Jan 27 21:35:54 reeing unused kernel memory: 132k freed Jan 27 21:35:54 diag: Detected 'ASUS WL-500g Premium' Jan 27 21:35:54 b44: eth0: Link is up at 100 Mbps, full duplex. Jan 27 21:35:55 b44: eth0: Flow control is off for TX and off for RX. Jan 27 21:35:58 roboswitch: Probing device eth0: found a 5325! It's a 5350. Jan 27 21:36:00 this was the output befor Jan 27 21:36:10 no error messages befor Jan 27 21:36:22 xMff yeah but why does this output now happen? Jan 27 21:36:27 puchu: it's trying for more switch ports now Jan 27 21:36:30 switch-robo.c wasnt modified Jan 27 21:37:05 Date: Tue Nov 3 20:35:37 2009 +0000 Jan 27 21:37:05 [package] fix breakage on wl500gp after r18214, thanks sn9 (#6084) Jan 27 21:37:12 that was the last mod to this file Jan 27 21:37:17 are you sure...svn blame? Jan 27 21:37:21 git Jan 27 21:37:45 xMff: why do u think this output is now generated? Jan 27 21:38:10 maybe because the underlying apis in the kernel changed? Jan 27 21:38:15 you're hunting ghosts Jan 27 21:38:25 it is just debug output Jan 27 21:38:32 xMff: ghost are invisible ... this isnt invisible ... Jan 27 21:38:35 ;) Jan 27 21:39:00 you can probably get rid of roboswitch entirely Jan 27 21:39:15 roboswitch: Probing device eth2: No such device Jan 27 21:39:15 roboswitch: Probing device eth3: No such device Jan 27 21:39:23 this was also not tested befor as it seems Jan 27 21:39:28 xMff: are u shure? Jan 27 21:39:45 just dont use roboswitch? Jan 27 21:41:28 puchu: are you using roboswitch instead of /proc/switch? Jan 27 21:41:55 using? i dont configure it by hand Jan 27 21:41:59 thats just init Jan 27 21:44:17 puchu: does something not work? Jan 27 21:44:57 no everything works Jan 27 21:45:07 puchu: then I wouldn't worry about it Jan 27 21:58:40 <[Fate]> nbd: ping Jan 27 22:31:53 so is the apple A4 port checked into trunk yet? Jan 27 23:00:02 ok that joke was ultralame. good night! Jan 27 23:20:42 cshore hacve u seen nbd today? Jan 27 23:20:45 ping nbd Jan 28 00:26:33 I figured out how to delay doing hotplug until after init Jan 28 00:27:12 which avoids race conditions that are already happening due to no rootfs but hotplug events being generated Jan 28 00:27:34 not sure it it'll work on brcm-2.4 though Jan 28 00:28:01 is there any x86 2.4 tree? (e.g. to test in a VM?) Jan 28 00:28:25 cshore: not in openwrt Jan 28 00:28:55 rtz: does 2.4 have the /sys tree? Jan 28 00:29:25 e.g. /sys/class/block/* Jan 28 00:29:32 that's really all I need Jan 28 00:30:35 cshore: sysfs doesn't exist on 2.4 Jan 28 00:30:44 damn Jan 28 00:30:59 wait 2.4 uses devfs right? Jan 28 00:31:35 cshore: yes, no hotplugging for it Jan 28 00:31:49 cshore: by the way, I wouldn't spend too much effort on 2.4 Jan 28 00:32:02 cshore: I dont think it will survive that long Jan 28 00:32:03 rtz: well I have to not break it Jan 28 00:34:32 rtz: basically I'm moving hotplug out until after init Jan 28 00:34:54 rtz: instead of trying to make preinit happen via hotplug events Jan 28 00:35:02 rtz: *much* more manageable Jan 28 00:35:09 rtz: no IPC Jan 28 00:36:16 kind of Linus' 'move into userspace' thing Jan 28 00:37:40 rtz: but there won't SIGUSR1 for the reset button...had to be checked via the keypress code....but that's already there, now Jan 28 00:38:13 (except of course it needs to access the appropriate GPIO stuff, either directly or through gpio-buttons Jan 28 00:56:27 in .32 does devfs detect as devfs the same as in 2.4? Jan 28 00:56:37 in /proc/filesystem I mean Jan 28 00:56:47 cshore: no idea Jan 28 00:57:23 cshore: no Jan 28 00:57:33 cshore: it's called devtmpfs Jan 28 00:57:50 rtz: ok, so there will need to be a preinit change for it Jan 28 01:01:27 http://lwn.net/Articles/330985/ Jan 28 01:01:31 @cshore Jan 28 01:01:41 but why do u wanna use devtempfs? Jan 28 01:02:07 Isn't it required by .32? Jan 28 01:02:15 u wanna disable hotplug2 in preinit? Jan 28 01:02:21 yes Jan 28 01:02:24 why Jan 28 01:02:30 race conditions Jan 28 01:02:36 especially with usb root Jan 28 01:03:05 but also any hotplug event that happens before there is a rootfs and so on Jan 28 01:03:22 Custom, embedded-like systems should be able to use this as a dynamic Jan 28 01:03:25 ahh nice Jan 28 01:03:39 /dev directory without any need for aditional userspace tools. Jan 28 01:03:46 right Jan 28 01:04:01 so hotplug2 could be removed completly? Jan 28 01:04:16 only in preinit Jan 28 01:04:35 but what are the usb race conditions? Jan 28 01:05:18 as soon as you insmod with hotplug active it generates a hotplug event Jan 28 01:05:35 and tries to host the hotplug rules instead of letting is do our preinit thing Jan 28 01:05:44 host=use Jan 28 01:05:56 ohh okay Jan 28 01:06:05 i removed the hotplug rules for usb Jan 28 01:06:11 they suck Jan 28 01:06:42 also interfaces are generating events before there is a rootfs Jan 28 01:06:45 i dont like automounting when i plug in a usb disk Jan 28 01:07:02 I plan on making that an option than can be disabled Jan 28 01:08:02 changing this line and removing hotplug should do it Jan 28 01:08:04 20_device_fs_mount: mount devfs /dev -t devfs Jan 28 01:08:32 The primary motivation for the change is to avoid hotplug until have a proper root, and have pivotted into it Jan 28 01:08:54 maybe there is an dynamic why to check if the kernel supports devtempfs Jan 28 01:09:02 I hope so Jan 28 01:09:31 /proc/filesystem? Jan 28 01:09:35 /proc/filesystem? Jan 28 01:09:49 /proc/filesystems Jan 28 01:09:51 I'm going to get things working right with .30 first Jan 28 01:10:57 grep devtmpfs /proc/filesystems Jan 28 01:10:57 nodev devtmpfs Jan 28 01:11:20 good...it's easy to see that it's there Jan 28 01:11:21 echo $? Jan 28 01:11:21 0 Jan 28 01:11:24 does it automount? Jan 28 01:11:34 no i dont think so Jan 28 01:11:38 cshore: afaik, nothing does automount Jan 28 01:11:44 its not automounted here Jan 28 01:12:03 puchu: so you don't have it active with your .32 builds? Jan 28 01:12:18 it is activated in the kernel but not used Jan 28 01:12:43 puchu: how to do you mount it? Jan 28 01:12:48 it should speed up the boot time because coldplug isnt needed any more Jan 28 01:12:59 mount -t devtmpfs devtmpfs /dev ? Jan 28 01:12:59 cshore: i havent mounted it Jan 28 01:13:10 http://lwn.net/Articles/330985/ Jan 28 01:13:13 read this Jan 28 01:13:36 it should work Jan 28 01:14:31 mount -t devtmpfs devtmpfs /root/dev Jan 28 01:14:31 server /root # dir /root/dev Jan 28 01:14:39 but its empty Jan 28 01:15:11 maybe its filled up when /dev isnt mounted befor and hotplug is not running Jan 28 01:15:16 puchu: probably because of udev overwriting everything Jan 28 01:15:48 i dont have udev here or is udevtrigger == udev= Jan 28 01:15:49 ? Jan 28 01:16:19 i think hotplug creates all devices Jan 28 01:16:48 /lib/preinit/30_device_fs_daemons: /sbin/hotplug2 --set-worker /lib/hotplug2/worker_fork.so --set-rules-file /etc/hotplug2-init.rules --no-persistent --set-coldplug-cmd /sbin/udevtrigger Jan 28 01:16:48 /lib/preinit/30_device_fs_daemons: /sbin/hotplug2 --set-worker /lib/hotplug2/worker_fork.so --set-rules-file /etc/hotplug2-init.rules --persistent & Jan 28 01:17:47 rtz2: or am i wrong? Jan 28 01:17:58 puchu: or that Jan 28 01:18:09 puchu: could you boot into failsafe? Jan 28 01:18:35 puchu: wait Jan 28 01:18:47 it won't matter, hotplug2 will still run Jan 28 01:19:11 no ... i build my image without telnet support Jan 28 01:19:21 so there is no change of using failsafe Jan 28 01:19:28 never used it Jan 28 01:20:06 I found how it's supposed to be mounted Jan 28 01:20:15 i have an image with allready running ssh and set pw + private key .. so i dont need a password at all Jan 28 01:20:22 if the kernel mounts the rootfs it's automatic Jan 28 01:20:51 cshore: but isnt the kernel mounting rootfs? Jan 28 01:21:12 not in our case I don't think Jan 28 01:21:32 cshore but why is it unpopulated when i mount it by hand? Jan 28 01:21:38 don't know Jan 28 01:22:04 maybe because hotplug runs coldplug? Jan 28 01:22:15 shouldn't be a problem Jan 28 01:22:32 that should be done to generate events (just not devices) Jan 28 01:22:32 but something seems to avoid it Jan 28 01:23:04 cshore: maybe u should try it on your linux box first? Jan 28 01:23:12 do u use linux for development? Jan 28 01:23:19 or windows + putty or somthing Jan 28 01:23:33 you don't happen to know the kernel commandline that the openwrt images use? Jan 28 01:23:35 linux Jan 28 01:23:56 proc holds it Jan 28 01:24:10 at /proc/cmdline Jan 28 01:24:11 root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd Jan 28 01:24:22 normally there is a serial option too Jan 28 01:24:24 yes Jan 28 01:24:28 but i removed that too Jan 28 01:24:29 :) Jan 28 01:24:38 so it should be on /dev Jan 28 01:24:39 i have no serial attached so it wouldnt work at all Jan 28 01:24:41 already Jan 28 01:24:54 and you can't mount it twice Jan 28 01:25:01 tmpfs on /dev type tmpfs (rw,relatime,size=512k) Jan 28 01:25:05 so it isnt Jan 28 01:25:14 hmmm..... Jan 28 01:25:24 i try it on my normal box Jan 28 01:25:31 cshore: I think the nodes are deleted from it, if something else creates them Jan 28 01:25:35 I think that is preinit mounting over top of the existing Jan 28 01:25:38 i activate it and recompile my kernel .. lets see if it works here Jan 28 01:26:25 puchu: if you system uses initramfs it won't auto mount devtmpfs Jan 28 01:26:26 hooo Jan 28 01:26:30 look what i found Jan 28 01:26:32 Symbol: DEVTMPFS_MOUNT [=n] │ Jan 28 01:26:32 │ Prompt: Automount devtmpfs at /dev Jan 28 01:26:36 in menuconfig Jan 28 01:26:37 :) Jan 28 01:27:00 so automount should work Jan 28 01:27:10 when its enabled Jan 28 01:27:14 is it enable in OpenWRT though? Jan 28 01:27:21 dont think so Jan 28 01:27:35 i look at my normal kernel not the one from openwrt Jan 28 01:28:11 grep DEVTMPFS_MOUNT config-2.6.32 Jan 28 01:28:11 CONFIG_DEVTMPFS_MOUNT=y Jan 28 01:28:15 ohh its enabled Jan 28 01:28:41 grep DEVTMPFS_MOUNT target/linux/generic-2.6/config-2.6.32 Jan 28 01:28:41 CONFIG_DEVTMPFS_MOUNT=y Jan 28 01:28:43 so it's being hidden by the preinit tmpfs mount Jan 28 01:28:53 could be Jan 28 01:29:29 maybe i should reboot ... im allready at my usb disk Jan 28 01:30:31 so i move it .. maybe devtmpfs is at the old root it .... i already pivoted to the usb disk and did a mount -o move of /dev Jan 28 01:30:53 that could be Jan 28 01:30:58 maybe devtmpfs is left behind and only the last mounted dev gets moved Jan 28 01:31:08 damn, just about asked you to go in failsafe again Jan 28 01:31:25 i can reboot ... but as i said i have no failsafe Jan 28 01:31:38 busybox is build without telnetd support Jan 28 01:33:32 I understand Jan 28 01:34:14 how do you recover when the flash goes bad? Jan 28 01:34:22 devtmpfs 14.4M 0 14.4M 0% /rom/dev Jan 28 01:34:25 its there Jan 28 01:34:30 yeah Jan 28 01:34:32 i just booted from fash Jan 28 01:34:34 flash Jan 28 01:34:39 nice Jan 28 01:35:05 and also populated Jan 28 01:35:05 I think the changes I just did will add support for it Jan 28 01:35:19 cshore: but is has to be moved Jan 28 01:35:30 but I'll have to do a patch Jan 28 01:35:34 that shouldn't be a problem Jan 28 01:35:51 after jffs is mounted Jan 28 01:35:56 yes Jan 28 01:36:09 are you booting the kernel from onboard flash and rootfs on MMC/SD/USB? Jan 28 01:36:23 just onboard flash Jan 28 01:36:59 when an usb disk is there and has a etc/usb.boot file ... it pivot to the usbdisk Jan 28 01:37:11 befor i call init Jan 28 01:39:07 cshore: where is the jffs partition foramted at firstboot? Jan 28 01:39:29 mounting formats Jan 28 01:39:40 ? Jan 28 01:39:47 in preinit? Jan 28 01:39:49 yes, I know, weird Jan 28 01:39:58 is this a kernel mod? Jan 28 01:40:02 yes Jan 28 01:40:06 okay Jan 28 01:40:33 hmm but how could u move dev on firstboot? Jan 28 01:41:06 ohh here Jan 28 01:41:08 lock /tmp/.switch2jffs Jan 28 01:41:08 firstboot switch2jffs Jan 28 01:41:08 lock -u /tmp/.switch2jffs Jan 28 01:41:17 if the flash is not formatted during preinit, a ramdisk (/tmp/root) is used as the overlay and mounting doesn't happen until firstboot Jan 28 01:41:22 /etc/init.d/done Jan 28 01:41:28 puchu: yes Jan 28 01:41:35 /sbin/firstboot Jan 28 01:41:46 and now /lib/firstboot/* Jan 28 01:42:10 but which firstboot Jan 28 01:42:10 /sbin/firstboot Jan 28 01:42:17 says this Jan 28 01:42:26 switch2jffs Jan 28 01:43:31 so this firstboot switch2jffs is called every time the kernel boots? Jan 28 01:43:52 yes Jan 28 01:44:05 but if mount fails (because it's already mounted), nothing happens Jan 28 01:44:17 okay Jan 28 01:45:12 so u should check after mount in init if its firstboot (not boot) or not Jan 28 01:45:25 not boot=not mounted Jan 28 01:45:42 huh? Jan 28 01:46:32 all the scripts in /etc/init.d need dev when they run and it wont be in /dev when its not firstboot Jan 28 01:47:01 or am i wrong? Jan 28 01:48:38 but isnt the partition ereased here? Jan 28 01:48:41 mtd erase "$partname" Jan 28 01:48:41 mount "$mtdpart" /jffs -t jffs2 Jan 28 01:48:41 fopivot /jffs /rom 1 Jan 28 01:48:54 I have no clue how to acces the gpio input device Jan 28 01:49:12 not that only happens the other conditions aren't met Jan 28 01:49:26 rtz: drat Jan 28 01:49:30 I can't find a dev minor number and without it, I can't create a dev node Jan 28 01:49:44 and without that, I have no idea what to do Jan 28 01:49:59 whatfor is gpio needed? Jan 28 01:50:17 puchu: buttons Jan 28 01:50:22 okay Jan 28 01:55:17 modifing the gpio_buttons driver would probably be a possible solution Jan 28 01:57:21 there should be another possibility, but I have no idea :/ Jan 28 02:04:00 rtz2 whatfor are the buttons needed? Jan 28 02:04:03 for failsafe? Jan 28 02:04:17 puchu: yes...without hotplug Jan 28 02:04:59 rtz: how does the gpio_buttons driver work? Jan 28 02:05:13 cshore and starting hotplug just the get the buttons and kill it right after hotplug is left? Jan 28 02:05:31 puchu: no that won't work...hotplug will do too much Jan 28 02:05:34 hotplug is left=failsafe is left Jan 28 02:06:26 cshore: not very interesting Jan 28 02:06:43 cshore: it creates an input device, that polls some given gpio lines Jan 28 02:06:44 https://dev.openwrt.org/browser/trunk/target/linux/generic-2.6/files/drivers/input/misc/gpio_buttons.c Jan 28 02:07:41 cshore: I could try to set a minor and major number for the dev Jan 28 02:08:20 then, it should be possible to craete the input node in /dev and access it from there Jan 28 02:08:24 rtz: well we really don't need events: I think we're better off just accessing the /sys Jan 28 02:08:37 and check it when we want o Jan 28 02:08:53 cshore: well, you would have to query the gpios directly Jan 28 02:09:00 rtz: is that bad/ Jan 28 02:09:18 welllll Jan 28 02:09:22 good question Jan 28 02:10:13 you would have to know the gpio lines connected to buttons for each device Jan 28 02:10:29 rtz2: don't you need that for the buttons driver anyway? Jan 28 02:10:41 cshore: yes Jan 28 02:11:09 cshore: but it's stored in the kernel and you can't access it easyly from userspace Jan 28 02:12:04 I think the major is 254 Jan 28 02:12:24 254? Jan 28 02:12:35 for gpiodev Jan 28 02:12:40 at least here Jan 28 02:13:10 cshore: for the gpio, it's not needed Jan 28 02:13:18 you can access it easyly from sysfs Jan 28 02:13:31 I don't know the minor number for the input device Jan 28 02:13:38 ahhh. Jan 28 02:13:38 I fact, I doubt it has one Jan 28 02:13:46 what kind of device would that be /dev/?? Jan 28 02:14:21 cshore: /dev/input/something Jan 28 02:14:42 it is a generic device type you create when you find a button? Jan 28 02:15:20 cshore: it's created from the platform bus, so, in gerneral yes Jan 28 02:15:29 but it doesn't seem to have a /dev node Jan 28 02:16:55 but sometzhing is wrong here Jan 28 02:16:59 something Jan 28 02:17:12 at the beginning of dmesg Jan 28 02:17:14 roboswitch: Probing device eth0: Jan 28 02:17:14 roboswitch: [/mnt/data/Openwrt/trunk_git/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:131] SIOCGETCPHYRD failed! Jan 28 02:17:14 roboswitch: [/mnt/data/Openwrt/trunk_git/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:131] SIOCGETCPHYRD failed! Jan 28 02:17:14 No Robo switch in managed mode found, phy_id = 0xffffffff Jan 28 02:17:17 roboswitch: Probing device eth1: Jan 28 02:17:28 and nearly at the end Jan 28 02:17:34 50-70 lines later Jan 28 02:17:37 roboswitch: Probing device eth0: found a 5325! It's a 5350. Jan 28 02:17:44 how can this be? first nothing Jan 28 02:17:53 then is eth0 a roboswitch Jan 28 02:17:58 this didnt happend befor Jan 28 02:18:43 seems when roboswitch is first inserted its at the wrong place and then unloaded again and then loaded again in /etc/init.d Jan 28 02:18:55 rtz: do you have input-core or whatever it's called in your kernel? Jan 28 02:19:23 cshore: do u know what i mean? Jan 28 02:19:30 cshore: it's a module Jan 28 02:19:42 puchu: I think it's normal Jan 28 02:20:05 befor there was only roboswitch: Probing device eth0: found a 5325! It's a 5350. at the beginning Jan 28 02:20:32 i think something has to be loaded befor to get it working when its loaded the first time Jan 28 02:21:12 puchu: possible...what modules do you have? Jan 28 02:21:22 when? Jan 28 02:21:33 this it at roboswitch: Probing device eth0: Jan 28 02:21:33 roboswitch: [/mnt/data/Openwrt/trunk_git/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:131] SIOCGETCPHYRD failed! Jan 28 02:21:33 roboswitch: [/mnt/data/Openwrt/trunk_git/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:131] SIOCGETCPHYRD failed! Jan 28 02:21:33 No Robo switch in managed mode found, phy_id = 0xffffffff Jan 28 02:21:35 roboswitch: Probing device eth1: Jan 28 02:21:39 preinit time Jan 28 02:21:41 so i dont know Jan 28 02:21:42 puchu: I mean in /lib/modules Jan 28 02:22:13 should i paste all modules here? Jan 28 02:22:20 pastebin Jan 28 02:22:43 cshore ik should work in preinit and not in /etc/init.d .. its okay there but it should be okay in preinit Jan 28 02:23:20 http://nopaste.info/1c1008770d.html Jan 28 02:23:37 maybe diag has to be loaded befor Jan 28 02:24:01 Freeing unused kernel memory: 136k freed Jan 28 02:24:01 roboswitch: Probing device eth0: Jan 28 02:24:11 so its the first thing that gets loaded as it seems Jan 28 02:24:38 in preinit Jan 28 02:25:32 yeah im right Jan 28 02:25:37 this was the old out Jan 28 02:25:42 with no error at all Jan 28 02:25:45 reeing unused kernel memory: 132k freed Jan 28 02:25:45 diag: Detected 'ASUS WL-500g Premium' Jan 28 02:25:45 b44: eth0: Link is up at 100 Mbps, full duplex. Jan 28 02:25:45 b44: eth0: Flow control is off for TX and off for RX. Jan 28 02:25:48 roboswitch: Probing device eth0: found a 5325! It's a 5350. Jan 28 02:25:55 is switch-robo being loaded before the attempt to use the switch? Jan 28 02:25:58 diag must be loaded befor roboswitch Jan 28 02:26:18 but it seems it is loaded after it Jan 28 02:26:26 so i doesnt work Jan 28 02:26:45 cshore: it is loaded after it in preinit Jan 28 02:26:58 look at the faulty kernel messages i posted Jan 28 02:27:05 I mean in the code Jan 28 02:27:12 and the on where there was no error Jan 28 02:27:54 05_init_interfaces_brcm: insmod diag Jan 28 02:28:32 boot_hook_add preinit_main init_iface Jan 28 02:28:32 boot_hook_add preinit_main set_preinit_iface Jan 28 02:28:39 they have to switch order? Jan 28 02:28:41 i think Jan 28 02:28:49 in 05_init_interfaces_brcm Jan 28 02:29:14 yeah that should solve this eror messages Jan 28 02:29:31 boot_hook_add preinit_main set_preinit_iface Jan 28 02:29:33 boot_hook_add preinit_main init_iface Jan 28 02:29:40 that should be the right order Jan 28 02:29:50 typo-- ;) Jan 28 02:30:13 cshore: what do u think? Jan 28 02:30:23 what's the code for those functions? Jan 28 02:30:39 should a post the code? Jan 28 02:30:42 rtz: I have no idea Jan 28 02:31:10 rtz: I'm trying to google, but I'm just USB input devices Jan 28 02:31:26 http://nopaste.info/8f3c189d4b.html Jan 28 02:31:34 @cshore Jan 28 02:32:11 i think im right Jan 28 02:32:17 puchu: oh, that's why...it's normal Jan 28 02:32:55 cshore: so its wrong? last to lines changed should fix it Jan 28 02:33:01 ? Jan 28 02:33:07 puchu: no, won't make a difference Jan 28 02:33:48 but dmesg states that diag is inserted after switch robo Jan 28 02:34:10 puchu: shouldn't matter Jan 28 02:34:25 how can i change the order .. i wanna test it Jan 28 02:34:40 switching those lines would do it Jan 28 02:34:50 okay thanks Jan 28 02:35:57 ill ty it Jan 28 02:36:28 could both of you take a look at /dev/input on your desktop system and tell me, what's there? Jan 28 02:36:50 drwxr-xr-x 2 root root 100 27. Jan 21:58 by-path Jan 28 02:36:50 crw-r----- 1 root root 13, 64 27. Jan 21:58 event0 Jan 28 02:36:50 crw-r----- 1 root root 13, 65 27. Jan 21:58 event1 Jan 28 02:36:50 crw-r----- 1 root root 13, 66 27. Jan 21:58 event2 Jan 28 02:36:50 crw-r----- 1 root root 13, 67 27. Jan 21:58 event3 Jan 28 02:36:51 crw-r----- 1 root root 13, 68 27. Jan 21:58 event4 Jan 28 02:36:53 crw-r----- 1 root root 13, 63 27. Jan 21:58 mice Jan 28 02:36:57 crw-r----- 1 root root 13, 32 27. Jan 21:58 mouse0 Jan 28 02:37:16 @rtz Jan 28 02:37:33 rtz: http://openwrt.pastebin.ca/index.php Jan 28 02:37:48 basically the same Jan 28 02:38:11 im sorry for pasting everything in here ... if u both get disturbed by it ... i can stop it Jan 28 02:38:39 @cshore rtz Jan 28 02:38:57 puchu: as long as it's not too long and you don't iterrupt other peoples conversations ... Jan 28 02:39:10 okay Jan 28 02:39:22 cshore: your link is missing something rather important Jan 28 02:39:47 doh Jan 28 02:39:51 the text ;) Jan 28 02:40:36 it's basically the same...I think an additional mouse device...just a sec (same major/minor) Jan 28 02:40:43 cshore: ok Jan 28 02:40:48 thanks to both of you Jan 28 02:41:13 cshore the problem with this is i think ... failsafe wont work on the devices right now beacuse the switch is not configured Jan 28 02:41:33 could be Jan 28 02:41:58 ok Jan 28 02:42:09 rtz: did that help? Jan 28 02:42:19 I think it should work with the evdev driver Jan 28 02:42:21 yes, it did Jan 28 02:42:45 it creates device nodes Jan 28 02:44:39 do you know if the gpio-button-hotplug is always a module? Jan 28 02:45:09 in OpenWRT? Jan 28 02:45:45 and/or is there a problem with -hotplug interfering with straight gpio-buttons or can they both work? Jan 28 02:47:11 cshore: it's in an external package and not a kernel patch, so it's always a module (but it should be trivial to change this) Jan 28 02:48:00 cshore: and the hotplug module and an evdev module should be able to coexsist without problems Jan 28 02:48:34 cshore didnt change anything ... its loaded befor but its still not detected .. it think that until the module is loaded in /etc/init.d/boot ... the switch doesnt work Jan 28 02:48:50 so failsafe doesnt work Jan 28 02:48:54 cshore: you could try to compile the evdev module and insmod it and see what happens Jan 28 02:49:30 cshore: would actually be pretty interesting, to see if and how exactly it works Jan 28 02:49:58 (don't have my machine with the linux vm with me at the moment) Jan 28 02:59:39 rtz: okay will do **** ENDING LOGGING AT Thu Jan 28 02:59:56 2010