**** BEGIN LOGGING AT Sun Apr 02 03:00:01 2017 Apr 02 05:04:09 veremit: is /etc/network/interfaces even consulted anymore on the default images or does connman ignore that entirely? Apr 02 05:04:53 the right answer to "how do i configure ethernet" is "that depends on which network manager is used" Apr 02 05:07:12 and the answer to "how to reconfigure the usb network" is that plus "there are probably scripts messing with that too" Apr 02 05:08:32 do the scripts mess with the actual network config or do they just do the work to create the network interface? Apr 02 05:09:13 I mean the whole point of using connman afaik was that it takes care of the network config Apr 02 05:10:05 (specifically in "tethered" use cases where the device is a dhcp server) Apr 02 05:10:21 most of them actually also configure the interface Apr 02 05:10:53 they haven't gotten rid of that? ew Apr 02 05:11:01 I think nowadays it's cleaner Apr 02 05:11:42 also ofc connman can do it. it was done by nokia for that reason... and I run it on embedded devices with that exact use case too Apr 02 05:12:18 it's also easily configured with systemd-networkd, although jessie's systemd is probably too ancient for that Apr 02 05:14:22 what I'd still be interested in is a network manager that auto-adapts to the network, i.e. tries to obtain a dhcp lease, or failing that sets up its own dhcp server + local dns server Apr 02 05:15:02 I'm still wondering how to do a context aware setup Apr 02 05:15:59 in some situations I need to bring up a manual network config (despite there being DHCP) on ethernet AND bring up wifi and set a default route over that... Apr 02 05:16:04 on point-to-point links it can also immediately switch to server role if it sees a dhcp request from the link partner Apr 02 05:16:25 (usb) Apr 02 05:16:35 why manual config despite dhcp? Apr 02 05:17:15 DHCP provides a limited setup that gets firewalled... don't ask Apr 02 05:17:31 if it obtains two valid network configs (eth and wifi) it should definitely try to see which one is suitable to become a default route Apr 02 05:18:04 all of them prefer ethernet over wifi, from what I've seen Apr 02 05:19:15 connman could probably do it, but don't want to switch to that on my laptop Apr 02 05:19:47 it could also monitor mDNS and LLMNR broadcasts, and if it sees a request for its hostname yet none of the broadcasts are from an IP in a network the device is in, try to actively obtain an IP in that range Apr 02 05:21:15 another issue I have is the case where the device is integrated with a network switch, which means it doesn't detect when it's bring plugged into or out of a LAN Apr 02 05:22:17 gnome network manager should be able to do what you want Apr 02 05:22:23 iirc Apr 02 05:22:44 ditto systemd-networkd Apr 02 05:22:54 well Apr 02 05:23:19 depends on what you mean by context-aware... you want it to recognize that *particular* ethernet network and only apply the manual config there? Apr 02 05:23:26 yes Apr 02 05:23:39 ah, I see now... yes I've had that desire too Apr 02 05:24:12 I have a separate network config in network-manager for that network, but it always comes up with the default dhcp Apr 02 05:28:58 I'd probably just hook up a script to fire when the interface becomes configured and then override the config manually... that should work with systemd-networkd anyway, gnome networkmanager would just demolish your settings at some point Apr 02 05:30:26 it can be done with network-damager too. it can hook up a script when the interface becomes ready, at which point one could check which DHCP server (IP/MAC) responded, cancel connect and force a reconnect with network specific config. Apr 02 05:30:32 it's not ideal, but would work Apr 02 05:30:56 would that automatically go back to the default config on link down? Apr 02 05:31:31 not if you tell network manager "bring up connection profile X", then it will cancel connect and bring up the right one Apr 02 05:31:45 it's what I do manually by clicking on the GUI buttons Apr 02 05:31:50 (lol @ networkdamager) Apr 02 05:32:18 if it quacks like a duck... Apr 02 05:33:05 right so the script would need to actively switch between the two, which is more annoying since you need to recognize when it's using the manual config because *it* requested it, versus because the network has been replugged and the manual config was used last time Apr 02 05:33:31 otherwise you'd create a network config oscillator Apr 02 05:33:33 luckily the two configs are different Apr 02 05:33:39 how? Apr 02 05:34:10 it's manual and doesn't do DHCP, so there's nothing to trigger it Apr 02 05:34:24 also in the script you can IF on the name of the connection Apr 02 05:35:05 the scripting feature of NM is very powerful and quite well hidden Apr 02 05:35:21 I don't see what you're saying... the script *needs* to trigger to switch back to default config when replugging the interface right? Apr 02 05:36:01 upon replugging NM tears everything down anyway and starts at square zero Apr 02 05:36:23 ok, that's what I asked earlier 07:30 < zmatt> would that automatically go back to the default config on link down? Apr 02 05:36:28 you said no Apr 02 05:37:00 huh, must have missed that, sorry Apr 02 05:37:11 iirc if I select the manual config via the GUI, it would become the default Apr 02 05:37:53 it always comes up with the manual config for me (both on jessie and stretch, I'm currently trying out KDE though) Apr 02 05:38:06 s/manual/dhcp/ Apr 02 05:38:08 not awake Apr 02 05:38:12 odd Apr 02 05:38:36 it's been a while though since I've used NM, maybe something has changed or maybe I just remember wrong Apr 02 05:39:04 there were some circumstances that made it stick to a config, I don't remember what it was though Apr 02 05:41:44 but yeah, context-aware setup would be nice... and not really that hard either, e.g. it should just tag a network with "has dhcp server $identifier" (for suitable identifier, e.g. MAC address), allow configs to be predicated on that (easy if it already supports predication on stuff), and reevaluate the choice when obtaining an offer and if necessary reject it and switch config Apr 02 05:42:34 or keep it and add additional config, if the two don't conflict Apr 02 05:42:52 then you can also locally reach IPs in the dhcp range Apr 02 05:45:44 btw have you ever heard of nerves-project.org ? it looks quite interesting, basically a way to build a small, fast, squashfs image with kernel + erlang runtime + application written in "elixir" (afaict we-like-erlang-but-want-more-features) Apr 02 05:46:17 (includes infra to update that image of course) Apr 02 05:46:56 sounds neat Apr 02 05:47:28 erlang has been on my to-do list for a while because of its purported suitability for zero downtime systems Apr 02 05:47:46 12M is still quite a lot in case of e.g. a STM32F4 Apr 02 05:47:59 but not for a beaglebone Apr 02 05:48:07 sure Apr 02 05:48:08 which is one of their actively supported targets Apr 02 05:48:33 right now we're sending devices out into the field running a debian install /o\ Apr 02 05:48:40 the concept just sounded like suitable for even more limited Apr 02 05:48:56 yes but then you probably just need to get rid of linux Apr 02 05:48:59 yeah, debian is not exactly an embedded distro Apr 02 05:49:51 since the erlang runtime already does its own scheduling anyway afaict Apr 02 05:51:05 there are definitely more people with that idea -> https://github.com/kerlnel that one seems dead though Apr 02 05:52:30 http://erlangonxen.org/ could perhaps be adapted? Apr 02 05:56:29 indeed it can https://twitter.com/erlang_on_xen/status/568430636521930753 Apr 02 06:07:14 thinkfat: btw, do you have an estimate on how fast wakeup from suspend is actually? (i.e. not including the overhead of linux) Apr 02 06:11:31 it probably doesn't help that the m3 does way too much sequential that could be done in parallel, e.g. powering up PLLs and locking PLLs Apr 02 06:12:43 (though that's deepsleep stuff, standby should be a lot faster) Apr 02 06:21:29 ok, time to do useful stuff, afk Apr 02 07:24:35 zmatt: I'd need a scope for that. Apr 02 07:26:01 but the m3 certainly executes a few hundred instructions before waking the MPU and a lot of them on 24MHz clock. Apr 02 07:29:48 thinkfat: is there even a reason to involve the m3 at all for standby? Apr 02 07:30:53 zmatt: for standby, no Apr 02 07:31:13 zmatt: hm, wait Apr 02 07:31:28 zmatt: standby still involves MPU PD OFF Apr 02 07:31:35 zmatt: not sure if the A8 can do that Apr 02 07:32:00 yes, and my tests showed that it'll get pulled out of it by the wakeup signal from intc Apr 02 07:32:33 zmatt: am335x doesn't support hwsup-sleep for powerdomains Apr 02 07:33:23 maybe my tests were tainted by debugger access, that's possible... I don't remember if I verified it without jtag Apr 02 07:33:36 zmatt: I guess the sleep transition would be instantaneous, maybe it could work if the MPU does that as the very last thing Apr 02 07:33:50 no, the sleep transition waits for idleack Apr 02 07:33:53 i.e. WFI Apr 02 07:34:02 for sure? Apr 02 07:34:05 100% Apr 02 07:34:35 and the wake signal afaik overrides everything Apr 02 07:35:32 but that should be double-checked since it's possible my testing was flawed... though I'm pretty sure I deliberately detached from the a8 to let it sleep normally Apr 02 07:36:08 (while manually playing with prcm controls via the m3's DAP ) Apr 02 07:38:43 my interpretation was that the idleack only wakes the m3, no hint that it synchronizes with mstandby of the mpu Apr 02 07:38:55 pd transition I mean Apr 02 07:38:59 ? Apr 02 07:39:10 also, other pd's sleep instantly when you force a sw_sleep Apr 02 07:39:42 ah, but that contratics nothing Apr 02 07:39:43 *all* modules in a power domain need to acknowledge idle and/or standby (whichever is applicable) before it can transition Apr 02 07:39:59 yeah, I see that now Apr 02 07:40:13 so yes, it should work Apr 02 07:40:18 the a8 can definitely safely power itself off Apr 02 07:40:29 it's only the wakeup that leaves me with slight doubt Apr 02 07:40:34 so you would need the M3 only for sleep modes that don't allow wakeup through the INTC Apr 02 07:41:43 the picture is still a bit blurry. Apr 02 07:41:54 the M3 has the MPU_WAKE as a wakeup source Apr 02 07:42:02 which is the signal from aintc Apr 02 07:42:34 if the A8 simultaneously wakes up, you'd better be damned sure that there is no interference with what the M3 is doing vs what the A8 does on wakeup Apr 02 07:42:37 which, as I discovered, also wakes up the mpu directly Apr 02 07:42:41 correct Apr 02 07:42:51 that's why I was very surprised about this Apr 02 07:43:06 which is why I'm fairly sure I checked this several times Apr 02 07:43:12 could be the reason why the EMIF save/resume is still done by the A8 Apr 02 07:43:57 and dgerlach mentioned putting dpll_mpu into bypass is nowadays no longer done in standby because it raced against the mpu resuming execution Apr 02 07:44:07 heh Apr 02 07:44:19 tadaa Apr 02 07:45:06 I'm wondering if that is the reason for my DS1 wakeup trouble Apr 02 07:45:07 like I said, I'm fairly certain I saw the mpu waking up due to irq, all the way from modulemode=disabled, module fully idled and in standby, clock domain in SW_SLEEP, power domain set to OFF Apr 02 07:46:09 is there a way to prevent that? Apr 02 07:48:26 once you stop the mpu clock it can at least no longer resume execution, although an irq would still bring it out of powerdown Apr 02 07:49:15 the best solution is moving more logic to the a8, or have the a8 explicitly wait for confirmation from the m3 that resume is complete Apr 02 07:49:41 but before considering solutions, I'd recommend double-checking my findings Apr 02 07:51:12 pity the m3 cannot access gpios Apr 02 07:51:30 it means setting modulemode to disabled and clock domain to SW_SLEEP (but keeping PD on) should allow the mpu to function normally, albeit with increased irq latency Apr 02 07:51:38 sure it can, all of gpio0 Apr 02 07:51:43 ah Apr 02 07:51:49 yes, they're in WKUP Apr 02 07:52:19 or you could abuse adc pins as gpios :P Apr 02 07:52:42 user leds on bbb are all on PER GPIOs Apr 02 07:52:46 sad Apr 02 07:52:53 breadboard it is Apr 02 07:53:23 you can toggle the power led Apr 02 07:53:42 it's on an LDO (LDO2 iirc) that's not used for anything else Apr 02 07:54:38 or turn the leds on via gpio and toggle them leds by changing their pinmux Apr 02 08:00:58 I'd need two GPIOs in wkup to confirm both MPU and M3 are waking simultaneously Apr 02 08:01:38 the pinmux trick should work Apr 02 08:02:51 hmm, I think there is a "DS2" mode in the m3 firmware that basically does what you described Apr 02 08:03:16 well no, what I described was not involving the m3 whatsoever, it should work with the m3 held in reset Apr 02 08:03:52 in fact I'd do exactly that to avoid interference Apr 02 08:04:35 ok, with MOSC on you mean Apr 02 08:04:54 everything on except the mpu Apr 02 08:05:21 or, first test just modulemode=disabled and clockdomain=SW_SLEEP Apr 02 08:05:44 since then the mpu should wakeup normally from the irq instead of taking the resume path Apr 02 08:05:55 i.e. wfi acts like a wfi and nothing more Apr 02 08:06:45 if you also set pd_mpu=off then it'll take the resume path (unless it falls through the wfi because an irq is already being asserted) Apr 02 08:07:27 iirc I simply used my baremetal test, which toggles a led in response to a gpio Apr 02 08:07:42 then saw if that still worked with modulemode=disabled and clockdomain=sw_sleep Apr 02 08:08:26 ( https://github.com/mvduin/bbb-asm-demo ) Apr 02 08:10:59 setting pd_mpu=off of course will have crashed due to not setting up a resume vector Apr 02 08:12:00 though, that demo can run entirely from ocmc (just needs small change to linker script) and uses so little cpu initialization (mmu still off etc) that a resume path would be very easy to add Apr 02 08:12:17 maybe I'll do that when I find a moment Apr 02 08:13:00 hum, I tried turning the power led off but the pmic doesn't let me, for some reason Apr 02 08:17:38 zmatt: you're using the A8 SRAM? It's that used as a cache? Apr 02 08:17:39 d'oh, PEBKAC Apr 02 08:18:02 s/it's/isn't/ Apr 02 08:18:31 no, caches are integrated in the a8 Apr 02 08:19:05 the a8 sram and ocmc are consecutive in the memory map, hence used as a single memory by ROM and by SPL Apr 02 08:19:13 and by my linker script Apr 02 08:19:15 sort of Apr 02 08:19:26 first 1 KB is reserved for secure world and inaccessible Apr 02 08:19:48 all of it is gone however if mpu goes powerdown, so in that case you need to restrict to ocmc Apr 02 08:20:03 my tiny tiny tiny application fits there very comfortably Apr 02 08:20:33 well it's not that small, actually Apr 02 08:20:47 the memory, I mean Apr 02 08:20:50 not your test prog Apr 02 08:21:08 the only reason I didn't set it up like that by default is because some ways of booting the am335x don't give control over the load address and hardcode 0x402f0400 Apr 02 08:21:33 a8 sram and ocmc are 64 KB each, (63 KB usable of a8 sram) Apr 02 08:22:35 hah it works Apr 02 08:23:20 pwwr() { i2cset -f -y 0 0x24 0x0b $(( $1 ^ 0x7d )) && i2cset -f -y 0 0x24 $1 $2; } Apr 02 08:23:31 pwwr 0x16 0x7e # cpu led off Apr 02 08:23:35 pwwr 0x16 0x7f # cpu led on Apr 02 08:23:43 note: do NOT do this with old bbb revisions Apr 02 08:24:01 safe on rev C though Apr 02 08:24:37 anyway, I'm afk Apr 02 08:33:00 I have A5A, that should be safe, too Apr 02 08:33:51 no Apr 02 08:33:52 nonono Apr 02 08:33:56 nooonoono Apr 02 08:35:23 doing this on A5A will turn off the VDD_3V3B while remaining supplies remain on, which may very well kill the hardware Apr 02 08:38:44 the change that made toggling the cpu led safe was done in revision A6 Apr 02 08:46:48 ok now really afk, train to catch Apr 02 19:49:50 hi guys is it normal for the bealgebone black to not boot with 5.4volts connected to vdd_raw? Apr 02 19:50:37 I am not able to get it to boot using an usb barrel jack and external usb charger either. it will boot with that usb barrel jack through my laptop though Apr 02 21:15:32 hmm, I wonder how bad idea it would be to install systemd from debian 'experimental' ... I kinda urgently need stuff they added as feature in the latest version :/ Apr 02 21:16:13 it's already been out for a month... Apr 02 21:35:03 zmatt: Ask mbiebl (Michael Biebl), he should know whether there are any known problems. Apr 02 21:39:52 zmatt: The reason why 233 is not in unstable is that 232 will be in stretch, so >= 233 will be in experimental until after stretch gets released this summer. Apr 02 21:44:14 hmm? I kinda assumed that once testing gets into feature-freeze, unstable would just go on with development for the next release Apr 02 21:47:40 zmatt: No, uploads to testing still (usually) happen through unstable. Apr 02 21:48:07 -.- Apr 02 22:25:19 zmatt: forgot about connman .. hrm. Apr 03 00:35:08 huh, why the fuck does btrfs depend on raid6 Apr 03 00:43:57 eh?!?! Apr 03 00:44:08 kernel?? Apr 03 00:48:38 http://lxr.free-electrons.com/source/fs/btrfs/Kconfig Apr 03 00:48:41 line 9 Apr 03 00:49:20 I noticed since the picks the best implementation for that by... benchmarking all choices available Apr 03 00:49:24 every boot Apr 03 00:50:26 which roughly doubled boot time Apr 03 00:54:07 I've just patched the kernel to hard-select the best implementation Apr 03 01:18:50 Spidler: btw, did you know eMMC has the option to convert some or all of its storage to SLC ? Apr 03 01:19:11 (of course paying the price in capacity) Apr 03 01:51:29 wow yik Apr 03 02:11:09 meh, erlang/elixir define rem(-4,3) to be -1 rather than 2 ... why do so many languages get that wrong -.- **** ENDING LOGGING AT Mon Apr 03 03:00:01 2017