Back
[00:42:50] -linuxcnc-github:#linuxcnc-devel- [13linuxcnc] 15SebKuzminsky commented on issue #38: False alarm. This problem was due to a bad PS/2 to USB keyboard adapter on this particular computer. Yes, really.... 02
https://github.com/LinuxCNC/linuxcnc/issues/38#issuecomment-185044581
[08:08:44] <jepler> cmorley: pncconf's xml thing, is it supposed to read the .xml files that come with hostmot2-firmware packages? or is it the converter for mach configuration files?
[08:10:34] <jepler> .. at a glance, mesaflash xml files and hostmot2-firmware xml files are similar but not identical
[08:10:59] <jepler> I don't know what software, if any, is the consumer of those xml files
[08:12:40] <mozmck> I think pncconf only reads pncconf xml files.
[08:17:22] <jepler> actually I think pncconf does read hostmot2-firmware .xml files from /lib/firmware
[08:18:28] <jepler> pncconf.py:def mesa_firmware_search
[08:18:43] <mozmck> ah, ok.
[08:20:27] <jepler> so I wonder if the problem is that there's no way to read a specific .xml file, or if the problem is the differences between the hostmot2-firmware xml format and the mesaflash xml format
[08:20:41] <jepler> and micges isn't around
[09:37:05] <pcw_home> I think the main problem is that there's no standard include file for pin names
[10:47:11] <seb_kuzminsky> all open-source workflow from verilog to ice40 lattice fpga bitstream:
http://www.clifford.at/icestorm/
[10:47:33] <seb_kuzminsky> a couple of the guys at the hackspace have been playing with it
[10:47:58] <seb_kuzminsky> flash over usb, ~160 I/Os brought out
[10:49:14] <mozmck> 160?
[10:49:26] <seb_kuzminsky> the board is $43 in qty 1
[10:49:32] <seb_kuzminsky> http://www.latticestore.com/default.aspx?tabid=417&searchid=1&searchvalue=ice40hx8k-b-evn
[10:49:50] <seb_kuzminsky> mozmck: yeah, 4 40-pin headers
[10:50:44] <mozmck> oh, you must be talking about the iCE20-HX8K breakout board - I was looking at the iCEstick
[10:51:10] <seb_kuzminsky> yeah
[10:51:32] <seb_kuzminsky> the hx8k is about the same size the the Xilinx Spartan on the 7i43-400, iiuc
[10:51:39] <seb_kuzminsky> 8k logic cells
[10:52:06] <seb_kuzminsky> no vhdl front end for the syntesizer, so getting hm2 to run on it is going to take some work
[10:54:00] <mozmck> any idea how to best call a bash script from C/C++ that needs root access?
[10:54:27] <seb_kuzminsky> system("sudo $HOME/Downloads/sketchy.sh")
[10:54:29] <cradek> there is no secure way to do that
[10:54:55] <seb_kuzminsky> cradek said it much more clearly than me
[10:55:02] <cradek> can you fix it so it doesn't need root access?
[10:55:21] <mozmck> Not too worried about secure - but what's insecure about it?
[10:56:24] <cradek> you can trick a shell in many ways. one very simple way is to manipulate its PATH, so it executes the commands you want instead of the ones the author intended
[10:56:41] <mozmck> No, it needs root access.
[10:57:52] <mozmck> Well, this is called from a GUI and they will have to enter a password. Someone could always replace the script with a different one, but that's not a concern. They could do anything if they can do that.
[10:59:20] <mozmck> I tried essentially popen("echo password | sudo -S /path/to/script.sh", "r") and my test script just does ls, but I get a segmentation fault.
[11:02:41] <seb_kuzminsky> mozmck: a drawback with "echo $PASSWORD" is that anyone can run "ps" and see the argument to echo
[11:03:04] <seb_kuzminsky> i think sudo reopens the terminal to escape the pipe, precisely to discourage this use
[11:03:56] <mozmck> hmm, well this is not run from a terminal
[11:04:32] <seb_kuzminsky> it may not be started from a terminal window, but each process has something called a "controlling terminal", which is just where its stdin/stdout are connected
[11:04:33] <mozmck> I could see that being a problem on a multi-user computer, but these are not.
[11:05:06] <mozmck> I see. I have a lot to learn about all that.
[11:05:39] <seb_kuzminsky> i recommend doing what i did: break your leg when you're 19, then spend the summer in bed reading Advanced Programming in the Unix Environment
[11:06:21] <mozmck> Basically I've written a script to find a connected 7i92 card, and set up the eth interface it's connected to in /etc/network/interfaces. I'd like to run this from a GUI if possible.
[11:06:29] <mozmck> Yeah, it's a little late for that now :-)
[11:06:44] <mozmck> I do read all I can when I get a chance though.
[11:07:10] <seb_kuzminsky> that sounds like a useful project
[11:07:40] <seb_kuzminsky> doesn't hm2_eth do a bunch of setup itself? iptables and what not?
[11:09:53] <mozmck> Yes, but this sets up the eth interface. We are using 10.10.10.10 for the cards, so I just set the iface to static 10.10.10.1 and run mesaflash to see if there is a 7i92 there :-) It's a bit of a hack, but it works. Then I write the settings to the interfaces file.
[11:19:37] <jepler> SUDO_ASKPASS=/usr/bin/ssh-askpass sudo -A false
[11:19:47] <jepler> on my system, this uses a graphical prompt for root's password to run 'false'
[11:19:54] <jepler> er, for your sudo password, not root's password
[11:20:02] <seb_kuzminsky> nice
[11:20:31] <jepler> but note that linuxcnc doesn't Depend: on sudo or ssh-askpass
[11:22:30] <mozmck> Yeah, I tried first with pkexec which does use a graphical prompt as well, but had the same problem. I may just not call the script from my GUI.
[13:10:14] <maxcnc> Hi i saw today there is a hy_vfd component is there a example somwhere cand find one
[13:27:47] <jepler> "man hy_vfd" in a terminal for the documentation. no, I don't think there's an example.
[21:12:11] <jepler> http://hackaday.com/2016/02/17/the-voice-recognition-typewriter/
[21:40:14] <cradek> wow, that's cool
[22:30:11] <KGB-linuxcnc> 03Dewey Garrett 05joints_axes11 76b1555 06linuxcnc 10scripts/linuxcnc.in 10src/emc/usr_intf/emcrsh.cc linuxcnc.in improve handling DISPLAY=linuxcncrsh * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=76b1555