I cross complied thttpd with php for arm linux boards successfully and I got a single file namged thttpd. I copied this file to arm board and ran it successfully with the following command:
thttpd -C CONFIG_FILE // CONFIG_FILE is the path of thttpd configuration file.
the question is: How can I INSTALL the thttpd on the target (here the arm board) to it run automatically, for example as a service. You know when you compile thttpd on normal linux (x86) you can install it using "make install" command, but what can I do on the arm board with the single executable thttpd file?
Offcourse this is my general question that how can I install cross compiled programs on the arm boards?
Related
I successfully built and booted the Texas Instruments Processor SDK for the BeagleBone X15 using Yocto with the following command:
MACHINE=beagle-x15 bitbake -c populate_sdk arago-core-tisdk-image
Now I installed the Yocto SDK on the Ubuntu Host machine so that I can use QtCreator to CrossCompile and deploy from Ubuntu.
I setup the kit, but Yocto believes the Qt Installation is invalid ( please see the following screenshots ):
What can I do to fix this?
Turns out you need to source the environment-setup file prior to launching qtcreator:
[linux-devkit]:/usr/local/arago-2016.12> ls
environment-setup site-config-armv7ahf-neon-linux-gnueabi sysroots version-armv7ahf-neon-linux-gnueabi
[linux-devkit]:/usr/local/arago-2016.12> pwd
/usr/local/arago-2016.12
I usually work on linux when i have a linux target but this time i must work from a Windows based computer and must keep all my work on Windows.
I tried with Code::blocks and GNUARM, the build has no problem but can't be runned on the target.
When using code sourcery G++ i can build with command a single .c file and it runs on my board.
When i try to put the sourcery g++ exécutables in a toolchain configuration in code::blocks the software seems to build with no error but is generating nothing...
Now i would like to go a step further an build a project, no more single files, and i don't seems to be able to find a solution to this problem.
Does anyone here has experience from this kind of situation ?
I finally got it to work, here is a little explanation on how i did it : first i installed the jdk and eclipse, the code sourcery g++ lite and finally the gnu arm Tools (not the gnu arm plugin). I then went into the toolchain configuration in eclipse and changed the Tools "cs-make" and "cs-rm" from code sourcery to the "make" and "rm" from the gnu arm Tools kit. I changed the format from c++11 to c++9 too and now i am generated a elf file which run on my board.
Can any one tell me how I can install and cross-compile libmodbus library(libmodbus.org) for beaglebone??
I tried to compile for my local machine having ubuntu installed in it and the library got installed properly and works fine. But I want to install for beaglebone. I have beaglebone's file system on my local machine(target Network file system)
I want to write a modbus master(client) rtu code and run on the board which i mentioned above. Please guide me for this work.
Manual cross-compilation
You should configure the build system with the prefix of your toolchain (for example arm-none-linux-gnueabi for Sourcery CodeBench ARM 2013.05):
./configure --host=arm-none-linux-gnueabi
(if you can't find confgure script, execute autogen.sh first to create it), build the library:
make
Then copy library files to your rootfs:
cp src/.libs/libmodbus.* path-to-your-rootfs-usr-lib
Buildroot flavor
git clone git://git.busybox.net/buildroot
make beaglebone_defconfig
make menuconfig
And search for libmodbus "Target packages->Libraries->Networking", select it and build the entire rootfs:
make
I am developing a software in C++ on windows 32-bit (using MSVC++), but since I want to be able to use my software on every platform, I have decided to use CMake as my build generator.
Therefore, I am still just a beginner in CMake. From the CMake tutorials, I understand that in order to cross compile codes, first a toolchain simulating the target platform should be installed on the host platform. Then using the appropriate target-platform C and C++ compilers provided by this toolchain, CMake would be able to generate makefiles etc.
Now, I want to build my code for Linux platform(GNU/Linux) on a Win32 platform. I tried doing the above procedure using CMake combined with Cygwin and using gcc and g++ as compilers. It built fine, created makefiles, and when I issued "make" in Cygwin terminal, the generated makefiles were "made". Now I have got an executable which I was hoping would run on Linux platform. But on Linux I get the error: bash cannot execute binary file.
Using command file executablename, I realized the executable which is made by the above procedure is of type PE32 which is only for Windows.
Now my question is: Is my understanding of cross-platform build procedure using cmake correct?Or should I just use another Linux toolchain under windows to get a Linux ELF executable? What toolchains come to your mind which would give me what I want?
Many thanks
Setareh
You will want to look here: cmake-toolchains(7) if you do cross compiling. However, I would suggest that you install a Linux VM like virtual box on your windows machine and build naively on Linux. It will compile much faster and you will not have to worry about cross compiling. You can mount the windows disk from the linux VM so you can share the same source tree. The linux VM will compile much faster than gcc running under windows.
Your understanding of CMake is correct... it will determine how to create the build system you request (or is default for the platform you are currently on) based on rules in your CMakeLists.txt file. However, this won't necessarily help you compile for linux on a windows machine if you don't have something installed that can target linux.
To compile targeting linux, you will need to use a linux compiler. The link posted by #stjin tells you how to install one on cygwin. Then, to set up your CMake build, do this in the terminal:
CC=gcc-linux CXX=g++-linux cmake . [options]
This will tell CMake to locate the special linux targeted compilers. Hopefuly, after compiling with these compilers you will be able to run on linux.
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.