DF3120 Hack Linux

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 22

[Hack] Linux on a photo frame DF3120 (Parrot)

Posted by skywodd March 24, 2012 19 Comments Filed under DF3120 , linux , parrot Hello everyone! Today I'm (still) out of the box and you do an article on a subject rather "technical". I discovered there is little photo frame Parrot DF3120, after reading some articles over I realized the potential of this small photo frame even 15 ( 17 without fdp to be precise)! Linux console with screen remote controllable via bluetooth, it does not make you feel? Anyway, I'm not going to spoiler later, you'll quickly understand

I ordered my DF3120 on ebay for about 15 , in other words for a bite of bread! The box arrived a little banged up, the seller had just put a piece of plastic bag over the carton without really taking more precautions. Fortunately the cardboard surrounding a large plastic shell that protected the DF3120. Phew! Once unpacked, the DF3120 makes pretty good, not great (we have not all) but very nice.

Once all the contents of the box on my desk, I found myself confronted with an unforeseen problem ... Taken in England are not the same in France ... Damn ...

But thanks to the magic of all made in China, I could find in my boxes AC adapter is compatible with the European DF3120! Yay!

Aesthetic side is very classic ... the front is white with just a small color bars (interchangeable). It's very plastic "made in china" but hey, I product aesthetics ... I balance my firmware as home runs over

The rear is already more interesting (a hackers perspective ). So we see the 3 buttons + power, foot stabilization, and light sensor.

Zoom on the power port, USB port, and SD card slot.

Zoom on the power button and the light sensor. (I may be a little forced on the zoom ^ ^)

Zoom buttons left, right and center.

The basic DF3120 start the firmware parrot original photo frame for the original firmware is relatively complete. By against a hacker in the soul it lacks all that linux We note in passing with the integrated tilt sensor automatically reorients the screen with the official firmware.

Level image quality is very average ... The quality is not bad but it is a good display of 320 240 pixels which ... (The photo is not significant, photographing a TFT display with a DSLR always gives very pixelated picture ...) Although now returned in the heart of the kitchen on the linux firmware! First of all I want to say that all the glory back to these three hackers:
- Michel Pollet - Jeroen - Claude Schwarz

