cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
2,537 Views
Registered: ‎10-19-2017

Include i2cdetect in PetaLinux

Jump to solution

It seems as though I do not have i2cdetect Linux tool included in PetaLinux. I am trying to write a basic I2C Linux application which is failing to write bytes to I2C. Since I am running it within QEMU, it is fairly difficult to debug without this tool. How do you include i2cdetect in PetaLinux?

 

root@plnx_arm:~# i2cdetect -r -y 0
-sh: i2cdetect: command not found

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
607 Views
Registered: ‎08-02-2019

Re: Include i2cdetect in PetaLinux

Jump to solution

Hi @jackfrye11 ,

There is a way to enable i2cdetect, i2cget e.t.c. commands in Petalinux without any installation.

You need to run "petalinux-config -c rootfs" command, then find i2ctools and enable it, build new image and you got it.

Not: I read your messaging but Solution misrouted me, that's why I m answering tour question.

Regards,

Saban

View solution in original post

4 Replies
Highlighted
Voyager
Voyager
2,473 Views
Registered: ‎06-24-2013

Re: Include i2cdetect in PetaLinux

Jump to solution

Hey @jackfrye11,

 

You want to add the i2c-tools package for i2cdetect.

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Highlighted
Explorer
Explorer
2,449 Views
Registered: ‎10-19-2017

Re: Include i2cdetect in PetaLinux

Jump to solution

@hpoetzl, is there a way to install apt-get or similar packaging utilities? I have installed i2cdetect before. Is it possible to install it manually, since I am in a secured environment?

0 Kudos
Highlighted
Voyager
Voyager
3,248 Views
Registered: ‎06-24-2013

Re: Include i2cdetect in PetaLinux

Jump to solution

Hey @jackfrye11,

 

There is no package manager in petalinux, you need to add the package via a build recipe so that it can be 'built' into your image.

 

Note that if you prefer a pacakge based distro like Debian, Ubuntu, Arch, etc. you can simply forget about petalinux and use your favorite ARM based distro instead (that's why I do most of the time).

 

Best,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Highlighted
Explorer
Explorer
608 Views
Registered: ‎08-02-2019

Re: Include i2cdetect in PetaLinux

Jump to solution

Hi @jackfrye11 ,

There is a way to enable i2cdetect, i2cget e.t.c. commands in Petalinux without any installation.

You need to run "petalinux-config -c rootfs" command, then find i2ctools and enable it, build new image and you got it.

Not: I read your messaging but Solution misrouted me, that's why I m answering tour question.

Regards,

Saban

View solution in original post