Jump to content

Armbian BPI_M64 1- Wire kernel 4.19.53-sunxi64.


shaddow501

Recommended Posts

12 hours ago, shaddow501 said:

ads7846_device: version magic '5.1.15 SMP mod_unload aarch64' should be '5.1.15-sunxi64 SMP mod_unload aarch64'

It seems that "out-of-the-tree" tooks/include the wrong magic header file.

It maybe easier to create a patch for that driver to make it included part of the kernel tree and then create a new image.

Link to comment
Share on other sites

1 hour ago, martinayotte said:

It seems that "out-of-the-tree" tooks/include the wrong magic header file.

It maybe easier to create a patch for that driver to make it included part of the kernel tree and then create a new image.

Well in the previous kernels I havent got any issues and also I could compile the "make modules" in the linux headers without any errors.

How do you create that patch? it is easier sure for someone that know how to do it?

 

Remember I moved to this kernel because I wanted to fix the functionality of the 1-wire & now I am facing a whole new problems.

It like going to the car repair shop to fix an oil leak,  but no lets replace all the engine,

but not the engine doesnt fit so lets replace the whole car

 

really???

 

Surely it is a problem with the "Linux headers" it should have  been compiled without any issues.

 

Please help.

 

 

 

Link to comment
Share on other sites

1 hour ago, shaddow501 said:

Surely it is a problem with the "Linux headers" it should have  been compiled without any issues.

Please, provide link where you took "out-of-the-tree" driver, I will give it a try ...

Link to comment
Share on other sites

1 hour ago, shaddow501 said:

Well in the previous kernels I havent got any issues and also I could compile the "make modules" in the linux headers without any errors.

How do you create that patch? it is easier sure for someone that know how to do it?

 

Remember I moved to this kernel because I wanted to fix the functionality of the 1-wire & now I am facing a whole new problems.

It like going to the car repair shop to fix an oil leak,  but no lets replace all the engine,

but not the engine doesnt fit so lets replace the whole car

 

really???

 

Surely it is a problem with the "Linux headers" it should have  been compiled without any issues.

 

Please help.

 

 

 

git clone https://github.com/notro/fbtft_tools/

Link to comment
Share on other sites

1 hour ago, shaddow501 said:

Ok ! I've tooked the only ads7846.c source and created a patch, and compiled kernel, I got a working modules with good magic signature.

But I'm unable to test it, since I don't have such display, and I don't know what parameters/arguments to provide to it.

At least, here is output of "modinfo" :

modinfo ads7846_device
filename:       /lib/modules/5.1.15-sunxi64/kernel/drivers/staging/fbtft/ads7846_device.ko
license:        GPL
author:         Noralf Tronnes
description:    Adds a ADS7846 device
depends:        
staging:        Y
intree:         Y
name:           ads7846_device
vermagic:       5.1.15-sunxi64 SMP mod_unload aarch64
parm:           verbose:0-2 (uint)
parm:           busnum:SPI bus number (default=0) (uint)
parm:           cs:SPI chip select (default=1) (uint)
parm:           speed:SPI speed (default 2MHz) (uint)
parm:           irq:int
parm:           mode:SPI mode (default: SPI_MODE_0) (int)
parm:           model:Touch Controller model: 7843, 7845, 7846, 7873 (default=7846) (int)
parm:           gpio_pendown:The GPIO used to decide the pendown state (required) (int)
parm:           x_plate_ohms:Used to calculate pressure (uint)
parm:           swap_xy:Swap x and y axes (bool)
parm:           x_min:Minimum value for x-axis (uint)
parm:           x_max:Maximum value for x-axis (uint)
parm:           y_min:Minimum value for y-axis (uint)
parm:           y_max:Maximum value for x-axis (uint)
parm:           pressure_min:uint
parm:           pressure_max:uint
parm:           keep_vref_on:Keep vref on for differential measurements as well (default=true) (bool)
parm:           vref_delay_usecs:int
parm:           vref_mv:int
parm:           settle_delay_usecs:uint
parm:           penirq_recheck_delay_usecs:uint
parm:           y_plate_ohms:Not used by driver (uint)
parm:           debounce_max:Max number of additional readings per sample (0,1,2) (uint)
parm:           debounce_tol:Tolerance used for filtering (uint)
parm:           debounce_rep:uint
parm:           irq_flags:ulong

BTW, on a side note, why you didn't use the existing driver which is already part of the kernel ?

ie : the one located here : /lib/modules/5.1.15-sunxi64/kernel/drivers/input/touchscreen/ads7846.ko

add-ads7846_device.patch

Link to comment
Share on other sites

1 hour ago, martinayotte said:

Ok ! I've tooked the only ads7846.c source and created a patch, and compiled kernel, I got a working modules with good magic signature.

But I'm unable to test it, since I don't have such display, and I don't know what parameters/arguments to provide to it.

At least, here is output of "modinfo" :


