**** BEGIN LOGGING AT Mon Oct 16 03:00:02 2017 Oct 16 07:21:30 when doing dev on a bbb, I can very much recommend setting up distcc to offload the actual compilation work to a machine that's a bit faster :P Oct 16 07:30:26 O_O Oct 16 07:30:30 -_- Oct 16 07:30:54 ayjay_t? Oct 16 07:31:11 i'm sure we all have our on bbb dev setsup Oct 16 07:31:16 hadn't thought about using distcc Oct 16 07:31:48 oh it took me a while before I did that too... then I was like holy shit why didn't I set this up sooner Oct 16 07:33:11 i'm not familiar with it so i'd have to tackle the learning curve first, i'm sure it might be useful at some poitn tho Oct 16 07:34:25 just try to make sure the compiler version is the same on bbb and distcc server, and that you invoke the compiler as "arm-linux-gnueabihf-gcc" on the bbb, not "gcc" (since then it'll try to distribute it to "gcc" on the x86 machine, which won't work... I wish distcc handled that a bit more intelligently) Oct 16 07:35:37 so one of my friends managed to build an html interpreter that renders directly to the framebuffer Oct 16 07:35:43 so no need for X Oct 16 07:36:04 and you can even embed c programs and call them like javascript functions Oct 16 07:36:18 as long as you compile them as a library, but yeah, you embed them directly in the html tags Oct 16 07:36:34 :-P Oct 16 07:40:36 mind to share the project ayjay_t ? :) Oct 16 07:42:12 let me talk to the author about open sourcing it, it has a few discrete things that could be improved Oct 16 07:42:45 and no javascript, unfortunately Oct 16 07:42:49 lol just c Oct 16 07:45:11 no problem Oct 16 08:09:49 ayjay_t: https://pastebin.com/raw/GwP88qgb Oct 16 08:10:00 my full distcc setup Oct 16 08:12:47 the hardest part is dealing with the stupid symlinks to get distcc automatically invoked Oct 16 11:07:41 hi, which image version of debian os has GUI/Desktop? Oct 16 11:09:41 nvm, i guess the name that has lxqt -_- Oct 16 11:16:52 indeed :) Oct 16 11:17:12 iot = everything except gui, console = minimalistic base image Oct 16 11:24:48 * ogra_ disagrees with the IoT definition ... you could have some kiosk UI on a IoT device too ;) Oct 16 11:49:38 ogra_: yeah IoT/LXQT thing is a little ... something or other. THough I'm not quite sure what terms better describe. All FE'sare graphic of some description... Oct 16 12:10:48 ogra_: you could label *anything* with IoT, even a toilet ;-þ Oct 16 12:16:08 tbr, so true :) ... and happy belated birthday too ;) Oct 16 12:20:36 thanks :) Oct 16 12:38:17 What is the most reliable way to add a second USB port to the beaglebone black? A hat? cheap Hub? Oct 16 12:55:54 Sudovo: the SoC only has two USB ports, so even if you'd want to repurpose the device port into a host port, a USB-hub attached to the existing host port is the quickest and cheapest way. Oct 16 13:04:30 tbr: Thanks! Oct 16 13:11:09 set_: i was off line, saw your response in logs, https://kernelnewbies.org/, thanks! Oct 16 13:28:07 Hello everyone, has anyone had trouble with BBB; I disconnect network cable, reconnect it, but then lose ping access to the BBB. Have to reset BBB to regain network access. Oct 16 14:11:36 TomHammond: depends entirely on what sort of OS/Distribution you run on your BBB Oct 16 14:12:40 TomHammond: I'd suggest to log on via serial terminal. either USB or debug-UART and investigate what happens that way Oct 16 14:12:44 or not Oct 16 14:35:27 Hello, I am looking for a board that works over a wider temperature range (preferably -40 to 165F) Oct 16 14:37:33 Soufiane: shouldn't https://www.arrow.com/en/products/bb-bblk-000-itemp/arrow-development-tools do the trick? Oct 16 14:39:46 Yes, that is one option. Do you have other options. Specifically one with an RS-232 port? Oct 16 14:40:53 Soufiane: um. well i did google for you one time. i don't feel like doing it over and over again, while you keep adding bots and pieces you didn't want to mention in the first place. Oct 16 14:41:01 s/bots/bits/ Oct 16 14:44:39 Thank you for your help. I will take from here! Oct 16 15:19:47 Up, up, and OTAY! Oct 16 16:33:44 any one know of example c code for BBB using /dev/mem/ and mmap() for gpio? Oct 16 16:41:16 eeeeeew Oct 16 16:43:40 hah Oct 16 16:44:07 its not that bad, useful to know how to use /dev/mem/ for peripherals in general i think Oct 16 16:48:05 zarzar1: I have a nice C++ wrapper. it's nicer to use than to study though, there's a bit of black magic involved here and there ;) Oct 16 16:48:51 hi zmatt: that would be great if it uses /dev/mem Oct 16 16:52:30 found this but I am not sure if it is out of date: Oct 16 16:52:32 http://vabi-robotics.blogspot.com/2013/10/register-access-to-gpios-of-beaglebone.html Oct 16 17:02:18 sorry, was distracted here for a moment Oct 16 17:03:21 https://github.com/dutchanddutch/jbang has some of my baremetal headers, the one relevant here is ti/subarctic/gpio.h Oct 16 17:04:15 and it contains libsubarctic, which is some magic glue to make those headers work in linux userspace by mmaping() the appropriate regions of /dev/mem Oct 16 17:05:49 hmmm... I should probably update it with internal sources again, since this version still contains a trick which works in practice but isn't really safe Oct 16 17:13:32 thanks zmatt! what are the .cc files? Oct 16 17:13:48 see readme? Oct 16 17:14:07 ok. i mean language wise Oct 16 17:14:15 c++ Oct 16 17:14:23 (again, see readme) Oct 16 17:14:27 k Oct 16 17:14:51 specifically, last paragraph of readme Oct 16 17:16:50 zmatt that's some fancy coding Oct 16 17:17:22 is there a version for dumb lazy people like me? Oct 16 17:17:29 :) Oct 16 18:37:04 zmatt: do i need to change permissions for /dev/mem/ , it is root by default? Oct 16 18:38:21 only root can access /dev/mem, regardless of what permissions you assign in the filesystem Oct 16 18:38:53 oh ok Oct 16 18:39:09 which makes perfect sense since access to /dev/mem gives total control over the hardware Oct 16 18:39:15 true Oct 16 18:42:11 btw, when doing direct access to a gpio controller, you do need to ensure that the controller is already enabled by the kernel. this will be the case if any gpio of that controlled is exported or used by the kernel, or you can force it by writing "on" to /sys/class/gpio/$CHIP/power/control Oct 16 18:42:31 attempting to access a peripheral while it's not enabled results in a bus error Oct 16 18:44:23 even gpio peripheral? Oct 16 18:44:32 any peripheral Oct 16 18:44:54 hmm, what is not enabled? the bus or clock? Oct 16 18:46:23 when a peripheral is disabled, its clock(s) are gated and it is disconnected from its target agent(s) on the interconnect(s), which therefore reply with error on any access Oct 16 18:46:23 other example code i used has this: fd = open("/sys/class/gpio/export", O_WRONLY); to enable the controller Oct 16 18:46:33 i see Oct 16 18:46:42 couldn't i enable the clock instead? Oct 16 18:47:24 usually in bare metal you enable the clock to a peripheral then start configuring it Oct 16 18:47:30 you can. the downside is that fiddling with PRCM behind the kernel's back upsets it a bit when it finds out. it's fine to do it with peripherals that are entirely unused or unknown to the kernel, but that's not true for gpio controllers Oct 16 18:47:40 i see Oct 16 18:47:41 ok Oct 16 18:48:04 i will use the sys class gpio export then, thanks for the heads up Oct 16 18:48:47 opening "/sys/class/gpio/export" by itself doesn't enable anything btw, presumably they write values there Oct 16 18:49:05 if you have cape-universal enabled, all gpios are exported by default anyway Oct 16 18:50:01 https://pastebin.com/8TawmKst Oct 16 18:50:13 btw you can see me manually enabling modules here -> https://github.com/dutchanddutch/jbang/blob/master/src/hw-subarctic.cc#L42-L61 Oct 16 18:50:30 the code opens then writes the pin number to the export file(?) Oct 16 18:51:01 yeah Oct 16 18:51:12 zmatt i'm not smart enough to understand that code Oct 16 18:51:35 :( will take me a while to understand that Oct 16 18:51:37 just look at lines 56-57 Oct 16 18:51:52 that enables one peripheral (namely the debug subsystem) Oct 16 18:52:26 wait_until is just a macro btw -> https://github.com/dutchanddutch/jbang/blob/master/include/util/device.h#L10 Oct 16 18:58:59 cooool, a merger of two neutron stars has been detected by gravitational waves *and* electromagnetic radiation across the spectrum Oct 16 18:59:58 (1000 times brigher than a typical supernova) Oct 16 19:01:00 Two stars crash into each other, wobbling the universe and flinging out huge amounts of gold http://www.independent.co.uk/news/science/neutron-star-collision-gravitational-waves-gold-metal-precious-ligo-a8003146.html Oct 16 19:13:32 \o/ Oct 16 20:32:52 zmatt: i don't understand the call to mmap here addr is used for addr and offset (first and last params): https://github.com/dutchanddutch/jbang/blob/master/libsubarctic/map-phys.cc Oct 16 20:35:19 please don't use what I'm doing there as example Oct 16 20:36:02 I'm using a terrible hack to make it look like a baremetal environment by using MAP_FIXED Oct 16 20:36:36 oh ok, its similar to other code i have floating about the internets Oct 16 20:36:49 I doubt any of it uses MAP_FIXED Oct 16 20:37:11 that is true Oct 16 20:37:31 neither should I, and actually I got rid of it in the current version of this lib... that's why I said earlier I should update jbang Oct 16 20:38:01 seems like map fixed would be correct though Oct 16 20:38:40 that was the issue Oct 16 20:39:11 map fixed doesn't work in my code Oct 16 20:39:37 map fixed relies on the physical address range where the peripherals lie being unused in the virtual address space of the program. for some reason it seems that this happens to be true in practice, but there's also absolutely nothing to guarantee it always is (let alone will always stay that way) Oct 16 20:40:29 hmm Oct 16 20:40:32 it probably helps that in my lib this gets executed during very early initialization (before main() is invoked), so not much will have been allocated yet Oct 16 20:41:37 zmatt how long have you been working with embedded linux? Oct 16 20:49:49 https://gist.github.com/mvduin/30e417d02263ee0fe81ea007f188c5bd this is my current version of map-phys.{h,cc} with a completely untested example Oct 16 20:51:15 couple of years or so? Oct 16 20:58:32 so my code is working now, thanks for the advice yet again Oct 16 20:59:55 so anyway, rest assured that my code isn't actually doing anything complicated... it's mostly just syntax sugar :P Oct 16 21:01:32 ok Oct 16 21:11:12 as shown by the fact that the main function of my example compiles (at -O2) down to almost nothing -> https://pastebin.com/raw/BmyzsEJ7 Oct 16 21:13:25 (most of the work actually goes into obtaining &gpio1 because -fPIC is the default since debian gcc 6 Oct 16 21:13:28 ) Oct 16 23:25:35 yow, is there any tutorial on how to use the onboard PMIC of BBB with johnny-five? :) Oct 16 23:27:08 johnny-five ? Oct 16 23:28:04 zmatt, are you going to be around in a couple of hours? I'm about ready to work on crazy edma hacks. ;) Oct 16 23:29:51 I might, I might not... depends on whether my silly brain decides it needs sleep Oct 16 23:31:31 hm. Oct 16 23:32:14 yeah Oct 16 23:32:47 bg, you're referring to http://johnny-five.io/ ? Oct 16 23:32:57 yes Oct 16 23:33:12 I don't think either of us have heard of it before. Oct 16 23:33:28 oh i see, Oct 16 23:33:39 it doesn't look like it uses the PRUs, either. Oct 16 23:33:41 i guess i'll be the first to try this out? :D Oct 16 23:33:55 ew, javascript Oct 16 23:33:55 http://johnny-five.io/platform-support/#beaglebone-black is everything I see about it. Oct 16 23:34:15 what do you want to do with the pmic specifically? Oct 16 23:34:26 @zmatt hahaha i know Oct 16 23:34:36 zmatt, I mean, beaglescript also uses JS. Oct 16 23:34:54 some batterymonitoring? Oct 16 23:35:29 need to have a battery monitoring Oct 16 23:35:40 or if you have some that you can suggest Oct 16 23:36:46 using the battery terminals of the pmic is considered fairly advanced stuff (the BBB actually needs a hw patch to avoid problems), and the PMIC has almost no useful info to monitor it Oct 16 23:37:24 you can tell when it's done charging and whether some error occurred, and that's about it Oct 16 23:38:13 ahh i see, i thought i was save from buying a cape or making a circuit for battery... anyways. Oct 16 23:38:50 is the power monitoring cape from andicelabs good enough for this? Oct 16 23:39:03 this one: https://elinux.org/AndiceLabs:PowerCape Oct 16 23:39:39 now, external capes and hardware may be a completely different deal and you'll have to look at their documentation to determine how to communicate with them. Oct 16 23:40:02 (assuming they don't trigger the hw bugs) Oct 16 23:40:18 hw bugs? Oct 16 23:40:21 Yep...I noticed some capes have no docs. Oct 16 23:40:26 the hw bug is specific to using the battery terminals of the PMIC Oct 16 23:40:46 i'm new to this BBB, i;m from RPi Oct 16 23:40:51 (which a cape probably won't) Oct 16 23:41:00 ok i'm getting into it Oct 16 23:41:57 I don't know anything about that Power cape or anything similar, so can't really give useful advice on that :) Oct 16 23:42:12 I only have experience with using the PMIC's built-in li-ion charger Oct 16 23:42:45 it looks like it just uses the power pins on P9. Oct 16 23:42:57 yes, which is what I'd expect Oct 16 23:43:07 + i2c and the buttons Oct 16 23:43:30 so I'd bet communicate with the cape through i2c. Oct 16 23:44:11 okey2. so it happens that i have a li-ion battery, :) hehe. need to try this out. Oct 16 23:44:36 just use the cape, not the built in terminals. Oct 16 23:45:49 "The Power Cape’s register set is available via the I2C2 bus at address 0x21" Oct 16 23:46:03 "The AVR is at address 0x21 and the INA219 is at address 0x40." Oct 16 23:46:44 bg: if you mean the pmic's battery terminals, do read https://elinux.org/BeagleBone_Power_Management#Battery Oct 16 23:47:09 https://github.com/AndiceLabs/PowerCape -- found their firmware and some tools. Oct 16 23:49:24 https://github.com/AndiceLabs/PowerCape/blob/master/utils/powercape.c#L379-L386 Oct 17 00:04:39 Can anyone say cross-compilation time for the BBB? Oct 17 00:06:49 http://exploringbeaglebone.com/chapter7/#prettyPhoto is the most up-to-date info. on cross comp. for Debian Jessie. Oct 17 00:07:05 i.e. for at least involving the book idea. Oct 17 00:23:18 no mas emdebian. Boo! Oct 17 00:23:20 Oh well. Oct 17 00:23:27 Where is my hammer? Oct 17 02:07:27 hi, anyone here can recommend me a display w/ touch cape for bbb wireless :) **** ENDING LOGGING AT Tue Oct 17 03:00:02 2017