Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-24 Thread Alec Ari via Emc-developers
Firmware is always separate from kernel unless you build the firmware into the 
kernel image. Usually, you would only do this for kernel options that you 
decide to have built-in (i.e. CONFIG_DRM_I915=y) instead of as modules (=m) 
however distributions don't do this and instead build as modules. When building 
firmware into the kernel image, you still need to have the firmware installed 
separately, then after the image is built, you can discard the firmware files. 
Reasons you may want to do this is so you can have a high resolution kernel 
console available before the kernel is able to load modules (i.e. before udev 
is loaded but you want kernel modesetting) but if you're not a kernel hacker, 
really no need.

Probably too much info but now you know!

Alec






On Monday, October 24, 2022 at 10:43:52 PM UTC, Jon Elson 
 wrote: 





On 10/24/22 15:28, Alec Ari via Emc-developers wrote:
> Jon,
>
> You can actually grab the sid 6.0 kernel and drop it on Bullseye and perhaps 
> even Buster:
>
Yes, I actually did this on a Bullseye install.  I also had 
to install the firmware files that didn't come in along with 
the new kernel for some reason.  Now, the graphics all works!

Jon



___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-24 Thread Jon Elson

On 10/24/22 15:28, Alec Ari via Emc-developers wrote:

Jon,

You can actually grab the sid 6.0 kernel and drop it on Bullseye and perhaps 
even Buster:

Yes, I actually did this on a Bullseye install.  I also had 
to install the firmware files that didn't come in along with 
the new kernel for some reason.  Now, the graphics all works!


Jon



___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-24 Thread Alec Ari via Emc-developers
Jon,

You can actually grab the sid 6.0 kernel and drop it on Bullseye and perhaps 
even Buster:

https://packages.debian.org/sid/linux-image-6.0.0-2-amd64

Firmware:

https://packages.debian.org/sid/firmware-misc-nonfree

Install:

sudo dpkg -i linux-image-6.0.0-2-amd64_6.0.3-1_amd64.deb
sudo dpkg -i firmware-misc-nonfree_20210818-1_all.deb

The problem you may run into though is that the X.org driver stack may not be 
new enough. libdrm, mesa and xserver-xorg-video-intel

Dropping kernels and firmware from other Debian releases shouldn't be a 
problem, if it doesn't work, you can just choose a different one on boot and 
remove it later. Once you start grabbing things like:

https://packages.debian.org/sid/libgl1-mesa-dri

Then you may start have issues.

Alec


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-23 Thread Jon Elson

On 10/22/22 21:54, Alec Ari via Emc-developers wrote:



I will post Debian packages for the 5.4 RTAI kernel once it's ready, but it may 
be a few weeks of testing. I need to fool proof Kconfig as well. I'll be using 
the latest Debian Bullseye 5.10 kernel config as the baseline, and just let 
Kconfig handle the differences once mine are plugged in. Latest config file is 
config-5.10.0-19-amd64.

I went through a week of hell trying to get graphics working 
on a newer system with Intel UHD 630 graphics.  It required 
updating to the 6.0.0 kernel and new firmware files.  Of 
course, i really had no idea what I was doing, so I may have 
done it all wrong.  Some online resources said at least the 
5.13 kernel was required for this chipset.


Jon



___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-23 Thread gene heskett

On 10/22/22 22:27, Alec Ari via Emc-developers wrote:

Scratch that, I did a dumb thing with my build system. LinuxCNC works with RTAI 
5.4 now, screenshot attached.

WOOO!

Alec
I agree, Alec, that is lots s better that anything I've seen older amd's 
do. Which explains why my stuff

with one exception is all running on i5's. The exception is an arm.

But is the test utility that generated this, available in buster? As in 
whats its name? I want to be able to run it on my stuff,
particularly on my rpi4 that's running my 80 yo Sheldon 11x54 lathe, 
doing what I consider to be an excellent job
for the last 3 or 4 years. An rpi3 was used originally but an rpi4 does 
a much quieter job, the 3 stuttered occasionally.


Take care & stay well, Alec.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 



___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-22 Thread Alec Ari via Emc-developers
Warnings for 5.4 kernel, note: [-Wvla]

Reading 0/204 dependency files
Done reading dependencies
Reading 0/204 dependency files
Done reading dependencies
In file included from hal/utils/halcmd_commands.cc:40:
hal/utils/halcmd_commands.cc: In function ‘int do_loadrt_cmd(char*, char**)’:
./config.h:49:24: warning: ISO C++ forbids converting a string constant to 
‘char*’ [-Wwrite-strings]
   49 | #define EMC2_RTLIB_DIR "/home/ntu/linuxcnc/rtlib"
  |    ^~
