Reverse engineering NOR Flash (VI)

Analizar el contenido de la memoria NOR y NAND Flash nos permitirá conocer mejor el sistema y sus posibles modificaciones. Para ello vamos a realizar ingeniería inversa en ambas memorias.

El primer análisis que podemos realizar, es utilizar el comando file con cada una de las partes del contenido de la memoria NOR flash, de esta manera conoceremos el tipo y formato de cada archivo en cuestión.

sergio@N130:~/proyectos/STB7007/flash_dev/NOR_Flash$ file cfe.bin
cfe.bin:        data
sergio@N130:~/proyectos/STB7007/flash_dev/NOR_Flash$ 

Repetimos el mismo comando con el resto de archivos.

cfe_config.bin: data

hdcp:           data

MAC_address:    data

reserve:        DOS executable (device driver)

secure_storage: DOS executable (device driver)

Para obtener más información acerca del contenido, utilizaremos los comandos hexdump y strings.

Con hexdump realiza un volcado completo del archivo a formato hexadecimal. Mientras que strings, busca e imprime secuencias de caracteres imprimibles del contenido del archivo.

Volcar el contenido del archivo a formato hexadecimal y guardar la información en un fichero la salida.

sergio@N130:~/proyectos/STB7007/flash_dev/NOR_Flash$ hexdump -C cfe.bin > cfe.dump
sergio@N130:~/proyectos/STB7007/flash_dev/NOR_Flash$ 

Buscar y extraer cadenas de texto y guardar en un fichero la salida.

sergio@N130:~/proyectos/STB7007/flash_dev/NOR_Flash$ strings -n 10 cfe.bin > cfe_strings.out
sergio@N130:~/proyectos/STB7007/flash_dev/NOR_Flash$ 

cfe

Mediante los strings de cfe, se puede apreciar gran parte del texto de la secuencia de arranque, la petición de un reset después de cargar el splash y el punto más importante. El cifrado del bootloader mediante un certificado público.

-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEA2PBIzgmzEKfPNYiXy1b4OLI8Ji2wpqOY3BMsgWvCKjIc9LViwi5q
Al+z0vLd3LPR04Blw+lwERak6Hvt5cKNU9iVN2/VY2xZZjrK5uwbgyezFJU7cV04
W9rewsLsl/yv71W+fjhNwI0/KHxDh3ajr7nEjjmTC12wlp8+EOZGvu19jNUj2crd
ycRvudeMQ5r9c64b3QYZC2JOl12FdQjmLkMiXpTUhXrCeBc6IzAeKX096jLSO3qX
MOdbEu+7sdWPLW4QFnjDX4/+M0Joz3NWfMU+Lz9pYiUONA/nZ/PwTh36pgZgKAqK
u2cdZi4R9zoPwLAaHJM+ommn7P/czkgI6QIDAQAB
-----END RSA PUBLIC KEY-----

Descarga el certificado certificado.cer

Repetimos el proceso con cada uno de los archivos, en algunos casos la salida de strings es 0, quiere decir que no ha encontrado caracteres imprimibles.

cfe_config.bin

Cuando arranca el bootloader, identifica 5 particiones mtd11 a mtd15 que son las utilizadas por el sistema.

