**** BEGIN LOGGING AT Tue Dec 12 03:00:01 2017 Dec 12 03:14:00 zmatt!!! Dec 12 03:14:03 help out a bonehead Dec 12 03:49:59 it is unlikely that me or anyone else is able to do so, since you haven't actually asked a question Dec 12 03:59:40 does that make him helpless? Dec 12 06:30:53 just created a simpel user.cmd : console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet init=/bin/bash Dec 12 06:31:10 it's the default one with init=/init/bash appended Dec 12 06:31:40 created the user.scr : mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Execute uImage' -d user.cmd user.scr Dec 12 06:31:54 placed it at / Dec 12 06:32:22 booted with S2 pressed , but user.scr doesn't seem to be picked up Dec 12 06:32:36 the beagle startsup with the original parameters Dec 12 06:33:24 using the latest bone-debian-9.2-iot-armhf-2017-10-10-4gb.img Dec 12 06:56:16 Hey Everyone, i am a 2nd year engineering student and want to contribute code in this Organization. Dec 12 06:56:45 Any help from mentors or maintainers will be much helpful Dec 12 06:56:57 willie_w: why would you think u-boot is looking for a "user.scr" ? Dec 12 06:57:49 willie_w: it looks like you're trying to change the kernel parameters? those are configured in /boot/uEnv.txt (the "cmdline" variable) Dec 12 07:05:26 ah ok, so uEnv.txt is read before starting the kernel Dec 12 07:05:37 even better Dec 12 07:06:09 uEnv.txt contains the config vars for u-boot Dec 12 07:06:17 the user.scr idea was coming after reading a couple of things on the net Dec 12 07:06:34 don't believe everything on the net...I know that's why I'm asking here Dec 12 07:08:35 whatever you read was probably right for whatever context it was meant for... that context is definitely not a beaglebone though (or at least not one flashed with the default debian image) Dec 12 08:47:07 HELP7 Dec 12 08:47:32 I couldnot use sd card as internal memory Dec 12 10:02:07 nor formulate a constructive question Dec 12 12:06:23 Hey guys, does some has 1 a working bonescript for reading Gyro MPU6050? Dec 12 13:44:40 how can i set the pwmss_ctrl Control Module register to enable PWMSS clocks? Dec 12 13:49:54 normally the kernel enables those automatically when using pwmss peripherals Dec 12 13:51:15 the whole thing is stupid anyway, that clock control register exists for the sole purpose of being able to ungate the clocks to multiple pwmss modules at the exact same time (to run their counters in sync), and this is impossible with the way the kernel handles it right now Dec 12 13:51:31 so they might as well just have set all three bits by default and be done with it Dec 12 13:56:41 ok, but at boot time i still cant get them enabled Dec 12 13:57:31 by using the CCS and a debugger i was able to set them in the startup.js script Dec 12 13:57:52 you're doing baremetal development? Dec 12 13:58:02 and i really cant find anything usefull on the net Dec 12 13:58:24 yes Dec 12 13:58:34 baremetal for debugging purposes Dec 12 13:58:38 keep in mind that control module registers cannot be written using unprivileged (userspace) writes, they need to be privileged (kernel) writes Dec 12 13:58:52 yeah i figured that out already Dec 12 13:58:59 but what does it mean? Dec 12 13:59:06 i dont get it Dec 12 13:59:17 cortex-a8 needs to be in any mode other than USER Dec 12 13:59:56 ok i know that too, but how do i achieve that Dec 12 14:00:12 i really cant find anything on this topic Dec 12 14:00:21 i would like to boot my beagle Dec 12 14:00:50 I don't know what to say, I'm not sure how you're doing baremetal dev while being unaware of any aspects of the ARM system-level architecture Dec 12 14:01:21 but by default the processor is in supervisor mode, so you're running privileged unless you deliberately enter user mode Dec 12 14:01:22 i am using CCS Dec 12 14:01:31 CCS is an IDE Dec 12 14:01:50 what text editor you use isn't really important for the cpu Dec 12 14:03:46 yes, but you also have a target configuration available Dec 12 14:03:55 and it is a debugging tool aswell Dec 12 14:04:06 sure, and? Dec 12 14:04:20 well it takes care of the PRU initialization Dec 12 14:04:37 and how am i suppose to know in what modes does it? Dec 12 14:04:38 pru is not able to write to control module registers Dec 12 14:04:44 right Dec 12 14:04:52 i figured that out Dec 12 14:04:55 pru always performs unprivileged accesses Dec 12 14:05:10 it is not capable of doing privileged reads or writes Dec 12 14:05:24 so control module setup needs to be done from the cortex-a8 or via the debugger Dec 12 14:06:46 ok, as i said before connecting to the target (BB Blue), i configure the debug, by adding an initialization js script Dec 12 14:07:10 which i guess uses some driver on the host processor Dec 12 14:07:26 it probably just uses debug access Dec 12 14:08:00 but you also said you were able to set them via that route, so I'm not sure what you're still asking Dec 12 14:08:41 yes, you ssaid pwmss_ctrl can only be accessed by cortex-a8 in privileged mode Dec 12 14:08:48 how can i achieve that Dec 12 14:08:50 ? Dec 12 14:08:51 or (privileged) debug access Dec 12 14:09:06 ok, i dont care 'bout the second one Dec 12 14:09:59 okay.. so? Dec 12 14:10:29 as I already mentioned, the cortex-a8 is in a privileged mode unless you deliberately enter user mode Dec 12 14:10:34 so, do you know how can i get in privilege mode Dec 12 14:10:50 or perhaps point me in the right direction Dec 12 14:11:07 ... Dec 12 14:13:11 I am thoroughly confused what you are doing if it's not working for you Dec 12 14:13:33 oh, now i see Dec 12 14:13:55 the cortex-a8 is alredy in privileged mode Dec 12 14:14:13 unless you deliberately enter user mode Dec 12 14:14:17 hmm.. Dec 12 14:14:25 im kinda confused Dec 12 14:14:31 right now :D Dec 12 14:14:48 yes, e.g. the linux kernel does that when context-switching to a userspace process. but baremetal code typicallyruns entirely in privileged mode Dec 12 14:16:46 and a userspace process would be an executable Dec 12 14:17:19 that tries to write to the lets say pwmss_ctrl register Dec 12 14:17:21 uhh, those are different concepts Dec 12 14:17:28 ? Dec 12 14:18:10 but.. you were doing baremetal dev right? I mean, I asked explicitly about that and you said yes Dec 12 14:18:18 yes Dec 12 14:18:50 so it's rather irrelevant how linux does things Dec 12 14:18:55 i was doing baremetal w/ a cheap debugger and CCS debugging software Dec 12 14:19:24 no, because on reboot the pwmss_ctrl reset to 0x0 Dec 12 14:19:40 and the time base clocks are gated Dec 12 14:19:46 uh, yes, so? Dec 12 14:20:26 so? i need them after boot so the PRU code loads to the PRUs and control the PWM duty cycle etc. Dec 12 14:20:55 okay, I'm starting to think you're the one being confused. is the question you're *actually* trying to ask "how do I write a control module register from linux userspace?" Dec 12 14:21:31 yes Dec 12 14:21:43 how can i enable the clocks from userspace Dec 12 14:21:45 jesus christ. okay, so "no, I'm not doing baremetal dev, I'm using linux" Dec 12 14:21:47 linux* Dec 12 14:22:05 you can trick the kernel into doing the write for you Dec 12 14:22:10 yes, when in production lets say Dec 12 14:22:15 oh really? Dec 12 14:22:36 trick in what sense Dec 12 14:23:59 if i run the rc_test_motors from the Strawson Design Robotics Cape software Dec 12 14:24:28 you need to mmap the control module registers, and then write to them using process_vm_readv() (there are probably other system calls that can be abused for the purpose, but I know that one works) Dec 12 14:24:34 the clocks get ungated, but I am not able to figure out how they achieve that Dec 12 14:27:23 probably they just use the kernel api for pwm Dec 12 14:27:24 ? Dec 12 14:27:35 (I have no idea, I haven't looked) Dec 12 14:28:27 yes they do. but they only write to register that control the timebase, dutycycle, compare etc. Dec 12 14:28:44 and all those addresses are present in the software constants Dec 12 14:29:07 this pwmss_ctrl is on 0x44e10664 Dec 12 14:29:15 you mean "no they don't" ? since what you're describing doesn't sound like they do Dec 12 14:30:48 actually it looks like they do... it looks to me like they're using the kernel api, not writing directly to registers Dec 12 14:31:06 not, they write to filedescriptors Dec 12 14:31:09 so the kernel takes care of everything in that case Dec 12 14:31:13 yes Dec 12 14:31:37 they're writing to sysfs attributes, not to hardware registers Dec 12 14:31:58 (obviously that indirectly causes the kernel to write to hardware registers) Dec 12 14:32:25 when you say kernel writes to hardware.. what do you mean Dec 12 14:32:35 the kernel reads from the sysfs Dec 12 14:32:39 ? Dec 12 14:32:44 ??? Dec 12 14:33:26 you seem to be so confused about how an OS works I'm not even sure where to begin Dec 12 14:33:31 sorry, i think im gonna have to read a few more books on all this stuff Dec 12 14:33:44 yup Dec 12 14:34:06 any read or write to a file descriptor (regardless of whether this is in sysfs or not) is a call into the kernel Dec 12 14:34:20 ok Dec 12 14:36:08 e.g. when a program calls write(), it ends up (via syscall dispatching) in this piece of kernel code: https://github.com/RobertCNelson/linux-stable-rcn-ee/blob/4.9.67-ti-r82/fs/read_write.c#L623-L638 Dec 12 14:38:20 sysfs is kinda special since everything there is just a representation of kernel objects, with files being attributes Dec 12 14:38:56 so, via an indirect route, reads and writes there end up calling getters and setters in drivers and other parts of the kernel Dec 12 14:40:35 ok Dec 12 14:41:50 anyway, to come back at the original topic: that code uses the kernel driver for ehrpwm, which causes the kernel to automatically enable the pwm timebase clocks when needed Dec 12 14:42:33 https://github.com/RobertCNelson/linux-stable-rcn-ee/blob/4.9.67-ti-r82/drivers/pwm/pwm-tiehrpwm.c#L358-L359 Dec 12 14:43:38 that call indirectly triggers the write to pwmss_ctrl, which is a privileged write since it's performed by the kernel Dec 12 14:44:03 thats why i wasnt able to find the associated pwmss_ctrl address Dec 12 14:44:10 in the Strawson code Dec 12 14:45:03 there are no hardware register addresses involved whatsoever, since no direct writes to registers are being done Dec 12 14:46:44 ok Dec 12 14:47:00 there are directories named after register addresses Dec 12 14:47:13 and in those directories the file descriptors Dec 12 14:47:38 some sysfs directories are named after devices, which may have a base address in their name to make them unique Dec 12 14:47:59 though to be honest, hardcoding those paths is awful Dec 12 14:48:14 they're absolutely not guaranteed to be stable Dec 12 14:49:27 well, il try to do as you said for enabling the clocks Dec 12 14:50:02 so mmap those registers Dec 12 14:50:35 you can also initialize the pwmss module using the kernel driver, let the kernel do the work for you Dec 12 14:50:37 and write to them w/ process_vm_read Dec 12 14:51:02 (and then just update the duty cycle in your pru code) Dec 12 14:51:42 that also avoids manually messing with PRCM Dec 12 14:51:57 i am using the PRU cuz the position readings are more deterministic Dec 12 14:52:22 right, but that doesn't mean you have to do initialization there Dec 12 14:52:31 i know Dec 12 14:52:55 anyway, you can do it whichever way you prefer of course Dec 12 14:53:06 but since i have to change the duty cycle in the PRU aswell Dec 12 14:53:22 for speed regulation Dec 12 14:53:27 ill do it all ther Dec 12 14:53:28 e Dec 12 14:55:00 zmatt, you're the man Dec 12 14:55:08 many thanks Dec 12 14:58:29 :) Dec 12 15:01:28 haha, hope i can help you someday :D Dec 12 15:02:34 if you find a way to manufacture time and/or motivation, let me know Dec 12 16:05:52 Well they have certain drugs for the motivation part, but I suspect it affects the quality of the work done (adderall and similar) Dec 12 16:12:08 they help (I'm on a dexamphetamine prescription) but they're not magic Dec 12 16:12:41 I was only speaking from my own... dabbling in them xD Dec 12 16:12:53 I find that they make me far too social in general to get real work done, unfortunately Dec 12 16:13:22 sounds like too high dosage possibly Dec 12 16:18:28 any idea how to make cloud9 execute run commands as root user (on beaglebone blue / debian stretch)? Dec 12 16:30:02 Interesting question michaelmeg_, would be curious to know myself. I do know that Cloud9 seems to use root on the Debian Jessie images, so I'm assuming you had that behavior before and want to get it back Dec 12 16:30:36 (that said, executing things in root is ... a tad scary if you have something to lose from it other than a little time) Dec 12 16:31:07 Ok Back Dec 12 16:31:11 I still need help Dec 12 16:31:23 I had wife aggro last night could not get back to the computer Dec 12 16:31:44 anyway I need to manually get this LAN going to use my board is what I determined Dec 12 16:33:26 zmatt i managed to make it work Dec 12 16:33:57 carbon what are you working on Dec 12 16:35:12 i dont like the idea of controlling the pwm duty cycle Dec 12 16:35:20 from the linux userspace Dec 12 16:36:25 and i am trying to make a simple motor driver Dec 12 16:37:32 i just want to give reference from the linux userspace Dec 12 16:37:45 and then measure and regulate on the PRUs Dec 12 16:37:53 ok that sailed way over my head Dec 12 16:39:25 so you are making the driver from scratch? Dec 12 17:42:30 Finally got it working Dec 12 17:42:38 that interfaces file is a black hole Dec 12 17:43:51 screwed up EVERYTHING Dec 12 18:38:56 lol Dec 12 18:39:20 trying to mix different network managers is a baaad idea Dec 12 22:18:16 Hello, am I free to ask for some help on my BeagleBone? Dec 12 22:19:15 StudentInNeed: ask away, wait for a few hours for a response... Dec 12 23:05:06 why would a camera that is connected to a beaglebone show that the device/resource is busy when using the v4l2-ctl command on it? Dec 12 23:21:39 maybe some desktop software is automatically started that makes use of it? Dec 13 01:15:39 Hello peoples Dec 13 01:15:45 question for the gallary Dec 13 01:16:05 how would I monitor a program trying to log into the BB Dec 13 01:16:30 I have my setup working but I am trying to put LINX on there running to problems Dec 13 01:16:44 I can follow the steps except for the last part. I cannot logon as root Dec 13 01:16:52 I can logon as myself interestingly enough Dec 13 01:22:58 I believe in /etc there are settings to allow you to log in remotely as root. This is greatly frowned on (bluntly). You should login via a terminal port as root or at the console as root only. Do you have the port setup and the normal linux server type settings configured? Dec 13 01:28:03 i do not believe so Dec 13 01:28:20 what file would allow me to change that setting Dec 13 01:28:29 I would only do in temporarily Dec 13 01:29:16 or can i elevate the ID i created as another root Dec 13 01:30:26 nm found it Dec 13 01:30:29 let me give this a shot Dec 13 01:38:22 hmmm not working Dec 13 01:38:28 you know when I would serial in Dec 13 01:38:33 i could type root without password Dec 13 01:38:46 I think that is what this installation was leveraging Dec 13 01:48:58 Ok that was it Dec 13 01:49:06 i will disable that setting ASAP **** ENDING LOGGING AT Wed Dec 13 03:00:01 2017