My need is running single program on Raspberry. I don't need tools and apps Integrated in Linux, like LXDE. Same as Bar-Metal code in my Boards that run on power up.
You want TinyCore. It is under 8mb for a full linux install. Simply package your compiled application/files into the .tcz file type. With fpgui and Msegui, you only need to load the Os and the Xorg/X11 module...everything running in ram in under 10mb with a full graphical environment. Bare-metal Fpc PLUS window-management free.
(This is running with a window manger FLWM. A bare boot is easy at reboot)
www.youtube.com/watch?v=tPBdUBMj8lsEverything-- Tinycore OS, FPC, Lazarus up and running in less than an hour. Fpgui is cakewalk to compile from the git repo once you have a working Lazarus. Fifteen minutes there and its done. Msegui installs well too just haven't been able to configure it yet. Actually a blast to do.
First step is you set up a Tinycore boot disk. I boot directly from a read-only dvd. Just download the 65mb all in one installer No hard drive installation. And that is not a "LiveCd distro". That is how you use it. Everything loads into ram. Your Os always boots to a pristine/incorruptable state. Your file system is all mounted at startup from a single directory, and is loop mounted in-ram.
There are also all the key ports available too like x86 Pure 64, ARM v7, ARM v6 Raspberry . Lots of packages in the Raspberry repo, looks like.
http://distro.ibiblio.org/tinycorelinux/4.x/armv6/tcz/ Then you install fpc.tcz and lazarus.tcz from the simple repository/apps store. Kinda sparse on installed packages/components.
Then all you need is a few extensions from the repo (make sure they are ondemand)
git.tcz (cmdline git)
binutils.tcz (make tools)
xfe (graphical file manager)
Start git.tcz ,binutils.tcz, and xfe.tcz by right clicking on the desktop for menu/ondemand/"git" and again for "binutils" and "xfe".
Now you can get/checkout Fpgui from git repo. Just make a logical directory structure like home/tc/SVN_GIT/fpgui. Go to this directory at a command prompt and:
git remote set-url origin git://git.code.sf.net/p/fpgui/code You have a fully configured fpgui Git version manger going too.
Now simply open Lazarus (click the leopard icon on the desktop/appbar), then install the fpgui.lpk . Then "open project" on the main fpgui.lpi, compile it. Search for all the .lpi files in the "demos" directory or any others you can find and load and compile them. Mine worked flawless except for one .lpi failed to compile.
Now, that is your development-side install. Just a few details left. You will need to create your own custom image to run on the RasPi which is your "target" and will need to compile the appropriate ARM cross compiler/s necessary for fpc and you are set up nicely.
Don't forget to re-boot with the backup option set. Everything is in ram and must be backed up each time to persist.