BOOT_IMAGE=0
PACKAGE0_NAME=Flash - Image - Usr - NAND - Telefonica - Broadcom - ComtrendCT7007
PACKAGE0_FILENAME=/[nandwrite]/dev/mtd12
PACKAGE1_NAME=Flash - Image - Usr - Local - NAND - Telefonica - Broadcom - ComtrendCT7007
PACKAGE1_FILENAME=/[nandwrite]/dev/mtd13
PACKAGE2_NAME=Flash - Image - Usr - MediaBrowser - NAND - Telefonica - Broadcom - ComtrendCT7007
PACKAGE2_FILENAME=/[nandwrite]/dev/mtd14
PACKAGE3_NAME=Flash - Image - Usr - MediaServer - NAND - Telefonica - Broadcom - ComtrendCT7007
PACKAGE3_FILENAME=/[nandwrite]/dev/mtd15
PACKAGE4_NAME=Flash - Image - RomFS - NAND - Telefonica - Broadcom - ComtrendCT7007
PACKAGE4_FILENAME=/[nandwrite]/dev/mtd11
PACKAGE4_EXTENT=3798205
PACKAGE_COUNT=5
FIRST_BOOT=0
PACKAGE0_VERSION=1000026
PACKAGE0_ID=Flash-Image-Usr-NAND-Telefonica-Broadcom-ComtrendCT7007-1.0.0r26
PACKAGE0_SIZE=3395584
PACKAGE0_EXTENT=3396792
PACKAGE1_VERSION=1000020
PACKAGE1_ID=Flash-Image-Usr-Local-NAND-Telefonica-Broadcom-ComtrendCT7007-1.0.0r20
PACKAGE1_SIZE=12828672
PACKAGE1_EXTENT=12829894
PACKAGE2_VERSION=4111812
PACKAGE2_ID=Flash-Image-Usr-MediaBrowser-NAND-Telefonica-Broadcom-ComtrendCT7007-4.11.18r12
PACKAGE2_SIZE=11804672
PACKAGE2_EXTENT=11805910
PACKAGE3_VERSION=1000030
PACKAGE3_ID=Flash-Image-Usr-MediaServer-NAND-Telefonica-Broadcom-ComtrendCT7007-1.0.0r30
PACKAGE3_SIZE=1015808
PACKAGE3_EXTENT=1017042
PACKAGE4_VERSION=2061836
PACKAGE4_ID=Flash-Image-RomFS-NAND-Telefonica-Broadcom-ComtrendCT7007-2.6.18r36
PACKAGE4_SIZE=3796297

Con el sistema iniciado y en la consola, si utilizamos el comando "cfe_config -p" aparece la misma información.

[root@stb:/] $ cfe_config -p
Variable Name        Value
-------------------- --------------------------------------------------
          BOOT_IMAGE 0
       PACKAGE0_NAME Flash - Image - Usr - NAND - Telefonica - Broadcom - ComtrendCT7007
   PACKAGE0_FILENAME /[nandwrite]/dev/mtd12
       PACKAGE1_NAME Flash - Image - Usr - Local - NAND - Telefonica - Broadcom - ComtrendCT7007
   PACKAGE1_FILENAME /[nandwrite]/dev/mtd13
       PACKAGE2_NAME Flash - Image - Usr - MediaBrowser - NAND - Telefonica - Broadcom - ComtrendCT7007
   PACKAGE2_FILENAME /[nandwrite]/dev/mtd14
       PACKAGE3_NAME Flash - Image - Usr - MediaServer - NAND - Telefonica - Broadcom - ComtrendCT7007
   PACKAGE3_FILENAME /[nandwrite]/dev/mtd15
       PACKAGE4_NAME Flash - Image - RomFS - NAND - Telefonica - Broadcom - ComtrendCT7007
   PACKAGE4_FILENAME /[nandwrite]/dev/mtd11
     PACKAGE4_EXTENT 3798205
       PACKAGE_COUNT 5
          FIRST_BOOT 0
    PACKAGE0_VERSION 1000026
         PACKAGE0_ID Flash-Image-Usr-NAND-Telefonica-Broadcom-ComtrendCT7007-1.0.0r26
       PACKAGE0_SIZE 3395584
     PACKAGE0_EXTENT 3396792
    PACKAGE1_VERSION 1000020
         PACKAGE1_ID Flash-Image-Usr-Local-NAND-Telefonica-Broadcom-ComtrendCT7007-1.0.0r20
       PACKAGE1_SIZE 12828672
     PACKAGE1_EXTENT 12829894
    PACKAGE2_VERSION 4111812
         PACKAGE2_ID Flash-Image-Usr-MediaBrowser-NAND-Telefonica-Broadcom-ComtrendCT7007-4.11.18r12
       PACKAGE2_SIZE 11804672
     PACKAGE2_EXTENT 11805910
    PACKAGE3_VERSION 1000030
         PACKAGE3_ID Flash-Image-Usr-MediaServer-NAND-Telefonica-Broadcom-ComtrendCT7007-1.0.0r30
       PACKAGE3_SIZE 1015808
     PACKAGE3_EXTENT 1017042
    PACKAGE4_VERSION 2061836
         PACKAGE4_ID Flash-Image-RomFS-NAND-Telefonica-Broadcom-ComtrendCT7007-2.6.18r36
       PACKAGE4_SIZE 3796297
[root@stb:/] $ 

hdcp

No aparecen strings que permitan identificar algún contenido.

MAC_address

