Current Hacks

Recent site activity

Parrot DF3120 320x240 Bluetooth/SD/USB Picture Frame


This port was made by a combination of mostly 3 hackers to start with:
With excellent contributions from Simon Taylor in particular, and a few others, including Bifferos of the bifferboard project.

This 3.5" display frame seems to have the highest potential for hackability so far.  When compared to the hacked keychain models, this has a much faster CPU, larger screen, more RAM and is hardly any more expensive. As of Nov 2010, they are on Amazon for a ridiculous £10!  (@Biff) I have some theories as to why.

This frame is now "owned" almost entirely and can run linux without needing JTAG or even a uart cable.  Here is a screenshot of the 320x240 display running the Linux framebuffer:


The Frame running the 'sdl newvox' demo with wiimote input:
                

                         

Status

Overall the unit works great now and boots Linux, there are no longer any "major" gotchas. Linux boots with busybox and has about ~3MB RAM remaining, largely enough for an application or two. Unit now has:

  • u-boot (from open-moko branch) working with:
    • serial console
    • NAND access
    • NAND boot
    • SD card
    • DFU & USB slave (upgrade NAND via USB)
  • kernel 2.6.36.1
Still missing:
  • u-boot:
    • A way to watch for a Button press at boot to stop auto-booting and stay in DFU mode.
    • U-boot status messages on the DF3120 screen, instead of just on the serial port.
  • kernel:
    • NAND access (MTD device not showing for now)
    • LCD has issues when booting from NAND
    • ADC for the light sensor
    • Bluetooth UART hooked up to some sort of stack
    • Issues with speed of USB device ethernet

Toolchain/rootfs

Suggested to use minifs as this builds toolchain, kernel and rootfs all in one go.  You will need to install lzop, uboot-mkimage, libelf-dev, libncurses-dev, checkinstall and any other tools requested.  You don't need to be root to run any of this.

% git clone http://oomz.net/git/minifs.git minifs
% cd minifs
% export MINIFS_BOARD=df3120
% ./minifs_build.sh
% ls -l build-df3120/minifs-full-ext.img
-rw-r--r-- 1 8388608 build-df3120/minifs-full-ext.img

NB:  For the impatient I've added my version to the bottom of this page, don't forget to decompress it with
bzip2 -d minifs-full-ext.img.bz2 before using!

Once you've build the rootfs, you'll need to copy it to the one and only partition on an SD card, e.g.:

% dd if=build-df3120/minifs-full-ext.img of=/dev/sdb1

Add the toolchain bin directory to your path before compiling anything, e.g.:

% export PATH=$PATH:~/minifs/toolchain/arm-v4t-linux-uclibcgnueabi/bin

u-boot

Derived from OpenMoko's u-boot, added support for s3c2412 etc. git tree: http://repo.or.cz/w/u-boot-openmoko/parrot-frames.git

% cd u-boot-df3120
% make df3120_config CROSS_COMPILE=arm-v4t-linux-uclibcgnueabi-
% make CROSS_COMPILE=arm-v4t-linux-uclibcgnueabi-
% ls -l u-boot.bin
-rwxr-xr-x 1 173152 Nov 26 12:47 u-boot.bin

Solderless Firmware 'Upgrade' to Linux

The easiest way to get linux onto the frame is to use a utlity called plftool to create a fake firmware upgrade, which the frame then picks up and runs as part of it's normal firmware upgrade process.  This has been tested with versions 1.1 and 1.2 of the Parrot firmware.


% cd plftool
% make CROSS_COMPILE=arm-v4t-linux-uclibcgnueabi-
% ./pack_uboot.sh df3120 path/to/u-boot.bin parrotDF3120.plf
% ls -l parrotDF3120.plf
-rw-r--r-- 1 182552 parrotDF3120.plf

Having created the firmware update, install it as follows:

  • Switch on the frame without any SD card inserted, with a USB cable connecting it to your PC.
  • When it shows up, mount the device somewhere (not the partition), e.g. mount /dev/sdc /mnt/hd
  • Create a directory on the USB storage device called 'update'.
  • Copy parrotDF3120.plf to the 'update' directory you created.
  • Leaving the power connected and the frame on, unplug the USB cable.
  • You should see four squares appear on the screen, the top left one will be blue and the others green.  This means the firmware has been updated correctly.
NB:  See below for a pre-built version of parrotDF3120.plf, which seems to work.

Troubleshooting:  If you find that Linux comes up with loads of syslog errors when connecting the frame, try to mount it anyhow.  If that fails, do the same thing on a Windows or MAC machine.  This worked for some frames that failed under Linux, and you can then create the update folder and copy the file in as under Linux.

Running U-boot

If you've installed the u-boot bootloader you keep compatibility with the old firmware for displaying pictures and so on.   u-boot gets activated only when you press and hold the centre and left buttons on power-on.  When you do this you'll see the screen going blank, and if you have an SD card inserted it will attempt to boot Linux.  U-boot is able to boot a kernel direct from SD card and will look for a file called linux in the root of the ext2 fs found on the first partition.


Kernel 2.6.36.1

Available as a git tree from http://repo.or.cz/w/linux-2.6/parrot-frames.git The minifs script also contains this patch and applies it to a vanilla kernel archive download.

Hardware Reference

