4

I need to incorporate the Busybox package in an embedded Linux system.

For this, I wonder if it is possible to compile the Linux kernel along with the Busybox incorporated in the build process so that it is included in initramfs and loaded in RAM in the boot process.

I have been looking for info about this but I don't think I found the answer.

Jorge
  • 1,350
  • 2
  • 10
  • 19
  • Can you share with us the reason you can't just do a build of each one like normal people do? – Zan Lynx Jun 23 '14 at 09:15
  • Note that if you are building a kernel with a built-in initramfs that includes busybox tools you need to cross-compile the kernel, then the busybox, then the kernel that includes the busybox. – Zan Lynx Jun 23 '14 at 09:17
  • Unless the kernel headers from an unbuilt kernel are enough to cross-compile the busybox with. Not sure I ever tried. – Zan Lynx Jun 23 '14 at 09:17
  • Actually it seems I dont quite understand some of the basics here. I can compile a linux kernel with its specific configuration parameters (using make ARCH=... .. menuconfig, etc) and with this I create an Image. What I would like to know is if I can create an image that already incorporates the busybox in this kernel (which is a 2.6) – Jorge Jun 23 '14 at 09:33
  • 1
    You want to make a Linux kernel that includes busybox in its initramfs? So that when it boots it has busybox already in RAM? yes you can do that. – Zan Lynx Jun 23 '14 at 14:24
  • Please edit your question to make it clear what you want. I find your question to be a little vague. – Zan Lynx Jun 23 '14 at 14:25
  • Ok, done. Thank you. Exactly, that is what I want. So if it is possible, any hints on how I should proceed? Thanks in advance – Jorge Jun 24 '14 at 07:01

2 Answers2

5

Another option is the Yocto project, which uses bitbake and the OpenEmbedded metadata. It is well-documented and very flexible, but has a fairly steep learning curve.

Robert Calhoun
  • 4,823
  • 1
  • 38
  • 34
4

You can use Buildroot, that's a buildsystem that downloads the linux kernel, manages rootfs, integrates BusyBox, and much much more. From my opinion it's the easiest way to get an embedded Linux/BusyBox system.

Here's their homepage: http://buildroot.uclibc.org/

user3085931
  • 1,757
  • 4
  • 29
  • 55
  • 2
    Also read the comments to this answer: http://stackoverflow.com/questions/17885451/how-to-rebuild-rootfs-in-buildroot/17892471#17892471 – sawdust Jun 24 '14 at 07:40
  • 1
    Actually an article about how to build initramfs-images with `Buildroot` would be more helpful, since selecting `BusyBox` is just a single-choice in the `Buildroot`. – user3085931 Jun 24 '14 at 07:47
  • Thank you! And do you think it would be posible to add a JRE in the build process? (this way I would have a ready-to-use embedded system) – Jorge Jun 24 '14 at 07:52
  • I never used Java on embedded devices, so I'm sorry that I can't help you with this question. But I guess this shouldn't be a big deal to integrate. – user3085931 Jun 24 '14 at 07:58
  • @Jorge if you figured out how to integrate Java, I would appreciate if you would tell the steps you did. – user3085931 Jun 25 '14 at 08:51
  • Sure, but I am still finding out how to do it, because the busybox lets you integrate a jvm but I don't think that is enough for running java (you need jre as well) – Jorge Jun 25 '14 at 09:09