c++ - How to get the Linux Flash ROM size in C? -
is there c/c++ library or linux system command can use rom size? on start-up kernel displays proper size in mb. can't seem find can pull from
thanks -naze
by way, im using jff2 rom file system on embedded system. arm7 cpu.
if appears mtd device, can following
cat /proc/mtd dev: size erasesize name mtd0: 00030000 00010000 "bootloaders" mtd1: 00200000 00010000 "kernel" mtd2: 00280000 00010000 "rootfs" mtd3: 00350000 00010000 "user"
size in hexadecimal
for more information on individual mtd, find them in /sys/class/mtd<n>
directory
Comments
Post a Comment