[Toybox] Status update

Georgi Chorbadzhiyski gf at unixsol.org
Wed Mar 14 06:37:01 PDT 2012


Rob, I know there is quite a lot of messages posted on the ML in the last
two weeks and catching up will be hard. This is message tries to summarize
what was going on on my side. I think you can ignore the old pile.

I have reordered and updated my patches, so that they can be easily reviewed.
Commit IDs are from git://github.com/gfto/toybox.git

Most of the patches (except one) were posted to toybox ML, so I'll not post
spam with them. I think we can ignore Android and OS X branches for now.

DEV branch - https://github.com/gfto/toybox/compare/dev
=======================================================

> 554d0c9 toys.h: Include strings.h. This is needed for strcasecmp, strncasecmp, index and rindex.
> 46168ba mdev: Do not use strndupa().
> 02f1187 toys/mke2fs: Remove unused variables.
> 0124b43 Use fprintf(stderr, ...) instead of fdprintf(2, ...).

  Cleanups, should be easy to apply.

> 4585b49 lib: Add void *cb_param param to dirtree_read().
> 2fb4f45 lib: Add dirtree_for_each().

  New functionality that is used by chmod, chgrp, chown and sysctl.

> 55c6997 Add new toy - chmod.
> 836289e Add new toy - chgrp.
> 7b02046 Add new toy - chown.
> 2c89be1 Add new toy - sysctl

  New toys. Some of them have unimplemented options marked as TODO.

> c491162 Add getdelim() and getline() portability functions.
> 98730b2 Add compat swapon(), swapoff() and sethostname() for Android.

 Compatibility functions needed for OS X and/or Android.

> c888d04 Add new toy - md5sum
> 35027c7 Add new toy - test
> 487c5a0 Add new toy - logger
> b4c4fe3 Add new toy - rm

 New toys.

> e137052 toys/sleep: Multiple fixes.

 *NEW* (not posted on the ML). This fixes segfault in sleep, also adds
 support for "s" suffix and support for multiple sleeps.

OSX branch - https://github.com/gfto/toybox/compare/dev...osx
=============================================================

This branch contains mostly hacks to get toybox to compile on OS X 10.6 with:
  make SED=gsed allyesconfig
  make SED=gsed

The branch is based on dev.

> 8290e6b OS X 10.6 ships with gcc 4.2.1 which do not support --gc-sections and --as-needed linker options.

  Hack, must be re-implemented .

> 4b224a5 Allow SED to be overwritten in configure.

  Although you plan to use toybox'es internal sed implementation, this patch
  I think can be merged.

> 3213abe lib/portability.h: Comment _POSIX_C_SOURCE and _XOPEN_SOURCE definitions.

  Unfortunately this turns out to be needed on OS X.

> 2501a51 Port some toys to OS X.

  From this patch something useful can come up. It plays with defines and makes
  reboot and netcat working.

> 2248cae Build some toys only on Linux.

  Hacks that make stubs out of getmntlist(), dmesg, free, insmod, mdev, rmmod,
  swapoff, swapon and uptime.
  - mdev - pure Linux utility.
  - getmntlist(), dmesg, free and uptime can be fixed for OS X.
  - insmod, rmmod, swapon and swapoff can't /no modules on OS X, swap is automatically
    handled/.

> 5672505 Use fprintf(stderr, ...) instead of dprintf().

  - This probably breaks yesno() and patch toy. Needs fdprintf() implementation.

ANDROID branch - https://github.com/gfto/toybox/compare/dev...android
=====================================================================

This branch contains hacks that are need to get toybox allyesconfig compiled
with android ndk from http://developer.android.com/sdk/ndk/index.html

The branch is based on dev.

> 9c82c4a configure: Hardcode android cross compilation parameters.

 Ugly hack to that hard codes android settings in configure.

> 28989de scripts/make: Do not add -lutil to linker flags.
> 31a9270 toys.h: Add __ANDROID__ checks where needed.
> 3f8c014 lib/portability.h: In bionic there is no statvfs replace it with statfs.
> d515662 lib/lib.c: struct winsize is not defined in bionic.

  This probably needs proper fix.

> c469d1e lib/getmountlist: setmntent(), getmntent_r() and stpcpy() are not defined in bionic.

  The new function compiles but I don't know if it is working.

> fe1863e forkpty(), and getutxent() are unsupported in bionic.

  forkpty() can be added as compat function. getutxent() probably not.

> b37b60e Use fprintf(stderr, ...) instead of dprintf().

  Same patch exists in OS X branch.

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/



More information about the Toybox mailing list