hal/utils/halcmd_commands.cc:1110:30: note: in expansion of macro 
‘EMC2_RTLIB_DIR’
 1110 | static char *rtmod_dir = EMC2_RTLIB_DIR;
  |  ^~
hal/utils/halcmd_commands.cc:1130:22: warning: comparison of integer 
expressions of different signedness: ‘int’ and ‘long unsigned int’ 
[-Wsign-compare]
 1130 | } else if (r >= sizeof(mod_path)) {
  |    ~~^~~
emc/usr_intf/emclcd.cc: In function ‘int main(int, char**)’:
emc/usr_intf/emclcd.cc:494:52: warning: ‘%s’ directive output may be truncated 
writing up to 3679 bytes into a region of size 1013 [-Wformat-truncation=]
  494 | snprintf(sockStr, sizeof(sockStr), "widget_add %s %s %s\n", 
widgets[i].screenName,
  |    ^~
In file included from /usr/include/stdio.h:867,
 from emc/usr_intf/emclcd.cc:30:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: 
‘__builtin___snprintf_chk’ output 15 or more bytes (assuming 3694) into a 
destination of size 1024
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
  |  ~^~~
   68 |    __bos (__s), __fmt, __va_arg_pack ());
  |    ~
hal/components/carousel.comp: In function ‘_’:
hal/components/carousel.comp:329:15: warning: this statement may fall through 
[-Wimplicit-fallthrough=]
hal/components/carousel.comp:330:5: note: here
hal/components/carousel.comp:367:15: warning: this statement may fall through 
[-Wimplicit-fallthrough=]
hal/components/carousel.comp:368:5: note: here
hal/components/carousel.comp:440:15: warning: this statement may fall through 
[-Wimplicit-fallthrough=]
hal/components/carousel.comp:441:5: note: here
hal/components/mesa_pktgyro_test.comp: In function ‘receive’:
hal/components/mesa_pktgyro_test.comp:74:2: warning: ISO C90 forbids variable 
length array ‘Replyd3’ [-Wvla]
hal/components/mesa_pktgyro_test.comp: In function ‘extra_setup’:
hal/components/mesa_pktgyro_test.comp:177:2: warning: ISO C90 forbids variable 
length array ‘read1’ [-Wvla]
hal/components/mesa_pktgyro_test.comp:178:2: warning: ISO C90 forbids variable 
length array ‘read1_sizes’ [-Wvla]
In file included from /home/ntu/linuxcnc/src/rtapi/rtai_rtapi.c:76:
/home/ntu/linuxcnc/src/rtapi/rtapi_vsnprintf.h: In function ‘rtapi_vsnprintf’:
/home/ntu/linuxcnc/src/rtapi/rtapi_vsnprintf.h:426:12: warning: this statement 
may fall through [-Wimplicit-fallthrough=]
  426 |  flags |= LARGE;
  |    ^
/home/ntu/linuxcnc/src/rtapi/rtapi_vsnprintf.h:427:2: note: here
  427 |  case 'x':
  |  ^~~~
/home/ntu/linuxcnc/src/hal/components/lcd.c: In function ‘write_one’:
/home/ntu/linuxcnc/src/hal/components/lcd.c:349:35: warning: this statement may 
fall through [-Wimplicit-fallthrough=]
  349 | inst->buff[1] = 0;
  | ~~^~~
/home/ntu/linuxcnc/src/hal/components/lcd.c:351:17: note: here
  351 | default: //check for hex
  | ^~~
/home/ntu/linuxcnc/src/hal/components/lcd.c:373:16: warning: this statement may 
fall through [-Wimplicit-fallthrough=]
  373 | if (retval >= 0) {
  |    ^
/home/ntu/linuxcnc/src/hal/components/lcd.c:379:9: note: here
  379 | default:
  | ^~~
/home/ntu/linuxcnc/src/hal/components/lcd.c: In function ‘parse_fmt’:
/home/ntu/linuxcnc/src/hal/components/lcd.c:426:20: warning: this statement may 
fall through [-Wimplicit-fallthrough=]
  426 | if (c < 0 && d == 0){
  |    ^
/home/ntu/linuxcnc/src/hal/components/lcd.c:430:13: note: here
  430 | case '1':
  | ^~~~
/home/ntu/linuxcnc/src/hal/components/lcd.c:465:22: warning: this statement may 
fall through [-Wimplicit-fallthrough=]
  465 | base = 16;
  | ~^~~~
/home/ntu/linuxcnc/src/hal/components/lcd.c:466:13: note: here
  466 | case 'o':
  | ^~~~
/home/ntu/linuxcnc/src/hal/components/lcd.c:467:20: warning: this statement may 
fall through [-Wimplicit-fallthrough=]
  467 | if (base == 10) base = 8;
  |    ^
/home/ntu/linuxcnc/src/hal/components/lcd.c:468:13: note: here
  468 | case 'u':
  | ^~~~

Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-22 Thread Alec Ari via Emc-developers
To clarify, you still need to use M instead of SUBDIRS, but the "FATAL: parse 
error in symbol dump file" was 100% PEBKAC lol.

Alec


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-22 Thread Alec Ari via Emc-developers
Scratch that, I did a dumb thing with my build system. LinuxCNC works with RTAI 
5.4 now, screenshot attached.

WOOO!

Alec___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-22 Thread Alec Ari via Emc-developers
All the LinuxCNC kernel modules build now against 5.4 albeit with several VLA 
(variable length array) warnings and this fatal error at the very end:

  MODPOST 185 modules
FATAL: parse error in symbol dump file
make[2]: *** [scripts/Makefile.modpost:95: __modpost] Error 1
make[1]: *** [Makefile:1650: modules] Error 2
make[1]: Leaving directory '/home/ntu/linux-5.4.y'
make: *** [Makefile:539: modules] Error 2

Alec


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-22 Thread Alec Ari via Emc-developers
Found the problem:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/Makefile?h=v5.4.219=7e35b42591c058b91282f95ce3b2cf0c05ffe93d

Fix:

diff --git a/src/Makefile b/src/Makefile
index 96eba38334..047419d4bc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -537,8 +537,8 @@ ifeq ($(BUILD_SYS),kbuild)
 
modules:
   MAKEFLAGS="$(filter-out --warn-undefined-variables,$(MAKEFLAGS))" \
-   $(PYTHON) modsilent.py $(MAKE) 
KBUILD_EXTRA_SYMBOLS=$(moduledir)/Module.symvers -C $(KERNELDIR) SUBDIRS=`pwd
` CC=$(CC) V=$(BUILD_VERBOSE) modules
-   -cp Module.symvers *$(MODULE_EXT) ../rtlib/
+   $(PYTHON) modsilent.py $(MAKE) 
KBUILD_EXTRA_SYMBOLS=$(moduledir)/Module.symvers -C $(KERNELDIR) M=`pwd` CC=$
(CC) V=$(BUILD_VERBOSE) modules
+   -cp $(moduledir)/Module.symvers $(moduledir)/*$(MODULE_EXT) ../rtlib/
endif
 
# These rules clean things up. 'modclean' cleans files generated by 'modules'


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-21 Thread Alec Ari via Emc-developers
This error:

> cp Module.symvers *.ko ../rtlib/
> cp: cannot stat 'Module.symvers': No such file or directory

Is a red herring. Fix:

diff --git a/src/Makefile b/src/Makefile
index 96eba38334..374b4bf35d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -538,7 +538,7 @@ ifeq ($(BUILD_SYS),kbuild)
modules:
   MAKEFLAGS="$(filter-out --warn-undefined-variables,$(MAKEFLAGS))" \
   $(PYTHON) modsilent.py $(MAKE) 
KBUILD_EXTRA_SYMBOLS=$(moduledir)/Module.symvers -C $(KERNELDIR) SUBDIRS=`pwd` 
CC=$(CC) V=$(BUILD_VERBOSE) modules
-   -cp Module.symvers *$(MODULE_EXT) ../rtlib/
+   -cp $(moduledir)/Module.symvers $(moduledir)/*$(MODULE_EXT) ../rtlib/
endif
 
# These rules clean things up. 'modclean' cleans files generated by 'modules'


LinuxCNC doesn't initialize the build process for the kernel modules at all, 
that's what's wrong:

Reading 204/204 dependency files
Done reading dependencies
MAKEFLAGS="" \
/usr/bin/python3.9 modsilent.py make 
KBUILD_EXTRA_SYMBOLS=/usr/realtime/modules/Module.symvers -C 
/lib/modules/5.4.219-rtai-amd64+/build SUBDIRS=`pwd` CC=gcc V=0 modules
make[1]: Entering directory '/home/ntu/linux-5.4.y'
 CALL    scripts/checksyscalls.sh
 CALL    scripts/atomic/check-atomics.sh
 Building modules, stage 2.
 MODPOST 33 modules
make[1]: Leaving directory '/home/ntu/linux-5.4.y'
cp /usr/realtime/modules/Module.symvers /usr/realtime/modules/*.ko ../rtlib/
You now need to run 'sudo make setuid' in order to run in place.

What do?

Alec


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-21 Thread Alec Ari via Emc-developers
I can't use 2.8 because master has all of the things I need. I'll try a few 
things though, thanks!

Alec





On Friday, October 21, 2022 at 04:53:24 PM UTC, andy pugh  
wrote: 





On Fri, 21 Oct 2022 at 17:38, Alec Ari via Emc-developers
 wrote:

> cp Module.symvers *.ko ../rtlib/
> cp: cannot stat 'Module.symvers': No such file or directory

Seems to be here:
https://github.com/LinuxCNC/linuxcnc/blob/master/src/Makefile#L539

Poking about in configure.ac it looks like you can specify MODULE_DIR
(and hence moduldir) with --with-module-dir in the configure command.

This looks like a hangover from the removal of RTAI, so the easiest
way for your current testing might well be to compile 2.8 instead?

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-21 Thread andy pugh
On Fri, 21 Oct 2022 at 17:38, Alec Ari via Emc-developers
 wrote:

> cp Module.symvers *.ko ../rtlib/
> cp: cannot stat 'Module.symvers': No such file or directory

Seems to be here:
https://github.com/LinuxCNC/linuxcnc/blob/master/src/Makefile#L539

Poking about in configure.ac it looks like you can specify MODULE_DIR
(and hence moduldir) with --with-module-dir in the configure command.

This looks like a hangover from the removal of RTAI, so the easiest
way for your current testing might well be to compile 2.8 instead?

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-21 Thread Alec Ari via Emc-developers
Trying to build LinuxCNC right now against the 5.4 kernel but ran into this, 
stuck now:

Reading 204/204 dependency files
Done reading dependencies
MAKEFLAGS="ik -j4 --jobserver-auth=3,4" \
make KBUILD_EXTRA_SYMBOLS=/usr/realtime/modules/Module.symvers -C 
/home/ntu/linux-5.4.y SUBDIRS=`pwd` CC=gcc V=0 modules
make[1]: Entering directory '/home/ntu/linux-5.4.y'
 CALL    scripts/atomic/check-atomics.sh
 CALL    scripts/checksyscalls.sh
 CHK include/generated/compile.h
 Building modules, stage 2.
 MODPOST 397 modules
make[1]: Leaving directory '/home/ntu/linux-5.4.y'
cp Module.symvers *.ko ../rtlib/
cp: cannot stat 'Module.symvers': No such file or directory
cp: cannot stat '*.ko': No such file or directory
make: [Makefile:540: modules] Error 1 (ignored)
You now need to run 'sudo make setuid' in order to run in place.

ntu@ntu:~/linuxcnc/src$ stat ~/linux-5.4.y/Module.symvers
 File: /home/ntu/linux-5.4.y/Module.symvers
 Size: 534944  Blocks: 1048   IO Block: 4096   regular file
Device: 806h/2054d  Inode: 831382  Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/ ntu)   Gid: ( 1000/ ntu)
Access: 2022-10-21 11:16:59.828423939 -0500
Modify: 2022-10-21 11:14:36.349885329 -0500
Change: 2022-10-21 11:14:36.349885329 -0500
Birth: 2022-10-21 11:14:34.429892605 -0500

ntu@ntu:~/linuxcnc/src$ stat /usr/realtime/modules/Module.symvers
 File: /usr/realtime/modules/Module.symvers
 Size: 25155   Blocks: 56 IO Block: 4096   regular file
Device: 806h/2054d  Inode: 830595  Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-10-21 11:18:14.981231215 -0500
Modify: 2022-10-21 11:18:14.981231215 -0500
Change: 2022-10-21 11:18:14.981231215 -0500
Birth: 2022-10-21 11:18:14.981231215 -0500

Any ideas?

Alec


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-21 Thread andy pugh
On Fri, 21 Oct 2022 at 01:40, Alec Ari via Emc-developers
 wrote:

> https://mail.rtai.org/pipermail/rtai/2022-October/028319.html

Which prompted me to check, and I haven't heard anything from [RTAI]
since January.

Apparently "Note: your list delivery is currently disabled; it was
disabled due to excessive bounces. The last bounce was received on
14-Oct-2022."

Which is probably a Gmail thing, and might also be related to a
certificate problem at the RTAI end. Neither of my computers wanted to
follow the link above. The work laptop refused utterly, whereas my Mac
made me promise that I understood the risks.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] RTAI support for kernel 5.4 works so far, pending musl/math test

2022-10-21 Thread Steffen Moeller

Wow! Thank you!
Steffen

Am 21.10.2022 um 02:36 schrieb Alec Ari via Emc-developers:

Success log:

https://mail.rtai.org/pipermail/rtai/2022-October/028319.html

I need to patch my RTAI repository to account for the 5.4 changes and test musl 
in kernel space. Intensive floating point arithmetic in the 5.4 kernel has yet 
to be tested. LinuxCNC may require some changes as well. I will let the 
LinuxCNC development team know when it's all set!

Alec


___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers



___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers