Carambola1 (32MByte) the smallest possible webserver. (lighttpd + php5 working)

So here is how you connect to carambola / OpenWRT.

TO CLARIFY: THIS CARAMBOLA-WIKI-ENTRY SAYS:

“From factory Carambola is shipped with ttyS0 disabled. Or to be more precise it is in GPIO mode. Which is sometimes not what we want. It is very easy to change this.”

COM PORT SHOULD BE ENABLED PER DEFAULT! MY PROBLEM WAS I USED THE WRONG SERIAL CABLE!

DO NOT(!NOT! NOT NOT!) USE A NULLMODEM-CABLE + GENDER CHANGER IT WILL NOT WORK! JUST USE AN “EXTENSION” CABLE WITH ALL WIRES STRAIGHT THROUGH. (NO CROSS OR TWIST)

(d.h. alle pole müssen einfach durchgeschliffen sein, NICHT GEKREUZT (KEIN NULLMODEM)!!)

“COM-KABEL-VERLÄNGERUNG MALE-FEMALE” (NICHT NULLMODEM!!! NICHT GENDER CHANGER!)

and you can get it as cheap as 5€ / 5USD e.g. from here http://www.pololu.com/catalog/product/129

6 foot long serial extension cable with a DB9 male connector on one end and a DB9 female connector on the other end.

IF YOU USE A USB2SERIAL BE SHURE TO GET ONE WITH PL2303 CHIPSET (WORKS ALSO FOR LINUX+OSX).

e.g. the LogiLink AU0002b

now that you are wired lets start the software

Linux Debian Minicom settings:

you can also try picocom which might work even better…

apt-get update;
apt-get install minicom setserial; # install
setserial -g /dev/ttyS[0123]; # test what COM ports are working
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3

# the output means i have two working serial ports
# one in the front /dev/ttyS1
# and one in the back /dev/ttyS0

su; # become root
minicom -s -c on; # start minicom

# now hit Ctrl/Strg+A then O -> settings

hit enter to accept the settings, go to “”save setup as dfl” and then “exit” (it will not exit but apply your settings).

if you press A or B it cycles through the possible baud rates available… for Carambola1 select 115200 (not one zero more or less)

if you get gobbeling / scrambled output it is probably because you did not set the baudrate correctly.

Also switch off Hardware and Software Flow Control (Press F -> No Press G -> No)

Hit Enter to save those settings.

Then select “Save setup as dfl” and then exit.

Restart minicom via Ctrl/Strg+A -> X -> Leave Minicom? -> Yes

then start it again, it will now use the previously set settings.

and you should restart your caramobla and see it “boot up” on your minicom screen 🙂 SUCCESS! 🙂

root@OpenWrt:/# cat /proc/cpu                                                   
cat: can't open '/proc/cpu': No such file or directory                          
root@OpenWrt:/# cat /proc/cpuinfo                                               
system type             : Ralink RT3350 id:1 rev:2                              
why does it say: "RALINK CONFIDENTIAL for ZION?" X-D CPU_RT5350.pdf.tar
machine                 : CARAMBOLA                                             
processor               : 0                                                     
cpu model               : MIPS 24KEc V4.12                                      
BogoMIPS                : 212.58                                                
wait instruction        : yes                                                   
microsecond timers      : yes                                                   
tlb_entries             : 32                                                    
extra interrupt vector  : yes                                                   
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0]
ASEs implemented        : mips16 dsp                                            
shadow register sets    : 1                                                     
kscratch registers      : 0                                                     
core                    : 0                                                     
VCED exceptions         : not available                                         
VCEI exceptions         : not available     

WINDOWS-PUTTY SETTINGS:

what you should get looks like this: (htop on carambola1… works! :-D)

 

if you hate bloatet-windows installations (it works well under parallels)

try this: http://pbxbook.com/other/mac-tty.html

and that

http://apple.stackexchange.com/questions/32834/is-there-an-os-x-terminal-program-that-can-access-serial-ports

[cc lang=”bash” escaped=”true” width=”600″]

U-Boot 1.1.3 (Nov 3 2009 – 15:19:34)
Board: Ralink APSoC DRAM: 32 MB
relocate_code Pointer at: 81fb0000
flash_protect ON: from 0xBF000000 to 0xBF01D4A3
flash_protect ON: from 0xBF030000 to 0xBF030FFF
*** Warning – bad CRC, using default environment
============================================
Ralink UBoot Version: 3.3
——————————————–
ASIC 3052_MP2 (Port5<->None)
DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: 8 MBytes NOR Flash
Date:Nov 3 2009 Time:15:19:34
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384
##### The CPU freq = 320 MHZ ####
SDRAM bus set to 16 bit
SDRAM 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.
9: Load Boot Loader code then write to Flash via TFTP.
 4  3  2  1  0

