Showing posts with label Kernel. Show all posts
Showing posts with label Kernel. Show all posts

Thursday, May 22, 2014

How to Run QT Application on raspberry PI Board at Startup

How to Run QT Application on raspberry PI Board at Startup.

1. Download ubuntu 12.04 and install ubuntu workspace (like 5Gb to 25GB as much as you can) as much as you can give to Ubuntu during time of installation.

2.Download QT Creator IDE , Different way are available to install.
     a. Directly download QT Creator  from QTProject.org site
     b. Goto Ubuntu Software Center and Search "QT" From Results find QTCreator and Install it.

3. If you are downloading specific version of QT from QTproject site as .run file.
   You need to make that file as excutable on Ubuntu by firing this command.
   chmod  +x /PATHOF.run press enter on Terminal.

( For open Terminal fire ALT +CTRL+T)

4. Now, Directly double click on  QTfileXX.run give Next Next Next Qt Creator will be installed.

5. Browse Project from Example and Run Qmake and Build ALL and Run. Application will run on Screen of Desktop.

6.Now to Run this application On Raspberry Pi baord. You need to cross compile that Application.
 Which is one Different Story. I will explain on another one. For that You need to have arm-linux-uclibgnueabi-g++ compiler, qmake build by Your Linux Repo for ARM and Specific to your QT Vesrion as same application was built on QtCretor IDE's QT version.  Make it clear version of QTCreator IDE and QT.

  7. Once you have cross compiled QT Application Binary ready to put it on raspberyy pi board.
You need to have Custom Linux Repo or Raspbian Linux Repo.  Make it sure it have already QT package installed. Which is also a different Story and require detailed explanation.

8.Once you have Raspberrypi Board ready with Linux Installed have Login prompt coming on power up your Linux image is ready to use for QT Application.

9. Just Copy Qt Application Binary Files to raspberry Pi's /root/ directory.
    First take SD card from Raspberry Pi board and plug it to ubuntu CPU.
    fire command : cp -avr /sourcedir  /media/SDCARD/root/

10.once copied, you need to have script to run at startup at /etc/init.d/  folder.
    For that first 
    a. goto  /media/SDCARD/etc/init.d/
    b. gedit S50Network  // text file opens in gedit viewer.
    c. delete all contents from these S50Netwro file
    d. Type:   cd /root
                   ./NameofQTBianry    
       (Which is already placed on root directory)  
    e. you need to save as file as difrent name like S60MyQTApp and close gedit.
   
11. Again you need to make script excutable by typing command:
       chmod +X S60MyQTApp

12.Done. Exit from all. Plug your SD card Power UP. Your App will work on Raspberyy Pi.
     You can see on your screen of Raspberry Pi board attached with it by HDMi or other video interface.

13.Thanks for reading.

Happy Coding.

Note: If you have reached to step 12 you are coolest person with COOL peach of mind as it required lots of patience.