1
vote
1answer
80 views

Accessing GPIO after kernel boots

my rootfs.cpio has only following files: [root@localhost extract]# ls dev init tmp dev has console only. init is cross-compiled from the program given at the end: Then I make a my image and ...
1
vote
1answer
115 views

USB modalias. Meaning of numeric values

For the USB modaliases, I know that the values corresponding to the device's vendor and product ids can be found here: http://www.linux-usb.org/usb.ids Which online resources and/or kernel source ...
5
votes
1answer
847 views

Difference between /dev and /sys/class?

What is the difference between the device representation in /dev between the one in /sys/class? Is one prefered over the other? Is there something one offers and the other doesn't?
0
votes
0answers
45 views

Best way to implement a system configuration driver for Linux

Is there a standard architecture for a driver that allows to read an set system configuration for an embedded Linux system? System configuration means for example hardware calibration values, revision ...
0
votes
1answer
508 views

/sys/class filesystem on Linux

On Linux (Ubuntu 11.10 on a ARM processor in my case) I was looking for a way to measure CPU temperature. I found out that a cat /sys/class/thermal/thermal_zone0/temp did the trick. Now I wonder: ...
2
votes
3answers
316 views

How to find out easily whether a block device (or a part of it) is mounted somehow

I want to know what the easiest way is to determine (without root privilege) whether a block device (say sdb) or any part of it is mounted (and which part of it). Checking /proc/mounts for sdb is not ...
3
votes
1answer
105 views

Using Bash to write to a device in /sys?

I have one of these: Basically, it's a USB device with three LEDs (red, green, and blue). The Linux kernel has supported this device through the usbled module for quite some time now. However, I ...
4
votes
2answers
128 views

Can you identify transport via sysfs?

I'm writing a script, and I'm interested in being able to identify the transport class (fc - "fibre channel", scsi, iscsi, etc.) for a given block device. I can retrieve this information via ls -l ...
8
votes
3answers
2k views

Why does rsync fail to copy files from /sys in Linux?

I have a bash script which uses rsync to backup files in Archlinux. I noticed that rsync failed to copy a file from /sys, while cp worked just fine: # rsync /sys/class/net/enp3s1/address /tmp ...
2
votes
0answers
857 views

How to retrieve sysfs devpath of a USB flash drive given its corresponding partition sysfs path?

I have a USB flash drive connected to a hub. Its storage device partition devpath in sysfs is /devices/pci0000:00/0000:00:12.2/usb6/6-1/6-1.2/6-1.2:1.0/host10/target10:0:0/10:0:0:0/block/sdb/sdb1. I ...
13
votes
4answers
454 views

How do I learn what I can do with /proc and /sys

I'd like to know more about the advanced uses of the /proc and /sys virtual filesystems, but I don't know where to begin. Can anyone suggest any good sources to learn from? Also, since I think sys has ...