Note: The hardware is not fantastically designed, in fact some of the frames reports lots of problems with the original firmware. It seems mostly due to sub-par power supply.
All the frames I tried (@buserror) works when reflashed to linux, but some of them might /need/ JTAG due to the fact that the frame will not allow you to copy the .plf "soft" upgrade path...

This contains the earlier notes we had on the board, including PCB scans and early JTAG chatter.

It has:
The CPU is BGA, but they have very conveniently used micro-via under each pad, so all the pins are prodable from the bottom side of the board.

This device does run linux, despite the low memory. There are lots of options to use it as a slave:
  • run it with usb-gadget ethernet, it will appear as a new ethernet device on the bifferboard, and can be bridged to a real network.
  • use usb-storage gadget to share it's SD card slot, for fast (usb-1) access to storage from the bifferboard
  • Devise a "remote frame buffer" protocol, over the usb-gadget-ethernet

Front Scan

All is pretty obvious here:
  • 2 cheap buck regulators, U8, U11. 34063's are pretty basic.
  • USB device port
  • Bluetooth IC in the bottom right U2, with it's trace antenna along the right side
    "Blutonium BCM2045" -- See brochure attached. Reported on UART0..
  • Light sensor bottom left U13 -- TAOS inc. TSL12T or TSL13T analog output
    Interestingly the light sensor is looking from the back of the device, there is a small clear patch in the casing. The sensor is hooked on the ADC0 of the s3c2412.
  • SW14 is the on/off switch
  • Not sure what U10 is



Back Scan
  • P1 is a bias correction for the LCD voltage. If you see "waves" on your screen in normal use, this is the one to adjust.
  • J3 is the obvious JTAG connector. See below
    OpenOCD works with the samsung s3c, we can upload a bootloader in SDRAM and run it from there.
  • U4 is SDRAM . 4Mx16. K4S641632. A bit light for linux, but it works!
  • U3 is NAND. K9F5608D0C is 32x8 bits. (see datasheet attached).
  • J5 is UART0 - Bluetooth.
  • J4 Is UART2 -- Console for u-boot and linux. 
  • J6 is UART 1 -- it has a different pinouts than J5/J4l


Hardware gotcha's
The connector to the display is glued in place for a reason: it can come loose quite easily if the glue-bonds are broken. If your display acts up, you may try reseating it. If you did this and the display still fails with symptoms of a working backlight but no image whatsoever (black screen with just some backlight leaking through) check what happens when you short R132 with e.g. a pair of tweezers. The resistor is located above the display connector and can blow when the display isn't seated correctly. Replace with a resistor of preferably 1.5K, but probably any value from 470 ohm to 2K will work. Shorting the R altogether may work too, but could smoke something else when the problem blowing the resistor in the first place happens again.

Pinouts

J4/J5 Pinouts:

     Pin     
Function
Notes
1
GND

2
Input

3
Output


J5 is almost certainly a console of some sort, but it's mostly gibberish.  I've tested 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 but it always comes out garbage.  All these settings were 8N1, so perhaps we need to try different parity settings.

J5 seems to be the UART connected to the Bluetooth chip. J4, next to it, has the same pinout but _does_ actually output something readible at 115200,n,8,1. J5 = UART0, J4 = UART2. That'd imply J6=UART1, but I haven't checked. - Jeroen

Now u-boot and the kernel use J4 (/dev/ttySAC2) as console.


GPIOs found:

GPB7: usb Vbus detect
GPB8: usb D+ pullup enable
GPG4: SD write protect
GPG9: orientation detect 1
GPG10: orientation detect 2
GPF0: BT BT_WAKE (?)
GPF1: BT nRESET (?)
GPF2: SW15 (inverted)
GPF3: SW16 (inverted)
GPF4: SW17 (inverted)
GPF7: SD card detect

Adding more RAM
It is possible to upgrade the RAM to 32MB or even 64MB(untested), since the address line A12 is connected on both the CPU and the SDRAM.
Desoldering and soldering is best done with a hot air soldering station. Appropriate 32MB chips can be salvaged from old PC133 DIMMs and SO-DIMMs.
PC100 and PC66 are not fast enough!
The original firmware doesn't care if 8MB or 32MB are installed. You need to modify u-boot to take advantage of the expanded RAM in Linux.
Tested Chips :
  • HYB39S256160CTL-7.5 32MB , salvaged from an PC133 256MB SO-DIMM - Claude

If you don't fancy doing this you can create a swap file,

dd if=/dev/zero of=/swap bs=1M count=32
mkswap /swap
swapon /swap
This makes a 32meg swap file that will trash your SD (flash memory doesn't like being swap) eventually. Not recommended if you value the card/data.


Tricks & Tips

When you have the frame running check the tips page for some usefull hints on what to do with it.

Untested prebuild minifs Images
Use at your own risk!!
Č
ċ
ď
RNDIS kernel.ub
(1152k)
Jason Wright,
Jan 26, 2012, 1:25 AM
Ċ
ď
Ian Baker,
Mar 12, 2012, 9:54 PM
Ċ
ď
Biff Eros,
Nov 27, 2010, 3:36 AM
Ċ
ď
Biff Eros,
Nov 27, 2010, 3:36 AM
Ċ
ď
Biff Eros,
Nov 27, 2010, 3:37 AM
Ċ
ď
Biff Eros,
Nov 27, 2010, 3:37 AM
ċ
ď
sdlquake-1.0.9.tar.gz
(2988k)
Michel Pollet,
Nov 29, 2010, 4:12 AM
Comments