pimium / sda5708

Raspberry Pi: Linux driver for Siemens SDA-5708 display
2 stars 0 forks source link

Problems compiling #1

Open gosadaque opened 3 years ago

gosadaque commented 3 years ago

Hey pimium,

I was pretty happy about stumbling across your rep. I’m not familiar with compiling and just a simple make didn’t work out for me unfortunately.

make CONFIG_DEBUG_SECTION_MISMATCH=y ARCH=arm \
CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabi- -C ~/embedded/raspi/buildroot-2013.05/output/build/linux-e959a8e/ M=/home/pi/sda5708 modules
make[1]: *** /home/pi/embedded/raspi/buildroot-2013.05/output/build/linux-e959a8e/: No such file or directory.  Stop.
make: *** [Makefile:11: default] Error 2

I think it's asking for the kernel, so I changed the path ~/home/pi/embedded/raspi/buildroot-2013.05/output/build/linux-e959a8e/ to /boot/. But there was another error:

make CONFIG_DEBUG_SECTION_MISMATCH=y ARCH=arm \
CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabi- -C /boot/ M=/home/pi/sda5708 modules
make[1]: Entering directory '/boot'
make[1]: *** No rule to make target 'modules'.  Stop.
make[1]: Leaving directory '/boot'
make: *** [Makefile:11: default] Error 2

I looked into the modules and saw the file sda5908.ko mentioned in the directory /home/pimi/embedded/raspi/driver/sda5908/. I copied it there, but still get the same error.

Can you help me? Thank you a lot in advance.

pimium commented 3 years ago

Hello, how do you try to compile the code? Which raspberry do you have? Which Linux kernel is running on?

gosadaque commented 3 years ago

Hello I just went to the downloaded git directory and did a make no parameters or whatsoever. Retried it with Sudo make But no change.

I'm using a Raspberry Pi Zero W with Raspbian GNU/Linux 10 (buster), Kernel Version: Linux version 4.19.97+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611))

pimium commented 3 years ago

ok I see. I built my own kernel with buildroot. That makefile is a cross compiling one.

pimium commented 3 years ago

Do you install the build tool in raspbian? Can you build some c code in raspbian? If yes: Move the code to the raspberry And edit the makefile

KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd)

default: $(MAKE) -C $(KDIR) M=$(PWD) modules if that do not work, contact me again

gosadaque commented 3 years ago

The KDIR differs a bit, but with the edited Makefile it looks correct:

make -C /lib/modules/4.9.0-6-rpi/build M=/home/pi/sda5708 modules
make[1]: Entering directory '/usr/src/linux-headers-4.9.0-6-rpi'
  Building modules, stage 2.
  MODPOST 0 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.9.0-6-rpi'

Is this correctly compiled? Also how do I control the display after successfully compiling?

Thanks in advance