WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Best way to compile latest Busybox for PI?  (Read 2200 times)

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Best way to compile latest Busybox for PI?
« on: September 12, 2018, 01:15:52 AM »
What is the best way to compile BusyBox for picore?  By that I mean for my own use in my own subdirectory, rather than replacing what comes with picore controlling the system.

IOW, I like to live on the bleeding edge as a user, with the latest stable Busybox, but admittedly, when it comes to compile time, I'm a "cookbook" compiler type.  I don't fully understand the importance of all the compile-time switches.

I'll typically use a recent Knoppix on a much faster box than a pi to compile stuff, but lately I've successfully compiled binaries that don't work due to my errors in hardware cross-compilation switches.  I'll do the work, but admit I'm kinda dumb when it comes to hardware details for the pi - and picore in particular.

So what does anyone prefer for their busybox compile time options in regards to working well with picore?

This is from a user-standpoint with a custom busybox in it's own directory, and not a system-wide busybox replacement standpoint -- although maybe that would be fun to try knowing full well it might make a stable picore fall over ....


« Last Edit: September 12, 2018, 01:36:43 AM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: Best way to compile latest Busybox for PI?
« Reply #1 on: September 12, 2018, 04:18:10 AM »
Not sure, but Busybox home page should have a section, on how to compile the source.
...Hope you have checked it !  :)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Best way to compile latest Busybox for PI?
« Reply #2 on: September 12, 2018, 02:19:47 PM »
Isn't that the reason cross-compiling is hairy? Incompatibilities?
Download a copy and keep it handy: Core book ;)

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1063
Re: Best way to compile latest Busybox for PI?
« Reply #3 on: September 12, 2018, 04:55:22 PM »
Native. Ompiling is not a problem, just follow the instructions.

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: Best way to compile latest Busybox for PI?
« Reply #4 on: September 12, 2018, 05:49:17 PM »
Some brave-heart may have posted a busybox cross-compiling how-to for piCore. Ggling may help ! :)

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Best way to compile latest Busybox for PI?
« Reply #5 on: September 12, 2018, 08:13:36 PM »
Duh don't know how I missed the cross compile info!  Right before my eyes.  I guess I like making 2+2 more complex than necessary.

I just need to build the cross-compiler first, then run the make defconfig from that.

Then according to something similar to their own example (gotta watch that trailing dash!):
make CROSS_COMPILE=armv4tl-

I'll be changing armv4tl to something else.  Looks like fun.  Never cross compiled before...

Or maybe I'll chicken out and just do it on a pi-zero w just for fun.  Hopefully all the necesary build / compiler stuff needed to build busybox is in the pi 9.x repository....

I'll let you all know how it turns out...
« Last Edit: September 12, 2018, 08:19:04 PM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Best way to compile latest Busybox for PI?
« Reply #6 on: September 12, 2018, 09:11:00 PM »
PiCore rocks!

Well that was easy.  Updated system time manually.  Just grabbed compile.tc, latest busybox source code, unarchived, make defconfig, make.  Done.  A few errors ignored at the end but the binary got built!

Made symlinks into my own subdirectory for research on the new bbox, change path, and tada!

The only thing wrong is that I segfault on the ED editor.  Not a super big deal, but prevents me from getting my internal Ken on.  (He never wanted to see the state of the file while he was editing it.)

AWESOME - thanks Bmarkus and others for picore. (and all the 'cores).  They rock my world.
That's a UNIX book! - cool  -- Garth