Device Tree configuration

Hello there! It’s me again. I figured out that, in order to use the XPT2046 LCD touchscreen, I need to perform device tree configuration. I did searched and ended up finding this .dts file that seems to do the job:

Now, I download the file, place it inside /boot/dtbs/4.19.94-ti-r73 and, using terminal I write (and get) the following:

debian@beaglebone:$ cd /boot/dtbs/4.19.94-ti-r73
debian@beaglebone:/boot/dtbs/4.19.94-ti-r73$ dtc -O dtb -o BBADS7846-00A0.dtbo -b 0 -@ BBADS7846-00A0.dts
Error: BBADS7846-00A0.dts:1.1-2 syntax error
FATAL ERROR: Unable to parse input tree
debian@beaglebone:/boot/dtbs/4.19.94-ti-r73$

Any help or suggestion? Thanks in advance!
Best Regards,

Doomyguy.

debian@beaglebone:/boot/dtbs/4.19.94-ti-r73$ make  src/arm/BBADS7846-00A0.dtbo

Regards,

Hi, Robert! Thanks for the answer, but I tried that:

And got:

make: ***No rule to make target 'src/arm/BBADS7846-00A0.dtbo'. Stop.

Why can’t it make the target? DId i miss any step?

Regards,

Doomyguy

Sorry, just saw what you did…

Normally those overlays can be found under:

/opt/source/dtb-4.19-ti/

If not you can grab them from:

git clone -b v4.19.x-ti-overlays https://github.com/beagleboard/BeagleBoard-DeviceTrees

Regards,

Ahhh ok. Thanks.Well, I cloned the repository in Downloads, and then run the command

make help

then

make all

which apparently installed everything, beacuse I’ve a lot of .dts and .dtbo files inside /src/arm/overlays

Which shall be the next step? Must I add the BBADS7846-00A0 .dts inside /overlays, and then add it at the end of the Makefile file, but as BBADS7846-00A0 .dtbo?

Regards,

Doomyguy

You can just copy it into the directory with the *.dts name… And just run:

make
sudo make install

The Makefile with .dtbo’s is only used when i sync this project with the linux-image.deb builds…

Regards,

2 Likes

Good morning again. Sorry for the delay in answering, but I am working with the BBB at my university as part of a project to develop a simple GUI and I have limited access to the BBB from 8 to 13 (my timezone is GMT-3 btw), so I try to post here the most I can in that limited time interval. That being clarified, I did the following:

  1. Copied the file BBADS7846-00A0.dts inside /overlays manually (right click: copy, open the overlay’s folder, right click: paste)

  2. Open terminal and did and got the following:

debian@beaglebone: cd /home/debian/Downloads/BeagleBoard-DeviceTrees/src/arm/overlays

debian@beaglebone:~/home/.../overlays ls  *I used it to look if the ADS file was there and it was indeed)

debian@beaglebone:~/home/.../overlays make

make: ***No targets. Stop.

debian@beaglebone:~/home/.../overlays make BBADS7846-00A0.dts

make: Nothing to be done for 'BBADS7846-00A0.dts' .
  
debian@beaglebone:~/home/.../overlays sudo make install BBADS7846-00A0.dts

[ sudo ] password for debian: ( I tipped here "temppwd" and then pressed Intro)

make: ***No rule to make target 'install'. Stop.

What am I doing wrong?

Regards,

Doomyguy

Hello,

  1. git clone GitHub - beagleboard/BeagleBoard-DeviceTrees: Linux kernel device trees and device tree overlays for BeagleBoard.org open hardware single board computers and add-on boards.
  2. cd BeagleBoard-DeviceTrees
  3. make
  4. add your .dts file
  5. sudo make install
  6. Add the .dtbo to the /boot/uEnv.txt file for kernel 4.19.x

If you are using another kernel, like 5.10.x, try to write a script and use the DTC outside of their Makefile for managing the .dts files they produce. I think this may be beneficial too.

Seth

1 Like

Run make from:

debian@beaglebone: cd /home/debian/Downloads/BeagleBoard-DeviceTrees/

Regards,

1 Like

Hello there!
Thanks a lot, @RobertCNelson and @silver2row , for your help!
I could satisfactorily install the Device Tree file, now the next step I have to take is, with this new configuration, try to put the LCD’s tactile function to work. I promise that if I can make it work properly, I’ll make a post with the step-by-step guide of how to do it, so everyone could make it in the future without going through everything I’m going through :sweat_smile:
I’ll make the post solved now.

Best regards,

Doomyguy

1 Like

Hello there again. Sorry to bother you, but how exactly should I add this?

I’ve looked for an answer in Google, but I’m confused, shall it be something like:

###Overide capes with eeprom
#uboot_overlay_addr0=/home/debian/Downloads/BeagleBoard-DeviceTrees/BBADS7846-00A0.dtbo

?

Best regards,

Doomyguy.

Hello @Doomyguy ,

Seth here. Um, I think after make and sudo make install in the BeagleBoard-DeviceTrees repo, one would just add a line and uncomment it from a /boot/dtbs/“YOUR_CURRENT_KERNEL”/overlays/“YOUR_DTBO”.

I hope that makes sense.

So, remove the hash mark, i.e. also known as uncommenting the line.

I think I can help you more. Ask away!

Seth