Tiene grabada la dirección MAC Address 4 veces.

00000000  00 00 00 00 00 00 00 84  00 00 00 00 64 68 0c 99  |............dh..|
00000010  88 77 00 00 64 68 0c 99  88 77 00 00 64 68 0c 99  |.|..dh...|..dh..|
*
00000040  88 77 00 00 64 68 0c 99  88 77 00 00 ff ff ff ff  |.|..dh...|......|
00000050  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000080  ff ff ff ff ff ff ff ff  ff ff ff ff c4 c4 ff ff  |................|
00000090  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
0001f800

reserve

Todo el contenido esta a ff.

secure_storage

Input configuration: 544C464E 335A7A6F 71324334 61313945 32343739

Data Section Value:    000000000000000000000000544c464e335a7a6f713243346131394532343739

CRC for DS =    5d7bc48e

Se trata de una comprobación de CRC para una entrada determinada, esta entrada podría ser los diferentes CRC de cada archivo, pero no es así.

CRC de cada archivo.

72fa09c4    cfe.bin
a702aa51    cfe_config.bin
cf63d352    hdcp
bb12aaf8    MAC_address
d64cd5de    reserve
0d2d27ed    secure_storage

Después de este análisis, parece complicado realizar modificaciones en el bootloader, está deshabilitado el prompt del CFE y cifrado. Tal vez se pueda hacer alguna cosa con la configuración cfe_config y el comando cfe_config

Comtrend STB-7007 backup memoria flash (V)

Llegados a este punto, con información sobre el hardware y el software. Seria importante realizar un backup de la memoria flash por lo que pueda pasar, sobretodo si vamos a tocar cosas y encontrar el problema que luego no arranca el sistema.

Para realizar la copia, utilizaremos el comando dd y conectaremos un pendrive en el USB.

Con el comando cat /proc/mtd nos informa que el sistema tiene un total de 18 particiones.

[root@stb:/] # cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00080000 00010000 "CFE"
mtd1: 00020000 00010000 "CFE config"
mtd2: 00320000 00010000 "reserved"
mtd3: 00020000 00010000 "secure storage"
mtd4: 0001f800 00010000 "MAC address"
mtd5: 00000800 00010000 "hdcp"
mtd6: 00800000 00020000 "Kernel"
mtd7: 00c00000 00020000 "/usr"
mtd8: 01000000 00020000 "/usr/local"
mtd9: 02000000 00020000 "/usr/lib/MediaBrowser"
mtd10: 02000000 00020000 "/usr/lib/MediaServer"
mtd11: 00800000 00020000 "Kernel (alt)"
mtd12: 00c00000 00020000 "/usr (alt)"
mtd13: 01000000 00020000 "/usr/local (alt)"
mtd14: 02000000 00020000 "/usr/lib/MediaBrowser (alt)"
mtd15: 02000000 00020000 "/usr/lib/MediaServer (alt)"
mtd16: 00400000 00020000 "Splash"
mtd17: 32e00000 00020000 "/rw/yaffs"
[root@stb:/] #

Durante el proceso de arranque se crean 6 particiones (mtd0 a mtd5) que corresponden con la memoria NOR Flash Spansion S29GL032A.

Creating 6 MTD partitions on "Broadcom 9xxxx mapped flash":
0x0000000000000000-0x0000000000080000 : "CFE"
0x0000000000080000-0x00000000000a0000 : "CFE config"
0x00000000000a0000-0x00000000003c0000 : "reserved"
0x00000000003c0000-0x00000000003e0000 : "secure storage"
0x00000000003e0000-0x00000000003ff800 : "MAC address"
mtd: partition "MAC address" doesn't end on an erase block -- force read-only
0x00000000003ff800-0x0000000000400000 : "hdcp

Mapa de particiones NOR Flash

 * +----------------------------------+
 * |       Mapa de particiones        |
 * |                                  |
 * +-0x00000000-----------------------+
 * |            bootloader   CFE      | 512 kb
 * +-0x00080000-----------------------+
 * |            CFE config            | 128 kb
 * +-0x000a0000-----------------------+
 * |            reserve               | 3.2 Mb
 * +-0x003c0000-----------------------+
 * |            secure storage        | 128 kb
 * +-0x003e0000-----------------------+
 * |            MAC address           | 126 kb
 * +-0x003ff800-----------------------+
 * |            hdcp                  | 2 kb
 * +-0x00400000-----------------------+

