Step by step to embedded Linux

850 views Asked by At

I am trying to understand Embedded linux. For this I tried to understand buildroot. Now I have few doubts.

1) How do u load the created environment in the target?

2) After we download environment how do we create and run app on it.

is there any complete tutorial on this ?

Thanks in advance.

Rahul

2

There are 2 answers

4
user543 On

buildroot is a series of make files and scripts which is intended to make it easier to create kernels, root file systems and toolchains for your particular system.

This makes it easier to support multiple boards for one particular project. It does require that you configure the targets correctly for your board. This is something that really only you (or some one who knows your app and the target board) can really do.

With regards to running your application: If you write your application to run using the filesystem / environement created by buildroot then you should be able to launch it via regular start up script or manually if you have ssh / console access to busy box.

This answer shows how to create a startup script. https://unix.stackexchange.com/questions/59018/create-and-control-start-up-scripts-in-busybox

It really depends on the particular board you are targeting as to how you get the image to the board. Something like a raspberry pi you can simply load the image onto an SD card and the board will load it from there. Others (like my nexus phone) require a software flashing process. The manufacturer of your board should provide instructions on how to do this.

1
Rahul Joshi On

york@york-Inspiron-1525:~/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabihf/bin$ gcc test.c -o test york@york-Inspiron-1525:~/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabihf/bin$ ./test This is my first prog. many thanks to those who helped me. york@york-Inspiron-1525:~/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabihf/bin$

I could compile a test prog.

Many thanks to all those who helped me with this.

One thing I havent understood is, How did the test bin generated for arm (r-pi2) run on my i386 ubuntu?

Now next task for me is to burn the environment and get remote access of target hardware.