Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
On Fri, Nov 3, 2017 at 3:22 AM, Alexander Rösslerwrote: > I would love to see the setup.sh files converted to config-pin bbio > files as here: > https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/MendelMax-CRAMPS/CRAMPS.bbio > > This format is kernel independent and even editable with a graphical > editor: https://github.com/machinekoder/BBIOConfig > > else we have the exactly same problem again with the next incompatible > device tree change. > > I have create an issue for this problem: > https://github.com/machinekit/machinekit/issues/1310 > > I think, this would be a great task to solve by someone new who wants to > contribute to Machinekit. I see a potential problem with 3.8 -> 4.4.x+ here: P9_28 spi #SPI CS0 P9_29 spi #SPI MISO P9_30 spi #SPI MOSI P9_31 spi #SPI SCLK P9_41 low #FET 5 P9_42 spics #SPI CS1 P9_29/P9_30 are fine as "spi" but the CSx and SCLK pins are now: spi_cs spi_sclk as usually the spi_cs modes are shared with spi_sclk on the same pin.. considering config-pin loads the bbio file i could fix it up in config-pin.. ;) But just a heads up... Regards, -- Robert Nelson https://rcn-ee.com/ -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
I would love to see the setup.sh files converted to config-pin bbio files as here: https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/MendelMax-CRAMPS/CRAMPS.bbio This format is kernel independent and even editable with a graphical editor: https://github.com/machinekoder/BBIOConfig else we have the exactly same problem again with the next incompatible device tree change. I have create an issue for this problem: https://github.com/machinekit/machinekit/issues/1310 I think, this would be a great task to solve by someone new who wants to contribute to Machinekit. Jerry Trantow writes: > Here's the change I made to setup.sh to conditionally use slots with > kernels <=3.8. > > # > # Slots changed to device tree overlays after 3.8 > # > major=$(uname -r | cut -f 1 -d '.') > minor=$(uname -r | cut -f 2 -d '.') > > if [[ $major -lt 3 || ( $major -eq 3 && $minor -le 8 ) ]] ; then > # > # Older slots method > # > SLOTS=/sys/devices/bone_capemgr.*/slots > > # Make sure required device tree overlay(s) are loaded > for DTBO in cape-universal ; do > > if grep -q $DTBO $SLOTS ; then > echo $DTBO overlay found > else > echo Loading $DTBO overlay > sudo -A su -c "echo $DTBO > $SLOTS" || dtbo_err > sleep 1 > fi > done; > else > # > # Use U-boot /boot/uEnv.txt to load capes. > # > echo "Kernel version is greater than 3.8, no need for slots. See > /boot/uEnv.txt" > fi > > > On Thu, Nov 2, 2017 at 12:17 PM, Jerry Trantow> wrote: > >> I changed PRUBIN=xenomai/pru_generic.bin to rt-preempt/pru_generic.bin. >> >> THANK YOU!!! This got my router moving again. >> >> At this point it looks like >> >>1. The install instructions could benefit from some information on >>modifying /boot/uEnv.txt device tree overlay with kernel >3.8 >>2. configs/ARM.BeagleBone.Probotix/setup.sh needs conditional on the >>device tree overlay load for kernel >3.8 >>3. configs/ARM.BeagleBone.Probotix/CometNP_Metric.hal needs PRUBIN=xenomai >>conditional >> >> I created a pull request for some mention of modifiying /boo/uEnv.txt in >> the install directions. >> I have a fix using a conditional to setup.sh to avoid the device tree >> overlay. >> There is probably a way to conditionally use PRUBIN=xenomain, rt-preempt, >> (posix probably doesn't need support?) Does the kernel path need to be in >> the .hal file? Seems like that path should be known? >> >> Would these changes to setup.sh and *.hal need to be applied to files in >> every config or are these files generated somehow? >> Point me to the repo and files and I can create the pull requests. >> >> >> On Thu, Nov 2, 2017 at 1:08 AM, Bas de Bruijn wrote: >> >>> >>> >>> On 1 Nov 2017, at 21:42, Jerry Trantow wrote: >>> >>> 8) export DEBUG=5 and run MachineKit again. >>> MACHINEKIT - 0.1 >>> Machine configuration directory is '/home/machinekit/machinekit/c >>> onfigs/ARM.BeagleBone.Probotix' >>> Machine configuration file is 'CometNP_Metric.ini' >>> >>> >>> The problem could be this line: >>> https://github.com/machinekit/machinekit/blob/master/configs >>> /ARM/BeagleBone/Probotix/CometNP_Metric.ini#L8 >>> >>> Can you you remove xenomai and try again? >>> >> >> -- Alexander Rössler alexander@roessler.systems +43 680 1348338 Lebnergasse 1/7/7 1210 Wien - Austria ATU72251528 -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
Here's the change I made to setup.sh to conditionally use slots with kernels <=3.8. # # Slots changed to device tree overlays after 3.8 # major=$(uname -r | cut -f 1 -d '.') minor=$(uname -r | cut -f 2 -d '.') if [[ $major -lt 3 || ( $major -eq 3 && $minor -le 8 ) ]] ; then # # Older slots method # SLOTS=/sys/devices/bone_capemgr.*/slots # Make sure required device tree overlay(s) are loaded for DTBO in cape-universal ; do if grep -q $DTBO $SLOTS ; then echo $DTBO overlay found else echo Loading $DTBO overlay sudo -A su -c "echo $DTBO > $SLOTS" || dtbo_err sleep 1 fi done; else # # Use U-boot /boot/uEnv.txt to load capes. # echo "Kernel version is greater than 3.8, no need for slots. See /boot/uEnv.txt" fi On Thu, Nov 2, 2017 at 12:17 PM, Jerry Trantowwrote: > I changed PRUBIN=xenomai/pru_generic.bin to rt-preempt/pru_generic.bin. > > THANK YOU!!! This got my router moving again. > > At this point it looks like > >1. The install instructions could benefit from some information on >modifying /boot/uEnv.txt device tree overlay with kernel >3.8 >2. configs/ARM.BeagleBone.Probotix/setup.sh needs conditional on the >device tree overlay load for kernel >3.8 >3. configs/ARM.BeagleBone.Probotix/CometNP_Metric.hal needs PRUBIN=xenomai >conditional > > I created a pull request for some mention of modifiying /boo/uEnv.txt in > the install directions. > I have a fix using a conditional to setup.sh to avoid the device tree > overlay. > There is probably a way to conditionally use PRUBIN=xenomain, rt-preempt, > (posix probably doesn't need support?) Does the kernel path need to be in > the .hal file? Seems like that path should be known? > > Would these changes to setup.sh and *.hal need to be applied to files in > every config or are these files generated somehow? > Point me to the repo and files and I can create the pull requests. > > > On Thu, Nov 2, 2017 at 1:08 AM, Bas de Bruijn wrote: > >> >> >> On 1 Nov 2017, at 21:42, Jerry Trantow wrote: >> >> 8) export DEBUG=5 and run MachineKit again. >> MACHINEKIT - 0.1 >> Machine configuration directory is '/home/machinekit/machinekit/c >> onfigs/ARM.BeagleBone.Probotix' >> Machine configuration file is 'CometNP_Metric.ini' >> >> >> The problem could be this line: >> https://github.com/machinekit/machinekit/blob/master/configs >> /ARM/BeagleBone/Probotix/CometNP_Metric.ini#L8 >> >> Can you you remove xenomai and try again? >> > > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
I changed PRUBIN=xenomai/pru_generic.bin to rt-preempt/pru_generic.bin. THANK YOU!!! This got my router moving again. At this point it looks like 1. The install instructions could benefit from some information on modifying /boot/uEnv.txt device tree overlay with kernel >3.8 2. configs/ARM.BeagleBone.Probotix/setup.sh needs conditional on the device tree overlay load for kernel >3.8 3. configs/ARM.BeagleBone.Probotix/CometNP_Metric.hal needs PRUBIN=xenomai conditional I created a pull request for some mention of modifiying /boo/uEnv.txt in the install directions. I have a fix using a conditional to setup.sh to avoid the device tree overlay. There is probably a way to conditionally use PRUBIN=xenomain, rt-preempt, (posix probably doesn't need support?) Does the kernel path need to be in the .hal file? Seems like that path should be known? Would these changes to setup.sh and *.hal need to be applied to files in every config or are these files generated somehow? Point me to the repo and files and I can create the pull requests. On Thu, Nov 2, 2017 at 1:08 AM, Bas de Bruijnwrote: > > > On 1 Nov 2017, at 21:42, Jerry Trantow wrote: > > 8) export DEBUG=5 and run MachineKit again. > MACHINEKIT - 0.1 > Machine configuration directory is '/home/machinekit/machinekit/c > onfigs/ARM.BeagleBone.Probotix' > Machine configuration file is 'CometNP_Metric.ini' > > > The problem could be this line: > https://github.com/machinekit/machinekit/blob/master/configs > /ARM/BeagleBone/Probotix/CometNP_Metric.ini#L8 > > Can you you remove xenomai and try again? > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
> On 1 Nov 2017, at 21:42, Jerry Trantowwrote: > > 8) export DEBUG=5 and run MachineKit again. > MACHINEKIT - 0.1 > Machine configuration directory is > '/home/machinekit/machinekit/configs/ARM.BeagleBone.Probotix' > Machine configuration file is 'CometNP_Metric.ini' The problem could be this line: https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/Probotix/CometNP_Metric.ini#L8 Can you you remove xenomai and try again? -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
Steps to recreate the problem: 1) Install fresh Standalone from https://rcn-ee.com/rootfs/bb.org/testing/2017-10-29/machinekit/bone-debian-8.9-machinekit-armhf-2017-10-29-4gb.img.xz 2) nuke the "MLO" file sudo dd if=/dev/zero of=/dev/mmcblk1 count=1 seek=1 bs=128k 3) reboot (not sure this is required?) 4) Check versions: sudo /opt/scripts/tools/version.sh git:/opt/scripts/:[a5d5f437baeaa7f8e14d5ae037268abf7a67e88e] eeprom:[A335BNLT00C04414BBBK6307] model:[TI_AM335x_BeagleBone_Black] dogtag:[Machinekit Debian Image 2017-10-29] bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2017.09-2-g0f3f1c7907] bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.09-2-g0f3f1c7907] kernel:[4.13.10-bone-rt-r2] nodejs:[v4.8.5] uboot_overlay_options:[enable_uboot_overlays=1] uboot_overlay_options:[disable_uboot_overlay_wireless=1] uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo] uboot_overlay_options:[enable_uboot_cape_universal=1] pkg:[bb-cape-overlays]:[4.4.20171027.1-0rcnee1~jessie+20171027] pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee1~jessie+20170829] pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~jessie+20170830] 4) edit /boot/uEnv.txt to enable disable_uboot_overlay_audio=1 5) reboot 6) Check with version.sh (only change is audio disable): uboot_overlay_options:[disable_uboot_overlay_audio=1] 7) Start MachineKit and select CometNP_metric configuration. (This will abort setup.sh) 7) Modify ARM.BeagleBone.Probotix/setup.sh to avoid faulting on 3.8 overlay logic. if [ 0 == 1 ] ; then SLOTS=/sys/devices/bone_capemgr.*/slots # Make sure required device tree overlay(s) are loaded for DTBO in cape-universal ; do if grep -q $DTBO $SLOTS ; then echo $DTBO overlay found else echo Loading $DTBO overlay sudo -A su -c "echo $DTBO > $SLOTS" || dtbo_err sleep 1 fi done; else echo "Skipping overlays with kernal >3.8" fi 8) export DEBUG=5 and run MachineKit again. MACHINEKIT - 0.1 Machine configuration directory is '/home/machinekit/machinekit/configs/ARM.BeagleBone.Probotix' Machine configuration file is 'CometNP_Metric.ini' Starting Machinekit... io started Unrecognized line skipped: POC FMS LEN DIAMCOMMENT halcmd loadusr io started Skipping overlays with kernal >3.8 Comet.hal:20: insmod failed, returned -1: rtapi_app_main(hal_pru_generic): -1 Operation not permitted See /var/log/linuxcnc.log for more information. Shutting down and cleaning up Machinekit... Cleanup done Machinekit terminated with an error. You can find more information in the log: /home/machinekit/linuxcnc_debug.txt and /home/machinekit/linuxcnc_print.txt as well as in the output of the shell command 'dmesg' and in the terminal Line 19 of Comet.hal is (line 20 is commented out #loadrt gantry, line 21 is newinst gantry) loadrt [PRUCONF](DRIVER) prucode=$(HAL_RTMOD_DIR)/[PRUCONF](PRUBIN) [PRUCONF](CONFIG) halname=hpg I also tried the CRAMPS configuration and it also bails on the same load rt [PRUCONF] line in CRAMPS.hal. I am new to this device tree stuff so I could have missed something (undocumented) simple. cat /home/machinekit/linuxcnc_debug.txt 10404 PID TTY STAT TIME COMMAND Stopping realtime threads Unloading hal components machinekit@beaglebone:~$ cat /home/machinekit/linuxcnc_print.txt RUN_IN_PLACE=no LINUXCNC_DIR= LINUXCNC_BIN_DIR=/usr/bin LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc LINUXCNC_SCRIPT_DIR= LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc LINUXCNC_CONFIG_DIR= LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs INIVAR=/usr/libexec/linuxcnc/inivar HALCMD=halcmd LINUXCNC_EMCSH=/usr/bin/wish8.6 INIFILE=/home/machinekit/machinekit/configs/ARM.BeagleBone.Probotix/CometNP_Metric.ini PARAMETER_FILE=metric.var TASK=milltask HALUI=halui DISPLAY=axis Starting Machinekit server program: linuxcncsvr Loading Real Time OS, RTAPI, and HAL_LIB modules Starting Machinekit IO program: io Starting HAL User Interface program: halui Killing task linuxcncsvr, PID=10404 Removing HAL_LIB, RTAPI, and Real Time OS modules Removing NML shared memory segments cat /var/log/linuxcnc.log Nov 1 19:46:39 beaglebone msgd:0:
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
Now that I have a better understanding, I will start from a fresh SD, disable the audio in uEnv.txt, and the overlay in setup.sh to make sure I haven't messed something up. Thanks for your help everyone. On Wednesday, November 1, 2017 at 2:10:52 PM UTC-5, Jerry Trantow wrote: > > I believe insmod is trying to load: > loadrt [PRUCONF](DRIVER) prucode=$(HAL_RTMOD_DIR)/[PRUCONF](PRUBIN) > [PRUCONF](CONFIG) halname=hpg > > This is before it tries newinst gantry gantry.0 pincount=2. > > I tried the CRAMPS configuration and it fails on the same loadrt. > > > On Wednesday, November 1, 2017 at 1:50:01 PM UTC-5, Robert Nelson wrote: >> >> On Wed, Nov 1, 2017 at 1:45 PM, Jerry Trantow>> wrote: >> > Thanks, disable_uboot_overlay_audio=1 fixed the problems with all >> (P9_25, >> > P9_28, P9_29, P9_31) the GPIO assignment in setup.sh. But, I'm still >> failing >> > with: >> > >> > MACHINEKIT - 0.1 >> > Machine configuration directory is >> > '/home/machinekit/machinekit/configs/ARM.BeagleBone.Probotix' >> > Machine configuration file is 'Comet_Metric.ini' >> > Starting Machinekit... >> > io started >> > Unrecognized line skipped: POC FMS LEN DIAMCOMMENT >> > halcmd loadusr io started >> > Skip cape-universal overlay load with kernel >3.8. >> > Comet.hal:20: insmod failed, returned -1: >> > rtapi_app_main(hal_pru_generic): -1 Operation not permitted >> >> Which module is it trying to load via "insmod"... >> >> Regards, >> >> -- >> Robert Nelson >> https://rcn-ee.com/ >> > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
> On 1 Nov 2017, at 19:45, Jerry Trantowwrote: > > Thanks, disable_uboot_overlay_audio=1 fixed the problems with all (P9_25, > P9_28, P9_29, P9_31) the GPIO assignment in setup.sh. But, I'm still failing > with: > > MACHINEKIT - 0.1 > Machine configuration directory is > '/home/machinekit/machinekit/configs/ARM.BeagleBone.Probotix' > Machine configuration file is 'Comet_Metric.ini' > Starting Machinekit... > io started > Unrecognized line skipped: POC FMS LEN DIAMCOMMENT > halcmd loadusr io started > Skip cape-universal overlay load with kernel >3.8. > Comet.hal:20: insmod failed, returned -1: > rtapi_app_main(hal_pru_generic): -1 Operation not permitted > > Here's what I see in /var/log/linixcnc.txt > > machinekit@beaglebone:~/machinekit$ cat /var/log/linuxcnc.log > Nov 1 18:33:14 beaglebone msgd:0: startup pid=4623 flavor=rt-preempt > rtlevel=1 usrlevel=1 halsize=524288 shm=Posix cc=gcc 4.9.2 > version=v0.1~-detached~fd30aa2 > Nov 1 18:33:14 beaglebone msgd:0: ØMQ=4.0.5 czmq=4.0.2 protobuf=2.6.1 > atomics=gcc intrinsicslibwebsockets= > Nov 1 18:33:14 beaglebone msgd:0: configured: sha=fd30aa2 > Nov 1 18:33:14 beaglebone msgd:0: built: Oct 28 2017 06:41:40 > sha=fd30aa2 > Nov 1 18:33:14 beaglebone msgd:0: register_stuff: actual hostname as > announced by avahi='beaglebone.local' > Nov 1 18:33:14 beaglebone msgd:0: zeroconf: registering: 'Log service on > beaglebone.local pid 4623' > Nov 1 18:33:15 beaglebone msgd:0: zeroconf: registered 'Log service on > beaglebone.local pid 4623' _machinekit._tcp 0 TXT > "uuid=a42c8c6b-4025-4f83-ba28-dad21114744a" > "instance=1ee034c8-bf33-11e7-a2ac-6cecebb9ef46" "service=log" > "dsn=ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a" > Nov 1 18:33:16 beaglebone rtapi:0: rtapi_app_main(hal_pru_generic): -1 > Operation not permitted > > This looks like the PRU isn't setup? > The Comet configuration uses two Y axis in the gantry code which is a little > bit out of the ordinary. I could try some other configs if that would narrow > down the problem. There was some re-arranging of pru_generic.bin location. https://github.com/machinekit/machinekit/pull/1279 Can you show a more detailed output by first doing: export DEBUG=5 Then run machinekit and check what /var/log/linuxcnc.log file shows -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
I believe insmod is trying to load: loadrt [PRUCONF](DRIVER) prucode=$(HAL_RTMOD_DIR)/[PRUCONF](PRUBIN) [PRUCONF](CONFIG) halname=hpg This is before it tries newinst gantry gantry.0 pincount=2. I tried the CRAMPS configuration and it fails on the same loadrt. On Wednesday, November 1, 2017 at 1:50:01 PM UTC-5, Robert Nelson wrote: > > On Wed, Nov 1, 2017 at 1:45 PM, Jerry Trantow> wrote: > > Thanks, disable_uboot_overlay_audio=1 fixed the problems with all > (P9_25, > > P9_28, P9_29, P9_31) the GPIO assignment in setup.sh. But, I'm still > failing > > with: > > > > MACHINEKIT - 0.1 > > Machine configuration directory is > > '/home/machinekit/machinekit/configs/ARM.BeagleBone.Probotix' > > Machine configuration file is 'Comet_Metric.ini' > > Starting Machinekit... > > io started > > Unrecognized line skipped: POC FMS LEN DIAMCOMMENT > > halcmd loadusr io started > > Skip cape-universal overlay load with kernel >3.8. > > Comet.hal:20: insmod failed, returned -1: > > rtapi_app_main(hal_pru_generic): -1 Operation not permitted > > Which module is it trying to load via "insmod"... > > Regards, > > -- > Robert Nelson > https://rcn-ee.com/ > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
On Wed, Nov 1, 2017 at 1:45 PM, Jerry Trantowwrote: > Thanks, disable_uboot_overlay_audio=1 fixed the problems with all (P9_25, > P9_28, P9_29, P9_31) the GPIO assignment in setup.sh. But, I'm still failing > with: > > MACHINEKIT - 0.1 > Machine configuration directory is > '/home/machinekit/machinekit/configs/ARM.BeagleBone.Probotix' > Machine configuration file is 'Comet_Metric.ini' > Starting Machinekit... > io started > Unrecognized line skipped: POC FMS LEN DIAMCOMMENT > halcmd loadusr io started > Skip cape-universal overlay load with kernel >3.8. > Comet.hal:20: insmod failed, returned -1: > rtapi_app_main(hal_pru_generic): -1 Operation not permitted Which module is it trying to load via "insmod"... Regards, -- Robert Nelson https://rcn-ee.com/ -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
Thanks, disable_uboot_overlay_audio=1 fixed the problems with all (P9_25, P9_28, P9_29, P9_31) the GPIO assignment in setup.sh. But, I'm still failing with: MACHINEKIT - 0.1 Machine configuration directory is '/home/machinekit/machinekit/configs/ARM.BeagleBone.Probotix' Machine configuration file is 'Comet_Metric.ini' Starting Machinekit... io started Unrecognized line skipped: POC FMS LEN DIAMCOMMENT halcmd loadusr io started Skip cape-universal overlay load with kernel >3.8. *Comet.hal:20: insmod failed, returned -1:* rtapi_app_main(hal_pru_generic): -1 Operation not permitted Here's what I see in /var/log/linixcnc.txt machinekit@beaglebone:~/machinekit$ cat /var/log/linuxcnc.log Nov 1 18:33:14 beaglebone msgd:0: startup pid=4623 flavor=rt-preempt rtlevel=1 usrlevel=1 halsize=524288 shm=Posix cc=gcc 4.9.2 version=v0.1~-detached~fd30aa2 Nov 1 18:33:14 beaglebone msgd:0: ØMQ=4.0.5 czmq=4.0.2 protobuf=2.6.1 atomics=gcc intrinsicslibwebsockets= Nov 1 18:33:14 beaglebone msgd:0: configured: sha=fd30aa2 Nov 1 18:33:14 beaglebone msgd:0: built: Oct 28 2017 06:41:40 sha=fd30aa2 Nov 1 18:33:14 beaglebone msgd:0: register_stuff: actual hostname as announced by avahi='beaglebone.local' Nov 1 18:33:14 beaglebone msgd:0: zeroconf: registering: 'Log service on beaglebone.local pid 4623' Nov 1 18:33:15 beaglebone msgd:0: zeroconf: registered 'Log service on beaglebone.local pid 4623' _machinekit._tcp 0 TXT "uuid=a42c8c6b-4025-4f83-ba28-dad21114744a" "instance=1ee034c8-bf33-11e7-a2ac-6cecebb9ef46" "service=log" "dsn=ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a" *Nov 1 18:33:16 beaglebone rtapi:0: rtapi_app_main(hal_pru_generic): -1 Operation not permitted* This looks like the PRU isn't setup? The Comet configuration uses two Y axis in the gantry code which is a little bit out of the ordinary. I could try some other configs if that would narrow down the problem. On Wednesday, November 1, 2017 at 12:35:53 PM UTC-5, Robert Nelson wrote: > > On Wed, Nov 1, 2017 at 12:12 PM, Jerry Trantow> wrote: > > I saw a previous post reply by Robert Nelson to a similar problem. > > That post mentioned grepping for bone_capemgr.uboot_capemgr_enabled=1 > which > > was already 1. > > > > machinekit@beaglebone:~$ grep -c bone_capemgr.uboot_capemgr_enabled=1 > > /proc/cmdline > > 1 > > > > This post also mentioned running version.sh to identify components. > > > > machinekit@beaglebone:~$ sudo /opt/scripts/tools/version.sh > > git:/opt/scripts/:[a5d5f437baeaa7f8e14d5ae037268abf7a67e88e] > > eeprom:[A335BNLT00C04414BBBK6307] > > model:[TI_AM335x_BeagleBone_Black] > > dogtag:[Machinekit Debian Image 2017-10-29] > > bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot > > 2017.09-2-g0f3f1c7907] > > kernel:[4.13.10-bone-rt-r2] > > nodejs:[v4.8.5] > > uboot_overlay_options:[enable_uboot_overlays=1] > > > uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo] > > > > uboot_overlay_options:[enable_uboot_cape_universal=1] > > pkg:[bb-cape-overlays]:[4.4.20171027.1-0rcnee1~jessie+20171027] > > pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee1~jessie+20170829] > > pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~jessie+20170830] > > > > And it looked like there was possible uboot confusion between SD and > eMMMC > > so last night I flashed the image. > > > > bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot > > 2017.09-2-g0f3f1c7907] (only change was mmcblk0 to 1) > > > > Still no love, so I modified my setup.sh to avoid the error about > loading > > the universal overlay which got me closer. > > > > MACHINEKIT - 0.1 > > Machine configuration directory is > > '/home/machinekit/machinekit/configs/ARM.BeagleBone.Probotix' > > Machine configuration file is 'Comet_Metric.ini' > > Starting Machinekit... > > io started > > Unrecognized line skipped: POC FMS LEN DIAMCOMMENT > > halcmd loadusr io started > > cape-universal check skipped. (my message from modified setup.sh) > > P9_25 pinmux file not found! > > WARNING: GPIO pin not exported, cannot set direction or value! > > bash: /sys/devices/platform/ocp/ocp*P9_25_pinmux/state: No such file or > > directory > > > P9_25 is hdmi-audio... Kill hdmi-audio via: > > disable_uboot_overlay_audio=1 > > in /boot/uEnv.txt > > > https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Disable_on-board_devices > > > Regards, > > -- > Robert Nelson > https://rcn-ee.com/ > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
I saw a previous post reply by Robert Nelson to a similar problem. That post mentioned grepping for bone_capemgr.uboot_capemgr_enabled=1 which was already 1. machinekit@beaglebone:~$ grep -c bone_capemgr.uboot_capemgr_enabled=1 /proc/cmdline 1 This post also mentioned running version.sh to identify components. machinekit@beaglebone:~$ sudo /opt/scripts/tools/version.sh git:/opt/scripts/:[a5d5f437baeaa7f8e14d5ae037268abf7a67e88e] eeprom:[A335BNLT00C04414BBBK6307] model:[TI_AM335x_BeagleBone_Black] dogtag:[Machinekit Debian Image 2017-10-29] bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2017.09-2-g0f3f1c7907] kernel:[4.13.10-bone-rt-r2] nodejs:[v4.8.5] uboot_overlay_options:[enable_uboot_overlays=1] uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo] uboot_overlay_options:[enable_uboot_cape_universal=1] pkg:[bb-cape-overlays]:[4.4.20171027.1-0rcnee1~jessie+20171027] pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee1~jessie+20170829] pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~jessie+20170830] And it looked like there was possible uboot confusion between SD and eMMMC so last night I flashed the image. bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.09-2-g0f3f1c7907] (only change was mmcblk0 to 1) Still no love, so I modified my setup.sh to avoid the error about loading the universal overlay which got me closer. MACHINEKIT - 0.1 Machine configuration directory is '/home/machinekit/machinekit/configs/ARM.BeagleBone.Probotix' Machine configuration file is 'Comet_Metric.ini' Starting Machinekit... io started Unrecognized line skipped: POC FMS LEN DIAMCOMMENT halcmd loadusr io started *cape-universal check skipped. (my message from modified setup.sh)* P9_25 pinmux file not found! WARNING: GPIO pin not exported, cannot set direction or value! bash: /sys/devices/platform/ocp/ocp*P9_25_pinmux/state: No such file or directory Cannot write pinmux file: /sys/devices/platform/ocp/ocp*P9_25_pinmux/state Comet.hal:5: program './setup.sh' failed, returned 1 So beyond the overlay check, there is a conflict with the default cape-universal and some of the pins? If I comment out the entire export pins section or selectively remove P9_25, P9_28, P9_29, P9_31 , I get through the setup script (*bold are from my mods to setup.sh*) but insmod fails. io started Unrecognized line skipped: POC FMS LEN DIAMCOMMENT halcmd loadusr io started *Skip cape-universal overlay load with kernel >3.8.* *Skip export GPIO pins with (kernel >3.8).* Comet.hal:20: insmod failed, returned -1: rtapi_app_main(hal_pru_generic): -1 Operation not permitted I think I am really close but it looks like I still need to fix something between the default cape-universal overlay and the setup.sh GPIO export? I double checked my notes and the assignments in setup.sh match my previous configurations (and wiring) that I was using with hdmi enabled. P9-25 ZDIR SW2 P9-28 YDIR/Y1DIR PRU0 Red LED P9-29 XDIR PRU0 Green LED P9-31 XSTEPPRU0 Blue LED I found some old notes that mention P9-28, P9-29, P9-30 conflict with the Probotics configuration. Does the eMMC need P9-25? If this is the case, should I go back to running off SD and use: BeagleBone Black: HDMI Audio/eMMC disabled: dtb=am335x-boneblack-nhdmi-overlay.dtb Or would this enable the PRUs and run from eMMC? - cape-universaln Exports all pins not used by HDMI and eMMC (no audio pins are exported) On Wednesday, November 1, 2017 at 7:08:25 AM UTC-5, Charles Steinkuehler wrote: > > On 11/1/2017 12:09 AM, Jerry Trantow wrote: > > > > But, I am still stick with "Error loading device tree overlay file: > > cape-universal". Shouldn't this just work with the machinekit image? > What > > do I need to do to setup the cape-universal device tree overlay. Any > help > > would be appreciated. (and should probably be added to the > > www.machinekit.io/docs/getting-started. > > I haven't worked much with the 4.x kernels, but I believe the cape > universal should be enabled by default. If it isn't, it's easy to enable: > > https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Cape_Universal > > The error about not being able to load the universal overlay could be > ignored, but it is causing the setup script (which is still setup for > a 3.8 kernel) to fail. Just comment out the cape loading portion of > the setup.sh script in your config (or better yet, add a test for the > kernel version and skip the cape loading if the kernel isn't 3.8, pull > requests happily accepted!). > > Sorry about the issues but the 4.x images are quite recent and all the > bugs haven't yet been worked out. Once you get past the setup script, > however, things should work. The changes required for the ADC and PRU > drivers for the 4.x kernel have already been incorporated. > > -- > Charles Steinkuehler > cha...@steinkuehler.net > -- website:
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
On 11/1/2017 12:09 AM, Jerry Trantow wrote: > > But, I am still stick with "Error loading device tree overlay file: > cape-universal". Shouldn't this just work with the machinekit image? What > do I need to do to setup the cape-universal device tree overlay. Any help > would be appreciated. (and should probably be added to the > www.machinekit.io/docs/getting-started. I haven't worked much with the 4.x kernels, but I believe the cape universal should be enabled by default. If it isn't, it's easy to enable: https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Cape_Universal The error about not being able to load the universal overlay could be ignored, but it is causing the setup script (which is still setup for a 3.8 kernel) to fail. Just comment out the cape loading portion of the setup.sh script in your config (or better yet, add a test for the kernel version and skip the cape loading if the kernel isn't 3.8, pull requests happily accepted!). Sorry about the issues but the 4.x images are quite recent and all the bugs haven't yet been worked out. Once you get past the setup script, however, things should work. The changes required for the ADC and PRU drivers for the 4.x kernel have already been incorporated. -- Charles Steinkuehler char...@steinkuehler.net -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] MachineKit Install directions (Cape, U-boot, Device Tree Overlay confusion)
> On 01 Nov 2017, at 06:09, Jerry Trantowwrote: > > It seems like there is a missing step for configuring the cape??? > > http://www.machinekit.io/docs/getting-started/getting-started-platform/ show > a choice of installing Images, Packages, or a Development Platform. I have a > home built gantry router/G540 that I originally controlled using LinuxCNC > from an old Laptop and recently controlled with BBB MachineKit using the > Comet Metric configuration using Images upto and including: > 2017-10-02 - Debian 8 (Jessie) - Monthly > BBW/BBB (All Revs) Machinekit > > microSD/Standalone: (machinekit) Based on Debian Jessie with 3.8.x kernel > > > I have been using Axis running on the BBB and thought it was about time to > try some of the other GUIs. Before I took this leap, I figured I would update > to a newer Jessie version. I thought there would be little risk in updating > to one of the image snapshots, but I have been stuck for the last several > nights trying to get the following image to work. > microSD/Standalone: (machinekit) Based on Debian Jessie with 4.13.x kernel > with U-Boot Overlays > > > I have my BBB GPIO directly connected to the G540 parallel port cable, so I > don't have any external cape. I thought everything would be ok as the > cape-universal should load by default? But running machinekit straight from > the latest Image this is not the case. > > In the terminal window, I see > MACHINEKIT - 0.1 > Machine configuration directory is > '/home/machinekit/machinekit/configs/ARM.BeagleBone.Probotix' > Machine configuration file is 'Comet_Metric.ini' > Starting Machinekit... > io started > Unrecognized line skipped: POC FMS LEN DIAMCOMMENT > halcmd loadusr io started > grep: /sys/devices/bone_capemgr.*/slots: No such file or directory > Loading cape-universal overlay > bash: /sys/devices/bone_capemgr.*/slots: No such file or directory > Error loading device tree overlay file: cape-universal > Comet.hal:5: program './setup.sh' failed, returned 1 > Shutting down and cleaning up Machinekit.. > > It seems like there is a step in the install directions missing for the > latest kernels? > > The directions at > https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Loading_custom_capes > didn't make sense to me. > First, I tried adding each of the following line to /etc/default/capemgr with > no success. > CAPE=cape-universal > CAPE=cape-universal-00A0 > CAPE=cape-universal:00A0 > > Then I looked up and tried to follow some device tree tutorials but I don't > even see bone_capemgr in cd /sys/devices/bone_capemgr.* > Some tutorials mention /mtn/boot/uEnv.txt > > In /boot/uEnv.txt, I verified enable_uboot_cape_universal=1 and tried adding > cape_enable/cape-universal > ##Example v4.1.x > #cape_disable=bone_capemgr.disable_partno= > cape_enable=bone_capemgr.enable_partno=cape-universal > > But, I am still stick with "Error loading device tree overlay file: > cape-universal". Shouldn't this just work with the machinekit image? What do > I need to do to setup the cape-universal device tree overlay. Any help would > be appreciated. (and should probably be added to the > www.machinekit.io/docs/getting-started. you probably still try to boot from the eMMC have a look https://groups.google.com/forum/#!topic/machinekit/vSPXdPspyEs or here https://github.com/machinekit/Machinekit-HAL/issues/17#issuecomment-324722580 (and following comments) grep -c bone_capemgr.uboot_capemgr_enabled=1 /proc/cmdline should output a “1” it probably doesn’t in your situation have a look so enable booting from the SD card: sudo dd if=/dev/zero of=/dev/mmcbkl1 count=1 seek=1 bs=128k -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.