How to create a Bootable GTK Application? - linux

Hi i have an application written in GTK and i would like to make it into an bootable ISO file.
I have tried many options but have failed and being sent in many directions using cmake and make by following several tutorials which did not work.
Does anybody know how to create an bootable ISO file for / from an GTK based application on linux / ubuntu?
I am currently using ubuntu to develop the bootloading application yet i would prefer the GTK application to startup when the computer starts up, and have no operating system running if possible?

GTK requires an operating system kernel (a Linux kernel...) to be running, and some display server, e.g. Xorg.
So you need to actually make your custom Linux distribution.
I would prefer the GTK application to startup when the computer starts up, and have no operating system running
This is not possible
But you could study the source code of source based Linux distributions like Gentoo and work for several months to make your own Linux distribution.
You probably would need help and address many issues you did not even thought of (e.g. AZERTY keyboard layout, computers with only USB disks, laptops with only Wifi network connections, etc...)
Notice that Debian & Ubuntu can be configured to boot some (open source) GTK based installation procedure. I guess you could study in details their implementation (since it is open source)

It's not possible to boot a GTK application without operating system, as Basile Starynkevitch said.
However, you can use Linux to display only your GTK distribution, without any additional programs and I think it can be done easier, than Starynkevitch's method.
You can try to use the tool Systemback or similar to create a bootable live Linux distribution. Systemback is not maintained anymore but there is a github fork made by BluewhaleRobot that appears to be more up-to-date.
You can install a light Linux distribution, for example Xubuntu, and remove all unnecessary packages and programs. You can set the wallpaper, remove or leave the taskbar/menu start etc. Then, install your GTK application, add it to autorun and use Systemback's "Live system create" function.
The ISO image should be created and your program should be already installed in it with autorun.
It's not a perfect and stable solution, however, it seems to be the easiest way to achieve what you want.

Related

Linux - boot in runlevel3 and add X11 components

I want to build a minimum Linux for embedded devices that comes with Firefox only.
Questions:
Is it ever possible to add X11 components to runlevel3 and
upgrade it to runlevel5?
Is it possible to setup a Linux in runlevel3 with minimum display support so that I be able to run
Firefox? (Not interested in text based browsers)
I gave it a go but I got lots of dependency errors trying to install X11-common with apt-get in runlevel3.
Linux From Scratch is a step-by-step instruction book for anyone who wants to gain a good understanding of how to build own custom Linux distro.
There is a dedicated topic about X Window System Environment
This includes the base LFS project and a bunch of extensions derived from it. For embedded systems Cross Linux From Scratch is of particular interest.
Another option - in case you want to do it faster but losing deep understanding - is using some Embedded Linux distro builder like Buildroot

How to compile the Linux kernel to be as small as possible?

I'm working on a side project which requires me to configure and compile a tiny Linux System based on Ubuntu.
The result should be a tiny OS with the following features:
A Bootloader
A Kernel
A Process
A Thread
Miscellaneous (if possible)
A File System
Virtual memory
A Console
I read lots of documents about it, one of them being: http://users.cecs.anu.edu.au/~okeefe/p2b/buildMin/buildMin.html#toc3
I deleted the file system, and recompiled the kernel using make xconfig. I tried to deactivate modules and configurations many times, but it's not working for me.
How can I configure the kernel for the OS with only the features I listed above? What options can I disable or enable while still having a working system?
Having the Kernel very small is not important for Ubuntu, so maybe choosing Ubuntu is part of your problem. I would use as starting point what OpenWRT does. They do a good work making the Kernel small and it is easy to get started. OpenWrt Buildroot – Usage
try Linux From Scratch. It is a step by step approach on building a minimal Linux system from which you can evolve later on. http://www.linuxfromscratch.org/.
Use Gentoo Linux distribution - it's great for practicing on creation of Linux systems. Gentoo has excellent setup documentation, for example about configuring the kernel.
And Gentoo is a little easier and faster to setup than Linux From Scratch (LFS). If you want to go deeper, then LFS may be a good learning step too.

Launching a program straight from OS

I am developing a program similar to xbmc but only for movies. I was wondering if there is any very simple operating system that will basically just boot and run the program I am developing? Similar to what openelec does for XBMC. I can run it on windows but I want to be able to put it on a machine like raspberry pi without having to have a whole windows or linux OS.
I hope that makes sense.
Take a look at the rather slim linux distributions specialized in embedded systems, like firewalling distros and so on.
Then, if it is a graphical application you have to make sure you boot into runlevel 5 (graphics) and configure your application as login shell for the default user.
You might also be interested in two services the openSUSE project offers: the Open Build Service (OBS) and SUSE Studio:
OBS allows you to automatically get packages of your application built and packaged, ready for use in a number of wide spread distributions.
Studio allows you to go a step further and create a custom distribution for your own purpose: you can call it 'your' operating system, completely preconfigured for your purpose, with all requried software and your own application installed. You just have to download a CD image afterwards!