Las otras 12 particiones (mtd6 a mtd17) corresponden a la memoria NAND Flash Samsung K9K8G08U0A.

Creating 12 MTD partitions on "bcm7xxx-nand.0":
0x0000000006400000-0x0000000006c00000 : "Kernel"
0x0000000006c00000-0x0000000007800000 : "/usr"
0x0000000007800000-0x0000000008800000 : "/usr/local"
0x0000000008800000-0x000000000a800000 : "/usr/lib/MediaBrowser"
0x000000000a800000-0x000000000c800000 : "/usr/lib/MediaServer"
0x0000000000000000-0x0000000000800000 : "Kernel (alt)"
0x0000000000800000-0x0000000001400000 : "/usr (alt)"
0x0000000001400000-0x0000000002400000 : "/usr/local (alt)"
0x0000000002400000-0x0000000004400000 : "/usr/lib/MediaBrowser (alt)"
0x0000000004400000-0x0000000006400000 : "/usr/lib/MediaServer (alt)"
0x000000000c800000-0x000000000cc00000 : "Splash"
0x000000000cc00000-0x000000003fa00000 : "/rw/yaffs"

Mapa de particiones NAND Flash

 * +----------------------------------------+
 * |       Mapa de particiones              |
 * |                                        |
 * +-0x00000000-----------------------------+
 * |            Kernel (alt)                | 8 Mb
 * +-0x00800000-----------------------------+
 * |            /usr (alt)                  | 12 Mb
 * +-0x01400000-----------------------------+
 * |            /usr/local (alt)            | 16 Mb
 * +-0x02400000-----------------------------+
 * |            /usr/lib/MediaBrowser (alt) | 32 Mb
 * +-0x04400000-----------------------------+
 * |            /usr/lib/MediaServer (alt)  | 32 Mb
 * +-0x06400000-----------------------------+
 * |            Kernel                      | 8 Mb
 * +-0x06c00000-----------------------------+
 * |            /usr                        | 12 Mb
 * +-0x07800000-----------------------------+
 * |            /usr/local                  | 16 Mb
 * +-0x08800000-----------------------------+
 * |            /usr/lib/MediaBrowser       | 32 Mb
 * +-0x0a800000-----------------------------+
 * |            /usr/lib/MediaServer        | 32 Mb
 * +-0x0c800000-----------------------------+
 * |            Splash                      | 4 Mb
 * +-0x0cc00000-----------------------------+
 * |            /rw/yaffs                   | 833 Mb
 * +-0x3fa00000-----------------------------+

Una vez analizada la estructura de la memoria flash, procederemos a realizar el backup.
EL primer paso sera encender el equipo y dejar que finalice el proceso de arranque completo, después conectaremos el pendrive al usb.

Ahora desde la consola, se crea la carpeta donde se montará el usb y se comprueba que este montado correctamente. En mi caso la carpeta la he creado en /tmp/usb.

[root@stb:/] # mkdir /tmp/usb
[root@stb:/] # mount /dev/sda1 /tmp/usb
[root@stb:/] # df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/romblock7            3.3M      3.3M         0 100% /usr
/dev/romblock8           12.3M     12.3M         0 100% /usr/local
/dev/romblock9           11.3M     11.3M         0 100% /usr/lib/MediaBrowser
/dev/romblock10           1.0M      1.0M         0 100% /usr/lib/MediaServer
/dev/mtdblock17         814.0M      2.3M    811.7M   0% /rw
tmpfs                    32.0M     20.0k     32.0M   0% /tmp
/dev/sda1                 7.4G      3.6G      3.9G  48% /tmp/usb
[root@stb:/] # 

Copia de seguridad de la memoria NOR Flash.

[root@stb:/] # dd if=/dev/mtd0 of=/tmp/usb/cfe.bin
1024+0 records in
1024+0 records out
[root@stb:/] # dd if=/dev/mtd1 of=/tmp/usb/cfe_config.bin
256+0 records in
256+0 records out
[root@stb:/] # dd if=/dev/mtd2 of=/tmp/usb/reserve       
6400+0 records in
6400+0 records out
[root@stb:/] # dd if=/dev/mtd3 of=/tmp/usb/secure_storage
256+0 records in
256+0 records out
[root@stb:/] # dd if=/dev/mtd4 of=/tmp/usb/MAC_address   
252+0 records in
252+0 records out
[root@stb:/] # dd if=/dev/mtd5 of=/tmp/usb/hdcp       
4+0 records in
4+0 records out
[root@stb:/] #

