WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Busybox config file  (Read 6248 times)

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Busybox config file
« on: April 18, 2015, 11:44:17 AM »
Good afternoon everyone!  I need to recompile busybox to include one or more applets than what comes with TC by default.  Is there anywhere that I can get the config file (and perhaps the compile script) used for busybox?

Thanks,
Dave

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14788

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Busybox config file
« Reply #2 on: April 18, 2015, 11:55:13 AM »
Click the download link at the top of this screen.
Under release files you will find the src.

What exactly do you need, You may find it in an extension.
Ex: busybox-httpd.tcz

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: Busybox config file
« Reply #3 on: April 18, 2015, 12:46:30 PM »
Awesome!  Thanks guys!

Dave

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: Busybox config file
« Reply #4 on: April 18, 2015, 01:21:42 PM »
There appears to be multiple config files for that software with the compile script calling both of them.  Why does the binary get compiled twice?  Also, are those the patches to upgrade to version 1.23.2 from 1.23.1 (the names correspond with patches from the bb website)?  Lastly, are the compile flags the same for 64bit?  I tried looking under the appropriate directory structure for the x64 build of bb, but it doesn't exist.

Thanks,
Dave
« Last Edit: April 18, 2015, 01:23:29 PM by wysiwyg »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14788
Re: Busybox config file
« Reply #5 on: April 19, 2015, 06:20:52 AM »
The binary is split into applets that require suid (linked to busybox.suid) and those that do not (linked to busybox) - hence two config files.

The patched source has two tinycore custom patches appled and yes, the other patches add up to 1.23.2, which wasn't available at the time.

For x86_64 you need:
Code: [Select]
$ make CC="gcc -mtune=generic -Os -pipe" CXX="g++ -mtune=generic -Os -pipe -fno-exceptions -fno-rtti"

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: Busybox config file
« Reply #6 on: April 20, 2015, 09:34:43 AM »
Thanks Juanito!  I'll add it in the compile script I wrote!

Thanks,
Dave

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: Busybox config file
« Reply #7 on: April 30, 2015, 07:34:58 PM »
Good evening everyone!  As stated, I'm attempting to recompile BB to add in extra functionality, but I could never get the system to configure correctly during boot (modules were not loading correctly) when I compiled my own version.  By just copying back the TC versions of the two binaries, the system works correctly.  My next step was to recompile using the OEM .config files for BB.  This too produced the same results as if I were using my custom .config files.  I'm not quite sure what could be going wrong.  I did notice that compiling with the OEM .config files, the binary sizes don't match:

-rwxr-xr-x 1 root root 540824 Apr 30 19:16 busybox
-rwsr-xr-x 1 root root  69360 Apr 30 19:16 busybox.suid
-rwsr-xr-x 1 root root  69352 Apr 18 18:44 busybox.suid.tc
-rwxr-xr-x 1 root root 534480 Apr 18 18:44 busybox.tc

I'm using the compile flags that were provided along with the following two commands to compile:

make
make CONFIG_PREFIX=/tmp/package install

I'm using the source code from the official busybox website (v1.23.1) without the two TC custom patches.  Those patches wouldn't be stopping this from working correctly right? Any thoughts on what's happening here?

Thanks,
Dave

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14788
Re: Busybox config file
« Reply #8 on: May 01, 2015, 01:44:43 AM »
One of the custom patches concerns depmod - you'll need this one for modules to load correctly

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: Busybox config file
« Reply #9 on: May 01, 2015, 08:31:05 AM »
Ahhhhh, I will apply those patches and report back!  Thanks Juanito!

Dave

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: Busybox config file
« Reply #10 on: May 01, 2015, 09:33:01 AM »
Good morning everyone!  I am attempting to apply those two patches, but it doesn't seem to work.  I'm trying:

patch -p1 [-N|-R] < busybox_1.21.1_depmod.patch

but I keep getting a:

hunk #1 FAILED on 206

error message.  I'm attempting to apply this patch to 1.23.1.  Will this not work on that version?  I see there is a  busybox-1.23.1-patched.tar.bz2 file.  As the name suggests, is this a patched 1.21.1 up to 1.23.1 while applying the two custom patches as well?

Thanks,
Dave

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: Busybox config file
« Reply #11 on: May 01, 2015, 09:37:40 AM »
Just as a side question, is there an advantage to compiling the files as applets instead of symlinks?

Thanks,
Dave

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14788
Re: Busybox config file
« Reply #12 on: May 01, 2015, 09:38:06 AM »
yes, the patched source has the two custom patches applied.

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: Busybox config file
« Reply #13 on: May 02, 2015, 06:22:24 PM »
Thanks Juanito, I ended up getting things going not too long ago using the patched version.

Thanks,
Dave