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.
Related
I installed scientific linux 7.4(based on redhat 7.4) in my surface book. My touch pad is working correctly but the problem is the keyboard won't work in this OS. I also found that an external usb keyboard works correctly with it. I have Ubuntu and Windows beside this OS, but I don't have any problem with them. How can I fix this problem?
According to https://www.reddit.com/r/linux/comments/6ca920/ms_surface_keyboard_does_it_play_nice_with_linux/
you would need at least 4.10 kernel for the surface to work properly.
The kernel version in your system can be obtained by uname -rv in the terminal.
The easiest solution is to update the kernel / linux-firmware package from your distro package manager.
If this does not work, probably you would need to reconfigure or update and reconfigure the kernel (e.g. to the latest stable mainline from https://www.kernel.org/)
A nice guide for configuration can be found here https://www.dotslashlinux.com/2017/09/11/the-linux-kernel-configuration-guide-part-11/
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.
I have been working with Linux kernel, compiling and inserting modules, in my custom kernels. Previously I had Ubuntu where I had been working with my custom kernel and all the commands for compiling and installing kernel worked like a charm once I had installed all the required libraries.
Now I have switched over to Fedora 20, here I want to install my custom kernel and for that I downloaded all possible kernel tools, namely, Kernel Development Kernel Tools these are group installs and other libraries that I downloaded were ia32 libraries (as I am working on 64-bit OS), kernel-devel package. Still I am not able to work with make-kpkg command. It says bash: make-kpkg: command not found....
I googled out and did everything I could.
Can anyone get me out of this trouble?
make-kpkg is a Debian kernel packaging tool. It does not exist on RHEL family distributions, such as Fedora.
Please refer to the Fedora documentation page "Building a custom kernel" for the correct procedure. (I have not reproduced it here as it is rather long, and I'm not sure how far you may have gotten.)
The make-kpkg tool is part of the 'kernel-package' package on Debian systems. It is a Debian tool to produce debian package files. Ubuntu is based on Debian and has this tool. However, Fedora uses a different system to manage packages. So, make-kpkg would not be available on Fedora.
I have a HP Envy 4 1025tx machine with Ubuntu 12.10.
My blender doesn't seem to detect the dedicated G-Card ATI Radeon 7670m.
But it does detect it on windows. Should I have to install any linux drivers
or does blender doesn't fully support openCL on linux. Or shoulf I manually
recompile the code?
How should I fix it?
open the terminal and use the command: CYCLES_OPENCL_TEST=true
this enable the opencl support to opencl on blender
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.