Copia de seguridad de la memoria NAND Flash.

[root@stb:/] # dd if=/dev/mtd6 of=/tmp/usb/kernel
16384+0 records in
16384+0 records out
[root@stb:/] # dd if=/dev/mtd7 of=/tmp/usb/usr
24576+0 records in
24576+0 records out
[root@stb:/] # dd if=/dev/mtd8 of=/tmp/usb/usr_local
32768+0 records in
32768+0 records out
[root@stb:/] # dd if=/dev/mtd9 of=/tmp/usb/u_l_mb
65536+0 records in
65536+0 records out
[root@stb:/] # dd if=/dev/mtd10 of=/tmp/usb/u_l_ms
65536+0 records in
65536+0 records out
[root@stb:/] # dd if=/dev/mtd11 of=/tmp/usb/kernelalt
16384+0 records in
16384+0 records out
[root@stb:/] # dd if=/dev/mtd12 of=/tmp/usb/usr_alt
24576+0 records in
24576+0 records out
[root@stb:/] # dd if=/dev/mtd13 of=/tmp/usb/usr_lo_al
32768+0 records in
32768+0 records out
[root@stb:/] # dd if=/dev/mtd14 of=/tmp/usb/u_l_mb_alt
65536+0 records in
65536+0 records out
[root@stb:/] # dd if=/dev/mtd15 of=/tmp/usb/u_l_ms_alt
65536+0 records in
65536+0 records out
[root@stb:/] # dd if=/dev/mtd16 of=/tmp/usb/splash
8192+0 records in
8192+0 records out
[root@stb:/] # dd if=/dev/mtd17 of=/tmp/usb/yaffs
1667072+0 records in
1667072+0 records out

Ahora ya tenemos nuestra copia completada, recomiendo tener dos copias del backup, una sin tocar "original" y la otra para análisis, modificaciones, etc. Un buen lugar puede ser el disco duro o la nube personal.

Estos son los enlaces a mi copia.

mtd0: ["CFE"] 512KB
mtd1: ["CFE config"] 128KB
mtd2: ["reserved"] 3.1MB
mtd3: ["secure storage"] 128KB
mtd4: ["MAC address"] 126KB
mtd5: ["hdcp"] 2KB
mtd6: ["Kernel"] 8MB
mtd7: ["/usr"] 12MB
mtd8: ["/usr/local"] 16MB
mtd9: ["/usr/lib/MediaBrowser"] 32MB
mtd10 ["/usr/lib/MediaServer"] 32MB
mtd11 ["Kernel (alt)"] 8MB
mtd12 ["/usr (alt)"] 12MB
mtd13 ["/usr/local (alt)"] 16MB
mtd14 ["/usr/lib/MediaBrowser (alt)"] 32MB
mtd15 ["/usr/lib/MediaServer (alt)"] 32MB
mtd16 ["Splash"] 4MB
mtd17 ["/rw/yaffs"] 833MB

Comtrend STB-7007 Linux OS 2.6.18-7.1 y shell BusyBox v1.12.4 (IV)

