Open MatthewReed303 opened 3 months ago
The version of your RT Kernel is 6.1.54-rt15 which is not in the tested branches list, try to use the following command,
We will use 6.1.21 branch which is similar to 6.1.54-rt15, but as it is not from Raspberry Pi Official Kernel, we need do some patch.
1. git clone --depth=1 --branch 6.1.21 https://github.com/Chipsee/industrial-pi.git
2. modify Makefile
diff --git a/Makefile b/Makefile
index b98ad3c..98de440 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,6 @@ help:
##############################################################
install:
@apt-get update
- @dpkg -i $(TOPDIR)/tools/*.deb
@make -C $(GT9XX_DIR)
@echo "Install GT9XX success!!"
@make -C $(LSM6DS3_DIR)
3. install raspberrypi-kernel-headers packages
sudo apt update
sudo apt install raspberrypi-kernel-headers
4. cd industrial-pi
5. sudo make install
I hope it works.
@Liu-Xiaoqiang please see my edit update where I installed the RT kernel headers? Still did not work with those. Will try with
sudo apt update
sudo apt install raspberrypi-kernel-headers
When I edit the make file, it's only this line - @dpkg -i $(TOPDIR)/tools/*.deb
adding the - ?
It means remove the following line,
@dpkg -i $(TOPDIR)/tools/*.deb
Kind regards, Nicky (Liu Xiaoqiang) CHIPSEE CO., LIMITED Address:Xinyuan Science Park B406, 97 Changping Road, Changping District, Beijing, 102206, China TEL:+8610-62105170 Website:https://chipsee.com @. Skype: @.
From: MatthewReed303 Date: 2024-08-02 16:59 To: Chipsee/industrial-pi CC: Xiaoqiang Liu; Mention Subject: Re: [Chipsee/industrial-pi] Can not install drivers on RT kernel (Issue #8) @Liu-Xiaoqiang please see my edit update where I installed the RT kernel headers? Still did not work with those. Will try with sudo apt update sudo apt install raspberrypi-kernel-headers
When I edit the make file, it's only this line - @dpkg -i $(TOPDIR)/tools/*.deb adding the - ? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Hi @Liu-Xiaoqiang still no luck using the above, the error is now different please see below
codesys:/temp/industrial-pi $ sudo make install
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 http://archive.raspberrypi.com/debian bookworm InRelease
Reading package lists... Done
(Reading database ... 88768 files and directories currently installed.)
Preparing to unpack .../raspberrypi-kernel-headers_1%3a1.20230405-1_aarch64.deb ...
Unpacking raspberrypi-kernel-headers (1:1.20230405-1) over (1:1.20230405-1) ...
Setting up raspberrypi-kernel-headers (1:1.20230405-1) ...
make[1]: Entering directory '/temp/industrial-pi/gt9xx'
make -C /lib/modules/6.1.54-rt15-v8+/build M=`pwd` modules
make[2]: Entering directory '/usr/src/linux-headers-6.1.54-rt15-v8+'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: aarch64-linux-gnu-gcc (GCC) 8.4.0
You are using: gcc (Debian 12.2.0-14) 12.2.0
CC [M] /temp/industrial-pi/gt9xx/gt9xx_update.o
gcc: warning: switch ‘-msign-return-address=all’ is no longer supported
In file included from ./include/asm-generic/bug.h:22,
from ./arch/arm64/include/asm/bug.h:26,
from ./include/linux/bug.h:5,
from ./arch/arm64/include/asm/cpufeature.h:20,
from ./arch/arm64/include/asm/ptrace.h:11,
from ./arch/arm64/include/asm/irqflags.h:10,
from ./include/linux/irqflags.h:16,
from ./include/linux/rcupdate.h:26,
from ./include/linux/rculist.h:11,
from ./include/linux/pid.h:5,
from ./include/linux/sched.h:14,
from ./include/linux/kthread.h:6,
from /temp/industrial-pi/gt9xx/gt9xx_update.c:21:
/temp/industrial-pi/gt9xx/gt9xx_update.c: In function ‘gup_check_update_file’:
/temp/industrial-pi/gt9xx/gt9xx.h:352:49: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type __kernel_size_t’ {aka ‘long unsigned int’} [-Wformat=]
352 | printk("<<-GTP-DEBUG->> [%d]"fmt"\n",__LINE__, ##arg);\
| ^~~~~~~~~~~~~~~~~~~~~~
./include/linux/printk.h:444:25: note: in definition of macro ‘printk_index_wrap’
444 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
/temp/industrial-pi/gt9xx/gt9xx.h:352:42: note: in expansion of macro ‘printk’
352 | printk("<<-GTP-DEBUG->> [%d]"fmt"\n",__LINE__, ##arg);\
| ^~~~~~
/temp/industrial-pi/gt9xx/gt9xx_update.c:884:9: note: in expansion of macro ‘GTP_DEBUG’
884 | GTP_DEBUG("Update File path:%s, %d", path, strlen(path));
| ^~~~~~~~~
/bin/sh: 1: scripts/basic/fixdep: not found
make[3]: *** [scripts/Makefile.build:250: /temp/industrial-pi/gt9xx/gt9xx_update.o] Error 127
make[3]: *** Deleting file '/temp/industrial-pi/gt9xx/gt9xx_update.o'
make[2]: *** [Makefile:2014: /temp/industrial-pi/gt9xx] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.1.54-rt15-v8+'
make[1]: *** [Makefile:21: compile] Error 2
make[1]: Leaving directory '/temp/industrial-pi/gt9xx'
make: *** [Makefile:34: install] Error 2
Hi Mention,
From the log, this kernel should need a special compiler.
warning: the compiler differs from the one used to build the kernel The kernel was built by: aarch64-linux-gnu-gcc (GCC) 8.4.0 You are using: gcc (Debian 12.2.0-14) 12.2.0 CC [M] /temp/industrial-pi/gt9xx/gt9xx_update.o gcc: warning: switch ‘-msign-return-address=all’ is no longer supported Maybe you need to check the following guide to compile and use the special gcc 8.4.0Kernel Build Prerequisites · kdoren/linux Wiki · GitHubAfter installing this kernel, the overlay directory is switched to /boot/firmware/6.1.54-rt15-v8+/o/ not the default one /boot/firmware/overlay/I think you should modify the Makefile for every driver to apply this change,For example the Makefile in the gt9xx directory, you should add the following line,
You also need to add this same line in other drivers's Makefile.
As this special kernel use special config, like follow, you also need to add this to all config-.txt file in industrial-pi/preconfig/boot/firmware/config-.txt
[all] kernel=vmlinuz-6.1.54-rt15-v8+ initramfs initrd.img-6.1.54-rt15-v8+ os_prefix=6.1.54-rt15-v8+/ overlay_prefix=o/ arm_64bit=1 [all]
At last, please use the 6.6.20 branch on Chipsee GitHub, I checked the config file which is the same as the special kernel.
Kind regards, Nicky (Liu Xiaoqiang) CHIPSEE CO., LIMITED Address:Xinyuan Science Park B406, 97 Changping Road, Changping District, Beijing, 102206, China TEL:+8610-62105170 Website:https://chipsee.com @. Skype: @.
From: MatthewReed303
Date: 2024-08-02 17:31
To: Chipsee/industrial-pi
CC: Xiaoqiang Liu; Mention
Subject: Re: [Chipsee/industrial-pi] Can not install drivers on RT kernel (Issue #8)
Hi @Liu-Xiaoqiang still no luck using the above, the error is now different please see below
codesys:/temp/industrial-pi $ sudo make install
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 http://archive.raspberrypi.com/debian bookworm InRelease
Reading package lists... Done
(Reading database ... 88768 files and directories currently installed.)
Preparing to unpack .../raspberrypi-kernel-headers_1%3a1.20230405-1_aarch64.deb ...
Unpacking raspberrypi-kernel-headers (1:1.20230405-1) over (1:1.20230405-1) ...
Setting up raspberrypi-kernel-headers (1:1.20230405-1) ...
make[1]: Entering directory '/temp/industrial-pi/gt9xx'
make -C /lib/modules/6.1.54-rt15-v8+/build M=pwd
modules
make[2]: Entering directory '/usr/src/linux-headers-6.1.54-rt15-v8+'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: aarch64-linux-gnu-gcc (GCC) 8.4.0
You are using: gcc (Debian 12.2.0-14) 12.2.0
CC [M] /temp/industrial-pi/gt9xx/gt9xx_update.o
gcc: warning: switch ‘-msign-return-address=all’ is no longer supported
In file included from ./include/asm-generic/bug.h:22,
from ./arch/arm64/include/asm/bug.h:26,
from ./include/linux/bug.h:5,
from ./arch/arm64/include/asm/cpufeature.h:20,
from ./arch/arm64/include/asm/ptrace.h:11,
from ./arch/arm64/include/asm/irqflags.h:10,
from ./include/linux/irqflags.h:16,
from ./include/linux/rcupdate.h:26,
from ./include/linux/rculist.h:11,
from ./include/linux/pid.h:5,
from ./include/linux/sched.h:14,
from ./include/linux/kthread.h:6,
from /temp/industrial-pi/gt9xx/gt9xx_update.c:21:
/temp/industrial-pi/gt9xx/gt9xx_update.c: In function ‘gup_check_update_file’:
/temp/industrial-pi/gt9xx/gt9xx.h:352:49: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type kernel_size_t’ {aka ‘long unsigned int’} [-Wformat=]
352 | printk("<<-GTP-DEBUG->> [%d]"fmt"\n",LINE, ##arg);\
| ^~~~~~
./include/linux/printk.h:444:25: note: in definition of macro ‘printk_index_wrap’
444 | _p_func(_fmt, ##__VA_ARGS); \
| ^~~~
/temp/industrial-pi/gt9xx/gt9xx.h:352:42: note: in expansion of macro ‘printk’
352 | printk("<<-GTP-DEBUG->> [%d]"fmt"\n",LINE, ##arg);\
| ^~
/temp/industrial-pi/gt9xx/gt9xx_update.c:884:9: note: in expansion of macro ‘GTP_DEBUG’
884 | GTP_DEBUG("Update File path:%s, %d", path, strlen(path));
| ^~~~~
/bin/sh: 1: scripts/basic/fixdep: not found
make[3]: [scripts/Makefile.build:250: /temp/industrial-pi/gt9xx/gt9xx_update.o] Error 127
make[3]: Deleting file '/temp/industrial-pi/gt9xx/gt9xx_update.o'
make[2]: [Makefile:2014: /temp/industrial-pi/gt9xx] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.1.54-rt15-v8+'
make[1]: [Makefile:21: compile] Error 2
make[1]: Leaving directory '/temp/industrial-pi/gt9xx'
make: *** [Makefile:34: install] Error 2
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Hi @Liu-Xiaoqiang I have tried with the 6.6.20 and using the latest RT build of 6.6.35
admin@codesys:/temp/industrial-pi $ sudo make install
make[1]: Entering directory '/temp/industrial-pi/gt9xx'
make -C /lib/modules/6.6.35-rt34-rpi-v8+/build M=`pwd` modules
make[2]: Entering directory '/temp/industrial-pi/gt9xx'
make[2]: *** /lib/modules/6.6.35-rt34-rpi-v8+/build: No such file or directory. Stop.
make[2]: Leaving directory '/temp/industrial-pi/gt9xx'
make[1]: *** [Makefile:25: compile] Error 2
make[1]: Leaving directory '/temp/industrial-pi/gt9xx'
make: *** [Makefile:30: install] Error 2
It looks like the 6.6.20 version is looking for exact kernel version of drivers and can't be found?
I think you should modify the Makefile for every driver to apply this change,For example the Makefile in the gt9xx directory, you should add the following line,
What do I need to modify exactly in the Drivers Make files, what is the line?
From the following error, the linux header is missing. Try to install it.
Kind regards, Nicky (Liu Xiaoqiang) CHIPSEE CO., LIMITED Address:Xinyuan Science Park B406, 97 Changping Road, Changping District, Beijing, 102206, China TEL:+8610-62105170 Website:https://chipsee.com @. Skype: @.
From: MatthewReed303
Date: 2024-08-07 05:03
To: Chipsee/industrial-pi
CC: Xiaoqiang Liu; Mention
Subject: Re: [Chipsee/industrial-pi] Can not install drivers on RT kernel (Issue #8)
Hi @Liu-Xiaoqiang I have tried with the 6.6.20 and using the latest RT build of 6.6.35
@.:/temp/industrial-pi $ sudo make install
make[1]: Entering directory '/temp/industrial-pi/gt9xx'
make -C /lib/modules/6.6.35-rt34-rpi-v8+/build M=pwd
modules
make[2]: Entering directory '/temp/industrial-pi/gt9xx'
make[2]: /lib/modules/6.6.35-rt34-rpi-v8+/build: No such file or directory. Stop.
make[2]: Leaving directory '/temp/industrial-pi/gt9xx'
make[1]: [Makefile:25: compile] Error 2
make[1]: Leaving directory '/temp/industrial-pi/gt9xx'
make: [Makefile:30: install] Error 2
It looks like the 6.6.20 version is looking for exact kernel version of drivers and can't be found? What do I need to modify exactly in the Drivers Make files? Or am I be to try change the overlay from /o to /overlay? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Hi @Liu-Xiaoqiang, What line do I need to add to make files because of overlay is /o and not /overlay? Or does this not matter now I'm using the 6.6.20 version?
Hi @Liu-Xiaoqiang I decided to just try with the standard RPI kernel 6.6.31 and install the 6.6.20 drivers and the install works fine and no errors, but it's stuck in a boot loop and can't even ssh into it now when I restarted. It's now just a blank screen. I re flashed the RPI OS back on it again and tried again to install the drivers, but same result. Looks like an issue with the drivers?
EDIT:
After leaving it 5min I can now SSH back in but still blank screen, going to now install the desktop and see if that works
EDIT:
Still blank display after installing the desktop I use Here is the /boot/firmware/config.txt
# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
# Additional overlays and parameters are documented
# /boot/firmware/overlays/README
# Automatically load overlays for detected cameras
camera_auto_detect=1
# Automatically load overlays for detected DSI displays
display_auto_detect=1
# Automatically load initramfs files, if found
auto_initramfs=1
# Enable DRM VC4 V3D driver
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1
# Run in 64-bit mode
arm_64bit=1
# Disable compensation for displays with overscan
disable_overscan=1
# Run as fast as firmware / board allows
arm_boost=1
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
#otg_mode=1
[all]
#######################Chipsee Config#################################
# Audio
gpio=6=op,dh
gpio=17=op,dh
# I2C
# if use I2C0, we need enalble follow
dtoverlay=i2c0,pins_44_45
# RTC
dtoverlay=i2c-rtc,ds1307,addr=0x32
# UART
dtoverlay=miniuart-bt
enable_uart=1
core_freq=250
dtoverlay=uart2
dtoverlay=uart3
dtoverlay=uart5
# LED
dtparam=act_led_trigger=heartbeat
# SD1
#dtoverlay=sdio,poll_once=off
dtparam=ant2
# Touch
dtoverlay=goodix,interrupt=20,reset=21
# HDMI
##PWM
#dtoverlay=pwm,pin=18,func=2
##GPIO
gpio=18=op,dh
dtoverlay=pwm-backlight,pin=18,func=2,pwm_0
# Follow Can fix some hardware issue
hdmi_force_hotplug=1
hdmi_group=2
hdmi_drive=2
hdmi_mode=87
hdmi_timings=1024 0 160 10 160 600 0 12 1 23 0 0 0 60 0 52000000 6
hdmi_ignore_edid=0xa5000080
hdmi_pixel_encoding=1
# MCP23008
dtoverlay=mcp23017,mcp23008,addr=0x20,noints
# MCP2517
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=16
# USB
dtoverlay=dwc2,dr_mode=host
########################Chipsee Config#################################
[all]
kernel=vmlinuz-6.6.35-rt34-rpi-v8+
initramfs initrd.img-6.6.35-rt34-rpi-v8+
os_prefix=6.6.35-rt34-rpi-v8+/
overlay_prefix=o/
arm_64bit=1
[all]
EDIT:
I have it working now... commented out all the HDMI sections in config.txt
#hdmi_force_hotplug=1
#hdmi_group=2
#hdmi_drive=2
#hdmi_mode=87
#hdmi_timings=1024 0 160 10 160 600 0 12 1 23 0 0 0 60 0 52000000 6
#hdmi_ignore_edid=0xa5000080
#hdmi_pixel_encoding=1
Hi I get the following errors trying to install the drivers on a preempt_rt kernel:
I need the rt kernel for the codesys plc that will also be running. The RT kernel came from https://github.com/kdoren/linux/wiki
I think it's todo with your drivers trying todo something with kernel headers?
Here is the RPI OS version I'm using https://downloads.raspberrypi.com/raspios_lite_arm64/images/ and it's the raspios_lite_arm64-2023-10-10 version which matches for RT Kernel here https://github.com/kdoren/linux/releases
I also installed the RT kernel headers DEB file and now get something slightly different when trying to install chipsee drivers
I'm wondering if it's possible for you to make driver installer a DEB package in the future? Or provide regular update when each major version of RPI OS is released?
Maybe the Chipsee Image builds can be done with github actions to automate it and provide 2x releases one standard and one with RT for Industrial applications?