How to start off with a embedded linux development environment

I come from a windows background and i am proficient with the .net platform. For work, i need to bring up a custom embedded system platform. We have bought the pandaboard ES as the test platform. The application is to stream images over the wifi. If you think about it, we are building something similar to a netgear router - the only difference being when you log into the device it serves images.
Because my background is in windows i am not quite sure how to start off with embedded linux development. in reading through various sites i have come to the conclusion that going to linux as development host is the best option.
Can some one point to me in the right direction regarding the set up. I have a windows machine that will be used for development purposes. I can either do a virtual box or setup a partition for linux. But the finer details are what throwing me off..what i need to know is
1) once i install linux what other software do I need - Code blocks,
2) what about toolchain
3) How to debug - through serial port ?
4) Is there a way to send the image built directly to the CF card?
Thanks
i suggest you to install linux on your desktop or laptop, perhaps
In a virtual machine.
Then, learn to compile on the command line (the order of program arguments to gcc is important).
Start an editor like emacs. Take half an hour to follow its tutorial.
Edit the helloworld.c file.
Compile it with
gcc -Wall -g helloworld.c -o hello
Improve it till no warnings are given.
Use
./hello
To run it.
Learn to use make with your own Makefile.
Use a version control system like git.
Learn to use cross compilation tools.
addenda
See also my answer here and also this answer.
Cross-building is not very different from native Linux building, except for the names of the cross-compilation tools.
But my feeling is that installing Linux and learning to develop Linux applications on Linux will teach you a lot of skills necessary for cross-development targeted for embedded Linux systems. So read material about Advanved Linux Programming and Advanced Unix Programming.
Remote debugging thru the serial port should be possible.

Looking for a super tiny linux distro that's sole purpose is running an AIR application?

I'm looking for a really really small linux distribution or process of making my own that's sole purpose is to get an air application to launch full screen and stay there; Essentially I'm building a home kitchen computer that runs entirely as an AIR app.
I have looked into using windows xp; and windows xp embedded but they pose so many issues I figured I'd try modern linux.
I have also seen TinyCore Linux which looks interestingly small but not sure what issues that poses in regards to running AIR and "hardware" accelerated display. I've also thought about stripping down an Ubuntu installation but I'm sure somebody must have done this already; google is just failing me right now...
I'm also interested in running an "embedded" version of say android and running the air app on some arm-based hardware again; with just the AIR runtimes only - although this is less preferred as it's more complex.
I'm also hooking this up to a touch screen monitor (not yet arrived) so I'll need to hunt down or write some drivers for translating the touch events into something AIR can understand... (this was my main intention for using windows in that all the drivers will just work).
What I'm after
Minified Linux kernel with JUST the drivers for the box I need
X Display with accelerated graphics support (Doesn't have to be X if AIR can run on a frame buffer?)
Running a Full screen AIR application (simple enough)
Ability to write back to the filesystem (enough support for AIR)
SSH Access for remote control
Samba for updating the filesystem (easier to maintain the system)
Touch screen support (3M Ex III I think...)
Audio support
Don't need
Don't need any window manager or any other GUI tools unless required by AIR
Don't need any toolbars or file managers or anything; The AIR app is the "OS"
Don't need any package managers or repos
Don't need multi user or logging in; everything can just run as an unprivileged account
Don't need to
I don't mind hand crafting the filesystem and configs if that makes it easier; I'm mainly looking for a "filesystem" that is as tiny as possible that I can just plop my AIR app into and write some scripts to get it to start when the X server starts
Thanks,
Chris
Try an embedded Linux build system such as Buildroot. It can build an entire system from source, and be very lightweight. The basic system is less than 1 MB in size.
Ended up going with Tiny Core. Very tiny and quick to boot up. You can also write extensions for it and you don't have a persistent drive which allows you to just switch the thing off without worry that it's going to break something -- exactly what you need in a kitchen :-D.
My current plan is to:
Just set up a working version using Ubuntu as this is mostly supported by Adobe
Slowly strip it back and try and get as little things to start as possible on boot
Try building my own distro/package from source and selecting only the packages I need
Compile my own kernel with nearly everything turned off and just leave on the things I need

Resources