UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
2,035 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
Observer sabankocal
Observer
105 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

4 Replies
Voyager
Voyager
1,971 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
Explorer
Explorer
1,947 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
Voyager
Voyager
2,746 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
Observer sabankocal
Observer
106 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