kasbert / epsolar-tracer

Tools for EPsolar Tracer BN solar charge controller
Apache License 2.0
120 stars 76 forks source link

Fails to build driver on Raspberry Pi 4 running Raspian Bullseye #56

Closed mflage closed 1 year ago

mflage commented 1 year ago
# make
make -C /lib/modules/6.1.32-v8+/build M=/home/pi/src/epsolar-tracer/xr_usb_serial_common-1a
make[1]: Entering directory '/usr/src/linux-headers-6.1.21+'
  CC [M]  /home/pi/src/epsolar-tracer/xr_usb_serial_common-1a/xr_usb_serial_common.o
In file included from ./include/linux/types.h:6,
                 from ./include/linux/limits.h:6,
                 from ./include/linux/kernel.h:16,
                 from /home/pi/src/epsolar-tracer/xr_usb_serial_common-1a/xr_usb_serial_common.c:37:
./include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
    5 | #include <asm/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /home/pi/src/epsolar-tracer/xr_usb_serial_common-1a/xr_usb_serial_common.o] Error 1
make[1]: *** [Makefile:2012: /home/pi/src/epsolar-tracer/xr_usb_serial_common-1a] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.21+'
make: *** [Makefile:9: all] Error 2

It build successfully on Raspian Buster, so I don't know what changed between versions.

mflage commented 1 year ago

Figured it out. Seems like the Raspberry community is a bit confused these days about 64 bit kernel and 32 bit userland. So setting arm_64bit=0 in config.txt resolved this for me.