{"action":"created","issue":{"url":"https://api.github.com/repos/machinekit/machinekit/issues/839","labels_url":"https://api.github.com/repos/machinekit/machinekit/issues/839/labels{/name}","comments_url":"https://api.github.com/repos/machinekit/machinekit/issues/839/comments","events_url":"https://api.github.com/repos/machinekit/machinekit/issues/839/events","html_url":"https://github.com/machinekit/machinekit/issues/839","id":122981182,"number":839,"title":"Fix PRU support on modern kernels ","user":{"login":"mhaberler","id":901479,"avatar_url":"https://avatars.githubusercontent.com/u/901479?v=3","gravatar_id":"","url":"https://api.github.com/users/mhaberler","html_url":"https://github.com/mhaberler","followers_url":"https://api.github.com/users/mhaberler/followers","following_url":"https://api.github.com/users/mhaberler/following{/other_user}","gists_url":"https://api.github.com/users/mhaberler/gists{/gist_id}","starred_url":"https://api.github.com/users/mhaberler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhaberler/subscriptions","organizations_url":"https://api.github.com/users/mhaberler/orgs","repos_url":"https://api.github.com/users/mhaberler/repos","events_url":"https://api.github.com/users/mhaberler/events{/privacy}","received_events_url":"https://api.github.com/users/mhaberler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/machinekit/machinekit/labels/project","name":"project","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2015-12-18T16:33:14Z","updated_at":"2015-12-23T06:54:57Z","closed_at":null,"body":"The BB PRU support is currently tied to the legacy [TI PRUSS driver](http://elinux.org/Ti_AM33XX_PRUSSv2) which has been superseded by the mainstream [remoteproc facility](http://processors.wiki.ti.com/index.php/PRU-ICSS_Getting_Started_Guide)\r\n\r\nCurrently we still use the PRUSS driver on the BB xenomai 3.8 kernel.\r\n\r\nAs PRUSSv2 is being phased out in favor of remoteproc, we need to adapt the PRU support to remoteproc so we can switch to higher kernel version numbers, for instance to support the BeagleBoard X15 - which we currently cannot, as we are stuck with the 3.8 kernel.\r\n\r\nAffected code: mostly hal_pru_generic (stepgen, pwmgen, encoder etc): https://github.com/machinekit/machinekit/tree/master/src/hal/drivers/hal_pru_generic\r\n\r\nRough outline:\r\n- understand how the current PRU support on the 3.8 kernel with PRUSS works - exercise some of the sample PRU programs on the net until you get the hang of it\r\n- read up on remoteproc\r\n- find a recent BB kernel which has remoteproc support (3.14+ I guess)\r\n- make the example programs work with remoteproc loading/starting/stopping of the PRU\r\n- adapt the hal_pru_generic code to alternatively support both methods (ideally with autodetection of the kernel facility provided)\r\n- proof of function - an example or - even better - regression test would be great\r\n- update the documentation as needed\r\n\r\nPrerequisites: \r\n- basic kernel skills: building a kernel and device drivers, adapting build support \r\n\r\nEffort:\r\n- 1-2 weeks of wee hour work if proficient with kernels\r\n\r\nPotential coaches: @cdsteinkuehler @mhaberler (possibly @RobertCNelson, did not ask yet..)"},"comment":{"url":"https://api.github.com/repos/machinekit/machinekit/issues/comments/166815746","html_url":"https://github.com/machinekit/machinekit/issues/839#issuecomment-166815746","issue_url":"https://api.github.com/repos/machinekit/machinekit/issues/839","id":166815746,"user":{"login":"mhaberler","id":901479,"avatar_url":"https://avatars.githubusercontent.com/u/901479?v=3","gravatar_id":"","url":"https://api.github.com/users/mhaberler","html_url":"https://github.com/mhaberler","followers_url":"https://api.github.com/users/mhaberler/followers","following_url":"https://api.github.com/users/mhaberler/following{/other_user}","gists_url":"https://api.github.com/users/mhaberler/gists{/gist_id}","starred_url":"https://api.github.com/users/mhaberler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhaberler/subscriptions","organizations_url":"https://api.github.com/users/mhaberler/orgs","repos_url":"https://api.github.com/users/mhaberler/repos","events_url":"https://api.github.com/users/mhaberler/events{/privacy}","received_events_url":"https://api.github.com/users/mhaberler/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T06:54:57Z","updated_at":"2015-12-23T06:54:57Z","body":"@the-snowwhite I know - it's just that the torvalds tree has/had an issue when cross-compiling for a looong time: the tools built under /usr/src/linux* for generating out-of-tree kernel modules were accidentially built for the host, not target arch - so it used to be painful to use with out-of-tree kmod work\r\n\r\nnot sure if that's been fixed yet"}}