Including all details of their work are available here: https://sites.google.com/site/repurposelinux/df3120 The hardware: The hardware of the DF3120 is not super impressive, it is almost the same configuration as a router WRT54G ... Judge for yourself ...
CPU: Samsung s3c2412 (arm9) @266 mhz (ARM9 -> support 100% stable du kernel linux) ECRAN: Powertip PH320240, rsolution 320x240px, 64k couleurs. RAM: 8Mo SDRAM (Mod DIY possible jusqu' 32Mo) FLASH: 32Mo de type NAND. AUTRE : - Bluetooth (port srie sur UART0), - Capteur d'inclinaison deux tats, - Capteur de lumire TAOSINC ( http://www.taosinc.com/ProductDetails.aspx?id=47 ) pour le contrle par PWM du rtro-clairage de l'cran, - 3 boutons (gauche, centre, droite).

The cpu is BGA (boxes with solder balls on the bottom), so you can not use the free pins directly. But as designers DF3120 placed under a micro-via each pin BGA it is possible (by scraping the paint) son of welding on the cpu from the other side of the pcb. Also, although the DF3120 has relatively little ram (only 8MB base) a bare linux kernel (kernel module without adding exotic) runs smoothly! Overjoyed he is about 2 to 2.5MB of free RAM to run an application home! The photo frame once passed under linux firmware can be remotely controlled via the USB port as network device USB CDC EEM (compatible linux only), or Bluetooth (but it will first use the USB connection to enable bluetooth). Linux firmware uses the telnet protocol to afford a remote console, the security level is zero (all plaintext passwords, password, commands, ...), but there is really no other choice , ssh would do too resource hungry. Linux firmware also allows the protocol to use "remote framebuffer" version heard in "miniature" of the VNC protocol. According to the original authors of this hack, only a very small percentage of DF3120 can not be flashed with firmware linux. So no need to fear on this point The software: Step 1: Installing dependencies Before you can compile the linux kernel for ARM9 platform must install a number of dependencies. Depending on your Linux distribution package names may be different for me as I am and I'm using debian package manager apt-get. sudo apt-get install git-core tig lzop libz-dev uboot-mkimage libelf-dev libncurses-dev gtk-doc-tools e2fsprogs checkinstall genext2fs libglib2.0-dev libxml2-dev gawk bison flex texinfo automake build-essential gcc Step 2: compiling the kernel Once the dependencies installed you must download and run the script "minifs" that will allow us to build an automated manner all packets kernel. First we will create a new folder in / home to have a clean workspace:
cd mkdir df3120 cd df3120

Then just use git to retrieve files minifs:


git clone http://oomz.net/git/minifs.git minifs cd minifs

And finally start the compilation itself:


export MINIFS_BOARD=df3120 ./minifs_build.sh

CAUTION: Compiling the kernel took 30 minutes on my i7-2630QM, and using 8 cores at full power without any application in the background. On a PC power "moderate" it may take more than an hour! Be patient! (And if there is an error in the middle of the compilation must be repeated) If you compile error lines with this header:
Configuring xxxxxxxxxx #### ** ERROR ** Configuring xxxxxxxxxxx Check /media/ubData/df3120/minifs/build-df3120/xxxxxxxxxx/._conf_libglib.log

Just then open the log file. Concerned and watch the cause of the error in order to fix it. I'll be honest, to find the cause of the problem will require a lot of patience, using google, and minimal reflection. For example I had an error with libtool version 2.4.2 minifs downloaded it then need version 2.4.0, so I had to download the voucher. Tar.gz hand and replace the one minifs. The different types of files. Log: conf: historical returns during the game console configuration with makeconf, autotool and. / configure, compile: historical returns during the game console compilation of sources (the. log most useful)

install: historical returns during the game console for preparing final files, deploy: historical returns during the game console deployment files end in. img. If everything goes well you should see a file. Plf and. Img folder build-DF3120:
cd build-df3120/ ls -l *.img *.plf -rw-r--r-- 1 skywodd skywodd 19212288 2012-03-07 21:27 minifs-full-ext.img -rw-r--r-- 1 skywodd skywodd 176576 2012-03-07 21:27 parrotDF3120.plf

ParrotDF3120.plf file corresponds to u-boot bootloader, encapsulated in a file update parrot, and the file-full-minifs ext.img corresponds to linux ext2 file system for ARM9 platform. Edit: I am very nice offers pre-compiled files by me parrotDF3120.plf: http://dl.dropbox.com/u/53604363/parrotDF3120.plf minifs-full-ext.img: http://dl.dropbox.com/u/53604363/minifs-full-ext.img (Build Date: 23/03/2012) By the way: To compile a program with the house arm-toolchain V4T he will think to export the bin folder containing the compiler export PATH = $ PATH: ~ / df3120/minifs/toolchain/arm-v4t-linux-uclibcgnueabi/bin Appendix minifs: minifs script is really very practical! Just give him a list of package files and it manages to configure and compile all! To recompile the entire kernel (in case of problems or big change):
rm build-df3120/*/._*

Then ./minifs_build.sh to recompile everything. To compile a packqage only:


rm build-df3120/packagename/._*

Then ./minifs_build.sh to recompile the package. And if you want to add / remove packages to your kernel it will be delving into the folder "conf" of minifs Installation: Once compiled the kernel must be installed on an SD card to use it on the DF3120 thereafter. To do this you must first format (for linux) SD card any size> = 2GB in ext2 file system. (Note you must format the SD card ALL to leave a single ext2 partition on the SD card). Then run the following command to copy the file system of the kernel:
dd if=~/df3120/minifs/build-df3120/minifs-full-ext.img of=/dev/partitionDeLaCarteSD

(Remember to change the path to the. Img, and the device name of the SD card on your configuration

Let's GO GO GO! Or not ... Before you can use the file system on the SD card you must change some small details. For my part I had trouble with the CDC EEM driver, problems that I solved by changing the network settings. To do this:
nano /media/leNomDeLaCarteSD/rootfs/etc/init.d/rcS

And change:
ifconfig usb0 172.16.61.1 netmask 255.255.255.0 up

in:
ifconfig usb0 192.168.2.1 netmask 255.255.255.0 up

(Ctrl + o to save then X with nano) Incidentally you can have fun changing the startup script according to your needs Let's GO GO GO? Yes ...! As I said earlier file parrotDF3120.plf will serve as a bootloader to run the newly compiled kernel linux. This one is doubly clever, he can start either on the official firmware (firmware parrot) or on the linux firmware present on the SD card. Once the file parrotDF3120.plf at our disposal just follow the procedure to update the classic install: - Turn the power switch OFF, - Connect the power cord, - Turn on the photo frame without SD card with the usb cable connected to the computer, - Once the USB storage device meadows, open it as a simple USB key, - Create a folder "update" to the root of the device, - Copy the file parrotDF3120.plf in the "update" - Keeping the cable plugged in, unplug the USB cable. Normally if everything goes well three green squares and blue (the top left) should appear on the screen. If this is the case is that the firmware has been successfully updated! Now just put the power button to OFF and then follow the procedure for starting the firmware linux: - Press the left arrow button and center - Turn the power switch to ON, - Wait ~ 5 seconds - Release both buttons - Admire the pretty penguin symbol linux operating system display with framebuffer. (You should see one (or more) error at startup, but it does not prevent the boot, and if all goes well the rcS script should run on the screen)

G0t r00t: Well now that the photo frame is in our power it remains for us to connect us over and get a root console! DF3120 usb port (under linux firmware) is listing as CDC EEM device just connect the USB cable to a computer and wait for linux. Basic CDC driver should activate and you should have a wired network connection notification usb0. Before you can do anything, you must configure the other end of the network connection. In a console (PC side) as root:
ifconfig usb0 192.168.2.3 netmask 255.255.255.0 up

Once the network connection is configured just the DF3120 ping to test the connection and start a telnet console:
ping 192.168.2.1 telnet 192.168.2.1

You should have the joy of seeing a root console open, ready to receive your orders ^ ^

The most basic example intrssant I think the example is plasma: (In the telnet console) plasma

This is what it gives:

(Not bad for a program running with SDL) Just go for the fun, gif version!

There is also a version adapted for use doom but must either make the MOD "ram upgrade" to have at least 16MB of RAM, or use a swap partition on the SD card (which is a VERY BAD idea! Except if you want to destroy your sd card in the "swapping"). Annex Hardware: I have not touched the hardware too but it may interest some: There is a serial port (actually there are 3 but only UART2 is really usable) on connector J4 pinmapping which is as follows:
1 GND 2 Rx (Input) 3 Tx (Output)

Software level: 115200 baud, no parity bit, 8 data bits, 1 stop bit. The original author of the hack was also able to reverse some of the processor GPIO:
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

If you want to get in the hack hardware serial port, JTAG or GPIO: https://sites.google.com/site/repurposelinux/df3120/adding-a-serial-console https://sites.google.com/site/repurposelinux/df3120/jtag-access http://www.dibblah.pwp.blueyonder.co.uk/df3120/df3120-map.html (who happen to use this pinmapping has good eyes ^ ^) To make debug, to recover the contents of the registers can also be interesting: https://sites.google.com/site/repurposelinux/df3120/register-dumps And for those like me who want to do their own in-house application here are some links very useful: https://sites.google.com/site/repurposelinux/df3120/compiling-custom-applications (application example) https://sites.google.com/site/repurposelinux/df3120/tricks-tips (and various tricks of all kinds) https://sites.google.com/site/repurposelinux/df3120/bluetooth-pan (bluetooth configuration) Conclusion: For 17 (shipping NOT included ... apparently it was free pdfs for christmas with my ebay sellers, but it is available on amazon uk assi ) It is possible to have a pretty display, bluetooth, usb, ... running linux! I see lots of projects already achievable with this DF3120, whether a monitor for real-time server, interface automation, ... A pure happiness! My conclusion Staff: It takes me a second Enjoy!

Share:

Twitter Facebook1 Google +1

"[Arduino] parsing a string of characters [Arduino] Using a joystick to control the direction / speed of a robot "

Discussion
19 Responses to "[Hack] Linux on a photo frame DF3120 (Parrot)"

1. Excellent Posted by coliss | March 24, 2012, 20 h 56 min Reply to this comment

2. Perfect I take one more: p a question: is it touch screen? whether I see use with Qt embeded Posted by zilators | March 26, 2012, 8 h 18 min Reply to this comment

The screen is NOT touch if he was touch I would of course clear Regarding Qt, in my opinion it's not even worth turning hope Qt A leave if the Qt framework graphic rotates with framebuffer only available (so no X server) and 2MB of RAM, otherwise it's just not conceivable. Posted by skywodd | March 26, 2012, 21 h 27 min Reply to this comment

damage so :/ but can be done with Posted by zilators | March 26, 2012, 21 h 47 min

3. Not bad, not bad, it gives me some ideas for my energetic system monitoring; remains only find one at this price there, because my first research does not give me one great thing about the bay .... you got a link to your seller? Posted by Jerome | March 26, 2012, 9 h 51 min Reply to this comment

ebay -> "NEW PARROT DF3120 3.5" WIRELESS DIGITAL PHOTO FRAME " 17.88 + 4.72 for fdp (I'd had the fdp free, but apparently it was only during the month of December :/) Otherwise look on amazon (it is available on the UK version by cons) Posted by skywodd | March 26, 2012, 21 h 23 min Reply to this comment

I have found here: http://www.mytrendyphone.co.uk/shop/search-1.html?keyword=df3120 I ordered there 2 weeks Posted by Eddy Briere | January 5, 2013, 21 h 54 min

4. This site explains how to program the DF3120 http://www.sistemasorp.es/2012/02/12/probando-el-marco-digital-parrot-df3120-parte-3-y-final/ Posted by Oscar | March 29, 2012, 11 h 10 min Reply to this comment

Not bad! The example with bluetooth / sdl is very informative! Posted by skywodd | March 29, 2012, 13 h 16 min Reply to this comment

5. This is the bomb that little parrot, it is still necessary to find and a good price ... Your explanation made me want to highlight my parot (sfr) of the box and I was able to compile the kernel and uboot without problems! I can make it work very well but I think it lacks a key to my config automation, let me explain: I want when I connect my usb in to my parrot DockStar (soon my raspberry pi) that everything goes ==> boot linux network connection and then launch app (next parrot and raspberry side => vnc). Anyway, I'm almost there network and application side (udev ok, eth0/usb0 bridge by car, with driver lcd4linux 'x11' or other app) ... But ... I do not know how to boot the linux parrot directly without pressing the two keys. And I can not be sure you do not have to put password on vnc client's parrot. I have not yet looked at the side but with bluetooth usb cable on DockStar I no longer need to connect the power cable to the parrot (suddenly a single wire) ... Posted by tempest69 | September 7, 2012, 11 h 15 min Reply to this comment

6. I >> do not know how to boot the linux parrot directly without pressing the two keys. You have the serial cable that serves Uboot console and you change the boot options. Or else you must do so (hard) directly into the uboot source code (?). Posted by skywodd | September 7, 2012, 14 h 07 min Reply to this comment

7. FOr direct start, I found! but I think it's dangerous .... well I did anyway and it worked. command line (only the following / #) / # Cd / / # Flash_eraseall / dev/mtd0 Erasing 16 Kibyte @ 40000-100% complete. / # Nandwrite-p / u-boot.bin dev/mtd0 Writing at 0 00000000 Writing at 0 00004000 Writing at 0 00008000 Writing at 0x0000c000 Writing at 0 00010000 Writing at 0 00014000 Writing at 0 00018000 Writing at 0x0001c000 Writing at 0 00020000 Writing at 0 00024000 Writing at 0 00028000 / # Reboot and voila! good in fact I read and I did (but without changing the memory or u-boot.bin at the root) Note: This does not work with kernel I had compiled j ... "I put it on the website link at the flash_eraseall otherwise it put me the message" sc2412-nand sc24xx-nand: invalid id chip 0 " So now when I turn on my parrot DockStar connected to a single USB cable that is directly accessible from any station on my network without manip! By bye bye against the old interface of the photo frame ... and as I have not changed the uboot.bin I do not have 5 seconds to access uboot. Anyway I got what I wanted! Posted by tempest69 | September 8, 2012, 0 h 55 min Reply to this comment

8. for info: I also found SDLvncviewer friends is not very good (as usual): I modified the code of the library used (vncclient.c) hard to put the password 'parrot' and roll my chicken ... I have not been able to manip-style "/ etc / fichierpasswd | SDLvncviewer ServerIP: 5901" or "/ etc / fichierpasswd <SDLvncviewer ServerIP: 5901" or other whatnot to redirect the password instead of the seizure by stdin ... So now when I turn the parrot after 5 seconds without doing anything he displays the screen of my VNC server (which is nothing other than a driver with lcd4linux = 'X11') Remains to get a USB cable at right angles to my parrot to ask properly ... And waiting to receive my raspberry pi to plug it! Posted by tempest69 | September 10, 2012, 10 h 55 min Reply to this comment

9. Hello and thank you for your article.

I followed your tutorial and I managed to start on linux with my Parrot DF3120. Now I'd like to compile C programs for this platform. In order to have the necessary libs I started in compiling minifs. I'm on mac with ubuntu 12.04 (precise) distribution to the latest update and I installed all the components of your article. But then he let me go in the compilation swaying me the following error: MINIFS_BOARD DF3120 Compiling host-installwatch # # # # ** ERROR ** Compiling host-installwatch Check So I looked at the file above and: more build-df3120/host-installwatch/installwatch/._compile_host-installwatch.log make-j2 gcc-Wall-c-D_GNU_SOURCE-DPIC-fPIC-D_REENTRANT-DVERSION = \ "0.7.0beta7 \" installwatch.c installwatch.c: 2960:5: error: conflicting type for 'readlink' / Usr / include / unistd.h: 832:16: note: previous declaration of 'readlink' was here installwatch.c: 3098:5: error: conflicting type for 'scandir' / Usr / include / dirent.h: 256:12: note: previous declaration of 'scandir' was here installwatch.c: 3714:5: error: conflicting type for 'scandir64' / Usr / include / dirent.h: 279:12: note: previous declaration of 'scandir64' was here make: *** [installwatch.o] Error 1 This is but I confess to being a bit overwhelmed at this level. IF you have an idea I'm interested. Cordially Eddy and Happy New Year 2013! Posted by Eddy Briere | January 5, 2013, 21 h 07 min Reply to this comment

This is a problem of conflict between gcc version from what I can read here: http://ubuntuforums.org/showthread.php?t=1498639 Posted by skywodd | January 5, 2013, 21 h 14 min Reply to this comment

Thank you for your answer. I've read this article and I understand that there is a history of confit. However, where I dropped what it is that is in conflict? I note that there is a statement readlink, and scandir64 scandir is not in accordance with the definitions and dirent.h unistd.h. Could it be my installation of gcc is not clean? (My version of gcc: gcc version 4.6.3 (Ubuntu / Linaro 4.6.3-1ubuntu5)

In the file installwatch.c I note that reflects GLIBC versions (see excerpt below): # If (GLIBC_MINOR> = 10) static int (* true_scandir) (const char *, struct dirent *** int (*) (const struct dirent *) int (*) (const struct dirent **, const struct dirent **)); # Else static int (* true_scandir) (const char *, struct dirent *** int (*) (const struct dirent *) int (*) (const void *, const void *)); # Endif Basically I do not really know where to look Posted by Eddy Briere | January 5, 2013, 21 h 42 min

The best way to compile a kernel linux is a debian stable. If you have a little free disk space that you partition debian wheezy or squezze. Posted by skywodd | January 5, 2013, 22 h 09 min

I think you're right, it's been a while since I attempted a passage in Debian. Ubuntu at first seem sexy but I do not use encounter strange behavior. Especially the network level is the cata short, I change the subject. Thank you again for your quick responses Posted by Eddy Briere | January 5, 2013, 22 h 15 min

compilation is distributed by modifying installwatch.c SevenMachines as indicated on the link you gave. I think it's still pretty crazy story ... it really is the hack Posted by Eddy Briere | January 5, 2013, 22 h 44 min

You might also like