3: System Boot system code via Flash.
## Booting image at bf050000 …
Image Name: MIPS OpenWrt Linux-3.3.8
Created: 2012-06-15 14:08:03 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 854075 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@VS_buildd3) (gcc version 4.7.1 20120402 (prerelease) (Linaro GCC 4.7-2012.04) ) #8 Fri Jun 15 17:07:57 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=00016a00
[ 0.000000] Readback ErrCtl register=00016a00
[ 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 <bio-0> 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
^C^C- preinit –
Press the [f] key and hit [enter] to enter failsafe mode
– regular preinit –
[ 6.420000] JFFS2 notice: (355) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 8 of xref (0 dead, 2 orphan) found.
switching to jffs2
– init –
Please press Enter to activate this console. [ 8.980000] Compat-wireless backport release: compat-wireless-2012-05-16-3-gde86a47
[ 8.990000] Backport based on wireless-testing.git master-2012-05-29
[ 8.990000] compat.git: wireless-testing.git
[ 9.040000] cfg80211: Calling CRDA to update world regulatory domain
[ 9.050000] cfg80211: World regulatory domain updated:
[ 9.060000] cfg80211: (start_freq – end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 9.060000] cfg80211: (2402000 KHz – 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 9.070000] cfg80211: (2457000 KHz – 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 9.080000] cfg80211: (2474000 KHz – 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 9.090000] cfg80211: (5170000 KHz – 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 9.100000] cfg80211: (5735000 KHz – 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 9.770000] cfg80211: World regulatory domain updated:
[ 9.780000] cfg80211: (start_freq – end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 9.780000] cfg80211: (2402000 KHz – 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 9.790000] cfg80211: (2457000 KHz – 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 9.800000] cfg80211: (2474000 KHz – 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 9.810000] cfg80211: (5170000 KHz – 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 9.820000] cfg80211: (5735000 KHz – 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 10.160000] SCSI subsystem initialized
[ 10.370000] usbcore: registered new interface driver usbfs
[ 10.380000] usbcore: registered new interface driver hub
[ 10.390000] usbcore: registered new device driver usb
[ 10.520000] lib80211: common routines for IEEE802.11 drivers
[ 11.080000] usbcore: registered new interface driver rt2500usb
[ 11.250000] phy0 -> rt2x00lib_request_eeprom_file: Info – Loading EEPROM data from ‘RT305X.eeprom’.
[ 11.430000] phy0 -> rt2x00_set_chip: Info – Chipset detected – rt: 2872, rf: 0005, rev: 0200.
[ 11.480000] usbcore: registered new interface driver rt2800usb
[ 11.790000] PPP generic driver version 2.4.2
[ 11.940000] gpiodev: gpio device registered with major 254
[ 12.110000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 12.310000] NET: Registered protocol family 24
[ 12.650000] nf_conntrack version 0.5.0 (470 buckets, 1880 max)
[ 13.220000] i2c /dev entries driver
[ 13.260000] dwc_otg: version 2.72a 24-JUN-2008
[ 13.260000] dwc_otg: Core Release: 2.66a
[ 13.470000] dwc_otg: Periodic Transfer Interrupt Enhancement – disabled
[ 13.470000] dwc_otg: Multiprocessor Interrupt Enhancement – disabled
[ 13.480000] dwc_otg: Using DMA mode
[ 13.480000] dwc_otg: Device using Buffer DMA mode
[ 13.490000] dwc_otg dwc_otg.0: DWC OTG Controller
[ 13.490000] dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 1
[ 13.500000] dwc_otg dwc_otg.0: irq 26, io mem 0x101c0000
[ 13.510000] dwc_otg: Init: Port Power? op_state=1
[ 13.510000] dwc_otg: Init: Power Port (0)
[ 13.520000] hub 1-0:1.0: USB hub found
[ 13.520000] hub 1-0:1.0: 1 port detected
[ 13.570000] i2c-gpio i2c-gpio.0: using pins 1 (SDA) and 2 (SCL)
[ 13.770000] Initializing USB Mass Storage driver…
[ 13.770000] usbcore: registered new interface driver usb-storage
[ 13.780000] USB Mass Storage support registered.
[ 16.730000] device eth0.1 entered promiscuous mode
[ 16.740000] device eth0 entered promiscuous mode
[ 16.740000] br-lan: port 1(eth0.1) entered forwarding state
[ 16.750000] br-lan: port 1(eth0.1) entered forwarding state
[ 18.750000] br-lan: port 1(eth0.1) entered forwarding state
[ 20.490000] ramips-wdt: timeout value 60 must be 0 < timeout < 40

BusyBox v1.19.4 (2012-06-15 10:35:27 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@OpenWrt:/#

[/cc]

… “bin ich schon drin?”

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin