-1

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

  • Your question is a little bit too broad. Instead of buildroot, try to take a look at (THIS)(https://www.yoctoproject.org/). Is "well" documented and drives you to build a complete linux embedded system: U-boot, kernel and rootFS – LPs Jun 26 '15 at 06:47
  • @LPs, buildroot do also have a really good documentation, and supports quite a few boards out of the box. It's also a lot easier to start with and come up to speed on... – Anders Jun 26 '15 at 08:52
  • LP , Thanks for the response... – Rahul Joshi Jun 26 '15 at 08:54
  • @Anders I know, but I think that Yocto can give OP a complete ready to use solution to start understand how huge are questions he's asking. – LPs Jun 26 '15 at 08:55
  • I haven't read yocto. But I am looking for understanding the steps that are involved. I think Buildroot indirectly explains me that. I understand my question is broad. My bad, I did not communicate it properly. – Rahul Joshi Jun 26 '15 at 09:00
  • 1
    Well, @LPs, if the board in question is supported by buildroot, buildroot will also give a ready to use solution. And to be honest, quick likely a slightly easier to setup solution, as well. – Anders Jun 26 '15 at 11:23
  • @RahulJoshi take a look at these [slides](http://free-electrons.com/doc/training/buildroot/buildroot-slides.pdf). You'll get a very good understanding of BR after that. – yegorich Jun 28 '15 at 16:36

2 Answers2

2

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.

Community
  • 1
  • 1
user543
  • 61
  • 3
  • For, at least, quite of few of the boards that buildroot supports, there's a `readme.txt` file under `boards/` that gives instructions on how to build and deploy the generated file system, kernel and u-boot images. – Anders Jun 26 '15 at 08:54
  • Thanks for the response, – Rahul Joshi Jun 26 '15 at 09:01
  • Thanks for the response, I am currently using R-pi2 for playing around. I build as is configured by the buildroot for R-Pi2. then make small variations... just to understand. Now I am trying to write on SD card. once I am able to do this. I would need to understand how to send the compiled application to the target remotely ( as I will be using R-Pi2 in headless mode). and command it to run. Once again thanks to all for the helping hand. – Rahul Joshi Jun 26 '15 at 09:07
  • @RahulJoshi, well if you want to send applications etc remotely to the RPI2, I'd suggest to make sure that you enable either dropbear or openssh in the buildroot configuration. That'll let you ssh into the RPi2. – Anders Jun 26 '15 at 11:24
  • Thanks Anders , Currently I am trying to compile the hello,c using tool chain compiled by buildroot. – Rahul Joshi Jun 27 '15 at 02:22
0

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.

  • Well, as you used `gcc` you actually got your host compiler. The crosscompiler is named something like `arm-buildroot-linux-uclibcgnueabi-gcc`. Using buildroot, you often had a symbolic link named `arm-linux-gcc`. ) Names taken from memory, so they might have a similar name and not exactly what I wrote). – Anders Jun 27 '15 at 11:48