vak: (Default)
[personal profile] vak
Вот такое чудо мне вчера принесли поиграться.

carambola-small

Процессор Ralink RT3050 (MIPS 24KEc) с частотой 320 МГц и памятью 32 Мб.  Два порта Ethernet, один порт USB и консоль RS-232.  Внутри Linux 3.3.8 (OpenWRT).  В файловой системе 15 Мбайт свободного места.  Есть драйверы и примеры работы с сигналами GPIO, SPI, I2C.

Сделано в Литве фирмой 8devices.  Процессорный модуль предлагается за 22.00€, вместе с отладочной платой и корпусом - 49.00€.  На сайте есть исходные тексты и подробные инструкции по сборке.

Обнаружился обзор на английском, откуда я немедленно попер фотки.

Вот протокол загрузки системы, со всеми техническими подробностями.
U-Boot 1.1.3 (Feb 20 2012 - 16:20:22)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fb0000
config usb..
flash_protect ON: from 0xBF000000 to 0xBF01E757
flash_protect ON: from 0xBF030000 to 0xBF030FFF
*** Warning - bad CRC, using default environment

============================================
Ralink UBoot Version: 3.5.0.0
--------------------------------------------
ASIC 3052_MP2 (Port5<->None)
DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: NOR Flash
Date:Feb 20 2012  Time:16:20:22
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

 ##### The CPU freq = 320 MHZ ####
 estimate memory size =32 Mbytes

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.
 0

3: System Boot system code via Flash.
## Booting image at bf050000 ...
   Image Name:   MIPS OpenWrt Linux-3.3.8
   Created:      2012-07-20  12:06:39 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    854077 Bytes = 834.1 kB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 32

Starting kernel ...