modinfo ads7846_device
filename:       /lib/modules/5.1.15-sunxi64/kernel/drivers/staging/fbtft/ads7846_device.ko
license:        GPL
author:         Noralf Tronnes
description:    Adds a ADS7846 device
depends:        
staging:        Y
intree:         Y
name:           ads7846_device
vermagic:       5.1.15-sunxi64 SMP mod_unload aarch64
parm:           verbose:0-2 (uint)
parm:           busnum:SPI bus number (default=0) (uint)
parm:           cs:SPI chip select (default=1) (uint)
parm:           speed:SPI speed (default 2MHz) (uint)
parm:           irq:int
parm:           mode:SPI mode (default: SPI_MODE_0) (int)
parm:           model:Touch Controller model: 7843, 7845, 7846, 7873 (default=7846) (int)
parm:           gpio_pendown:The GPIO used to decide the pendown state (required) (int)
parm:           x_plate_ohms:Used to calculate pressure (uint)
parm:           swap_xy:Swap x and y axes (bool)
parm:           x_min:Minimum value for x-axis (uint)
parm:           x_max:Maximum value for x-axis (uint)
parm:           y_min:Minimum value for y-axis (uint)
parm:           y_max:Maximum value for x-axis (uint)
parm:           pressure_min:uint
parm:           pressure_max:uint
parm:           keep_vref_on:Keep vref on for differential measurements as well (default=true) (bool)
parm:           vref_delay_usecs:int
parm:           vref_mv:int
parm:           settle_delay_usecs:uint
parm:           penirq_recheck_delay_usecs:uint
parm:           y_plate_ohms:Not used by driver (uint)
parm:           debounce_max:Max number of additional readings per sample (0,1,2) (uint)
parm:           debounce_tol:Tolerance used for filtering (uint)
parm:           debounce_rep:uint
parm:           irq_flags:ulong

BTW, on a side note, why you didn't use the existing driver which is already part of the kernel ?

ie : the one located here : /lib/modules/5.1.15-sunxi64/kernel/drivers/input/touchscreen/ads7846.ko

add-ads7846_device.patch 8.59 kB · 2 downloads

Dear martinayotte 

 

Thanks for the help,

my parameters are:

ads7846_device model=7846 cs=1 gpio_pendown=234 keep_vref_on=1 swap_xy=0 pressure_max=255 x_plate_ohms=150 x_min=3900 x_max=200 y_min=3900 y_max=200 busnum=1
 

I was finally was able to trick and install the driver.

I dont say it is the correct way but it worked.

 

1.  Install kernel headers => dpkg -i linux-headers-dev-sunxi64_5.90_arm64.deb

2. go into the /usr/src/headers... & make modules (till it it has the error I posted before)

3. go into the make the driver in the ads7846_device and just "make" (not make install !!!)

4.  Delete /usr/src/linux-headers..

5. Install kernel headers => dpkg -i linux-headers-dev-sunxi64_5.90_arm64.deb  => but now not to "make modules" anything just to have it there.

6. go into the make the driver in the ads7846_device and now perform the "make install" + depmod (now to goes to the right location)

7. Reboot.

 

And now the touch is working!!!

 

I am not sure if I had to do all those steps but hey it is working, I am happy and now I have battery support + 1-wire support, the python GPIO are working, the WiringPI is working. the only thing that I am now facing is to have u-boot  - logo...

but it is not that important since everything else is working.

 

Thanks for your help.

 

sure I would like to have your patch install but I do not know were exactly to put my values....

 


 

 

Link to comment
Share on other sites

8 minutes ago, shaddow501 said:

Dear martinayotte 

 

Thanks for the help,

my parameters are:

ads7846_device model=7846 cs=1 gpio_pendown=234 keep_vref_on=1 swap_xy=0 pressure_max=255 x_plate_ohms=150 x_min=3900 x_max=200 y_min=3900 y_max=200 busnum=1
 

I was finally was able to trick and install the driver.

I dont say it is the correct way but it worked.

 

1.  Install kernel headers => dpkg -i linux-headers-dev-sunxi64_5.90_arm64.deb

2. go into the /usr/src/headers... & make modules (till it it has the error I posted before)

3. go into the make the driver in the ads7846_device and just "make" (not make install !!!)

4.  Delete /usr/src/linux-headers..

5. Install kernel headers => dpkg -i linux-headers-dev-sunxi64_5.90_arm64.deb  => but now not to "make modules" anything just to have it there.

6. go into the make the driver in the ads7846_device and now perform the "make install" + depmod (now to goes to the right location)

7. Reboot.

 

And now the touch is working!!!

 

I am not sure if I had to do all those steps but hey it is working, I am happy and now I have battery support + 1-wire support, the python GPIO are working, the WiringPI is working. the only thing that I am now facing is to have u-boot  - logo...

but it is not that important since everything else is working.

 

Thanks for your help.

 

sure I would like to have your patch install but I do not know were exactly to put my values....

I moved to the newer image based on Ubuntu 18x since with the older image that I have had installed that was based on kernel 4.x , when updated to the new kernel the xfce were kind of slow and unresponsive, it also didnt let me update the u-boot to the new one so decided to go with a fresh new image.

 

I am still looking how to create the u-boot logo, but it is not so important.

 

8 minutes ago, shaddow501 said:

 


 

 

 

20190705_223054_HDR.jpg

8.jpg

1.jpg

2.jpg

3.jpg

4.jpg

5.jpg

6.jpg

7.jpg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines