6 Software
User Manual 70/374
Example: Read out EEPROM
Displays in two byte hexadecimal by using /usr/bin/hexdump.
# hexdump -x /sys/bus/i2c/devices/0-0054/eeprom
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
..
0002000
Display canonical hex+ASCII, 16 byte per line.
# hexdump -C /sys/bus/i2c/devices/0-0054/eeprom
00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
..
00002000
Low Level Hardware Access
List of devices to
partition parameters
This user space interface includes
the device and partition information of
the system.
This user space interface includes
the command line parameters which
the kernel itself was booted.
Example:
Read device and partition information
# cat /proc/mtd
dev: size erasesize name
mtd0: 03700000 00020000 "rootfs"
mtd1: 00800000 00020000 "kernel"
mtd2: 00040000 00020000 "u-boot"
mtd3: 00020000 00020000 "u-boot-env"
mtd4: 000a0000 00020000 "fdt"
mtd5: 000a0000 00020000 "reserved"
mtd6: 40000000 00020000 "nand-flash"
Get command line parameters. Parameter ubi.mtd=0 indicates to which mtd block the file system is mounted to.
# cat /proc/cmdline
console=ttyPSC3,115200 ubi.mtd=0 root=ubi0:rootfs rw rootfstype=ubifs quiet
ip=192.168.4.253:192.168.4.204::255.255.255.0::eth0:off panic=1