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-00002-g0f3f1c7907]
        bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 
2017.09-00002-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     DIAM    COMMENT
        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: startup pid=4582 
flavor=rt-preempt rtlevel=1 usrlevel=1 halsize=524288 shm=Posix cc=gcc 
4.9.2  version=v0.1~-detached~f                                            
          d30aa2
        Nov  1 19:46:39 beaglebone msgd:0: ØMQ=4.0.5 czmq=4.0.2 
protobuf=2.6.1 atomics=gcc intrinsics    libwebsockets=<no version symbol>
        Nov  1 19:46:39 beaglebone msgd:0: configured: sha=fd30aa2
        Nov  1 19:46:39 beaglebone msgd:0: built:      Oct 28 2017 06:41:40 
sha=fd30aa2
        Nov  1 19:46:39 beaglebone msgd:0: register_stuff: actual hostname 
as announced by avahi='beaglebone.local'
        Nov  1 19:46:39 beaglebone msgd:0: zeroconf: registering: 'Log 
service on beaglebone.local pid 4582'
        Nov  1 19:46:40 beaglebone msgd:0: zeroconf: registered 'Log 
service on beaglebone.local pid 4582' _machinekit._tcp 0 TXT 
"uuid=a42c8c6b-4025-4f83-ba28-da                                            
          d21114744a" "instance=60b36302-bf3d-11e7-bbc0-6cecebb9ef46" 
"service=log" "dsn=ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a"
        Nov  1 19:46:46 beaglebone msgd:0: rtapi_app exit detected - 
scheduled shutdown
        Nov  1 19:46:48 beaglebone msgd:0: msgd shutting down
        Nov  1 19:46:48 beaglebone msgd:0: zeroconf: unregistering 'Log 
service on beaglebone.local pid 4582'
        Nov  1 19:46:48 beaglebone msgd:0: log buffer hwm: 0% (0 msgs, 0 
bytes out of 524288)
        Nov  1 19:46:48 beaglebone msgd:0: normal shutdown - global segment 
detached
        Nov  1 20:17:09 beaglebone msgd:0: startup pid=6962 
flavor=rt-preempt rtlevel=1 usrlevel=1 halsize=524288 shm=Posix cc=gcc 
4.9.2  version=v0.1~-detached~f                                            
          d30aa2
        Nov  1 20:17:09 beaglebone msgd:0: ØMQ=4.0.5 czmq=4.0.2 
protobuf=2.6.1 atomics=gcc intrinsics    libwebsockets=<no version symbol>
        Nov  1 20:17:09 beaglebone msgd:0: configured: sha=fd30aa2
        Nov  1 20:17:09 beaglebone msgd:0: built:      Oct 28 2017 06:41:40 
sha=fd30aa2
        Nov  1 20:17:09 beaglebone msgd:0: register_stuff: actual hostname 
as announced by avahi='beaglebone.local'
        Nov  1 20:17:09 beaglebone msgd:0: zeroconf: registering: 'Log 
service on beaglebone.local pid 6962'
        Nov  1 20:17:09 beaglebone msgd:0: zeroconf: registered 'Log 
service on beaglebone.local pid 6962' _machinekit._tcp 0 TXT 
"uuid=a42c8c6b-4025-4f83-ba28-da                                            
          d21114744a" "instance=a348e7c4-bf41-11e7-b29d-6cecebb9ef46" 
"service=log" "dsn=ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a"
        Nov  1 20:17:11 beaglebone rtapi:0: 
rtapi_app_main(hal_pru_generic): -1 Operation not permitted
        Nov  1 20:17:19 beaglebone rtapi:0: unload: 'trivkins' not loaded
        Nov  1 20:17:19 beaglebone rtapi:0: unload: 'tp' not loaded
        Nov  1 20:17:19 beaglebone rtapi:0: unload: 'motmod' not loaded
        Nov  1 20:17:19 beaglebone rtapi:0: unload: 'hal_bb_gpio' not loaded
        Nov  1 20:17:19 beaglebone msgd:0: rtapi_app exit detected - 
scheduled shutdown
        Nov  1 20:17:21 beaglebone msgd:0: msgd shutting down
        Nov  1 20:17:21 beaglebone msgd:0: zeroconf: unregistering 'Log 
service on beaglebone.local pid 6962'
        Nov  1 20:17:21 beaglebone msgd:0: log buffer hwm: 0% (0 msgs, 0 
bytes out of 524288)
        Nov  1 20:17:21 beaglebone msgd:0: normal shutdown - global segment 
detached
        Nov  1 20:22:47 beaglebone msgd:0: startup pid=10428 
flavor=rt-preempt rtlevel=1 usrlevel=1 halsize=524288 shm=Posix cc=gcc 
4.9.2  version=v0.1~-detached~                                              
        fd30aa2
        Nov  1 20:22:47 beaglebone msgd:0: ØMQ=4.0.5 czmq=4.0.2 
protobuf=2.6.1 atomics=gcc intrinsics    libwebsockets=<no version symbol>
        Nov  1 20:22:47 beaglebone msgd:0: configured: sha=fd30aa2
        Nov  1 20:22:47 beaglebone msgd:0: built:      Oct 28 2017 06:41:40 
sha=fd30aa2
        Nov  1 20:22:48 beaglebone msgd:0: register_stuff: actual hostname 
as announced by avahi='beaglebone.local'
        Nov  1 20:22:48 beaglebone msgd:0: zeroconf: registering: 'Log 
service on beaglebone.local pid 10428'
        Nov  1 20:22:48 beaglebone msgd:0: zeroconf: registered 'Log 
service on beaglebone.local pid 10428' _machinekit._tcp 0 TXT 
"uuid=a42c8c6b-4025-4f83-ba28-d                                            
          ad21114744a" "instance=6d3b4ff4-bf42-11e7-9ca3-6cecebb9ef46" 
"service=log" "dsn=ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a"
        Nov  1 20:22:49 beaglebone rtapi:0: 
rtapi_app_main(hal_pru_generic): -1 Operation not permitted
        Nov  1 20:22:57 beaglebone rtapi:0: unload: 'trivkins' not loaded
        Nov  1 20:22:57 beaglebone rtapi:0: unload: 'tp' not loaded
        Nov  1 20:22:57 beaglebone rtapi:0: unload: 'motmod' not loaded
        Nov  1 20:22:57 beaglebone rtapi:0: unload: 'hal_bb_gpio' not loaded
        Nov  1 20:22:57 beaglebone msgd:0: rtapi_app exit detected - 
scheduled shutdown
        Nov  1 20:22:59 beaglebone msgd:0: msgd shutting down
        Nov  1 20:22:59 beaglebone msgd:0: zeroconf: unregistering 'Log 
service on beaglebone.local pid 10428'
        Nov  1 20:22:59 beaglebone msgd:0: log buffer hwm: 0% (0 msgs, 0 
bytes out of 524288)
        Nov  1 20:22:59 beaglebone msgd:0: normal shutdown - global segment 
detached


On Wednesday, November 1, 2017 at 2:13:14 PM UTC-5, Jerry Trantow wrote:
>
> 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 <[email protected]> 
>>> 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     DIAM    COMMENT 
>>> > 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 [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to