Una vez finalizado el arranque, si presionamos Ctrl+C aparecera el shell de Linux.
Caught signal SIGINT (2, "Inte

[root@stb:/] # 
[root@stb:/] #

Acceder a la shell y listado de utilidades de BusyBox
[root@stb:/] # sh
/ # busybox 
BusyBox v1.12.4 (2010-11-15 09:44:53 CET) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as!

Currently defined functions:
        [, [[, ash, awk, basename, bunzip2, bzcat, cat, chgrp, chmod, chown,
        clear, cp, cpio, cut, date, dd, df, dirname, dmesg, du, echo, egrep,
        env, expr, false, fdisk, fgrep, find, fold, fsck, getty, grep,
        gunzip, gzip, halt, head, hexdump, hostid, hostname, hwclock, id,
        ifconfig, ifdown, ifup, inetd, init, insmod, kill, killall, killall5,
        klogd, length, less, linuxrc, ln, logger, login, logname, ls, lsmod,
        mdev, mesg, mkdir, mkfifo, mknod, mktemp, modprobe, more, mount,
        mv, netstat, nice, nohup, nslookup, od, ping, poweroff, printenv,
        printf, ps, pwd, rdev, realpath, reboot, reset, rm, rmdir, rmmod,
        route, rtcwake, script, sed, sh, sleep, stty, sync, syslogd, tail,
        tar, tee, telnet, telnetd, test, tftp, tftpd, top, touch, tr, traceroute,
        true, tty, udhcpc, umount, uname, uniq, usleep, vi, watch, wc,
        wget, which, whoami, zcat, zcip

/ #

Listado de directorios de la ubicación actual. # ls
[root@stb:/] # ls
bin      etc      lib      opt      rw       sys      var
boot     home     linuxrc  proc     sbin     tmp
dev      init     mnt      root     share    usr
[root@stb:/] # 

Información acerca del sistema de archivo. # df
[root@stb:/] # df -h   
Filesystem                Size      Used Available Use% Mounted on
/dev/romblock7            3.3M      3.3M         0 100% /usr
/dev/romblock8           14.8M     14.8M         0 100% /usr/local
/dev/romblock9            9.9M      9.9M         0 100% /usr/lib/MediaBrowser
/dev/romblock10           1.0M      1.0M         0 100% /usr/lib/MediaServer
/dev/mtdblock17         814.0M      2.3M    811.7M   0% /rw
tmpfs                    32.0M     24.0k     32.0M   0% /tmp
[root@stb:/] #

Información del sistema. # ls /proc/
[root@stb:/] # ls /proc/
1            20           359          devices      loadavg      swaps
10           21           364          diskstats    locks        sys
11           22           4            driver       meminfo      sysvipc
12           23           5            execdomains  misc         tty
13           24           6            filesystems  modules      uptime
132          25           7            fs           mounts       version
14           26           8            interrupts   mtd          vmstat
15           27           9            iomem        net          yaffs
16           28           bcmdriver    ioports      partitions   zoneinfo
17           29           buddyinfo    irq          scsi
18           3            bus          kallsyms     self
19           313          cmdline      kcore        slabinfo
2            314          cpuinfo      kmsg         stat
[root@stb:/] #

Mediante algunos comandos de BusyBox, podemos obtener información sobre la CPU, memoria, dispositivos, etc.

Información acerca del procesador, tipo, modelo, etc. # cat /proc/cpuinfo
[root@stb:/] # cat /proc/cpuinfo
system type             : BCM97xxx Settop Platform
build target            : unknown
processor               : 0
cpu model               : BMIPS4380 V4.4  FPU V0.1
cpu MHz                 : 402.43
BogoMIPS                : 402.43    ( udelay_val : 201216  HZ = 1000 )
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : no
ASEs implemented        : mips16
VCED exceptions         : not available
VCEI exceptions         : not available
RAC setting             : Unknown
unaligned access        : 7
rdhwr/brdhwr traps      : 0 / 0
process migrations      : 290
processor               : 1
cpu model               : BMIPS4380 V4.4  FPU V0.1
cpu MHz                 : 404.48
BogoMIPS                : 404.48    ( udelay_val : 202240  HZ = 1000 )
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : no
ASEs implemented        : mips16
VCED exceptions         : not available
VCEI exceptions         : not available
RAC setting             : Unknown
[root@stb:/] #

Información sobre la memoria física. # cat /proc/meminfo
[root@stb:/] # cat /proc/meminfo 
MemTotal:       122488 kB
MemFree:         59528 kB
Buffers:         13300 kB
Cached:          36880 kB
SwapCached:          0 kB
Active:          21296 kB
Inactive:        29184 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       122488 kB
LowFree:         59528 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
AnonPages:         276 kB
Mapped:            504 kB
Slab:             8352 kB
PageTables:         48 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:     91864 kB
Committed_AS:     1156 kB
VmallocTotal:   786424 kB
VmallocUsed:      3212 kB
VmallocChunk:   781648 kB
[root@stb:/] #

Información sobre el mapa actual de memoria. # cat /proc/iomem
[root@stb:/] # cat /proc/iomem 
00000000-0fffffff : System RAM
  00001000-0031544f : Kernel code
  00315450-003bf4ff : Kernel data
10480300-104803a8 : brcm-ehci0-IO
  10480300-104803a8 : ehci_hcd
10480400-1048046f : brcm-ohci0-IO
  10480400-1048046f : ohci_hcd
10480500-104805a8 : brcm-ehci1-IO
  10480500-104805a8 : ehci_hcd
10480600-1048066f : brcm-ohci1-IO
  10480600-1048066f : ohci_hcd
10510000-1051ffff : sata pci memory space
  10510000-10517fff : 0000:01:00.0
    10510000-10517fff : sata_svw
b0002800-b00028c0 : brcmnand-base
d0000000-efffffff : ext pci memory space
  d0000000-d0003fff : 0000:00:04.0
[root@stb:/] #

Información sobre los dispositivos configurados. # cat /proc/devices
[root@stb:/] # cat /proc/devices
Character devices:
  1 mem
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
 10 misc
 13 input
 21 sg
 30 brcm
 90 mtd
128 ptm
136 pts
180 usb
189 usb_device

Block devices:
  7 loop
  8 sd
 11 sr
 31 mtdblock
 65 sd
 66 sd
 67 sd
 68 sd
 69 sd
 70 sd
 71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
253 romblock
[root@stb:/] #

Información sobre los sistemas de ficheros montados. # cat /proc/mounts
[root@stb:/] # cat /proc/mounts 
rootfs / rootfs rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw 0 0
none /proc/bus/usb usbfs rw 0 0
/dev/romblock7 /usr squashfs ro 0 0
/dev/romblock8 /usr/local squashfs ro 0 0
/dev/romblock9 /usr/lib/MediaBrowser squashfs ro 0 0
/dev/romblock10 /usr/lib/MediaServer squashfs ro 0 0
/dev/mtdblock17 /rw yaffs rw 0 0
tmpfs /tmp tmpfs rw 0 0
[root@stb:/] #

Información sobre las particiones en la memoria flash y sus puntos de montaje. # cat /proc/mtd
[root@stb:/] # cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00080000 00010000 "CFE"
mtd1: 00020000 00010000 "CFE config"
mtd2: 00320000 00010000 "reserved"
mtd3: 00020000 00010000 "secure storage"
mtd4: 0001f800 00010000 "MAC address"
mtd5: 00000800 00010000 "hdcp"
mtd6: 00800000 00020000 "Kernel"
mtd7: 00c00000 00020000 "/usr"
mtd8: 01000000 00020000 "/usr/local"
mtd9: 02000000 00020000 "/usr/lib/MediaBrowser"
mtd10: 02000000 00020000 "/usr/lib/MediaServer"
mtd11: 00800000 00020000 "Kernel (alt)"
mtd12: 00c00000 00020000 "/usr (alt)"
mtd13: 01000000 00020000 "/usr/local (alt)"
mtd14: 02000000 00020000 "/usr/lib/MediaBrowser (alt)"
mtd15: 02000000 00020000 "/usr/lib/MediaServer (alt)"
mtd16: 00400000 00020000 "Splash"
mtd17: 32e00000 00020000 "/rw/yaffs"
[root@stb:/] #

Listado de las particiones y su tamaño. # cat /proc/partitions
[root@stb:/] # cat /proc/partitions 
major minor  #blocks  name

  31     0        512 mtdblock0
  31     1        128 mtdblock1
  31     2       3200 mtdblock2
  31     3        128 mtdblock3
  31     4        126 mtdblock4
  31     5          2 mtdblock5
  31     6       8192 mtdblock6
  31     7      12288 mtdblock7
  31     8      16384 mtdblock8
  31     9      32768 mtdblock9
  31    10      32768 mtdblock10
  31    11       8192 mtdblock11
  31    12      12288 mtdblock12
  31    13      16384 mtdblock13
  31    14      32768 mtdblock14
  31    15      32768 mtdblock15
  31    16       4096 mtdblock16
  31    17     833536 mtdblock17
 253     0        512 romblock0
 253     1        128 romblock1
 253     2       3200 romblock2
 253     3        128 romblock3
 253     4        126 romblock4
 253     5          2 romblock5
 253     6       8192 romblock6
 253     7      12288 romblock7
 253     8      16384 romblock8
 253     9      32768 romblock9
 253    10      32768 romblock10
 253    11       8192 romblock11
 253    12      12288 romblock12
 253    13      16384 romblock13
 253    14      32768 romblock14
 253    15      32768 romblock15
 253    16       4096 romblock16
 253    17     833536 romblock17
[root@stb:/] #

Sigue leyendo Parte V