[lxc-users] not able to read-write to eeprom inside lxc container
manik sheeri
sheeri185adidam at gmail.com
Tue Sep 20 17:45:06 UTC 2016
Hi,
I am using lxc container. and I have an eeprom on my hardware board
connected via i2c adaptor.
my gaming application uses this eeprom to store some settings.
In my sysfs, the eeprom nodes are:
/sys/devices/platform/ocores-i2c.0/i2c-23/23-0054/eeprom
/sys/devices/platform/ocores-i2c.0/i2c-23/23-0056/eeprom
Since the sysfs is dynamic, so I created a sym link to these eeproms at :
/dev/kmcwire/eeprom0 ->
/sys/devices/platform/ocores-i2c.0/i2c-23/23-0054/eeprom
/dev/kmcwire/eeprom1 ->
/sys/devices/platform/ocores-i2c.0/i2c-23/23-0056/eeprom
now, in my host I used to read/write to nodes "/dev/kmcwire/eeprom*"
Inside the container, I am not able to do that. I get 'Permission Denied'
error.
In my config file, I made some changes:
*/usr/share/lxc/config/common.conf*
I changed "lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed" to
"lxc.mount.auto = cgroup:mixed proc:mixed *sys:rw*" to mount sysfs in
read-write mode.
*/var/lib/lxc/my_container/config*
I added the line "lxc.mount.entry = /dev/kmcwire dev/kmcwire none
bind,optional,create=dir"
Can anyone help me point out the issue here ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160920/d6b603d9/attachment.html>
More information about the lxc-users
mailing list