Embedded Electron on NXP i.MX6 - linux

Earlier this year, I developed an app with the framework Electron (made by Github) and now I would like to embed it on a SBC I bought.
The SBC is the ConnectCore6 from DIGI, based on the NXP i.MX6 processor, and connected to a screen with HDMI.
I can generate linux images for this SBC with Yocto and load GTK & QT applications on it. However, I would like to understand if create a compatible version of my Electron app for this hardware is an easy, hard or impossible task.
I don't realize what is needed by Electron to work on PCs (Windows, Linux and OS X) and should be set up on the SBC to get the same result.
Could you help me with that and possibly guide me to find a way to execute the Electron App on the board ?
Thank you
Antoine

The job can be quite easy.
You can simply configure your tools (e.g. qt creator) to use cross compiler and cross libs of Yocto SDK.
Looking at the Electron web site I found
Cross compilation
If you want to build for an arm target you should also install the following >dependencies:
$ sudo apt-get install libc6-dev-armhf-cross linux-libc-dev-armhf-cross \
g++-arm-linux-gnueabihf
And to cross compile for arm or ia32 targets, you should pass the --target_arch parameter to the bootstrap.py script:
$ ./script/bootstrap.py -v --target_arch=arm
The main problem is if a lib, required by Electron framework, is not available as open source or already cross compiled. In that case you'll have to ask it to the lib provider.

Related

Qt Windows + Linux Cross-compiling

I have developed Qt on Windows for Windows, and on Linux for Linux.
I understand that in order to develop a Qt application for both Windows + Linux is well documented (although I haven't actually done it yet).
What I would like to do is create a Qt project but run it on both Windows + Linux .
Is this possible?
Assuming you're asking about developing Qt Project on both Operating system.
Yes . you can open your project in both operating system if you have Qt Creator or related development application installed.
Assuming you want to compile your project for both Operating systems
you can follow up this for cross-compilation : How do I configure Qt for cross-compilation from Linux to Windows target?
or you can compile it on your Linux Distribution maybe inside the VM-ware .
also good read if you need more : https://forum.qt.io/topic/16018/how-to-compile-a-qt-application-targeting-for-linux-from-a-windows-machine/15
Source : Internet.

TideSDK app on Mac

I developed an app via TideSDK on OSX. I have a .app and It is working on OSX. However, you know it cannot work on linux or windows. I want to run my app on linux or windows. How can I do that?
In short, you package for each platform. As you are aware mac apps do not run on Windows and it is the same with TideSDK since you are creating something native for each platform.
TideSDK must be installed on each platform to create an executable and bundle for it.
To generate an installer for each system, you need to run commands on each system (windows / linux 32bit / linux 64bit) using tidebuilder.py on the command line.
We will have more to speak about concerning packaging quite soon that will make the task of building and distributing your apps easier. Stay tuned for updates !!

Compiling a Linux program for ARM architecture - running on a host OS

I have a ARM Coretex-A8 development board from Freescale (i.MX53) running Linux Ubuntu. It boots up just fine and I can access the system with mouse/keyboard/terminal.
To get started I would like to make an application running on the board inside the host OS, just as you do when you run application on your PC.
My problem is to compile my test program, using toolchains like YAGARTO which is based on gcc i end up in trouble with the linking bacause I have not defined any startup script.
I find lot of information on building "bare metal" configurations (inluding compiling the kernel and make load and link scripts), but not anything usefull for making a application running on a host OS.
My development environment is running on Windows 7. I also have the option to run on Linux X86, but i doubt this whould help me making ARM applications.
For ARM-Linux application development the preferable choice is a Linux Host(x86) machine with a ARM toolchain installed in it. In Ubuntu Desktop machine you can use the following command to install ARM toolchain:
apt-get install gcc-arm-linux-gnueabi
After toolchain installation you can use the following command for cross compilation:
gcc-arm-linux-gnueabi-gcc -o hello hello.c
Using this toolchain you can cross-compile your C program using Standard C library without the need of startup code. Applications can be cross-compiled at your Host Linux(x86) platform and run on Target Linux(ARM) platform.
Windows version of ARM-Linux Toolchain is also available. You can get it from here.
Linaro Developers Wiki - an open organization focused on improving Linux on ARM, will be a good reference for your work.

Using OpenGL Without X-Window System

How to OpenGL on Linux Platform Without X-Window System, can I send OpenGL Graphics Directly to Framebuffer Device?
There Is Project Named DirectFB (Direct FrameBuffer). With DirectFB We can do this but DirectFB needs for driver for each hardware and I want to user a graphic card that only have Linux driver.
This is how i did it in my ubuntu 11.04 in detail:
1- Install the dependencies using the command:
sudo apt-get install xutils-dev libpciaccess-dev x11proto-dri2-dev x11proto-gl-dev libxdamage-dev libxfixes-dev
2- The mesa library needs libdrm version >= 2.4.24 which is not available in the ubuntu 11.04 repository (older version is available) so you have to download the source and build it using the following commands:
./configure
make
make install
3-Download mesa library and then compile it using the following commands:
./configure --prefix=install_directory
make realclean
make linux-fbdev
sudo make install
be careful when you choose the install_directory so that you don't overwrite the system's mesa library.
after that compile your application using the options : -lGL -lOSMesa -ldl -L'install_directory/lib' -I'install_directory/include'
Apparently is possible to have SDL running without X.
Basically, your kernel should have framebuffer support and you could use SDL on top of DirectFB.
These threads are ok:
http://lists.libsdl.org/pipermail/sdl-libsdl.org/2006-October/058305.html
http://forums.libsdl.org/viewtopic.php?t=4079
As you said, you need a driver to do this. 99.9% of all Linux graphics drivers use X11, so unless you have a DirectFB OpenGL driver for your hardware, you are stuck with using X11.
I use the SDL (Simple Direct Media Layer) for OpenGL programming in Linux. This site has some nice tutorials to get you set up. One advantage of using SDL is that it will port across platforms, so once you get something running on Linux, it'll transfer right over to Windows so long as you have SDL installed there.
You can use Mesa for framebuffer-based software rendering.

How do I use cygwin to cross compile to linux, when I have an application that needs libX11.so, libGL.so, and libGLU.so?

Will I have to use the crosstool that cygwin provides to make the libX11.so, libGL.so, and libGLU.so libraries using their respective source code? Or do you know where I can find them compiled already for crosstool (I'm new to this cross compilation)?
Just for clarification: I'm on a windows 7 machine trying to get my application also to compile for linux systems by using cygwin's cross compilation. The application uses OpenGL. Thanks
To cross-compile for Linux you should install the needed development libs and headers on a linux box[1] and then copy /usr/lib and /usr/include your cygwin environment (e.g. /crosscompiler/linux/...). When you build the cross compiler in cygwin, tell it where those native linux headers and libs are so they'll be used when you compile your app.
[1] If you're looking to run on a wide variety of linux boxes make sure you pick an older linux distro (e.g. Red Hat 9) to ensure your app doesn't have dependencies on very new glibc, etc..
Why do you want to use Cygwin?
There is instructions on the OpenGL Wiki about how to use OpenGL on Windows using MinGW.
MinGW use the same GNU tools that are available on Linux (GCC, GDB, GMAKE, etc.) but produce Windows native executables. So, you shouldn't have trouble compiling your source code on both platforms.
I just ended up building on a native Linux machine.

Resources