[    0.000000] Linux version 3.3.8 (zilvinas@LX-buildd3) (gcc version 4.7.1 20120402 (prerelease) (Linaro GCC 4.7-2012.04) ) #2 Fri Jul 20 15:06:33 EEST 2012
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT3350 id:1 rev:2 running at 320.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=CARAMBOLA console=ttyS1,115200 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00007242
[    0.000000] Readback ErrCtl register=00007242
[    0.000000] Memory: 29932k/32768k available (1946k kernel code, 2836k reserved, 316k data, 172k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 212.58 BogoMIPS (lpj=1062912)
[    0.090000] pid_max: default: 32768 minimum: 301
[    0.090000] Mount-cache hash table entries: 512
[    0.100000] NET: Registered protocol family 16
[    0.110000] MIPS: machine is CARAMBOLA
[    0.110000] gpiochip_add: registered GPIOs 0 to 23 on device: RT305X-GPIO0
[    0.120000] gpiochip_add: registered GPIOs 24 to 39 on device: RT305X-GPIO1
[    0.120000] gpiochip_add: registered GPIOs 40 to 51 on device: RT305X-GPIO2
[    0.150000] bio: create slab  at 0
[    0.160000] Switching to clocksource MIPS
[    0.170000] NET: Registered protocol family 2
[    0.170000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.180000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.180000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.190000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.200000] TCP reno registered
[    0.200000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.210000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.210000] NET: Registered protocol family 1
[    0.260000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.270000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.280000] msgmni has been set to 58
[    0.290000] io scheduler noop registered
[    0.290000] io scheduler deadline registered (default)
[    0.300000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.300000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.310000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.320000] physmap platform flash device: 00800000 at bf000000
[    0.330000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022c9
[    0.340000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.350000]   Amd/Fujitsu Extended Query version 1.1.
[    0.350000] physmap-flash.0: Swapping erase regions for top-boot CFI table.
[    0.360000] number of CFI chips: 1
[    0.360000] Creating 6 MTD partitions on "physmap-flash.0":
[    0.370000] 0x000000000000-0x000000030000 : "u-boot"
[    0.380000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.390000] 0x000000040000-0x000000050000 : "factory"
[    0.400000] 0x000000050000-0x000000170000 : "kernel"
[    0.410000] 0x000000170000-0x000000800000 : "rootfs"
[    0.420000] mtd: partition "rootfs" set to be root filesystem
[    0.420000] mtd: partition "rootfs_data" created automatically, ofs=380000, len=480000
[    0.430000] 0x000000380000-0x000000800000 : "rootfs_data"
[    0.440000] 0x000000050000-0x000000800000 : "firmware"
[    0.460000] TCP westwood registered
[    0.470000] NET: Registered protocol family 17
[    0.470000] 8021q: 802.1Q VLAN Support v1.8
[    0.480000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.490000] Freeing unused kernel memory: 172k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
jffs2 not ready yet; using ramdisk
- init -

Please press Enter to activate this console.

[    8.850000] Compat-wireless backport release: compat-wireless-2012-05-16-3-gde86a47
[    8.860000] Backport based on wireless-testing.git master-2012-05-29
[    8.870000] compat.git: wireless-testing.git
[    8.920000] cfg80211: Calling CRDA to update world regulatory domain
[    8.930000] cfg80211: World regulatory domain updated:
[    8.930000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    8.940000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.950000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    8.960000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    8.960000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.970000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)



BusyBox v1.19.4 (2012-07-20 14:20:05 EEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 ATTITUDE ADJUSTMENT (Bleeding Edge, r32074)
 -----------------------------------------------------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------
root@(none):/#

[    9.870000] cfg80211: World regulatory domain updated:
[    9.870000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    9.880000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.890000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    9.900000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    9.910000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.910000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.090000] SCSI subsystem initialized
[   10.300000] usbcore: registered new interface driver usbfs
[   10.310000] usbcore: registered new interface driver hub
[   10.310000] usbcore: registered new device driver usb
[   10.450000] lib80211: common routines for IEEE802.11 drivers
[   11.010000] usbcore: registered new interface driver rt2500usb
[   11.180000] phy0 -> rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'RT305X.eeprom'.
[   11.440000] phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 2872, rf: 0005, rev: 0200.
[   11.490000] usbcore: registered new interface driver rt2800usb
[   11.800000] PPP generic driver version 2.4.2
[   11.950000] gpiodev: gpio device registered with major 254
[   12.130000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.320000] NET: Registered protocol family 24
[   12.660000] nf_conntrack version 0.5.0 (470 buckets, 1880 max)
[   13.230000] i2c /dev entries driver
[   13.270000] dwc_otg: version 2.72a 24-JUN-2008
[   13.270000] dwc_otg: Core Release: 2.66a
[   13.480000] dwc_otg: Periodic Transfer Interrupt Enhancement - disabled
[   13.480000] dwc_otg: Multiprocessor Interrupt Enhancement - disabled
[   13.490000] dwc_otg: Using DMA mode
[   13.490000] dwc_otg: Device using Buffer DMA mode
[   13.500000] dwc_otg dwc_otg.0: DWC OTG Controller
[   13.500000] dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 1
[   13.510000] dwc_otg dwc_otg.0: irq 26, io mem 0x101c0000
[   13.520000] dwc_otg: Init: Port Power? op_state=1
[   13.520000] dwc_otg: Init: Power Port (0)
[   13.530000] hub 1-0:1.0: USB hub found
[   13.530000] hub 1-0:1.0: 1 port detected
[   13.580000] i2c-gpio i2c-gpio.0: using pins 1 (SDA) and 2 (SCL)
[   13.770000] Initializing USB Mass Storage driver...
[   13.780000] usbcore: registered new interface driver usb-storage
[   13.790000] USB Mass Storage support registered.
[   17.750000] device eth0.1 entered promiscuous mode
[   17.750000] device eth0 entered promiscuous mode
[   17.770000] br-lan: port 1(eth0.1) entered forwarding state
[   17.770000] br-lan: port 1(eth0.1) entered forwarding state
[   19.770000] br-lan: port 1(eth0.1) entered forwarding state
[   21.200000] ramips-wdt: timeout value 60 must be 0 < timeout < 40

root@OpenWrt:/#

[   33.620000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   33.640000] jffs2_build_filesystem(): unlocking the mtd device... done.
[   33.640000] jffs2_build_filesystem(): erasing all blocks after the end marker... help

root@OpenWrt:/# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                   15052        40     15012   0% /
/dev/root                 2304      2304         0 100% /rom
tmpfs                    15052        60     14992   0% /tmp
tmpfs                      512         0       512   0% /dev
root                     15052        40     15012   0% /tmp/root
overlayfs:/tmp/root      15052        40     15012   0% /
root@OpenWrt:/# free
             total         used         free       shared      buffers
Mem:         30104        15980        14124            0         1900
-/+ buffers:              14080        16024
Swap:            0            0            0
root@OpenWrt:/# ps alx
  PID USER       VSZ STAT COMMAND
    1 root      1504 S    init
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    4 root         0 SW   [kworker/0:0]
    5 root         0 SW   [kworker/u:0]
    6 root         0 SW<  [khelper]
    7 root         0 SW   [kworker/u:1]
   42 root         0 SW   [sync_supers]
   44 root         0 SW   [bdi-default]
   46 root         0 SW<  [kblockd]
   70 root         0 SW   [kswapd0]
  119 root         0 SW   [fsnotify_mark]
  139 root         0 SW   [mtdblock0]
  144 root         0 SW   [mtdblock1]
  149 root         0 SW   [mtdblock2]
  154 root         0 SW   [mtdblock3]
  159 root         0 SW   [mtdblock4]
  164 root         0 SW   [mtdblock5]
  169 root         0 SW   [mtdblock6]
  174 root         0 SW<  [ramips-spi]
  184 root         0 SW   [kworker/0:1]
  362 root      1532 S    {rcS} /bin/sh /etc/init.d/rcS S boot
  363 root      1504 S    init
  364 root      1500 S    /bin/ash --login
  365 root      1532 S    {rcS} /bin/sh /etc/init.d/rcS S boot
  367 root      1496 S    logger -s -p 6 -t sysinit
  398 root         0 SW<  [cfg80211]
  418 root         0 SW   [khubd]
  481 root         0 SW<  [dwc_otg]
  553 root      1508 S    /sbin/syslogd -C16
  555 root      1488 S    /sbin/klogd
  557 root       848 S    /sbin/hotplug2 --override --persistent --set-rules-f
  563 root       868 S    /sbin/ubusd
  567 root      1528 S    /sbin/netifd
  617 root      1500 S    udhcpc -p /var/run/udhcpc-eth0.2.pid -s /lib/netifd/
  773 root      1500 S    /sbin/watchdog -t 5 /dev/watchdog
  971 root      1492 S    /usr/sbin/telnetd -l /bin/login.sh
  979 root      1132 S    /usr/sbin/uhttpd -f -h /www -r OpenWrt -x /cgi-bin -
 1002 root      1552 S    {rc.common} /bin/sh /etc/rc.common /etc/rc.d/S50drop
 1013 nobody     944 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf
 1015 root      1540 S    {S95done} /bin/sh /etc/rc.common /etc/rc.d/S95done b
 1017 root      1488 S    lock /tmp/.switch2jffs
 1018 root      1516 S    {firstboot} /bin/sh /sbin/firstboot switch2jffs
 1032 root      1492 D    /bin/busybox mount -o noatime /dev/mtdblock5 /rom/ov
 1033 root      1488 S    lock /tmp/.switch2jffs
 1035 root      1496 R    ps alx

root@OpenWrt:/#

[   75.520000] JFFS2 notice: (1032) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.

root@OpenWrt:/# ifconfig -a
br-lan    Link encap:Ethernet  HWaddr C4:93:00:00:00:28
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:402 (402.0 B)

eth0      Link encap:Ethernet  HWaddr C4:93:00:00:00:28
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:9744 (9.5 KiB)
          Interrupt:5

eth0.1    Link encap:Ethernet  HWaddr C4:93:00:00:00:28
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:402 (402.0 B)

eth0.2    Link encap:Ethernet  HWaddr C4:93:00:00:00:28
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:9246 (9.0 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@OpenWrt:/# halt

[  132.010000] br-lan: port 1(eth0.1) entered disabled state
[  132.010000] device eth0.1 left promiscuous mode
[  132.020000] device eth0 left promiscuous mode
[  132.020000] br-lan: port 1(eth0.1) entered disabled state
[  134.710000] System halted.

Date: 2012-10-05 06:49 (UTC)
From: [identity profile] b00ter.livejournal.com
М-м-м, на Карамболе вроде есть WiFi.

Date: 2012-10-20 16:26 (UTC)
From: [identity profile] alec_v.livejournal.com
Мне тоже приехела. Работает. Еще бы понять, что с ней можно сделать полезного ?