#linuxcnc-devel Logs

Apr 28 2020

#linuxcnc-devel Calendar

12:13 AM memfrob: Not yet!
02:33 AM Centurion-Dan2 is now known as Centurion_Dan
03:05 AM rene_dev_: Memfob what was it?
10:03 AM rene_dev_: jepler around? to make the c python bindings compatible with python2 and 3, I would like to add a dependency or bundle py3c-dev
10:03 AM rene_dev_: its a header only lib with a compatibility layer
11:44 AM jepler: I think in master anyway who cares about python2 compatibility
11:44 AM jepler: If this work is targeting 2.8 I'm less sure.
11:45 AM jepler: A "header only lib" could just be copied in
12:13 PM jepler: rene_dev_: ^^^
12:13 PM rene_dev_: currently any python3 stuff im doing is in master only
12:14 PM rene_dev_: but some commits could be pickes into 2.8 as well, they dont do much apart from formatting python scripts
12:27 PM Tom_dev: what's the default directory for the kernel tree?
12:28 PM Tom_L: still working on this rtai build...
04:08 PM seb_kuzminsky: experimental debs of mesaflash 3.4.0~pre0 for buster, stretch, jessie, wheezy, and precise, for i386 and amd64, are available here: deb http://highlab.com/~seb/linuxcnc $DIST main
04:09 PM seb_kuzminsky: the public key that the repo is signed with is here: http://highlab.com/~seb/linuxcnc/dists/archive-signing-key.gpg
04:09 PM seb_kuzminsky: download the key, add it with "sudo apt-key add archive-signing-key.gpg", apt-get update, and apt-get install mesaflash
04:10 PM seb_kuzminsky: feedback is welcome, and please report any problems on the issue tracker: https://github.com/linuxcnc/mesaflash/issues
04:16 PM Tom_L: is that the merge from jt and micges?
04:29 PM seb_kuzminsky: that's right, this has everything from both jt and micges
04:31 PM Tom_L: i'll look it over, trying to build a kernel atm
04:44 PM Tom_L: seb_kuzminsky, i'm not finding it...
04:45 PM andypugh: seb_kuzminsky: As am experiment I just dropped python-gtksourceview…..deb in to www.linuxcnc.org/dists/buster
04:45 PM andypugh: But I suspect it can’t be found without the indexes being updated?
04:52 PM andypugh: IIRC you are the only one with the scripts?
05:09 PM seb_kuzminsky: Tom_L: what does `apt-cache policy mesaflash` say?
05:09 PM seb_kuzminsky: andypugh: anyone with write access to wlo can update our deb archive, i have some local scripts (not committed in any public git repo) that help me do that
05:10 PM andypugh: I assume it isn’t done by hand editing?
05:10 PM seb_kuzminsky: i'm happy to do the deb archive maintenance if you want, or we can both do it separately (as long as we try not to step on each others toes)
05:10 PM seb_kuzminsky: no, there is software that does it
05:10 PM seb_kuzminsky: computes checksums, signs the index files, etc
05:10 PM seb_kuzminsky: hang on a sec, i'll go dig it up
05:11 PM seb_kuzminsky: oh nevermind, i did commit it publicly
05:11 PM seb_kuzminsky: the scripts are in linuxcnc-infrastructure in our github org
05:11 PM andypugh: I am just seeing if front-porting python-gtksourceview2 helps. It’s not on Sid any more, but that was never going to work for the Buster ISO anyway.
05:11 PM andypugh: OK, let me have a look.
05:12 PM seb_kuzminsky: so the main script is called 'update-deb-archive'
05:12 PM seb_kuzminsky: the two helpers are 'rsync-from-wlo' and 'rsync-to-wlo'
05:13 PM seb_kuzminsky: i rsync-from-wlo, so that i have any packages people have added since i rsynced last, then i add my new debs, run update-deb-archive, and finally rsync-to-wlo to send the new deb(s) and the updated archive files back to wlo
05:14 PM seb_kuzminsky: if you want you can do that, or if you want you can send me the deb somehow and i'll do it, i don't mind
05:15 PM andypugh: Let me see how I get on. I can get at least as far as not uploading again before there is any risk of disaster
05:15 PM seb_kuzminsky: hi Tom_dev
05:17 PM Tom_dev: N: Unable to locate package mesaflash
05:17 PM Tom_dev: N: Unable to locate package http://highlab.com/~seb/linuxcnc/
05:18 PM Tom_dev: i'm not real linux savvy though
05:18 PM seb_kuzminsky: did you add that apt source?
05:18 PM seb_kuzminsky: what distro are you on?
05:18 PM Tom_dev: well of course not!
05:18 PM Tom_dev: this one is buster
05:19 PM seb_kuzminsky: try this: apt-add-repository 'deb http://highlab.com/~seb/linuxcnc buster main'
05:19 PM seb_kuzminsky: then download the key at the URL above, add it with the apt-key command there, and try again
05:21 PM andypugh: seb_kuzminsky: I read recently that you can add files to etc/apt/sources.d/ Presumably as part of an install package. I am trying to work out if that helps us at all.
05:22 PM seb_kuzminsky: andypugh: yes, that's right
05:22 PM andypugh: (In general, not for anything beong discussed now)
05:22 PM seb_kuzminsky: i generally have one file in /etc/apt/sources.list.d for each "unusual" apt source i have
05:23 PM seb_kuzminsky: eg i have linuxcnc.list, linuxcnc-buildbot.list, and now seb-debs.list with the above repo
05:23 PM seb_kuzminsky: now there are three Toms!
05:23 PM andypugh: OK
05:23 PM Tom_dev: i'm building on 2
05:28 PM Tom_dev: must not have something installed. apt-add-repository fails
05:30 PM seb_kuzminsky: then just edit /etc/apt/sources.list.d/seb-debs.list by hand (as root) and add that line
05:31 PM seb_kuzminsky: `dpkg -S apt-add-repository` tells me that my apt-add-repository came from a package named software-properties-common
05:32 PM Tom_dev: deb http://highlab.com/~seb/linuxcnc/ buster main
05:32 PM Tom_dev: i added that thru synaptic package manager
05:32 PM Tom_dev: is that right/
05:32 PM Tom_dev: ?
05:33 PM Tom_dev: that line came from sources.list
05:39 PM Tom_dev: finally
05:40 PM Tom_dev: ok, pre0 is installed. i'll test it out later on
05:58 PM seb_kuzminsky: yay, something worked!
06:05 PM seb_kuzminsky: jepler: you did some magic to make the mesaflash repo dfsg-compliant... i changed it a bit and would appreciate a review/feedback of the new system
06:05 PM seb_kuzminsky: i wanted something where i could build & test debs before making the release tags
06:06 PM seb_kuzminsky: the new debian/rules get-orig-source target encapsulates the change
06:07 PM jthornton: seb_kuzminsky, should I delete my mesaflash repo or wait a bit?
06:14 PM Tom_dev: ping
06:14 PM jthornton: pong
06:16 PM Tom_dev: mesaflash --device 7i80 --addr 10.10.10.10 --readhmid
06:16 PM Tom_dev: Configuration Name: HOSTMOT2
06:16 PM Tom_dev: General configuration information:
06:16 PM Tom_dev: ok on ethernet
06:23 PM seb_kuzminsky: jthornton: probably delete it
06:23 PM seb_kuzminsky: or make a new commit that removes every file and makes a README.md that says "go to linuxcnc/mesaflash for the latest version"
06:24 PM seb_kuzminsky: thanks for the report, Tom_dev !
06:24 PM jthornton: ok I can do that, thanks for rescuing mesaflash
06:24 PM seb_kuzminsky: my pleasure, thanks for maintaining it for a while
06:24 PM seb_kuzminsky: oh wait, don't delete it yet!
06:25 PM seb_kuzminsky: i see there's an unmerged manpage branch in your repo
06:25 PM seb_kuzminsky: i didn't merge that (only your master branch)
06:25 PM seb_kuzminsky: is the manpage worth having?
06:29 PM jthornton: oh crap
06:30 PM jthornton: I would guess so
06:32 PM Tom_L: where is your git page?
06:32 PM Tom_L: i thought i had it..
06:33 PM jthornton: https://paste.ubuntu.com/p/y79yfPsYBH/
06:33 PM jthornton: https://github.com/jethornton/mesaflash
06:34 PM jthornton: ok I reverted the commit for now
06:39 PM seb_kuzminsky: i grabbed the manpage out of your repo, thanks
06:43 PM jthornton: ok
06:44 PM seb_kuzminsky: ugh, writing manpages in asciidoc is so much nicer than troff/groff/nroff/whatever that is
06:51 PM jthornton: lol
06:55 PM seb_kuzminsky: the manpage claims a third license, MIT, i'm changing that to match the rest of the files in the repo, GPL v2+
06:56 PM seb_kuzminsky: i pushed the manpage, that'll be in the next pre-release, after i get some more testing reports
07:29 PM jepler: seb_kuzminsky: looks good to me, assuming it works
07:29 PM jepler: aha this is why those diversions are created when installing raspberry pi kernels:
07:30 PM jepler: > unable to make backup link of './boot/System.map-4.19.71-rt24-v7l+' before installing new version: Operation not permitted
07:32 PM jepler: more packaging work to do. Too bad rpi upstream didn't package kernels in a way that facilitates patching them within a debian packaging workflow
07:35 PM jepler: I wonder if this pi will come back up after I reboot it ...
07:38 PM jepler: that would be "no"
07:41 PM jepler: oh yay it did, just took longer than I expected
07:53 PM skunkworks: http://electronicsam.com/images/greenmachine/IMG_20200428_191604.jpg
08:13 PM seb_kuzminsky: that's super cool, skunkworks
08:13 PM seb_kuzminsky: jepler: thanks for that
08:14 PM seb_kuzminsky: i saw that error and i'm not convinced that's the cause of the problem
08:14 PM seb_kuzminsky: i think i saw the same error on the other kernels, since vfat doesn't do links
08:14 PM seb_kuzminsky: (or something)
08:56 PM jepler: seb_kuzminsky: this did prevent the package from (re)installing
08:56 PM jepler: https://gist.github.com/404f8047459408947b670331890ff976
10:51 PM memfrob: `uname -r` prints the kernel version and then the string of CONFIG_LOCALVERSION
10:52 PM memfrob: If you're using kernel git sources, then a + sign will get appended to the end automatically, regardless of your kernel config.
10:53 PM memfrob: uname -r: 4.19.114-rtai+
10:53 PM memfrob: grep "LOCALVERSION=" /boot/config-4.19.114-rtai: CONFIG_LOCALVERSION="-rtai"
10:53 PM memfrob: To determine for sure if your kernel is running an IPIPE-enabled kernel, run: dmesg | grep "pipeline"
10:55 PM memfrob: Output for me: [ 0.000000] Interrupt pipeline (release #11)
10:57 PM Tom_L: it must be plain vanilla kernel then
10:57 PM Tom_dev: 4.19.114
10:57 PM memfrob: Currently, there is no way to determine if the kernel is a Xenomai IPIPE kernel or an RTAI variant without grepping specific kernel source files for the string, "rtai" -- I should probably add a message explicitly stating whether it is for Xenomai or RTAI..
10:59 PM memfrob: If "pipeline" isn't in there, the only way it can still be patched is if your kernel config has the log buffer too small, in which case, dmesg doesn't go back far enough
10:59 PM memfrob: A way to test THAT is by running: dmesg | grep "gcc"
11:00 PM memfrob: If gcc shows up but no interrupt pipeline, then it's definitely not patched, rather instead a vanilla kernel.
11:00 PM Tom_L: this is my 2nd kernel build so i'm quite the rookie
11:00 PM Tom_L: i'm building it again for sure with the patches this time
11:00 PM Tom_L: i had issues with those directions
11:00 PM memfrob: Well if you're using this: https://github.com/NTULINUX/RTAI then the configure script will tell you
11:01 PM memfrob: AC_MSG_ERROR([IPIPE not enabled in $RTAI_LINUX_DIR])
11:01 PM Tom_L: i am
11:02 PM Tom_L: i found i had to run make modules before make bzImage or it would error every time
11:02 PM memfrob: What the heck??
11:02 PM Tom_L: ../lib/modules wouldn't show that version
11:03 PM Tom_L: dots are for irc
11:03 PM memfrob: lol first I had just `make` then someone said `make` doesn't build modules, so I split the `make` up into bzImage and modules
11:03 PM Tom_L: so far it's building ok
11:03 PM Tom_L: forgot what step i'm on
11:03 PM memfrob: I don't know what these distros are doing, for years and years, just running `make` builds everything, modules and all.
11:04 PM Tom_L: yeah
11:04 PM memfrob: What happens if you replace `make bzImage && make modules` with just `make all` ?
11:04 PM Tom_L: i dunno
11:04 PM Tom_L: i could try it i suppose
11:05 PM Tom_L: but if linux-4.10.114 isn't in /lib/modules it won't build
11:05 PM Tom_L: typo on the ver
11:05 PM memfrob: Try this: sudo rm -rf /lib/modules/*4.19* && make mrproper && make olddefconfig && make all
11:06 PM memfrob: from inside the kernel source
11:06 PM Tom_L: can't right now
11:06 PM memfrob: its ok
11:06 PM Tom_L: still running
11:06 PM memfrob: just don't make a typo or you're screwed!
11:07 PM Tom_L: it's a test pc
11:07 PM memfrob: Oh I love those!
11:07 PM Tom_L: i was building on the Q1900 but it takes forever
11:07 PM Tom_L: it's really the target i wanted to test buster on
11:08 PM Tom_L: i got it built but i get a memory error on it and haven't had a chance to look into it
11:08 PM Tom_L: the kernel won't boot
11:09 PM memfrob: You're using the debian kernel config or did you make it from scratch?
11:09 PM Tom_L: scratch i think
11:09 PM memfrob: systemd?
11:10 PM Tom_L: not sure.. i'm too new at this
11:10 PM Tom_L: i got the kernel from kernel org and the patch from that link
11:10 PM memfrob: What are the contents of /boot on the RTAI system you're trying to work on?
11:13 PM memfrob: If you made it from scratch you need several options enabled, and I think debian started using systemd ages ago so you need to know what you're doing if you're making it from scratch
11:13 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/configs/Screenshot%20at%202020-04-28%2023-11-21.png
11:13 PM memfrob: Ok, copy /boot/config-4.19.0-6-rt-amd64 to <your_RTAI_kernel_source_dir>/.config
11:14 PM Tom_L: i left all the defaults in menuconfig
11:14 PM memfrob: yeah that wont work
11:14 PM Tom_L: i wasn't sure i could do that
11:14 PM Tom_L: should i abort this build?
11:15 PM memfrob: I have no idea what stage you're on, are you in a middle of a compile?
11:15 PM Tom_L: yeah
11:15 PM Tom_L: make modules i think
11:15 PM memfrob: yes abort that and do a make clean
11:16 PM Tom_L: i'll copy the source fresh and add the patches
11:16 PM memfrob: then be sure to copy the debian kernel config to that kernel source directory as ".config"
11:17 PM Tom_L: the rt one
11:17 PM memfrob: yes
11:17 PM memfrob: either is fine it doesn't matter i don't think
11:17 PM Tom_L: and put it in the /usr/src/linux-4.19.114 folder?
11:17 PM Tom_L: as .config
11:17 PM memfrob: not by much, I have all the problematic Kconfig options forcefully disabled
11:17 PM memfrob: yes
11:18 PM memfrob: then before you run your make command, run `make olddefconfig`
11:18 PM memfrob: this will ensure Kconfig does it's thing
11:18 PM memfrob: The reason this isn't documented is that there's a million ways to configure the kernel and I can't cover all of them.
11:18 PM Tom_L: i realize that
11:19 PM Tom_L: why do you create a simlink in those directions?
11:19 PM memfrob: Heh that goes way back actually and isn't needed anymore.
11:20 PM memfrob: RTAI mainline used to always want to use /usr/src/linux and still does to this day, my tree is smarter than that now.
11:23 PM Tom_dev: cp /boot/config-4.19.0-6-rt-amd64 /usr/src/linux-4.19.114/.config
11:23 PM Tom_L: correct?
11:23 PM memfrob: yes you'll need root privs if you're working in /usr/src
11:23 PM Tom_L: right
11:23 PM Tom_L: i am
11:23 PM memfrob: and since you're using debian's config you'll need an initrd
11:24 PM Tom_L: ok how do i do that?
11:25 PM Tom_L: ok i ran the patches too
11:25 PM memfrob: sudo apt-get install dracut
11:25 PM memfrob: then build and install the kernel
11:26 PM memfrob: (be sure to run make olddefconfig before the compilation process)
11:26 PM Tom_L: no need to edit .config?
11:26 PM Tom_L: right
11:26 PM memfrob: then.. Me being a Gentoo guy, I follow this: https://wiki.gentoo.org/wiki/Dracut#Building_an_initramfs_image
11:26 PM Tom_L: :)
11:26 PM memfrob: dracut --hostonly --kver 4.19.114-rtai
11:27 PM memfrob: So dracut doesn't get confused you should probably modify the config file a bit
11:27 PM memfrob: General setup -> Local version - append to kernel release
11:27 PM Tom_dev: Errors were encountered while processing:
11:27 PM Tom_dev: dracut
11:27 PM Tom_dev: cryptsetup-initramfs
11:27 PM Tom_dev: cryptsetup
11:27 PM memfrob: Hit enter, erase everything in there, and set it to -rtai
11:27 PM memfrob: Maybe there is a more debian way..
11:28 PM memfrob: Actually you know what!
11:28 PM Tom_L: i just ran make olddefconfig
11:29 PM memfrob: Instead of any of that make stuff (besides make olddefconfig) run `make deb-pkg` instead from inside the kernel source
11:29 PM Tom_L: do i need to edit .config first?
11:29 PM memfrob: But to do that you should be working inside your home directory
11:29 PM memfrob: (not use root for anything)
11:30 PM Tom_L: i'm in /usr/src/linux4.xxxx
11:30 PM memfrob: two options..
11:30 PM memfrob: mv /usr/src/linux-4.19.114 /home/<your user>
11:30 PM memfrob: then sudo chown -R youruser:youruser /home/<your user>/linux-4.19.114/*
11:31 PM memfrob: then probably sudo chown -R youruser:youruser /home/<your user>/linux-4.19.114
11:31 PM memfrob: to make sure you have all read+write
11:31 PM memfrob: or re-download the kernel source a third time and start over again
11:31 PM memfrob: all from inside your home directory
11:31 PM memfrob: not touch /usr/src at all
11:33 PM memfrob: The reason for all of this is because debian doesn't compile any filesystems or ATA/PATA/SATA/SCSI drivers into the kernel, rather all modules
11:33 PM Tom_dev: ok done
11:33 PM Tom_dev: i did the chown stuff
11:34 PM memfrob: ok cool
11:34 PM Tom_dev: now in /home/tom/linux-4.19.114
11:34 PM Tom_dev: as user not root
11:34 PM memfrob: for sanity purposes, run `make menuconfig` and make sure -rtai is set in the local version string
11:35 PM memfrob: that way all your custom kernel folders and files and uname -r will end in -rtai
11:35 PM Tom_dev: where's that at?
11:35 PM memfrob: General setup -> Local version - append to kernel release
11:36 PM Tom_L: ok
11:36 PM memfrob: I thought andy had debs.
11:36 PM memfrob: A good learning experience though if you want DIY
11:36 PM Tom_L: i started with one from rtai.org 5.2.3 and got nowhere because of ipipe
11:36 PM Tom_L: so i started on this one
11:36 PM Tom_L: i'm ok doing this
11:36 PM memfrob: got nowhere because of ipipe?
11:37 PM Tom_L: they took ipipe out of it
11:37 PM Tom_L: and i got nothing but errors
11:37 PM Tom_L: not knowing if or how to fix it
11:37 PM memfrob: where?
11:37 PM Tom_L: rtai.org 5.2.3
11:37 PM memfrob: RTAI doesn't have a 5.2.3 that's my version
11:37 PM Tom_L: or 5.2
11:37 PM Tom_L: sry
11:37 PM memfrob: RTAI still uses IPI[E
11:37 PM memfrob: *IPIPE
11:38 PM memfrob: it's the only way it works
11:38 PM memfrob: http://svn.savannah.gnu.org/viewvc/rtai/vulcano/base/arch/x86/patches/hal-linux-4.19.114-cip24-x86-12.patch?revision=72&view=markup&sortby=date
11:38 PM Tom_L: i got all sorts of errors
11:38 PM Tom_L: what's that one?
11:38 PM memfrob: Ah, yeah RTAI mainline doesn't take out the bad options
11:39 PM memfrob: That's RTAI's mainline IPIPE patch
11:39 PM Tom_L: oh
11:39 PM memfrob: I'm behind on an IPIPE release, I haven't updated it yet.
11:39 PM Tom_L: ok i added -RTAI, anything else in config?
11:39 PM memfrob: lowercase!
11:40 PM memfrob: debian will complain about -R being in local version
11:40 PM memfrob: I don't know why, stupid I guess.
11:40 PM Tom_L: ok
11:40 PM Tom_L: heh
11:41 PM Tom_L: is that it for .config?
11:42 PM memfrob: Yeah, you applied all 4 patches so you're good to go.
11:42 PM Tom_L: just try make all?
11:43 PM Tom_L: should i remove linux=4.19.114 from /lib/modules first?
11:43 PM Tom_L: should i remove linux-4.19.114 from /lib/modules first?
11:43 PM memfrob: yes
11:43 PM memfrob: well it doesn't matter until you run dpkg -i
11:44 PM memfrob: make deb-pkg will make the kernel debs which include the initial ramdisk, in your home folder
11:44 PM memfrob: then you do `sudo dpkg -i <your kernel .debs here>'
11:45 PM memfrob: the contents of /lib/modules have nothing to do with the actual compilation but rather, you don't want a mix of kernel modules from 3 different kernels all in the same directory
11:46 PM Tom_L: ok running make all as user
11:46 PM memfrob: no no
11:46 PM memfrob: `make deb-pkg`
11:47 PM memfrob: the "yes" was to removing stuff in /lib/modules
11:47 PM memfrob: I should have been more clear.
11:47 PM Tom_L: ok
11:47 PM Tom_L: no need to compile it first?
11:47 PM memfrob: make deb-pkg cleans the source dir and compiles it and makes debs all in one shot
11:47 PM Tom_L: ok
11:48 PM Tom_L: i see that now
11:48 PM Tom_L: then dpkg to install it?
11:48 PM memfrob: yes with the -i flag
11:48 PM Tom_L: seems a little easier
11:48 PM memfrob: and you don't need any of the dbg (debug) packages
11:49 PM Tom_L: nothing in .config needed to optimize it better?
11:49 PM memfrob: The Kconfig patch does all that
11:49 PM Tom_L: the 4 patches i added?
11:49 PM memfrob: Yes, the 0003 patch fixes everything
11:50 PM Tom_L: forgot to change the certificate line
11:50 PM Tom_dev: make[4]: *** No rule to make target '../../certs/debian-uefi-certs.pem', needed by 'certs/x509_certificate_list'. Stop.
11:50 PM memfrob: Oh, right...
11:50 PM memfrob: Uhmm..
11:50 PM Tom_L: i remember that one :)
11:50 PM memfrob: Heh, I do all these things out of habit. Can you fix it or do you need help?
11:51 PM Tom_L: try again...
11:51 PM Tom_L: no i fixed it
11:51 PM memfrob: You just blank the string out?
11:51 PM Tom_L: yep ""
11:52 PM memfrob: Hahaha yeah same
11:53 PM Tom_L: i think i can remember the steps to run it on the q1900 pc tomorrow
11:53 PM Tom_L: just do it all as user instead of root
11:54 PM Tom_L: will i need to move the deb to install it?
11:54 PM memfrob: No, the deb can be installed anywhere
11:54 PM Tom_L: where will it put it?
11:54 PM memfrob: I think you can even install debs over NFS
11:54 PM Tom_L: in the work directory?
11:54 PM memfrob: when you install the .deb it will install the kernel and initial ramdisk to /boot and the modules to /lib/modules
11:56 PM memfrob: oh, the debs themselves will be in the root of your home directory
11:57 PM memfrob: I am not sure if dpkg will execute the command to update grub.
11:57 PM memfrob: I think it does.
11:57 PM Tom_L: i can pull that line from the link
11:58 PM Tom_L: how can i get rid of grub entries?
11:58 PM Tom_L: i've got a bad one in the other pc.. it won't boot
11:59 PM memfrob: grub-mkconfig scans the /boot folder, if you want to remove an entry the proper way, you'd delete the kernel image, initrd (if there is one) the System.map file, and the config file, then generate a new grub config file