Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/docs/new-applet-HOWTO.txt

    r1765 r2725  
    99Thomas Lundquist - Trying to keep it updated.
    1010
    11 When doing this you should consider using the latest svn trunk.
    12 This is a good thing if you plan to getting it commited into mainline.
     11When doing this you should consider using the latest git HEAD.
     12This is a good thing if you plan to getting it committed into mainline.
    1313
    1414Initial Write
     
    2020And be sure to put it in <applet>.c. Usage does not have to be taken care of by
    2121your applet.
    22 Make sure to #include "libbb.h" as the first include file in your applet so
    23 the bb_config.h and appropriate platform specific files are included properly.
     22Make sure to #include "libbb.h" as the first include file in your applet.
    2423
    2524For a new applet mu, here is the code that would go in mu.c:
     
    3736 * Copyright (C) [YEAR] by [YOUR NAME] <YOUR EMAIL>
    3837 *
    39  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
     38 * Licensed under GPLv2, see file LICENSE in this source tree.
    4039 */
    4140
     
    4342#include "other.h"
    4443
    45 int mu_main(int argc, char **argv);
     44int mu_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
    4645int mu_main(int argc, char **argv)
    4746{
    4847    int fd;
     48    ssize_t n;
    4949    char mu;
    5050
     
    9999
    100100Add <function_name>.o in the right alphabetically sorted place
    101 in libbb/Kbuild. You should look at the conditional part of
    102 libbb/Kbuild aswell.
     101in libbb/Kbuild.src. You should look at the conditional part of
     102libbb/Kbuild.src as well.
    103103
    104104You should also try to find a suitable place in include/libbb.h for
     
    106106ifdefs to include or not.
    107107
    108 You can look at libbb/Config.in and try to find out if the function is
    109 tuneable and add it there if it is.
     108You can look at libbb/Config.src and try to find out if the function is
     109tunable and add it there if it is.
    110110
    111111
     
    118118sorted alphabetically.
    119119
    120 Add the applet to Kbuild in the chosen directory:
     120Add the applet to Kbuild.src in the chosen directory:
    121121
    122122lib-$(CONFIG_MU)               += mu.o
    123123
    124 Add the applet to Config.in in the chosen directory:
     124Add the applet to Config.src in the chosen directory:
    125125
    126 config CONFIG_MU
     126config MU
    127127    bool "MU"
    128128    default n
     
    134134---------------
    135135
    136 Next, add usage information for you applet to include/usage.h.
     136Next, add usage information for you applet to include/usage.src.h.
    137137This should look like the following:
    138138
     
    149149line (-[abcde]) and a detailed description of each flag should go in the
    150150mu_full_usage section, one flag per line. (Numerous examples of this
    151 currently exist in usage.h.)
     151currently exist in usage.src.h.)
    152152
    153153
     
    155155------------
    156156
    157 Next, add an entry to include/applets.h.  Be *sure* to keep the list
     157Next, add an entry to include/applets.src.h.  Be *sure* to keep the list
    158158in alphabetical order, or else it will break the binary-search lookup
    159159algorithm in busybox.c and the Gods of BusyBox smite you. Yea, verily:
    160160
    161 Be sure to read the top of applets.h before adding your applet.
     161Be sure to read the top of applets.src.h before adding your applet.
    162162
    163163    /* all programs above here are alphabetically "less than" 'mu' */
    164     USE_MU(APPLET(mu, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
     164    IF_MU(APPLET(mu, _BB_DIR_USR_BIN, _BB_SUID_DROP))
    165165    /* all programs below here are alphabetically "greater than" 'mu' */
    166166
     
    169169----------------------
    170170
    171 Then create a diff by adding the new files with svn (remember your libbb files)
    172     svn add <where you put it>/mu.c
     171Then create a diff by adding the new files to git (remember your libbb files)
     172    git add <where you put it>/mu.c
    173173eventually also:
    174     svn add libbb/function.c
     174    git add libbb/function.c
    175175then
    176     svn diff
     176    git commit
     177    git format-patch HEAD^
    177178and send it to the mailing list:
    178179    busybox@busybox.net
Note: See TracChangeset for help on using the changeset viewer.